Schnorr.commit
defimported Lean
Given randomness $r \in \mathbb{Z}_q$ and a generator $g \in G$, the commitment is $a := g^{r}$, where the exponent is taken via the canonical lift $r.\mathrm{val} \in \mathbb{N}$.
Statement
set_option relaxedAutoImplicit false in set_option autoImplicit false in variable {G : Type*} [CommGroup G] in variable {q : ℕ} [Fact q.Prime] in variable (g : G) in def Schnorr.commit (r : ZMod q) : G
- Defined in
- TCSlib, `Schnorr.commit`
- Lean proof
- By Hydroxyi (from the file's git history), from github.com/Shilun-Allan-Li/tcslib at
c8a02591b1e5(Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.25.0.Schnorr.commit← Schnorr.commit (TCSlib/Cryptography/SchnorrProtocol.lean:42): verbatim
- Verified
- 07 Oct 2026
- Axioms
- none listed
- Used by 3
- Schnorr.schnorr_completenessCompleteness of the Schnorr identification protocol. Let $q$ be a prime, let $G$ be a commutative group, and let $g \in G$ be an element…
- Schnorr.schnorr_hvzkHonest-verifier zero knowledge of the Schnorr protocol. Let $G$ be a commutative group, let $q$ be prime, and let $g \in G$ be an element…
- Schnorr.honestThe honest prover's full transcript for witness $w$, randomness $r$, and challenge $c$ is the triple…
Lean source view module on GitHub
set_option relaxedAutoImplicit false in set_option autoImplicit false in variable {G : Type*} [CommGroup G] in variable {q : ℕ} [Fact q.Prime] in variable (g : G) in /-- Prover's first message: commitment `a := g ^ r` for randomness `r`. -/ def Schnorr.commit (r : ZMod q) : G := g ^ r.val