Rust implementation of the improved batched-threshold encryption scheme introduced in ePrint:2024/1516. For virtually all applications, this implementation should be preferred over the original scheme as it does not suffer from a per epoch setup and has a much simpler initial setup. See the paper for a detailed comparison.
Use cargo bench
to benchmark encrypt
, partial_decrypt
and decrypt_all
.
Use cargo run --example endtoend
to check correctness of the implementation.
WARNING: This is an academic proof-of-concept prototype, and in particular has not received careful code review. This implementation is NOT ready for production use.
- arkworks project for finite field and elliptic curve arithmetic.
- merlin library for implementing the Fiat-Shamir transform.
src/dealer
: Contains an implementation of thesetup
methods executed by a trusted dealer for the batched threshold encryption scheme.src/encryption
: Contains an implementation of theencrypt
method for the batched threshold encryption scheme.src/decryption
: Contains an implementation of:partial_decrypt
- computes the message sent by each member of the committee.decrypt_all
- gathers partial decryptions and recovers all messages from the batch of ciphertexts. This uses FK20 to compute all KZG opening proofs in quasi-linear time.
This library is released under the MIT License.