Skip to content

PBKDF2 OWASP Iteration Recommendations#857

Merged
tarcieri merged 8 commits intoRustCrypto:masterfrom
WingZer0o:owasp-params-for-sha-512
Mar 20, 2026
Merged

PBKDF2 OWASP Iteration Recommendations#857
tarcieri merged 8 commits intoRustCrypto:masterfrom
WingZer0o:owasp-params-for-sha-512

Conversation

@WingZer0o
Copy link
Copy Markdown
Contributor

#855

https://cheatsheetseries.owasp.org/cheatsheets/Password_Storage_Cheat_Sheet.html#pbkdf2

The OWASP recommended iterations for SHA512 is lower than 600,000. We already have removed SHA1 so we don't need to worry about that. The proposed solution for 210,000 iterations for SHA512 is still above the FIPS requirements for PBKDF2.

I added tests for SHA256 and SHA512 with matching hex values. As well as tests for checking the iteration count for a specific hash.

I got bored after creating the issue and fired up a PR to see if it would get accepted.

@tarcieri tarcieri merged commit 7daa160 into RustCrypto:master Mar 20, 2026
15 checks passed
@WingZer0o
Copy link
Copy Markdown
Contributor Author

👍

WingZer0o added a commit to WingZer0o/password-hashes that referenced this pull request Mar 23, 2026
…hould create benchmarks that correspond with these parameters
@tarcieri tarcieri mentioned this pull request Apr 20, 2026
tarcieri added a commit that referenced this pull request Apr 21, 2026
## Added
- Customizable `Params` for `Pbkdf2` type (#79])
- Modular Crypt Format (MCF) support (#806, #808)
- `alloc` feature (#816)
- `kdf::{Kdf, Pbkdf}` implementations (#823)

## Changed
- Bump edition to 2024; MSRV 1.85 (#563)
- Use `EagerHash` in bounds (#592)
- Use `phc` crate for PHC hash types (#761)
- Rename `simple` features to `phc` (#776)
- Have `Pbkdf2::new` take algorithm/params args (#805)
- Fallible `Params` constructors (#810)
- Bump `password-hash` dependency to v0.6 (#848)
- Bump `digest` dependency to v0.11 (#849)
- Use 210,000 iterations for PBKDF2-HMAC-SHA512 per OWASP (#857)
- Bump `hmac` dependency to v0.13 (#870)
- Bump `sha2` to v0.11 (#872)

## Removed
- `parallel` crate feature (#702)
- `std` feature (#760)
- `sha1` feature (#853)
- `Sync` bounds (#876)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants