Versions in this module Expand all Collapse all v1 v1.10.17 Oct 18, 2021 Changes in this version + type EncryptedVRFKeyExport struct + PublicKey secp256k1.PublicKey + VRFKey gethKeyStruct + type KeyV2 struct + PublicKey secp256k1.PublicKey + func FromEncryptedJSON(keyJSON []byte, password string) (KeyV2, error) + func MustNewV2XXXTestingOnly(k *big.Int) KeyV2 + func NewV2() (KeyV2, error) + func (key KeyV2) GenerateProof(seed *big.Int) (Proof, error) + func (key KeyV2) GenerateProofWithNonce(seed, nonce *big.Int) (Proof, error) + func (key KeyV2) GoString() string + func (key KeyV2) ID() string + func (key KeyV2) Raw() Raw + func (key KeyV2) String() string + func (key KeyV2) ToEncryptedJSON(password string, scryptParams utils.ScryptParams) (export []byte, err error) type PrivateKey + func (k *PrivateKey) GoString() string + func (k PrivateKey) ToV2() KeyV2 + type Raw []byte + func (raw Raw) GoString() string + func (raw Raw) Key() KeyV2 + func (raw Raw) String() string v1.10.16 Oct 18, 2021 Changes in this version + var ErrCGammaEqualsSHash = fmt.Errorf("pick a different nonce; c*gamma = s*hash, with this one") + var FieldSize = utils.HexToBig("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F") + var Generator = Secp256k1Curve.Point().Base() + var RandomOutputHashPrefix = common.BigToHash(bm.Three).Bytes() + var Secp256k1Curve = &secp256k1.Secp256k1 + func FieldHash(msg []byte) *big.Int + func HashToCurve(p kyber.Point, input *big.Int, ordinates func(x *big.Int)) (kyber.Point, error) + func HashUint256s(xs ...*big.Int) (*big.Int, error) + func IsCurveXOrdinate(x *big.Int) bool + func IsSquare(x *big.Int) bool + func ProjectiveECAdd(p, q kyber.Point) (x, y, z fieldElt) + func ScalarFromCurvePoints(hash, pk, gamma kyber.Point, uWitness [20]byte, v kyber.Point) *big.Int + func SquareRoot(x *big.Int) *big.Int + func YSquared(x *big.Int) *big.Int + type EncryptedVRFKey struct + CreatedAt time.Time + DeletedAt gorm.DeletedAt + PublicKey secp256k1.PublicKey + UpdatedAt time.Time + VRFKey gethKeyStruct + func (e *EncryptedVRFKey) JSON() ([]byte, error) + func (e *EncryptedVRFKey) WriteToDisk(path string) error + type PrivateKey struct + PublicKey secp256k1.PublicKey + func CreateKey() (key *PrivateKey) + func Decrypt(e *EncryptedVRFKey, auth string) (*PrivateKey, error) + func NewPrivateKeyXXXTestingOnly(k *big.Int) *PrivateKey + func (k *PrivateKey) Encrypt(auth string, scryptParams utils.ScryptParams) (*EncryptedVRFKey, error) + func (k *PrivateKey) GenerateProof(seed *big.Int) (Proof, error) + func (k *PrivateKey) GenerateProofWithNonce(seed, nonce *big.Int) (Proof, error) + func (k *PrivateKey) GoStringer() string + func (k *PrivateKey) String() string + type Proof struct + C *big.Int + Gamma kyber.Point + Output *big.Int + PublicKey kyber.Point + S *big.Int + Seed *big.Int + func (p *Proof) String() string + func (p *Proof) VerifyVRFProof() (bool, error) + func (p *Proof) WellFormed() bool