Documentation ¶
Overview ¶
Copyright (c) 2018 The MATRIX Authors Distributed under the MIT software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php
Index ¶
- Variables
- func Evaluate(pri *ecdsa.PrivateKey, h hash.Hash, m []byte) (index [32]byte, proof []byte)
- func ProofToHash(pk *ecdsa.PublicKey, h hash.Hash, m, proof []byte) (index [32]byte, err error)
- func Verify(pub *ecdsa.PublicKey, msg, vrf, nizk []byte) (bool, error)
- func Vrf(pri *ecdsa.PrivateKey, msg []byte) (vrf, nizk []byte, err error)
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.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.