package dleq
import "github.com/cloudflare/circl/zk/dleq"
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] RFC-9497: https://www.rfc-editor.org/info/rfc9497
Index ¶
- type Params
- type Proof
- func (p *Proof) MarshalBinary() ([]byte, error)
- func (p *Proof) UnmarshalBinary(g group.Group, data []byte) error
- type Prover
- func (p Prover) Prove(k group.Scalar, a, ka, b, kb group.Element, rnd io.Reader) (*Proof, error)
- func (p Prover) ProveBatch(k group.Scalar, a, ka group.Element, bi, kbi []group.Element, rnd io.Reader) (*Proof, error)
- func (p Prover) ProveBatchWithRandomness( k group.Scalar, a, ka group.Element, bi, kbi []group.Element, rnd group.Scalar, ) (*Proof, error)
- func (p Prover) ProveWithRandomness(k group.Scalar, a, ka, b, kb group.Element, rnd group.Scalar) (*Proof, error)
- type Verifier
Types ¶
type Params ¶
type Proof ¶
type Proof struct {
// contains filtered or unexported fields
}
func (*Proof) MarshalBinary ¶
func (*Proof) UnmarshalBinary ¶
type Prover ¶
type Prover struct{ Params }
func (Prover) Prove ¶
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 (Verifier) VerifyBatch ¶
Source Files ¶
- Version
- v1.6.1 (latest)
- Published
- Apr 9, 2025
- Platform
- linux/amd64
- Imports
- 4 packages
- Last checked
- 3 days ago –
Tools for package owners.