use the crypto library native call pbkdf2_hmac if available#110
Merged
prefiks merged 3 commits intoprocessone:masterfrom Mar 19, 2026
Merged
use the crypto library native call pbkdf2_hmac if available#110prefiks merged 3 commits intoprocessone:masterfrom
pbkdf2_hmac if available#110prefiks merged 3 commits intoprocessone:masterfrom
Conversation
prefiks
reviewed
Mar 19, 2026
Member
prefiks
left a comment
There was a problem hiding this comment.
Except that one thing, rest looks ok
rebar.config
Outdated
| {erl_opts, [debug_info, {src_dirs, ["asn1", "src"]}, | ||
| nowarn_export_all, | ||
| {platform_define, "^(R|1|2[012])", 'USE_OLD_CRYPTO_HMAC'}, | ||
| {platform_define, "^(R|1|2[0123])", 'NO_PBKDF2_HMAC'}, |
Member
There was a problem hiding this comment.
Can you change that to "^(R|1|2[0123]|24.[01])", looks like this was added in 24.2
Contributor
Author
|
You are right, OTP 24.0 and 24.1 should be discarded, thanks |
Member
|
Merged, thank you for your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The crypto library since OTP 24.2 contains a pbkdf2_hmac/5 method.
The significant performance benefit of this nif (see the execution sample below) on server side may be used to increase the number of iterations as requested by @tmolitor-stud-tu for good reasons.
Sample parameters
scram:hi/5legacy algorithmscram:hi/5algorithm based on the native callpbkdf2_hmac/5Improvements
~5 times less reductions
~6 times faster
Given the cost measure function