Schnorr identification is perfectly correct
ProvedCryptologyCity.schnorr_correctcryptographycryptology-citydiscrete-logarithm
Let generate a group of order . For all , the Schnorr verifier for accepts , that is, .
Preamble
import Definitions.Def_CryptologyCity_DLogIdentification open scoped ENNReal
Formal statement
namespace CryptologyCity
theorem schnorr_correct {G : Type*} [Group G] [DecidableEq G] (g : G) (p : ℕ) [NeZero p]
(hg : IsCyclicGroupOfOrder g p) (x r e : ZMod p) :
schnorrAccepts g (g ^ x.val) (g ^ r.val) e (r + e * x) = true := by sorry
end CryptologyCitySource
Cryptology City, Schnorr identification ⇒ non-trivial canonical identification, https://cryptology.city/Reductions/schnorr-identification-protocol-to-non-trivial-canonical-identification-scheme (perfectly correct, since g^{r+ex} = g^r (g^x)^e). Protocol: https://cryptology.city/Primitives/identification-scheme#schnorr-identification-protocol.
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be any group with decidable equality, , and a natural number with (not required to be prime), and assume : every element of is an integer power of and has order . Then for all , the Schnorr verifier with public key accepts the transcript , i.e.
where every exponent is the canonical representative in of the corresponding element of (in particular is reduced mod before exponentiating). No challenge set appears; ranges over all of .
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.