Documentation ¶
Index ¶
- Variables
- func Evaluate(k *ecdsa.PrivateKey, m []byte) (index [32]byte, proof []byte)
- func H1(m []byte) (x, y *big.Int)
- func H2(m []byte) *big.Int
- func ProofToHash(pk *ecdsa.PublicKey, m, proof []byte) (index [32]byte, err error)
- func Prove(secret *big.Int, params *GeneralBulletSetup) (bulletproofs.ProofBPRP, error)
- type GeneralBulletSetup
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrPointNotOnCurve occurs when a public key is not on the curve. ErrPointNotOnCurve = errors.New("point is not on the P256 curve") // ErrWrongKeyType occurs when a key is not an ECDSA key. ErrWrongKeyType = errors.New("not an ECDSA key") // ErrNoPEMFound occurs when attempting to parse a non PEM data structure. ErrNoPEMFound = errors.New("no PEM block found") // ErrInvalidVRF occurs when the VRF does not validate. ErrInvalidVRF = errors.New("invalid VRF proof") )
Functions ¶
func Evaluate ¶
func Evaluate(k *ecdsa.PrivateKey, m []byte) (index [32]byte, proof []byte)
Evaluate returns the verifiable unpredictable function evaluated at m
func ProofToHash ¶
ProofToHash asserts that proof is correct for m and outputs index.
func Prove ¶
func Prove(secret *big.Int, params *GeneralBulletSetup) (bulletproofs.ProofBPRP, error)
Types ¶
type GeneralBulletSetup ¶
type GeneralBulletSetup struct { A int64 B int64 BP1 bulletproofs.BulletProofSetupParams BP2 bulletproofs.BulletProofSetupParams }
Click to show internal directories.
Click to hide internal directories.