Skip to content

Make password salt generation algo-agnostic and isolate bcrypt-specific logic - #24281

Open
narfbg wants to merge 1 commit into
php:PHP-8.4from
narfbg:password_salt
Open

narfbg wants to merge 1 commit into
php:PHP-8.4from
narfbg:password_salt

Conversation

@narfbg

@narfbg narfbg commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor
  • Fixes a bug where the libargon2 implementation uses less entropy than intended (still safe, but below baseline).
  • Aligned bcrypt salt encoding more closely to bcrypt's variant. Previously, it relied on php_crypt() doing the error correction. This is still not entirely following bcrypt as designed, but that's for another time.
  • Stricter bcrypt sanity checks.

…ic logic

- Fixes a bug where the libargon2 implementation uses less entropy than intended (still safe, but below baseline)
- Aligned bcrypt salt encoding more closely to bcrypt's variant (previously, it relied on php_crypt() doing the error correction)
- Stricter bcrypt sanity checks, and slightly optimized code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant