| Crates.io | verify-beacon |
| lib.rs | verify-beacon |
| version | 0.1.2 |
| created_at | 2024-03-22 00:02:09.006074+00 |
| updated_at | 2024-03-22 00:02:09.006074+00 |
| description | Computes and verifies an iterated SHA-256 randomness beacon using hardware acceleration if available. |
| homepage | |
| repository | |
| max_upload_size | |
| id | 1182164 |
| size | 152,376 |
This is for computing and verifying the randomness beacon used in the Powers of Tau and Sapling MPC ceremonies, using hardware acceleration if available.
The beacon is computed using 2^42 iterations of SHA-256.
The files powersoftau.txt and sapling.txt each contain 1025 hashes (1024
sequential pairs), allowing the beacon to be verified more quickly in parallel.
Two hardware-accelerated implementations are available, along with a non-accelerated fallback. Currently, Intel SHA extensions (e.g. AMD Ryzen) and ARMv8 cryptographic extensions are supported.
Important: binaries must be compiled with RUSTFLAGS='-C target-cpu=native' to enable hardware-acceleration.
cargo run --release --bin compute > pairs.txtcargo run --release --bin verify < pairs.txtThe time taken is around 130 cycles per iteration on AMD Ryzen, which is ~1h45m to verify on on 24 cores running at 3.8GHz.