zkelog

package
v0.0.0-...-05710c2 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 5 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

	// N = m⋅G+α⋅X
	N curve.Point

	// B = m⋅H
	B curve.Point
}

type Private

type Private struct {
	// Y = y
	Y curve.Scalar

	// Lambda = λ
	Lambda curve.Scalar
}

type Proof

type Proof struct {
	*Commitment

	// Z = α+eλ (mod q)
	Z curve.Scalar

	// U = m+ey (mod q)
	U 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(public Public) bool

func (*Proof) Verify

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

type Public

type Public struct {
	// E = (L=λ⋅G, M=y⋅G+λ⋅X)
	E *elgamal.Ciphertext

	// ElGamalPublic = X
	ElGamalPublic elgamal.PublicKey

	// Base = H
	Base curve.Point

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

Jump to

Keyboard shortcuts

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