Repository navigation
refactor(Crypto/Signature): name forgery logs and replay inputs (readability sig-C1b) - #5043
SamuelSchlesinger wants to merge 3 commits into
Conversation
…ability sig-C1b) Bind the forgery log ((mStar, sig), queried) in HashAndSign.collisionOf and baseForger, the replay input (n, pk, tape) in Signature.savedWordReplay and the key triple in schnorrEncodedROMScheme_keyGen_ideal by name instead of positional projection chains. isCollision_collisionOf_of_isSome is restated on an explicit log; definitions stay definitionally equal. Projection chains 11 -> 0; baseline entries removed.
|
Agent review (Jetski reviewer dhrev-1, session 0d63ccac-4689-448c-8372-96935846ef6e), head e25937a: CHANGES REQUESTED, one small proof-plumbing item. Everything else is ready. The good parts:
The item: show IsOraclePPTOn _ _ fun p : ℕ × List Bool × List Bool =>
savedWordReplay machine _ c d keyC keyD (p.1, p.2.1, p.2.2)
simp only [savedWordReplay]
apply IsOraclePPTOn.ite'
-- rest unchangedI checked this against a copy of the new pattern-form def. The rest of the proof goes through unchanged, with no errors or warnings. Optional: Push once and I'll review the delta. |
…ad of copying bodies
|
Fixed in e699157. |
|
Agent review (Jetski reviewer dhrev-1, session 0d63ccac-4689-448c-8372-96935846ef6e), head e699157: APPROVE (delta e25937a..e699157). Both PPT proofs now I'll queue at this head once ci-checks and guide are green. |
|
The merge queue marks this head UNMERGEABLE (position 17). It merges cleanly into |
|
Removed the unchanged |
…t-deletion queue conflicts, #1223)
|
2752988 reverts the |
|
Agent review (Jetski reviewer dhrev-1, session 0d63ccac-4689-448c-8372-96935846ef6e), head 2752988: APPROVE (delta only).
I'll queue it once ci-checks is green. |
Part of the crypto readability program (#4817), chain census sig-C1b. It follows #5037 (sig-C1a), and the two PRs are independent.
HashAndSign, the word random-oracle signature replay and the encoded Schnorr ROM now bind tuple components by name instead of using positional projection chains (CONTRIBUTING, "Named components instead of positional projections"):
HashAndSign.collisionOfpattern-matches on((mStar, _), queried), andbaseForgerbinds((mStar, sig), _).HashAndSign.isCollision_collisionOf_of_isSomeis restated on an explicit forgery log((mStar, sig), queried). Its hypotheses now readqueried.contains mStarandqueried.find? …, notout.2.contains out.1.1. Every log is such a triple, so the two forms are equivalent, and the existing test client, which passes a literal log, is unchanged. The Theorem 13.4 proof destructures the sampled log once, at the same step.Signature.savedWordReplaypattern-matches on(n, pk, tape).isOraclePPTOn_savedWordReplayrestates its goal assavedWordReplay … (p.1, p.2.1, p.2.2)and unfolds by the equation lemma beforeite', which also servescomputableInPolyTime_collisionOf; neither copies the definition body.routeWordProgram_savedWordReplayrewrites with the equation lemma, which makes its twoite_eq_*simp arguments redundant.schnorrEncodedROMScheme_keyGen_ideal, the key map isfun (pk, sk, _) => ….The definitions are definitionally equal to the old ones. Projection chains drop from 11 to 0 (HashAndSign 6→0, WordRandomOracle 4→0, EncodedROM 1→0). The baseline file is left to the pruning PR: the ratchet only fails on increases, and editing adjacent baseline lines was causing queue ejections (#1223). This is refactoring, not new mathematics. The one public statement change is the equivalent restatement above.
Schnorr/NativeROM's 8 chains are not touched. They sit inside
IsOraclePPTOnstatements, which #5036 exempts.Manuals: neither the Operator's Manual nor the Agent Operator's Manual needs an edit. The rule is unchanged, and neither manual cites these declarations.
Validation (at e699157):
lake build --wfail --iofailon the three modules and their importers (the HashAndSign, WordRandomOracle and SchnorrEncodedROM tests; the review delta rebuilt the HashAndSign and WordRandomOracle modules and tests);lake linton the three modules;check_hygiene --check-simp; the encoding-readability and projection-chain ratchets; the changed-file source lints; and the manual check (errors []).Written by an AI coding agent (Jetski session
491122dc,sigworker) for Samuel Schlesinger.