dleq

package
v0.0.0-...-dfc0bd1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2024 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Overview

Package dleq provides zero-knowledge proofs of Discrete-Logarithm Equivalence (DLEQ).

This implementation is compatible with the one used for VOPRFs [1]. It supports batching proofs to amortize the cost of the proof generation and verification.

References:

[1] draft-irtf-cfrg-voprf: https://datatracker.ietf.org/doc/draft-irtf-cfrg-voprf

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Params

type Params struct {
	G   group.Group
	H   crypto.Hash
	DST []byte
}

type Proof

type Proof struct {
	// contains filtered or unexported fields
}

func (*Proof) MarshalBinary

func (p *Proof) MarshalBinary() ([]byte, error)

func (*Proof) UnmarshalBinary

func (p *Proof) UnmarshalBinary(g group.Group, data []byte) error

type Prover

type Prover struct{ Params }

func (Prover) Prove

func (p Prover) Prove(k group.Scalar, a, ka, b, kb group.Element, rnd io.Reader) (*Proof, error)

func (Prover) ProveBatch

func (p Prover) ProveBatch(k group.Scalar, a, ka group.Element, bi, kbi []group.Element, rnd io.Reader) (*Proof, error)

func (Prover) ProveBatchWithRandomness

func (p Prover) ProveBatchWithRandomness(
	k group.Scalar,
	a, ka group.Element,
	bi, kbi []group.Element,
	rnd group.Scalar,
) (*Proof, error)

func (Prover) ProveWithRandomness

func (p Prover) ProveWithRandomness(k group.Scalar, a, ka, b, kb group.Element, rnd group.Scalar) (*Proof, error)

type Verifier

type Verifier struct{ Params }

func (Verifier) Verify

func (v Verifier) Verify(a, ka, b, kb group.Element, p *Proof) bool

func (Verifier) VerifyBatch

func (v Verifier) VerifyBatch(a, ka group.Element, bi, kbi []group.Element, p *Proof) bool

Jump to

Keyboard shortcuts

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