➖ Remove dependency on PBKDF2#42
Open
danielberkompas wants to merge 1 commit into
Open
Conversation
This is a breaking change. OTP versions > 24.2 now include the `pbkdf2_hmac/5` function in the `:crypto` module, thanks to this PR: erlang/otp#5421 The new function does not include support for all the algorithms that the old dependency supported, namely `md4`, `md5` and `ripemd`. However, I think this is a valid tradeoff. It is no longer necessary to add a `:pbkdf2` dependency in order to use the PBKDF2 field type.
9e860f3 to
33d529a
Compare
jc00ke
reviewed
May 24, 2023
| defaults = [algorithm: :sha256, iterations: 10_000, size: 32] | ||
| @impl Cloak.Ecto.PBKDF2 | ||
| def init(config) do | ||
| defaults = [algorithm: :sha256, iterations: 10_000, size: 32] |
There was a problem hiding this comment.
OWASP suggests 600,000 iterations for SHA256 and 210,000 iterations for SHA512. Would you be amenable to bumping the default number of iterations and also updating the docs?
Owner
Author
There was a problem hiding this comment.
I'll do that in a separate PR, so that it will show up in the automatic changelog more easily.
|
Given we're now up to Erlang 26, it'd be great to see this merged. Are you actively supporting all the way back to 23? |
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.
This is a breaking change. OTP versions > 24.2 now include the
pbkdf2_hmac/5function in the:cryptomodule, thanks to this PR: erlang/otp#5421The new function does not include support for all the algorithms that the old dependency supported, namely
md4,md5andripemd. However, I think this is a valid tradeoff.It is no longer necessary to add a
:pbkdf2dependency in order to use the PBKDF2 field type.