package dl
import "github.com/cloudflare/circl/zk/dl"
Package dl provides a Schnorr NIZK discrete-log proof.
This package implements a Schnorr NIZK discrete-log proof obtained from the interactive Schnorr identification scheme through a Fiat-Shamir transformation.
Given (k,G,kG) the Prove function returns a Proof struct attesting that kG = [k]G, which can be validated using the Verify function.
The userID label is a unique identifier for the prover.
The otherInfo label is defined to allow flexible inclusion of contextual information in the Schnorr NIZK proof. The otherInfo is also used as a domain separation tag (dst) for the hash to scalar function.
Reference: https://datatracker.ietf.org/doc/html/rfc8235
Index ¶
- func Verify(myGroup group.Group, G, kG group.Element, p Proof, userID, otherInfo []byte) bool
- type Proof
Functions ¶
func Verify ¶
Verify checks whether the proof attests that kG = [k]G.
Types ¶
type Proof ¶
func Prove ¶
func Prove(myGroup group.Group, G, kG group.Element, k group.Scalar, userID, otherInfo []byte, rnd io.Reader) Proof
Prove returns a proof attesting that kG = [k]G.
Source Files ¶
- Version
- v1.6.1 (latest)
- Published
- Apr 9, 2025
- Platform
- linux/amd64
- Imports
- 3 packages
- Last checked
- 4 days ago –
Tools for package owners.