Implement verified Argon2 on x86-64 - #479
Merged
Merged
Conversation
reaperhulk
force-pushed
the
argon2-reference-map
branch
from
October 1, 2026 21:56
92344db to
dc9d00b
Compare
reaperhulk
marked this pull request as draft
October 1, 2026 21:56
reaperhulk
force-pushed
the
argon2-reference-map
branch
2 times, most recently
from
October 2, 2026 11:49
d40608f to
dc7ee9c
Compare
reaperhulk
marked this pull request as ready for review
October 2, 2026 11:49
reaperhulk
force-pushed
the
argon2-reference-map
branch
from
October 2, 2026 11:58
dc7ee9c to
bdfe5b1
Compare
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.
Implements Argon2d, Argon2i, and Argon2id version 1.3 on x86-64 against the merged specification and ISA models. The public
argon2::deriveAPI supports passwords, salts, secrets, associated data, memory and iteration costs, lanes, worker limits, and variable-length output. Rust validates parameters and allocates memory; the entire derivation runs in Lean-generated assembly. Lanes are evaluated serially.The complete entry point is proven
VerifiedagainstSpec.Argon2.deriveContract, including H₀, initialization, every filling pass, final reduction and H′, memory framing, termination, ABI preservation, and the shared contract’s exact leakage policy. Argon2i leaks no input contents; Argon2d/id permit precisely the specified flattened reference-index log. The implementation is generic over the BLAKE2b backend, so future variants propagate through H′ and the whole derivation.This consolidates the implementation and proof stack into one complete platform PR. There are no changes to
Spec/orTCB/, no unverified proof shortcuts or resource-limit overrides, and no manually written assembly. Stack arguments remain read-only; normalized copies live in the verified private frame.Validation:
cargo bench --manifest-path bench/Cargo.toml --features openssl-argon2enables the comparison andcargo test --manifest-path bench/Cargo.toml --features openssl-argon2 --test argon2runs the differential tests. Benchmark smoke tests and clippy also pass against the runners’ exact OpenSSL 3.0.13 version.Rebased onto main at
ac71ac2a; the complete Argon2 registration build and scoped emitter audits pass after the rebase, and generated Argon2 assembly remains unchanged.