PlonkUp
This is a pure Rust implementation of the PlonkUp proving system over BLS12-381. More details on this proving system can be found in this paper.
This library contains a modularized implementation of KZG10 as the default polynomial commitment scheme.
DISCLAIMER: This library is currently unstable and still needs to go through an exhaustive security analysis. Use at your own risk.
Usage
use *;
use OsRng;
// Implement a circuit that checks:
// 1) a + b = c where C is a PI
// 2) a <= 2^6
// 3) b <= 2^5
// 4) a * b = d where D is a PI
// 5) JubJub::GENERATOR * e(JubJubScalar) = f where F is a Public Input
// Now let's use the Circuit we've just implemented!
let pp = setup.unwrap;
// Initialize the circuit
let mut circuit = default;
// Compile/preproces the circuit
let = circuit.compile.unwrap;
// Prover POV
let proof = ;
// Verifier POV
let public_inputs: = vec!;
verify.unwrap;
Performance
Benchmarks taken on Apple M1
For a circuit-size of 2^16 constraints/gates:
- Proving time:
17.392s - Verification time:
10.475ms. (This time will not vary depending on the circuit-size.)
For more results, please run cargo bench to get a full report of benchmarks in respect of constraint numbers.
Acknowledgements
- Reference implementation AztecProtocol/Barretenberg
- FFT Module and KZG10 Module were taken and modified from zexe/zcash and scipr-lab, respectively.
Licensing
This code is licensed under Mozilla Public License Version 2.0 (MPL-2.0). Please see LICENSE for further info.
About
Implementation designed by the dusk team.
Contributing
- If you want to contribute to this repository/project please, check CONTRIBUTING.md
- If you want to report a bug or request a new feature addition, please open an issue on this repository.