Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

One-Step Key Derivation Method with KMAC #4121

Merged
merged 3 commits into from
Jun 18, 2024

Conversation

FAlbertDev
Copy link
Collaborator

As mentioned in PR #4119, this pull request introduces the One-Step Key Derivation Method (KDM) of SP800-56Cr2 Section 4 using KMAC.

Previously, the One-Step KDM was defined in SP800-56Ar2. However, with the revision SP800-56Ar3, it has been moved to SP800-56Cr2. To reflect this change, I have updated comments and internal interfaces accordingly. The public API and external interfaces, including module names, remain unchanged.

Additionally, this pull request includes a KMAC option for the one-step Key Derivation Function (KDF), which is utilized by the Ounsworth Key Encapsulation Mechanism (KEM) combiner. Also, I added the test vectors I got for the Ounsworth PR. These include tests for the KMAC option and some for SHA-3 instances, which were not yet covered.

@coveralls
Copy link

Coverage Status

coverage: 91.774% (-0.004%) from 91.778%
when pulling 4d41863 on Rohde-Schwarz:sp800-56c-one-step
into f02c602 on randombit:master.

@coveralls
Copy link

Coverage Status

coverage: 91.773% (-0.005%) from 91.778%
when pulling bab8300 on Rohde-Schwarz:sp800-56c-one-step
into f02c602 on randombit:master.

FAlbertDev added a commit to Rohde-Schwarz/botan that referenced this pull request Jun 14, 2024
Copy link
Owner

@randombit randombit left a comment

Choose a reason for hiding this comment

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

Left some comments but overall seems fine

src/lib/kdf/sp800_56a/sp800_56c_one_step.cpp Outdated Show resolved Hide resolved
src/lib/kdf/sp800_56a/sp800_56c_one_step.cpp Outdated Show resolved Hide resolved
src/lib/kdf/sp800_56a/sp800_56c_one_step.cpp Outdated Show resolved Hide resolved
src/lib/kdf/sp800_56a/sp800_56c_one_step.h Outdated Show resolved Hide resolved
src/lib/kdf/sp800_56a/sp800_56c_one_step.h Outdated Show resolved Hide resolved
src/lib/kdf/sp800_56a/sp800_56c_one_step.h Outdated Show resolved Hide resolved
src/lib/kdf/sp800_56c/sp800_56c_two_step.cpp Show resolved Hide resolved
@FAlbertDev
Copy link
Collaborator Author

Thanks, @randombit, for your input! It seems I left some copy-past issues in the new implementation. Also, I did not correctly handle default_salts for KMAC. The doxygen comments were also deprecated in various places.

I addressed your suggestions and the other mentioned issues in the latest commit.

@coveralls
Copy link

Coverage Status

coverage: 91.769% (-0.009%) from 91.778%
when pulling 2e8c045 on Rohde-Schwarz:sp800-56c-one-step
into f02c602 on randombit:master.

@FAlbertDev FAlbertDev merged commit a902bba into randombit:master Jun 18, 2024
42 checks passed
@FAlbertDev FAlbertDev deleted the sp800-56c-one-step branch June 18, 2024 07:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants