Documentation ¶
Overview ¶
* @author PalletOne core developers <dev@pallet.one> * @date 2018
* @author PalletOne core developers <dev@pallet.one> * @date 2018
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrKeyNotSupported = errors.New("only support ECC key") ErrEvalVRF = errors.New("failed to evaluate vrf") )
View Source
var ( ErrInvalidVRF = errors.New("invalid VRF proof") ErrInvalidHash = errors.New("hash function does not match elliptic curve bitsize") )
Functions ¶
func ProofToHash ¶
ProofToHash asserts that proof is correct for m and outputs index.
func VrfProof2Value ¶
func VrfProof2Value(curve *elliptic.CurveParams, proof []byte) []byte
Types ¶
type Ec ¶
type Ec struct { }
func (*Ec) VrfProve ¶
Vrf returns the verifiable random function evaluated m and a NIZK proof func VrfProve(pri *ecdsa.PrivateKey, msg []byte) (vrfValue, vrfProof []byte, err error) {
Click to show internal directories.
Click to hide internal directories.