Rust password hashing functions: Argon2, scrypt, PBKDF2
2 jph 4 6/10/2025, 11:33:54 AM
I'm evaluating Rust password hashing functions, specifically Argon2, scrypt, PBKDF2. I'm using the RustCrypto open source implementations.
I have three simple demos in case you want to try these yourself:
* https://github.com/joelparkerhenderson/demo-rust-argon2
* https://github.com/joelparkerhenderson/demo-rust-scrypt
* https://github.com/joelparkerhenderson/demo-rust-pbkdf2
I'm seeking advice please, such as pros and cons. The context is medical software where hashing is on generally modern machines. I'm aware of the OWASP recommendations which seem broadly helpful. Thanks!
For comparison, see also the section named Password handling in Cryptographic Right Answers: Post Quantum Edition https://www.latacora.com/blog/2024/07/29/crypto-right-answer...
Pbkdf2 is quite old and has an attack vector from ASICs and FPGA, but is still quite widespread for applications and protocols.
[†] Really, "PBKDF2 vs. any modern password hash".