Argon2 on x86-64: prove compression calls and block updates - #484
Closed
reaperhulk wants to merge 1 commit into
Closed
reaperhulk wants to merge 1 commit into
reaperhulk wants to merge 1 commit into
Conversation
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.
Call the verified Argon2 G primitive using the previous and reference block pointers, then write its temporary result into the current matrix cell. Pass zero copies G; later passes XOR G with the old cell. The temporary output follows the first 4096 bytes of scratch, and a frame slot retains the destination across the call.
Prove the compression-call boundary, including narrowed permissions, return-address handling, input preservation, calling-convention obligations and its memory frame. Compose the call, restored arguments and full block write under explicit frame and destination separation invariants. Prove the combined result, memory safety, register/permission preservation, full MXCSR preservation, and equal traces when permitted argument addresses and public frame words agree. Add a permission-widening wrapper so the block write works inside the larger matrix allocation.
This continues whole-derive implementation above #483. The save/setup/reload blocks are individually proven; composition of their invariants with the filling loops follows next. No new public API, specification, TCB changes or emitted assembly.
Validation: targeted Lean builds of changed proof modules and checked literals; standard-axiom, compiler-override and specification-origin audits; Lean import and proof-speed checks;
git diff --check. Full checks run in CI.