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 withSHA256
and thesecp256r1
curve (akaNIST P-256
).K163_SHA256_TAI
: the aforementioned algorithms withSHA256
and thesect163k1
curve (akaNIST K-163
).SECP256K1_SHA256_TAI
: the aforementioned algorithms withSHA256
and thesecp256k1
curve.
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 MIT license.