https://github.com/lovesh/cp-snark-bbs
Proof of concept of using Groth16 (LegoGroth16) with BBS+ using CP-SNARK construction
https://github.com/lovesh/cp-snark-bbs
Last synced: over 1 year ago
JSON representation
Proof of concept of using Groth16 (LegoGroth16) with BBS+ using CP-SNARK construction
- Host: GitHub
- URL: https://github.com/lovesh/cp-snark-bbs
- Owner: lovesh
- Created: 2021-12-06T15:43:39.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-04-28T08:33:24.000Z (about 4 years ago)
- Last Synced: 2025-01-30T21:20:00.795Z (over 1 year ago)
- Language: Rust
- Size: 15.6 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PoC of using LegoSNARK with BBS+
Using LegoGroth16, the cc-SNARK specified in the [LegoSNARK paper](https://eprint.iacr.org/2019/142), appendix H.5, to prove properties of messages signed in a BBS+ signature.
The cc-SNARK is [here](https://github.com/lovesh/legogro16/tree/comm-wit)
## Examples
Following tests demonstrate some potential use cases. Run the tests in release mode with `--nocapture` to see the time taken by proof generation and verification.
1. See test `bound_check_message` where a specific signed message is proven in some range, i.e. for public `min` and `max`, `min < message < max`. This will be useful in doing proof of age in a range.
2. See test `bound_check_messages_sum` where sum of specific signed messages is proven in some range, i.e. for public `min` and `max`, `min < sum < max`. This can be useful in proving that the sum of income sources is in a range.
3. See test `compare_messages_sum` where sum of certain signed messages from the 1st signature is proven less than the sum of certain signed messages from 2nd signature. This can be useful in proving sum of liabilities < sum of assets where liabilities and assets are signed under different signatures.