crypto/scrypt: add scrypt to crypto #22216
Merged
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 what prompted me to do the other work in the other crypto modules.
This adds scrypt to the library of key derivation functions. I have only 1 scrypt function test in scrypt_test.v because the other tests from RFC-7914 take a long time, 3 minutes on my machine. The other tests in scrypt_test.v are exercising internal functionality that is not public. I will put these slower scrypt function tests in the slower_tests repo after this gets committed (assuming that it does get accepted, of course).
The fact that scrypt is time and/or memory intensive is not a bug. It is for the purpose of making scrypt generated keys more resistant to brute force attacks.