zkmulstar

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 8 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 = (α ⊙ c) ⊕ Enc(N₀, β, r)
	A *paillier.Ciphertext
	// Bₓ = gᵃ
	Bx curve.Point
	// E = sᵃ tᵍ
	E *saferith.Nat
	// S = sˣ tᵐ
	S *saferith.Nat
}

type Private

type Private struct {
	// X ∈ ± 2ˡ
	X *saferith.Int

	// Rho = ρ = Nonce D
	Rho *saferith.Nat
}

type Proof

type Proof struct {
	*Commitment
	// Z1 = α + ex
	Z1 *saferith.Int
	// Z2 = y + em
	Z2 *saferith.Int
	// W = ρᵉ•r mod N₀
	W *saferith.Nat
	// 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(group curve.Curve, hash *hash.Hash, public Public) bool

type Public

type Public struct {
	// C = Enc₀(?;?)
	C *paillier.Ciphertext

	// D = (x ⨀ C) ⨁ Enc₀(y;ρ)
	D *paillier.Ciphertext

	// X = gˣ
	X curve.Point

	// Verifier = N₀
	Verifier *paillier.PublicKey
	Aux      *pedersen.Parameters
}

Jump to

Keyboard shortcuts

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