schnorr

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2024 License: MIT Imports: 5 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ZKProof

type ZKProof struct {
	Alpha *crypto.ECPoint
	T     *big.Int
}

func NewZKProof

func NewZKProof(Session []byte, x *big.Int, X *crypto.ECPoint, rand io.Reader) (*ZKProof, error)

NewZKProof constructs a new Schnorr ZK proof of knowledge of the discrete logarithm (GG18Spec Fig. 16)

func (*ZKProof) ValidateBasic

func (pf *ZKProof) ValidateBasic() bool

func (*ZKProof) Verify

func (pf *ZKProof) Verify(Session []byte, X *crypto.ECPoint) bool

NewZKProof verifies a new Schnorr ZK proof of knowledge of the discrete logarithm (GG18Spec Fig. 16)

type ZKVProof

type ZKVProof struct {
	Alpha *crypto.ECPoint
	T, U  *big.Int
}

func NewZKVProof

func NewZKVProof(Session []byte, V, R *crypto.ECPoint, s, l *big.Int, rand io.Reader) (*ZKVProof, error)

NewZKProof constructs a new Schnorr ZK proof of knowledge s_i, l_i such that V_i = R^s_i, g^l_i (GG18Spec Fig. 17)

func (*ZKVProof) ValidateBasic

func (pf *ZKVProof) ValidateBasic() bool

func (*ZKVProof) Verify

func (pf *ZKVProof) Verify(Session []byte, V, R *crypto.ECPoint) bool

Jump to

Keyboard shortcuts

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