package dleq
import "go.dedis.ch/kyber/v3/proof/dleq"
Package dleq provides functionality to create and verify non-interactive zero-knowledge (NIZK) proofs for the equality (EQ) of discrete logarithms (DL). This means, for two values xG and xH one can check that
log_{G}(xG) == log_{H}(xH)
without revealing the secret value x.
Index ¶
- type Proof
- func NewDLEQProof(suite Suite, G kyber.Point, H kyber.Point, x kyber.Scalar) (proof *Proof, xG kyber.Point, xH kyber.Point, err error)
- func NewDLEQProofBatch(suite Suite, G []kyber.Point, H []kyber.Point, secrets []kyber.Scalar) (proof []*Proof, xG []kyber.Point, xH []kyber.Point, err error)
- func (p *Proof) Verify(suite Suite, G kyber.Point, H kyber.Point, xG kyber.Point, xH kyber.Point) error
- type Suite
Types ¶
type Proof ¶
type Proof struct { C kyber.Scalar // challenge R kyber.Scalar // response VG kyber.Point // public commitment with respect to base point G VH kyber.Point // public commitment with respect to base point H }
Proof represents a NIZK dlog-equality proof.
func NewDLEQProof ¶
func NewDLEQProof(suite Suite, G kyber.Point, H kyber.Point, x kyber.Scalar) (proof *Proof, xG kyber.Point, xH kyber.Point, err error)
NewDLEQProof computes a new NIZK dlog-equality proof for the scalar x with respect to base points G and H. It therefore randomly selects a commitment v and then computes the challenge c = H(xG,xH,vG,vH) and response r = v - cx. Besides the proof, this function also returns the encrypted base points xG and xH.
func NewDLEQProofBatch ¶
func NewDLEQProofBatch(suite Suite, G []kyber.Point, H []kyber.Point, secrets []kyber.Scalar) (proof []*Proof, xG []kyber.Point, xH []kyber.Point, err error)
NewDLEQProofBatch computes lists of NIZK dlog-equality proofs and of encrypted base points xG and xH. Note that the challenge is computed over all input values.
func (*Proof) Verify ¶
func (p *Proof) Verify(suite Suite, G kyber.Point, H kyber.Point, xG kyber.Point, xH kyber.Point) error
Verify examines the validity of the NIZK dlog-equality proof. The proof is valid if the following two conditions hold:
vG == rG + c(xG) vH == rH + c(xH)
type Suite ¶
type Suite interface { kyber.Group kyber.HashFactory kyber.XOFFactory kyber.Random }
Suite wraps the functionalities needed by the dleq package.
Source Files ¶
dleq.go
- Version
- v3.1.0 (latest)
- Published
- Nov 30, 2022
- Platform
- linux/amd64
- Imports
- 2 packages
- Last checked
- 1 month ago –
Tools for package owners.