Skip to content
RustCryptoPublic

About

Pure Rust implementation of Verifiable Random Functions

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

RustCrypto: Verifiable Random Functions (VRFs)

Dependency Status Project Chat

Pure Rust implementations of verifiable random functions (VRFs).

A VRF is the public-key analogue of a keyed hash. The secret key holder can compute a pseudorandom output for a given input and a proof that the output is correct. Anyone with the public key can use the proof to check the output against the input, much like verifying a digital signature. For a given key and input there is only one valid output. To someone with only the public key, the output for a fresh input looks random.

Crates

Crate crates.io Documentation Description
lav-vrf crates.io docs.rs Experimental lattice-based VRF

Use cases

A key transparency directory can use a VRF to turn email addresses into public directory indices, as in CONIKS. With an ordinary hash, a spammer could hash a list of likely addresses and look for matches in the log. With a VRF, the directory can publish the indices and give each user the proof for their own address separately. The user can then check their index offline. Keeping the proof out of the public log matters because anyone who has it can test guesses for the address.

Another use is committee selection in a consensus protocol. In Algorand, each validator uses its secret key and a public seed to check whether it was selected for a particular role in a round. A selected validator can attach the proof to its vote so that everyone else can verify its eligibility.

License

RustCrypto contributions are dual-licensed under the Apache License, Version 2.0 or the MIT license, at your option. The LaV reference code is covered by the BSD Zero Clause License.

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.

About

Pure Rust implementation of Verifiable Random Functions

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages