Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arnaucube/sigmabus-poc
Proof of concept implementation of Sigmabus https://eprint.iacr.org/2023/1406
https://github.com/arnaucube/sigmabus-poc
Last synced: about 10 hours ago
JSON representation
Proof of concept implementation of Sigmabus https://eprint.iacr.org/2023/1406
- Host: GitHub
- URL: https://github.com/arnaucube/sigmabus-poc
- Owner: arnaucube
- License: gpl-3.0
- Created: 2023-09-29T13:16:48.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-20T17:23:57.000Z (11 months ago)
- Last Synced: 2024-04-16T22:33:56.813Z (7 months ago)
- Language: Rust
- Size: 18.6 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sigmabus-poc
Proof of concept implementation of Sigmabus https://eprint.iacr.org/2023/1406, a cool idea by [George Kadianakis](https://twitter.com/asn_d6) and [Mary Maller](https://www.marymaller.com/) and [Andrija Novakovic](https://twitter.com/AndrijaNovakov6).> Experimental code, do not use in production.
This PoC implements [Sigmabus](https://eprint.iacr.org/2023/1406) to prove & verify that $X = x \cdot G \in \mathbb{G}$ for a public input $X \in \mathbb{G}$ and a private input $x \in \mathbb{F}_r$ ($\mathbb{G}$'s ScalarField), while the circuit is defined on $\mathbb{F}_r$ (note that $\mathbb{G}$ coordinates are on $\mathbb{F}_q$ ($\mathbb{G}$'s BaseField)).
Proving $X = x \cdot G$ with a 'traditional' approach in a zkSNARK circuit, would require non-native arithmetic for computing the scalar multiplication $x \cdot G \in \mathbb{G}$ over $\mathbb{F}_r$, which would take lot of constraints. The number of constraints in the circuit for this Sigmabus instantiation mainly depends on the constraints needed for 2 Poseidon hashes.
Let $\mathbb{G}$ be [BN254](https://hackmd.io/@jpw/bn254)'s $G1$, an example of usage would be:
```rust
// generate the trusted setup
let params = Sigmabus::::setup(&mut rng, &poseidon_config);// compute X = x * G
let x = Fr::rand(&mut rng);
let X = G1Projective::generator().mul(x);// generate Sigmabus proof for X==x*G
let mut transcript_p = PoseidonTranscript::::new(&poseidon_config);
let proof = Sigmabus::::prove(&mut rng, ¶ms, &mut transcript_p, x);// verify Sigmabus proof for X==x*G
let mut transcript_v = PoseidonTranscript::::new(&poseidon_config);
Sigmabus::::verify(¶ms, &mut transcript_v, proof, X).unwrap();
```