custom

package
v0.8.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2024 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

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 H1

func H1(m []byte) (x, y *big.Int)

H1 hashes m to a curve point

func H2

func H2(m []byte) *big.Int

H2 hashes to an integer [1,N-1]

func ProofToHash

func ProofToHash(pk *ecdsa.PublicKey, m, proof []byte) (index [32]byte, err error)

ProofToHash asserts that proof is correct for m and outputs index.

func Prove

func Prove(secret *big.Int, params *GeneralBulletSetup) (bulletproofs.ProofBPRP, error)

Types

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL