lattice-commitments

Crates.iolattice-commitments
lib.rslattice-commitments
version0.0.1
sourcesrc
created_at2024-10-19 00:37:53.409137
updated_at2024-10-19 00:57:09.735843
descriptionStructured lattice commitments from Baum16.
homepagehttps://github.com/chancehudson/lattice-commitments
repositoryhttps://github.com/chancehudson/lattice-commitments.git
max_upload_size
id1414995
size48,138
Chance (chancehudson)

documentation

README

lattice-commitments Build Docs Version

Structured lattice commitments based on Baum et al.

Usage

Clone the repo and run cargo run.

Change the configuration variables in main.rs to adjust the base field and polynomial ring degree.

Example output

Base field cardinality: 2013265921 (baby bear 32 bit)
Polynomial ring: ℤ[X]/<X^1024 + 1>

Committing to 1 polynomials, each containing 1024 coefficients:
1124335506,149818619,1601233164,205230700,1475683794,659969253,282573766,1962836835,893421200,512127742,185294682,780911461,82017087,1974806903,1904974401,1567299238,333737732,433543762,1300045461,1587965164,52563316,254413285,194076911,358654244,178023259...

Opening commitment with secret vector (3 polynomials):
0,0,0,1,1,1,0,1,1,0,1,0,0,1,0,0,0,1,1,0,1,0,1,0,0,1,0,1,0,0,0,1,1,1,0,1,0,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,1,1,1,1,0,1,0,0,1,1,1,1,0,0,0,0,0,0,1,0,0,0,1,1,1,1,1,0,1,1,0,1,0,0,0,1,0,1,0,1,1,0,1,1,0,1,0,1,0,0,1,0,1,1,1,0,1,1,1,0,0,1,0,1,1,1,0,1,...

Commitment opening is valid!

Commitment size: 8192 bytes
Public parameters size: 24576 bytes
Secret size: 3 bytes
Commit count: 24

cargo fmt