Skip to content

ext/hash: Improve the performance of hash_pbkdf2() - #25463

Open
Sjord wants to merge 1 commit into
php:masterfrom
Sjord:pbkdf2-minimal-improvement
Open

Sjord wants to merge 1 commit into
php:masterfrom
Sjord:pbkdf2-minimal-improvement

Conversation

@Sjord

@Sjord Sjord commented Nov 15, 2026

Copy link
Copy Markdown
Contributor

Reuse precomputed HMAC inner and outer contexts instead of re-hashing the key blocks on every iteration.

Securely clear the precomputed contexts before freeing them, and add NEWS and UPGRADING entries for the performance improvement.

Fixes GH-9604.

Reuse precomputed HMAC inner and outer contexts instead of re-hashing
the key blocks on every iteration.

Securely clear the precomputed contexts before freeing them, and add
NEWS and UPGRADING entries for the performance improvement.

Fixes phpGH-9604.
@Sjord

Sjord commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Continuation of #24188

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.

hash_pbkdf2() wastes time by repeatedly hashing the HMAC key blocks

1 participant