€0.00 — free as in speechtonight's forecast: clear skies over production Cache: warm · Deploys: fair, 0% rollbacks expectedset by moonlight, shipped before dawn · deploy freely Page A2

❦The Daily Commit❦ ☾The Nightly Build☽

Dev news, typeset daily — PHP · AI · The Wider Stack

The developer's evening paper — PHP · AI · The Wider Stack

Sunday, October 25, 2026 Vol. I — No. 882 · Morning editionLate edition EN DE FR ES

PHP · RFC Watch

PHP RFC targets bcrypt's 72-byte password limit

Sjoerd Langkemper has proposed PASSWORD_BCRYPT_SHA256 for PHP’s password_hash() and password_verify().

curated by Sönke

Existing bcrypt can mishandle null bytes and ignores password data beyond 72 bytes. The proposal applies HMAC SHA256 before bcrypt, addressing both limitations. It follows criticism of a separate plan to reject longer passwords, which would have broken backward compatibility.

Sjoerd Langkemper has proposed PASSWORD_BCRYPT_SHA256 as a new algorithm for password_hash and password_verify. The mode would process the password with HMAC SHA256 before passing the result to bcrypt. This addresses two limitations of current bcrypt handling: problems with null bytes and the 72-byte input limit, because bcrypt hashes only the first 72 bytes.

The RFC is available at https://wiki.php.net/rfc/bcrypt_sha256, with an implementation proposed in PHP source pull request 24073 at https://github.com/php/php-src/pull/24073. Langkemper previously considered an RFC that would make passwords longer than 72 bytes produce an error. That approach faced criticism because of its backward incompatibility, so he is not pursuing it for now. The new algorithm is presented as a less disruptive way to address the same underlying problem. The earlier proposal is documented at https://wiki.php.net/rfc/bcrypt_max_password_length.

Read the original source ↗

Rate this article: 0

Readers’ Forum

No contributions yet — open the debate.

← The Daily CommitThe Nightly Build — Page A1