zkdec

package
v0.6.0-alpha-20...-5109cf1 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2022 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 {
	// S = sʸ tᵘ
	S *safenum.Nat
	// T = sᵃ tᵛ
	T *safenum.Nat
	// A = Enc₀(α; r)
	A *paillier.Ciphertext
	// Gamma = α (mod q)
	Gamma curve.Scalar
}

type Private

type Private struct {
	// Y = y
	Y *safenum.Int

	// Rho = ρ
	Rho *safenum.Nat
}

type Proof

type Proof struct {
	*Commitment
	// Z1 = α + e•y
	Z1 *safenum.Int
	// Z2 = ν + e•μ
	Z2 *safenum.Int
	// W  = r ρ ᵉ (mod N₀)
	W *safenum.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(hash *hash.Hash, public Public) bool

type Public

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

	// X = y (mod q)
	X curve.Scalar

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

Jump to

Keyboard shortcuts

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