Rust password hashing functions: Argon2, scrypt, PBKDF2

2 jph 1 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!

Comments (1)

stop50 ยท 17h ago
The first two are good enough, but shouldn't be the only protection. In general salts (adding an per password random string to the raw password) and pepper(addding an random string that is shared across the application) should be added.

Pbkdf2 is quite old and has an attack vector from ASICs and FPGA, but is still quite widespread for applications and protocols.