Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double speed of PBKDF2 #1387

Closed
wants to merge 1 commit into
base: PHP-5.6.10
from

Conversation

4 participants
@ctz
Copy link

ctz commented Jul 4, 2015

By hoisting the processing of inner/outer key blocks
out of the inner loop, we calculate PBKDF2 with approx
half the hash compression function applications.

Speed comparison:

test.php is:

$ TIME='%U' time php test.php
24.56

$ TIME='%U' time ./sapi/cli/php test.php
12.82

Double speed of PBKDF2
By hoisting the processing of inner/outer key blocks
out of the inner loop, we calculate PBKDF2 with approx
half the hash compression function applications.

Speed comparison:

test.php is:

<?php hash_pbkdf2('sha1', 'password', 'saltsalt', 1 << 24, 0); ?>

$ TIME='%U' time php test.php
24.56

$ TIME='%U' time ./sapi/cli/php test.php
12.82
@krakjoe

This comment has been minimized.

Copy link
Member

krakjoe commented Jan 4, 2017

Since this has generated no interest, or reviews, and since it targets a security fix only branch of PHP, I'm closing this PR.

Please take this action as encouragement to open a PR against a supported branch of PHP, in addition, please start an internals discussion in order to attract someone to review the code.

@krakjoe krakjoe closed this Jan 4, 2017

@staabm

This comment has been minimized.

Copy link
Contributor

staabm commented Jan 4, 2017

@paragonie-scott what do you think about the propsed changes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.