sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation. [TAKEOVER]#15199
Merged
benpicco merged 2 commits intoRIOT-OS:masterfrom Nov 4, 2020
Merged
sys/hashes/pbkdf2: Add PBKDF2-sha256 implementation. [TAKEOVER]#15199benpicco merged 2 commits intoRIOT-OS:masterfrom
benpicco merged 2 commits intoRIOT-OS:masterfrom
Conversation
7e718c2 to
9e5579b
Compare
benpicco
reviewed
Oct 11, 2020
Contributor
Author
It did... I'll take a look.. |
Contributor
Author
Ahh its a python version issue. |
fjmolinas
commented
Oct 21, 2020
Contributor
Author
|
This time the test passed, there where only some unrelated failures There was some boards that needed to be added to the insufficient memory list, as well as a typo to be fixed. Is it OK to squash @benpicco ? |
Contributor
|
Sure, please squash - but also go recommend some parameter lengths in the doc so it's clear how to use this properly |
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.
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.
15c1f29 to
bc8ce92
Compare
Contributor
|
Only |
benpicco
approved these changes
Nov 4, 2020
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 PR rebases and fixes murdock complaints for #12211, I also fixed some issues when running the test on hardware. I took over since I can't push to the archived repository.
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.
BOARD=native make -C tests/pbkdf2/ all test -j3 --no-print-directory
BOARD=nrf52840-mdk make -C tests/pbkdf2/ flash test -j3 --no-print-directory
Issues/PRs references
Taken from #12191 .
Closes #12211