Group-hash indifferentiability: security games, rejection-sampling simulator, and concrete endpoints - #199
Merged
Conversation
daira
force-pushed
the
fv/indiff-sampler
branch
from
August 15, 2026 16:23
26a76c0 to
79e5f61
Compare
daira
force-pushed
the
fv/indiff-sampler
branch
4 times, most recently
from
August 16, 2026 02:47
b01b5b5 to
6c67576
Compare
daira
force-pushed
the
fv/indiff-sampler
branch
4 times, most recently
from
August 16, 2026 19:03
bca0944 to
2f4279e
Compare
daira
force-pushed
the
fv/indiff-sampler
branch
from
August 16, 2026 21:49
9e81f03 to
a3792b9
Compare
daira
commented
Aug 16, 2026
daira
commented
Aug 16, 2026
daira
commented
Aug 16, 2026
daira
commented
Aug 16, 2026
daira
left a comment
Collaborator
Author
There was a problem hiding this comment.
Self-ACK, only minor nits.
daira
force-pushed
the
fv/indiff-sampler
branch
from
August 16, 2026 22:36
a3792b9 to
f6085bb
Compare
daira
marked this pull request as ready for review
August 16, 2026 22:37
daira
commented
Aug 17, 2026
daira
force-pushed
the
fv/indiff-sampler
branch
3 times, most recently
from
August 17, 2026 12:44
1f17f9d to
a0e1cd9
Compare
This was referenced Aug 18, 2026
dannywillems
left a comment
Contributor
There was a problem hiding this comment.
Mostly comments. First batch. Include daira/CompElliptic#31
Update the two passages that described the constant as calculated-only: the calculation is now proven on paper —modulo results cited as established mathematics— in CompElliptic's design/weil-constant-derivation.md. What CompElliptic#28 tracks is formalizing the calculation in Lean; Weil's theorem itself stays a cited input, since formalizing it would require machinery not present in Mathlib. This replaces the vaguer "remaining steps to a fully rigorous account" wording, which could be misread as including a formalization of Weil's theorem. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The regularity section now shows where the number comes from: the
formal budget condition ε² ≥ (#G − 1)·C⁴/(#F)² accepts any ε just
above C²·√#G/#F, and at the deployed sizes that is about
2^6.8 · 2^127 / 2^254 ≈ 2^{-120}. The Conclusion's mention now points
back to that arithmetic.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The pin moves from the head of indiff-counting (CompElliptic PR zcash#27) to the head of weil-covers (PR zcash#29, stacked on zcash#27): the reduction of the deployed Weil bound to Weil's theorem at the two branch covers, with the per-curve endpoints taking only the CharSumBounded inputs. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
pallas/vesta_indiffFromRO now denote the concrete endpoints: from
Weil's theorem at the two branch covers alone —the CharSumBounded
inputs of CompElliptic's Hashing/WeilInstance.lean— q queries
distinguish the group hash from a random oracle with advantage at
most q/2^120. The former parametric statements keep doing the modular
work under the names pallas/vesta_indiffFromRO_of_weilBounded, which
say what they consume; the plain names belong to what consumers
should cite. The census pins keep their text and now pin the concrete
endpoints.
The parametric endpoints conclude with advantage q·(ε + 4/#F). We
instantiate ε := 1/2^120 - 4/#F, so that ε + 4/#F telescopes to
exactly 1/2^120: the subtraction pre-pays the zero-repair transport
inside the budget, and no slack is lost at that step. Two side
conditions remain, both checked by norm_num as exact rational
arithmetic on the card numerals (~508 bits after squaring):
* ε ≥ 0 — the transport 4/#F ≈ 2^{-252} is far below 2^{-120};
* the budget check (#G - 1)·(21/2)⁴/#F² ≤ ε² — the regularity
distance is about 2^{-120.2}, a headroom factor of about 1.16.
The proofs avoid pin-sensitive lemma names: the Nat.card bridges go
through simp's default set, and the endpoint conclusion is applied in
fully-introduced form.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Update the four passages that described the Weil constant as proven-on-paper only: * the Calculating-the-Weil-constant section now records that the calculation is formalized down to Weil's theorem at the two branch covers, which stays the cited input (its statement needs genus, places, and covers vocabulary that Mathlib does not yet have); * the trust-boundary bullet names the CharSumBounded inputs as the unformalized boundary; * the Conclusion states the concrete advantage q/2^120 at the renamed endpoints, with the budget arithmetic; * the remaining-work bullet tracks the vocabulary boundary rather than the whole formalization. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Bump the CompElliptic pin to main at the merge of PR zcash#29 (2c04440), the reduction of the deployed Weil bound to Weil's theorem at the branch covers. Above the previously pinned commit, this adds: * WeilSupport.lean — the squarefreeness lemma's inputs, the Eisenstein patterns, and the monodromy square exclusions; * the CharacterSum realness lemmas; * the design doc's woven references, with their CI checks (the reference checker and the sage identities); * the review round's docstring, module-doc, script-naming, and margin corrections; * the full FFSTV citation at its first use; * census pins for every declaration the design doc cites, with the reference checker's matching third direction; * the checker's path-suffix citation resolution — restricted to the relevant modules, with ambiguous citations required to qualify themselves and every potential referent required to be pinned. Nothing this development consumes changed; ironwood's census is unaffected. The book page catches up: the calculation passage notes that the paper proof's checkable inputs are machine-checked and cited at their points of use, and the closing bullet no longer says the supporting facts remain — that scope of CompElliptic#28 is delivered, with the function-field vocabulary still tracked at CompElliptic#30. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The branch maps were called g and h, but g is RFC 9380's name for the curve equation's right-hand side (y² = g(x) = x³ + A·x + B, §6.6.2), which the scaling-defect display also uses. The RFC has no name for the branch functions; its x1 and x2 are the two candidate abscissae, not the values of these point-valued maps. As the two branches of the mapping f they are now f₁ and f₂ — distinct from the design doc's abscissa functions x₁, x₂, which keep their names. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
It was called ε, colliding with the conventional total in "(q, ε)-indifferentiable"; the composition line now reads q·β. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
A reader landing on the f₁/f₂ cases directly can miss that u is transformed before it becomes an x-coordinate. Point at CompElliptic's Hashing/SimplifiedSWU.lean, which defines the mapping step by step with the spec's own intermediate names. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
"Exact computation on small curves" now points at CompElliptic's scripts/sswu-small-curve-stats.sage, the committed form of that computation. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
\cdot served both as multiplication and as the argument-placeholder dot. Separating them was necessary to fix the multiplication sense's spacing, which was too tight in scriptstyle contexts; macros.txt now defines \mul (a multiplication dot with consistent spacing) and \argument (the placeholder), and the group-hash page uses them by role. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Pull the budget paragraph out of the regularity discussion so it no
longer interleaves with the DFT aside, and let the Weil-constant
section own it: the named hypothesis and its constant C come first,
then the budget β that `sum_abs_prob_dev_le` (now the linked
formalization pointer) derives from C — stated as what it is, a bound
on the previous section's regularity distance. The mapping's character
sum is written plain S, with subscripts reserved for the covering sums
S_{C_j}, which are defined at first use.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The budget paragraph linked the formalization but did not say where (#G − 1)·C⁴/(#F)² comes from. It is the DFT aside's pipeline with the constants tracked: (C²·#F)² per nontrivial frequency, Parseval's 1/#G, Cauchy–Schwarz's #G cancelling it, and the probability normalization's (#F)⁴. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The section used C = 21/2 without saying why: the hypothesis wants
|S(χ)| ≤ C·√#F, and the extra half over the 10 absorbs the calculated
bound's trailing +1 — in square-root-free form,
(10√#F + 1)² ≤ (21/2)²·#F, with margin about 2^{126} at the deployed
sizes. The deployed-sizes sentence points forward to it.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The bare `Hashing/*.lean` mentions — TwoTermUniformity and PastaSSWU at the top, BranchCovers, WeilInstance, and WeilSupport in the Weil-constant section and the Conclusion — now link to their files, matching the page's other CompElliptic links. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
"Out of scope for CompElliptic#28" describes a scope boundary of an issue that closes just before this page lands. Keep only the live tracker: the vocabulary is CompElliptic#30. The Conclusion's "the delivered scope of zcash#28" already reads historically and stays. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
One sentence carried the paper proof, the formalization boundary, the per-cover inputs with their defining aside, and the machine-checked claim. Four sentences now carry one each. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The book's β rename left the code using ε in two roles. The regularity-specific budgets in Sampler.lean, Pasta.lean, and Indiff.lean become β, matching the book. The generic interfaces (PMFEventBiasLE, PMFWeightedBiasLE, and the multi-oracle composition) become ρ rather than ε: ε carries a "this probability is small" implication that need not hold for the generic lemmas — they do not care whether it is small. mapQuery's answer translator, which already used ρ, becomes τ (completing the π/σ/τ trio). IndiffFromRO's total stays δ. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
The passage read as though a uniform-looking mapping frees the
security arguments from considering non-uniformity. It does not —
what indifferentiability buys is paying for it once, with a concrete
protocol-independent figure, at most q/2^{120} after q queries.
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
daira
force-pushed
the
fv/indiff-sampler
branch
from
August 20, 2026 06:09
5b27d40 to
95852a8
Compare
dannywillems
approved these changes
Aug 20, 2026
dannywillems
left a comment
Contributor
There was a problem hiding this comment.
ACK - I got a bit lost in side quests as I am onboarding on CompElliptic and this repo. I don't want to block future patches on top of this one. The patch is already relatively huge.
daira
added a commit
to TalDerei/ironwood
that referenced
this pull request
Aug 20, 2026
The scope bullet still described the modelling as a plan, starting with an indifferentiability proof. That step is delivered by the arc this branch is stacked on (zcash#199): the deployed hash-to-curve is proven indifferentiable from a random oracle onto the group, with a concrete advantage bound, presented in the Group-Hash Indifferentiability chapter. What remains for the ledger games is adversary oracle access to the hash-to-curve, tracked at zcash#188. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
daira
added a commit
to TalDerei/ironwood
that referenced
this pull request
Aug 20, 2026
The scope bullet still described the modelling as a plan, starting with an indifferentiability proof. That step is delivered by the arc this branch is stacked on (zcash#199): the deployed hash-to-curve is proven indifferentiable from a random oracle onto the group, with a concrete advantage bound, presented in the Group-Hash Indifferentiability chapter. What remains for the ledger games is adversary oracle access to the hash-to-curve, tracked at zcash#188. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
daira
added a commit
to TalDerei/ironwood
that referenced
this pull request
Aug 20, 2026
The scope bullet still described the modelling as a plan, starting with an indifferentiability proof. That step is delivered by the arc this branch is stacked on (zcash#199): the deployed hash-to-curve is proven indifferentiable from a random oracle onto the group, with a concrete advantage bound, presented in the Group-Hash Indifferentiability chapter. What remains for the ledger games is adversary oracle access to the hash-to-curve, tracked at zcash#188. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
daira
added a commit
to TalDerei/ironwood
that referenced
this pull request
Aug 21, 2026
The scope bullet still described the modelling as a plan, starting with an indifferentiability proof. That step is delivered by the arc this branch is stacked on (zcash#199): the deployed hash-to-curve is proven indifferentiable from a random oracle onto the group, with a concrete advantage bound, presented in the Group-Hash Indifferentiability chapter. What remains for the ledger games is adversary oracle access to the hash-to-curve, tracked at zcash#188. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ironwood side of the indifferentiability arc (#198): the one-oracle game, the collapse of the full two-oracle game onto it, the rejection-sampling simulator, and concrete endpoints at the deployed mappings. The counting side is daira/CompElliptic#27, and the Weil-bound reduction above it is daira/CompElliptic#29, both merged; the pin references CompElliptic main at the #29 merge.
The headline.
pallas_/vesta_indiffFromRO(Indiff.lean): everyq-query adaptive distinguisher between the real per-query law and the ideal one is moved by at mostq/2^120, in both directions and against every acceptance event. The only inputs are the twoCharSumBoundedbounds at100·#F— Weil's theorem at the branch covers. The parametric forms keep the_of_weilBoundedsuffix.The route (each module's doc has the detail):
Sampler.lean— the single-query core: the one-squeeze bias in both worlds is bounded by the regularity distance.Pasta.lean— the deployed instantiation under the namedWeilBoundedhypothesis, with the zero-repair transport at(4·#F − 2)/(#F)², and the simulator's counting inputdeployedFibreBound = 11.MultiOracleComp.lean/TwoOracle.lean— indexed query trees with per-index budgets; the two-oracle game collapses computably onto the one-oracle core at the folded budget.Model.lean— thePMFEventBiasLEcombinators the arc composes with.Simulator.lean— the capped rejection sampler behind the ideal law, with exact costs: round-count tail(1 − p)^k, geometric round law, two-sided output bias(1 − p)^K, exactness on empty fibres, and convergence to the fibre sampler asK → ∞.Indiff.lean— the compositions:indiffFromRO_of_regularity(a regularity-distance budget ofβgives indifferentiability atq·β), the capped variant chargingsimLawBiasper query, and the concrete endpoints (β := 1/2^120 − 4/#Fmakes the transport term telescope; the rest is exact arithmetic at the deployed sizes).The book page teaches the argument to a general mathematical audience and states the what-is-proved/what-is-modelled boundary; its Conclusion gives the advantage as the single term
q/2^120.Census: the arc's top-level leaves are pinned, with their
native_decideowners named — the Pasta base-field structures, and the curve-group order certificates at the concrete endpoints and the simulator pins; the census module doc's CompElliptic owner tally ends at six.What stays cited: Weil's theorem at the two branch covers — stating it needs function-field vocabulary tracked at daira/CompElliptic#30. The consuming games' oracle access is #188.
The first commit adopts CompElliptic's absorbed
CompEllipticExtras(daira/CompElliptic#12) in place of ironwood's copies.🤖 Claude Fable 5, Claude Opus 4.8 (1M context)