feat(KZG): de-vacuate evaluation binding and prove the t-SDH GGM soundness bound#655
feat(KZG): de-vacuate evaluation binding and prove the t-SDH GGM soundness bound#655emberian wants to merge 17 commits into
Conversation
🤖 PR Summary
OverviewThis pull request addresses a vacuity in ArkLib's KZG commitment scheme security proofs and adds mechanized generic-group-model soundness bounds for the t-SDH assumption. The core changes are in Vacuity Finding & RepairThe existing The fix ( Generic-Group Model SoundnessTwo independent GGM formalizations bound the t-SDH problem's hardness:
Both yield the Boneh–Boyen numerator Side Conditions
Honest Scope & Structure
Statistics
Lean Declarations ✏️ Added: 212 declaration(s)
…and 62 more not listed. ✏️ Affected: 1 declaration(s) (line number changed)
📋 **Additional Analysis**The diff introduces a large contribution (KZG vacuity finding, fix, and two GGM soundness proofs) that touches on many guidelines. The code generally follows naming conventions and documentation standards, but there are several violations of style and process rules, most notably the absence of a blueprint and PR title/description, as well as minor formatting issues (line length, import grouping). The citation additions are correct. Below are the findings organized by the categories emphasized in the supplied instructions. 📄 **Per-File Summaries**
It defines:
The main theorems are:
Commments in the file explicitly contrast this model with the concrete-group attack in
Last updated: 2026-07-17 05:37 UTC. |
A two-pager (
twopager.pdf) is available as a visual blueprint-style companion to this branch.Motivation:
tSdhAssumptionisClassical.choice-false, sobindingis vacuousGroups.tSdhAssumptionquantifies over an unrestricted adversary type.tSdhAdversarylandsin
StateT unifSpec.QueryCache ProbComp, and becauseProbCompis a free monad over oraclequeries, pure computation is free — an adversary may
purean arbitrary noncomputablefunction of the SRS at zero cost. The SRS includes the verifier leg
(g₂, g₂^τ), whichdetermines
τwheneverg₂ ≠ 1, and ArkLib's ownAlgebra.lean:105 exists_zmod_power_of_generatormakes that discrete logClassical.choice-definable. A one-lineadversary recovers
τ, returns thet-SDH solution(c = 0, g₁^{1/τ}), and wins withprobability exactly
1(zero oracle queries). Consequently:tSdhAssumption D erroris false for everyerror < 1(not_tSdhAssumption), andtrivially true for
error ≥ 1since a probability is≤ 1(tSdhAssumption_trivial_of_one_le).KZG.CommitmentScheme.bindingtakestSdhAssumptionas a hypothesis and concludes a bound atthe same
error, so it carries no information at any parameter. Its ownhpair : pairing g₁ g₂ ≠ 0even forcesg₂ ≠ 1, discharging the killing adversary's onehypothesis from
binding's own premises (binding_hypotheses_unsatisfiable).Groups.arsdhAssumption— hypothesis ofKZG.function_binding— has the identicalunrestricted quantifier and falls the identical way (
not_arsdhAssumption/arsdhAssumption_trivial_of_one_le); the ARSDH branch'sD + 2 ≤ pis exactly thep ≥ n + 2that
function_bindingalready carries.What this PR changes
1. The fix — an unconditional reduction (
+42 / −14,Binding.leanonly).t-SDH is analgebraic assumption whose killing adversary makes zero queries, so query-bounding (the right
tool for random-oracle/hash floors) constrains something it never does. Instead we observe that
ArkLib's reduction is already fully constructive:
binding's proof is a five-stepcalc, andtSdhAssumptionis consumed in exactly one place — the last≤. Splitting the calc there yieldsbinding_reduces_to_tSdh, which carries the full constructive content without theuniversally-quantified assumption — it relates two concrete probabilities (this adversary's
binding advantage and its reduction's
t-SDH success), so there is no assumptionPropfor aClassical.choiceadversary to inhabit, and it has content at every parameter.bindingkeepsits exact signature as a one-line corollary (backward compatible).
RepairSurvives.leanprovesthe de-vacuation survives the exact attack (
repair_survives_attack): the trapdoor-extractingadversary still refutes
tSdhAssumptionbelow1, andbinding_reduces_to_tSdhholdsunconditionally — nothing left to empty.
2. The sound number —
t-SDH in the generic group model, both standard models, both wired.The fix removes the vacuity but hands no number; the number a KZG binding bound rests on is the
generic-group hardness of
t-SDH. We mechanize it in both standard GGM formulations and wireboth to ArkLib's real
tSdhExperiment, each yielding the Boneh–Boyen numeratorC(fuel+D+4, 2)·D + (D+1)overp − 1:GgmEndToEnd.tSdh_ggm_sound, +_lt_one), wired viaembed.GgmShoup.shoup_ggm_soundmodel-internal, thenGgmShoupEmbed.shoup_tSdh_ggm_sound+_lt_onewired viaembedShoup). Free comparison isrealized, not assumed: in a prime-order group the exponent encoding
a ↦ g₁^{a.val}isinjective, so the adversary's real pairwise
DecidableEq G₁equality matrix equals thesymbolic pattern the strategy branches on (
groupEqPattern_eq).Each capstone quantifies over the image of its embedding into
tSdhAdversary— thegeneric-restricted class that escapes §1's refutation (over the full type the statement is false).
Group elements carry ordinary polynomials in
X(not Laurent: inversion negates the exponent),which is exactly why a winning
1/(X+c)output is unrepresentable and forces a bounded-degreeroot event. The
< 1companions give genuine content in the standard regimeC(fuel+D+4,2)·D + (D+1) < p − 1(≈ 2⁻²³⁴at cryptographic parameters).To our knowledge — a census of ArkLib, VCVio, and Mathlib — no generic-group-model security
theorem previously existed in Lean, so this is a candidate first of its kind. (ArkLib's
AGM/Basic.leanis a WIP stub —Adversary.runissorry, and its adversary is aReaderToverthe concrete group table, so outputs can still depend on discrete logs. The extraction-shaped fix
is the right first step regardless of whether you later complete that module to opacity: it
isolates the single obligation any restricted assumption must discharge.)
Contrast with previous behavior
binding/function_bindingare provable but vacuous — theirtSdhAssumption/arsdhAssumptionpremises are unsatisfiable below error1and their conclusions free at orabove it. No parameter carries information.
binding_reduces_to_tSdhis an unconditional, content-bearing reduction at everyparameter;
bindingremains as its corollary with an unchanged signature; and the number thereduction points at is proved sound in two independent GGM models against the real experiment,
with every side-condition named.
Honest scope / side-conditions
1 ≤ D(the meaningful KZG regime);2 ≤ p;orderOf g₁ = pfor both tracks' transport intotSdhExperiment(generator, for encoding injectivity); Maurer additionally carries ArkLib's own[∀ i, SampleableType (unifSpec.Range i)]verbatim. The bound is the classical Boneh–Boyen shapeO((q_G + D)²·D / p)— degree-dependent, not a cleanq²/p.GgmRandomEncodingadditionallycarries, clearly labelled off-path, a conservative pairing-capable
δ = 2Dvariant notconsumed by either capstone. The
Classical.choicein the vacuity theorems is the content (theunbounded extractor exhibited as a legal inhabitant of the unrestricted type), not a smell.
Structure and review
This is a large contribution, and we are happy to split it — the one-file
Binding.leande-vacuation (with
KzgVacuity.lean+RepairSurvives.leanas the finding-and-survival evidence)stands on its own as a small, self-contained PR, and the GGM soundness formalization can follow as
a second. Tell us which shape you prefer and we will restructure.
A two-pager (
twopager.pdf) is available as a visual blueprint-style companion to this branch.References
[BB04]Boneh–Boyen, Short Signatures Without Random Oracles ·[KZG10]Kate–Zaverucha–Goldberg·
[Sho97]Shoup, Lower Bounds for Discrete Logarithms ·[Mau05]Maurer, Abstract Models ofComputation in Cryptography ·
[FKL18]Fuchsbauer–Kiltz–Loss, The Algebraic Group Model ·[Sch80]Schwartz ·[Zip79]Zippel. (Added toblueprint/src/references.bib.)