zklog

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Commitment

type Commitment struct {
	// A = α⋅G
	A curve.Point
	// B = α⋅H
	B curve.Point
	// C = β⋅G
	C curve.Point
}

type Private

type Private struct {
	// A = a
	A curve.Scalar
	// B = b
	B curve.Scalar
}

type Proof

type Proof struct {
	*Commitment

	// Z1 = α+ea (mod q)
	Z1 curve.Scalar
	// Z2 = β+eb (mod q)
	Z2 curve.Scalar
	// contains filtered or unexported fields
}

func Empty

func Empty(group curve.Curve) *Proof

func NewProof

func NewProof(group curve.Curve, hash *hash.Hash, public Public, private Private) *Proof

func (*Proof) IsValid

func (p *Proof) IsValid() bool

func (Proof) Verify

func (p Proof) Verify(hash *hash.Hash, public Public) bool

type Public

type Public struct {
	// H = b⋅G
	H curve.Point

	// X = a⋅G
	X curve.Point

	// Y = a⋅H
	Y curve.Point
}

Jump to

Keyboard shortcuts

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