Skip to content

testing/crypto: Add pbkdf2 test app#3437

Open
PruteanuVlad wants to merge 1 commit intoapache:masterfrom
PruteanuVlad:add_pbkdf2_support
Open

testing/crypto: Add pbkdf2 test app#3437
PruteanuVlad wants to merge 1 commit intoapache:masterfrom
PruteanuVlad:add_pbkdf2_support

Conversation

@PruteanuVlad
Copy link
Contributor

@PruteanuVlad PruteanuVlad commented Mar 25, 2026

Summary

This adds support for testing PBKDF2 implementation. Test vectors for SHA1 are taken from RFC6070.
SHA256 vectors were extrapolated using an online PBKDF2 generator which was checked against RFC6070.

Impact

This allows for the testing of PBKDF2 implementation.

Modified files:

  • testing/drivers/crypto/CMakeLists.txt - enables app compilation
  • testing/drivers/crypto/Kconfig - add option for test app
  • testing/drivers/crypto/Makefile - enables app compilation
  • testing/drivers/crypto/pbkdf2.c - actual test app

Testing

Development was done using ESP32 DevkitC.
Building was done on Ubuntu 24.04 VM.

nsh> pbkdf2
hmac PBKDF2 SHA1 success
hmac PBKDF2 SHA1 success
hmac PBKDF2 SHA1 success
hmac PBKDF2 SHA1 success
hmac PBKDF2 SHA1 success
hmac PBKDF2 SHA1 success
hmac PBKDF2 SHA256 success
hmac PBKDF2 SHA256 success
hmac PBKDF2 SHA256 success
hmac PBKDF2 SHA256 success
hmac PBKDF2 SHA256 success
hmac PBKDF2 SHA256 success

This adds support for testing PBKDF2 implementation. Test
vectors for SHA1 are taken from RFC6070. SHA256 vectors
were extrapolated using an online PBKDF2 generator which
was checked against RFC6070.

Signed-off-by: Vlad Pruteanu <pruteanuvlad1611@yahoo.com>
Copy link
Contributor

@cederom cederom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @PruteanuVlad :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants