schnorr

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: MIT Imports: 4 Imported by: 0

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(x *big.Int, X *crypto.ECPoint) (*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(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(V, R *crypto.ECPoint, s, l *big.Int) (*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(V, R *crypto.ECPoint) bool

Jump to

Keyboard shortcuts

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