vrf-rs
vrf-rs is an open source implementation of Verifiable Random Functions (VRFs) written in Rust.
DISCLAIMER: This is experimental software. Be careful!
The library can be built using cargo and the examples can be executed with:
Elliptic Curve VRF
This module uses the OpenSSL library to offer Elliptic Curve Verifiable Random Function (VRF) functionality.
It follows the algorithms described in:
Currently the supported cipher suites are:
P256_SHA256_TAI: the aforementioned algorithms withSHA256and thesecp256r1curve (akaNIST P-256).K163_SHA256_TAI: the aforementioned algorithms withSHA256and thesect163k1curve (akaNIST K-163).SECP256K1_SHA256_TAI: the aforementioned algorithms withSHA256and thesecp256k1curve.
Example
Create and verify a VRF proof by using the cipher suite SECP256K1_SHA256_TAI:
use ;
A complete example can be found in examples/basic.rs. It can be executed with:
Adding unsupported cipher suites
This library defines a VRF trait which can be extended in order to use different curves and algorithms.
License
vrf-rs is published under the MIT license.