password-hashes
password-hashes copied to clipboard
argon2: use `blake2` crate for round implementation
The argon2 crate presently vendors its own implementation of the BLAKE2b round function for the core of the Argon2 KDF implementation:
https://github.com/RustCrypto/password-hashes/blob/58bc6dd/argon2/src/block.rs#L100-L186
Ideally it'd be able to leverage an implementation from the blake2 crate (which would give us a single place to focus on e.g. SIMD optimizations)
I don't think this is feasible, since Argon2 uses a modified version of the round function. See the Argon2 and Blake2 RFCs
@Pjottos agreed