-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add CMAC benchmark for AWS-LC #2218
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2218 +/- ##
==========================================
- Coverage 79.08% 79.06% -0.03%
==========================================
Files 612 612
Lines 106327 106327
Branches 15023 15021 -2
==========================================
- Hits 84088 84064 -24
- Misses 21588 21612 +24
Partials 651 651 ☔ View full report in Codecov by Sentry. |
@@ -34,6 +34,8 @@ | |||
#include "internal.h" | |||
|
|||
#include <openssl/crypto.h> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: extra space?
|
||
return | ||
#if defined(OPENSSL_IS_AWSLC) || defined(OPENSSL_IS_BORINGSSL) | ||
CMAC_Reset(ctx.get()) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just checking the reset call is enough for LC, we don't need an init on top of this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, reset is a AWS-LC/BroingSSL helper function https://github.com/aws/aws-lc/blob/main/include/openssl/cmac.h#L64 that keeps the key but resets the state so a new message can be authenticated.
Description of changes:
Adds a benchmark for CMAC, OpenSSL 1.0.2 does not support CMAC.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.