{"id":19493483,"url":"https://github.com/dark64/powersoftau","last_synced_at":"2026-06-15T11:32:12.407Z","repository":{"id":126309352,"uuid":"603161260","full_name":"dark64/powersoftau","owner":"dark64","description":"Powers of Tau ceremony utilities for a general setup for all circuits up to a given size. Extended to support Ethereum's BN256 curve.","archived":false,"fork":false,"pushed_at":"2023-02-17T19:49:28.000Z","size":47,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T20:22:58.599Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dark64.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-17T18:42:13.000Z","updated_at":"2024-12-15T18:23:57.000Z","dependencies_parsed_at":"2023-06-16T06:00:16.247Z","dependency_job_id":null,"html_url":"https://github.com/dark64/powersoftau","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dark64/powersoftau","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dark64%2Fpowersoftau","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dark64%2Fpowersoftau/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dark64%2Fpowersoftau/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dark64%2Fpowersoftau/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dark64","download_url":"https://codeload.github.com/dark64/powersoftau/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dark64%2Fpowersoftau/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34358731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-10T21:26:10.406Z","updated_at":"2026-06-15T11:32:12.392Z","avatar_url":"https://github.com/dark64.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Powers of Tau\n\n## Original story\n\nThis is a [multi-party computation](https://en.wikipedia.org/wiki/Secure_multi-party_computation) (MPC) ceremony which constructs partial zk-SNARK parameters for _all_ circuits up to a depth of 2\u003csup\u003e21\u003c/sup\u003e. 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.\n\nThis protocol is described in this [paper](https://eprint.iacr.org/2017/1050). It produces parameters for an adaptation of [Jens Groth's 2016 pairing-based proving system](https://eprint.iacr.org/2016/260) using the [BLS12-381](https://github.com/ebfull/pairing/tree/master/src/bls12_381) elliptic curve construction. The security proof relies on a randomness beacon being applied at the end of the ceremony.\n\n## Contributions\n\nExtended 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.\n\n---\n## To run the ceremony on your machine:\n\n1. Preparation:\n\n```bash\n$ rustup update # tested on rustup 1.24.3 and rustc 1.55.0\n$ cargo build --release\n```\n\n2. Put the `challenge` and `response` file from the previous ceremony to root directory.\n3. To generate `new_challenge` run:\n\n```bash\n$ cargo run --release --bin verify_transform_constrained challenge response new_challenge 21 256\n```\n\n4. Run ceremony:\n\n```bash\n$ cargo run --release --bin compute_constrained new_challenge new_response 21 256\n```\n\nPut your hash from output response to private gist (example: https://gist.github.com/skywinder/c35ab03c66c6b200b33ea2f388a6df89)\n\n5. Reboot your machine to clean up toxic waste.\n\n6. Save the newly generated `response` file and give it to the next participant.\n\n## Recommendations from original ceremony\n\nParticipants 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:\n\n* putting the machine in a Faraday cage\n* rebooting the machine afterwards\n* rebooting the machine afterwards and disconnecting RAM\n* destroying the machine afterwards\n* running the software on secure hardware\n* not connecting the hardware to any networks\n* using multiple machines and randomly picking the result of one of them to use\n* using different code than what we have provided\n* using a secure operating system\n* using an operating system that nobody would expect you to use (Rust can compile to Mac OS X and Windows)\n* using an unusual Rust toolchain or [alternate rust compiler](https://github.com/thepowersgang/mrustc)\n* lots of other ideas we can't think of\n\nIt 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.\n\n## Perpetual Powers of Tau\n\nIn this section we are going to use a response from [Perpetual Powers of Tau](https://github.com/privacy-scaling-explorations/perpetualpowersoftau) to prepare for a circuit-specific ceremony (also known as phase 2).\n\n### 1. Pick a response\n\nAt the time of writing this, the last response was https://github.com/privacy-scaling-explorations/perpetualpowersoftau/tree/master/0074_daniel_response\n\n### 2. Reduce powers\n\nPerpetual Powers of Tau supports circuits of up to `2^28` (260+ million) constraints. We can reduce the parameters to the power of our choice. In this example, we will reduce the power to `21` (up to 2M constraints).\n\n```bash\n$ cargo run --release --bin reduce_powers challenge_0075 challenge_reduced 28 21 256\n```\n\n### 3. Apply a random beacon\n\nTo finalize the setup, we apply a random beacon to the final challenge. In this example, we are going to use an ethereum block height `16627102` with a corresponding hash `0x171147a580764b8445aa1deaeedf8a81436ca1c9c447612e198cb41376aec3a6`. The process and code for calculating the beacon value should be announced before the block appears.\n\n```bash\n$ cargo run --release --bin beacon_constrained challenge_reduced response_final 21 256 171147a580764b8445aa1deaeedf8a81436ca1c9c447612e198cb41376aec3a6 10\n```\n\n### 4. Prepare phase 2\n\n```bash\n$ cargo run --release --bin prepare_phase2 response_final 21 256\n```\n\nThis command will generate parameters for various circuit depths which we can use in the [phase 2](https://zokrates.github.io/toolbox/trusted_setup.html).\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\nOriginally forked from [phase2-bn254](https://github.com/kobigurk/phase2-bn254)\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdark64%2Fpowersoftau","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdark64%2Fpowersoftau","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdark64%2Fpowersoftau/lists"}