Skip to content

Double speed of PBKDF2 #1387

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

Closed
wants to merge 1 commit into from
Closed

Conversation

ctz
Copy link

@ctz 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

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
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
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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants