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

Add CMAC benchmark for AWS-LC #2218

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

Conversation

andrewhop
Copy link
Contributor

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.

@andrewhop andrewhop requested a review from a team as a code owner February 24, 2025 22:53
@codecov-commenter
Copy link

codecov-commenter commented Feb 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.06%. Comparing base (3c172f2) to head (dd42db5).
Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@@ -34,6 +34,8 @@
#include "internal.h"

#include <openssl/crypto.h>

Copy link
Contributor

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()) &&
Copy link
Contributor

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?

Copy link
Contributor Author

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.

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