Update defaults to use second recommended option from RFC #360
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 published RFC has the following recommended options:
If a uniformly safe option that is not tailored to your
application or hardware is acceptable, select Argon2id with t=1
iteration, p=4 lanes, m=2^(21) (2 GiB of RAM), 128-bit salt, and
256-bit tag size. This is the FIRST RECOMMENDED option.
If much less memory is available, a uniformly safe option is
Argon2id with t=3 iterations, p=4 lanes, m=2^(16) (64 MiB of
RAM), 128-bit salt, and 256-bit tag size. This is the SECOND
RECOMMENDED option.
Since 2 GiB is too much for the Node engine and it will crash when allocating that much, we should adopt the second option. This will make the library safer for those that just use the defaults.