sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation.#12211
Closed
jcarrano wants to merge 2 commits intoRIOT-OS:masterfrom
Closed
sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation.#12211jcarrano wants to merge 2 commits intoRIOT-OS:masterfrom
jcarrano wants to merge 2 commits intoRIOT-OS:masterfrom
Conversation
8048434 to
c399ed4
Compare
c399ed4 to
3e75ba6
Compare
This add an implementation of PBKDF2 using sha256 hmac. Only one derived key length is supported (32) though it should not be hard to extend it. The testing is done with both random (with fixed seed) vectors amd vectors from rfc7914.
Contributor
Author
This is stupid. Is there any way to suppress this nonsense? |
Wipe temporary buffers and sha256 contexts so that no remnants of the password is left on the stack This ensures that the password is not leaked if some function reads the stack afterwards.
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.
Contribution description
This add an implementation of PBKDF2 using sha256 hmac. Only one derived key length is supported (32) though it should not be hard to extend it.
Testing procedure
The testing is done with both random (with fixed seed) vectors and vectors from rfc7914. As usual, I ran into weirdness with interactive tests so I enabled it only for native. Using miniterm.py everything is fine (at least on samr21-xpro)
Issues/PRs references
Taken from #12191 .