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

Cherry-pick to earlgrey_1.0.0: [crypto] Fix the KMAC-KDF implementation to return the output in shares. #25789

Open
wants to merge 1 commit into
base: earlgrey_1.0.0
Choose a base branch
from

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jan 7, 2025

This is an automatic cherry-pick of #25780 to branch earlgrey_1.0.0.

Previously, the KMAC driver always unmasked the shares of the digest returned
by the KMAC block. This is OK for hash functions like SHA-3, but problematic
for KMAC-KDF where the output is key material. The implementation also did not
modify the second half of the keyblob buffer in KMAC-KDF, which would cause
correctness issues if those values were not initialized to zero.

This commit refactors the KMAC driver to allow returning the digest in masked
form, and adjusts KMAC-KDF to use this new capability.

Signed-off-by: Jade Philipoom <[email protected]>
(cherry picked from commit c676ed8)
@github-actions github-actions bot requested a review from a team as a code owner January 7, 2025 13:41
@github-actions github-actions bot requested review from jadephilipoom and removed request for a team January 7, 2025 13:41
@jadephilipoom jadephilipoom requested a review from moidx January 7, 2025 13:53
@moidx moidx closed this Jan 16, 2025
@moidx moidx reopened this Jan 16, 2025
@moidx
Copy link
Contributor

moidx commented Jan 16, 2025

@jadephilipoom. I closed and re-opened this PR to trigger a CI run. For some reason the results from the previous run were not available.

@jadephilipoom
Copy link
Contributor

Looks like the "build documentation" and "cw340 manufacturing test" checks are failing -- I re-ran them, but it looks like it might be unrelated, given that the latest run of earlgrey_1.0.0 had the same failures. I wouldn't expect this PR to interfere with either of those things, there's no dependency on KMAC-KDF for manufacturing and no documentation or even function names/locations were changed, so I wouldn't expect documentation issues either.

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.

2 participants