vrf

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2023 License: GPL-3.0 Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	N2 = 32 // ceil(log2(q) / 8)
	N  = N2 / 2
)

Variables

View Source
var (
	ErrMalformedInput = errors.New("ECVRF: malformed input")
	ErrDecodeError    = errors.New("ECVRF: decode error")
	ErrInternalError  = errors.New("ECVRF: internal error")
)
View Source
var (
	NotSupportKey = errors.New("Unsupported key type")
)

Functions

func ECP2OS

func ECP2OS(Bx, By *big.Int) []byte

func ECVRF_decode_proof

func ECVRF_decode_proof(pi []byte) (x *big.Int, y *big.Int, c *big.Int, s *big.Int, err error)

func ECVRF_hash_points

func ECVRF_hash_points(ps ...[]byte) *big.Int

func ECVRF_hash_to_curve

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

func G

func G() (x, y *big.Int)

func I2OSP

func I2OSP(b *big.Int, n int) []byte

func OS2ECP

func OS2ECP(os []byte) (Bx, By *big.Int)

func OS2IP

func OS2IP(os []byte) *big.Int

func ProofToHash

func ProofToHash(pi []byte) []byte

func Prove

func Prove(key *ecdsa.PrivateKey, data []byte) ([]byte, error)

func Verify

func Verify(key *ecdsa.PublicKey, pi []byte, data []byte) (bool, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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