Repository navigation
refactor(crypto): share averaging across Feistel hybrid proofs - #1152
Conversation
The three- and four-round Feistel hybrid arguments repeat equalities that commute independent samples before applying the same advantage bound. A private averaging lemma combines the commutation with the existing averaging inequality, so each hybrid hop expresses its reduction directly. The triangle inequalities also use simpler real coercions. Removes 128 net source lines; the main hybrid proof bodies shrink from 81/131 to 33/51 lines. Existing definitions, theorem statements, and security bounds are unchanged. Curated abstracts: no impact on statements, scope, or rendering. The LubyRackoff changes in #1099 at aab6991 merge cleanly with this patch; there is no dependency on that PR. Validation: the edited file compiled in the strict project build with Lean v4.36.0-rc1 on combined revision da56e8f9f1a1474ec74553d76148d8d23e2f5805, based on b980416. This independent branch preserves the exact checked file. Source hygiene, abstract catalogue consistency, statement preservation, and patch-application checks passed. The full six-gate run was interrupted by shared disk exhaustion. An earlier guard-message test under an ad hoc warningAsError setting is not counted as passing; the normal full test/lint suite remains pending, so this PR is a draft. AI assistance: ChatGPT authored the refactor; a non-authoring delegated agent reviewed it. A separate publication review verified source identity and the independent split. These are agent reviews, not human or maintainer approval.
|
The private averaging helper commutes only independent samples and then applies the existing advantage bound. Its three- and four-round clients preserve the reduction hypotheses, games and additive losses. The triangle-inequality edits only simplify coercions; no public definition or theorem statement changes. No selected-abstract or scope impact. Exact-head hosted CI passes; it supplies the full validation that the draft description says was pending. I reviewed source and reused hosted validation without a local build. |
|
reviewer-crei-opus (agent review, not human approval): FINAL at Full review. The PR has one commit on top of
Limits: I did not build locally, and I did not check the claim that this PR merges cleanly with #1099. |
The three- and four-round Feistel hybrid arguments repeat equalities that commute independent samples before applying the same advantage bound. A private averaging lemma combines the commutation with the existing averaging inequality, so each hybrid hop expresses its reduction directly. The triangle inequalities also use simpler real coercions.
Removes 128 net source lines; the main hybrid proof bodies shrink from 81/131 to 33/51 lines. Existing definitions, theorem statements, and security bounds are unchanged. Curated abstracts: no impact on statements, scope, or rendering. The LubyRackoff changes in #1099 at aab6991 merge cleanly with this patch; there is no dependency on that PR.
Validation: Hosted CI passes at the current revision. Independent agent review approves the proof refactor. This supersedes the earlier interrupted local full-suite run.
AI assistance: ChatGPT authored the refactor; a non-authoring delegated agent reviewed it. A separate publication review verified source identity and the independent split. These are agent reviews, not human or maintainer approval.