vrf-rs
vrf-rs is an open source implementation of Verifiable Random Functions (VRFs) written in Rust.
DISCLAIMER: This is experimental software. Be careful!
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 thesecp256r1(akaNIST P-256) curve.K163_SHA256_TAI: the aforementioned algorithms withSHA256and thesect163k1(akaNIST K-163) curve.SECP256K1_SHA256_TAI: the aforementioned algorithms withSHA256and thesecp256k1curve.
Example
Create and verify a VRF proof by using the cipher suite SECP256K1_SHA256_TAI:
use ;
use VRF;
A complete example can be found in examples/basic.rs
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 GNU General Public License v3.0.