phase2-bn254/powersoftau
2020-01-24 13:59:12 +08:00
..
src attach smalltest feature directly to REQUIRED_POWER constant 2020-01-24 13:59:12 +08:00
.gitignore add generated files to .gitignore 2020-01-08 19:46:33 +07:00
Cargo.lock Accept filenames as command line arguments 2020-01-08 19:46:34 +07:00
Cargo.toml adds small test parameters, generalizes repr_to_big 2020-01-23 16:42:21 +02:00
COPYRIGHT Add 'powersoftau/' from commit '34b4d09b4ccc459d757a77c94b391a1f64f66f76' 2019-09-02 15:50:38 +03:00
LICENSE-APACHE Add 'powersoftau/' from commit '34b4d09b4ccc459d757a77c94b391a1f64f66f76' 2019-09-02 15:50:38 +03:00
LICENSE-MIT Add 'powersoftau/' from commit '34b4d09b4ccc459d757a77c94b391a1f64f66f76' 2019-09-02 15:50:38 +03:00
README.md Add 'powersoftau/' from commit '34b4d09b4ccc459d757a77c94b391a1f64f66f76' 2019-09-02 15:50:38 +03:00
test.sh attach smalltest feature directly to REQUIRED_POWER constant 2020-01-24 13:59:12 +08:00

Powers of Tau

Original story

This is a multi-party computation (MPC) ceremony which constructs partial zk-SNARK parameters for all circuits up to a depth of 221. It works by taking a step that is performed by all zk-SNARK MPCs and performing it in just one single ceremony. This makes individual zk-SNARK MPCs much cheaper and allows them to scale to practically unbounded numbers of participants.

This protocol is described in a forthcoming paper. It produces parameters for an adaptation of Jens Groth's 2016 pairing-based proving system using the BLS12-381 elliptic curve construction. The security proof relies on a randomness beacon being applied at the end of the ceremony.

Contributions

Extended to support Ethereum's BN256 curve and made it easier to change size of the ceremony. In addition proof generation process can be done in memory constrained environments now. Benchmark is around 1.3 Gb of memory and 3 hours for a 2^26 power of tau on BN256 curve on my personal laptop

Instructions

Instructions for a planned ceremony will be posted when everything is tested and finalized.


To run the ceremony on your laptop:

  1. Preparation:
rustup update # tested on rustup 1.17.0
cargo build
  1. Put response file from the previous ceremony to root directory.
  2. To generate new_challenge run:
cargo run --release --bin verify_transform_constrained # this will generate new_challenge from response file
  1. Backup old files and replace challenge file:
mv challenge challenge_old
mv response response_old
mv new_challenge challenge
  1. Run ceremony:
cargo run --release --bin compute_constrained # generate response file

Put your hash from output response to private gist (example: https://gist.github.com/skywinder/c35ab03c66c6b200b33ea2f388a6df89)

  1. Reboot laptop to clean up toxic waste.

  2. Save response file and give it to the next participant.

Recommendations from original ceremony

Participants of the ceremony sample some randomness, perform a computation, and then destroy the randomness. Only one participant needs to do this successfully to ensure the final parameters are secure. In order to see that this randomness is truly destroyed, participants may take various kinds of precautions:

  • putting the machine in a Faraday cage
  • destroying the machine afterwards
  • running the software on secure hardware
  • not connecting the hardware to any networks
  • using multiple machines and randomly picking the result of one of them to use
  • using different code than what we have provided
  • using a secure operating system
  • using an operating system that nobody would expect you to use (Rust can compile to Mac OS X and Windows)
  • using an unusual Rust toolchain or alternate rust compiler
  • lots of other ideas we can't think of

It is totally up to the participants. In general, participants should beware of side-channel attacks and assume that remnants of the randomness will be in RAM after the computation has finished.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.