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

Hmac with precomputed key #396

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

fabrice102
Copy link
Contributor

@fabrice102 fabrice102 commented Aug 7, 2024

Issue #, if available: N/A

Description of changes:

This commit adds support for HMAC Precomputed Keys in ACCP.
See aws/aws-lc#1574

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Without this fix, we get error in debug mode (when assert is enabled):

```
hkdf.cpp:61:58: error: comparison between signed and unsigned integer
expressions [-Werror=sign-compare]
         assert(out_len == EVP_MD_size(digest) && out_len == outputLen);
```
@fabrice102 fabrice102 force-pushed the hmac-with-precomputed-key branch 2 times, most recently from af3f66e to 881ffef Compare August 28, 2024 19:52
@fabrice102 fabrice102 marked this pull request as ready for review August 28, 2024 20:17
@fabrice102 fabrice102 requested a review from a team as a code owner August 28, 2024 20:18
@fabrice102 fabrice102 force-pushed the hmac-with-precomputed-key branch 2 times, most recently from 50bcab8 to 39e6205 Compare August 28, 2024 20:37
This commit adds support for HMAC Precomputed Keys in ACCP.
See aws/aws-lc#1574
@fabrice102 fabrice102 force-pushed the hmac-with-precomputed-key branch from 39e6205 to 8097f53 Compare August 28, 2024 20:55
bssl::ScopedHMAC_CTX simplifies HMAC context management.
But it does not seem available in legacy builds.
(The CB AccpCiLegacyTests fails.)
geedo0
geedo0 previously approved these changes Sep 27, 2024
README.md Show resolved Hide resolved
Copy link
Contributor

@WillChilds-Klein WillChilds-Klein left a comment

Choose a reason for hiding this comment

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

PR looks great! I left a few minor, optional suggestions.

csrc/hmac.cpp Show resolved Hide resolved
tst/com/amazon/corretto/crypto/provider/test/HmacTest.java Outdated Show resolved Hide resolved
Minor code improvements addressing comments from PR corretto#396.
@fabrice102 fabrice102 dismissed stale reviews from WillChilds-Klein and geedo0 via d596fbf December 9, 2024 23:24
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