Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Simplify native code configurations and aes_ctr_set_key#3019

Draft
torben-hansen wants to merge 1 commit into
aws:main from
torben-hansen:aes_ctr_set_key_refactor
Draft

Simplify native code configurations and aes_ctr_set_key #3019
torben-hansen wants to merge 1 commit into
aws:main from
torben-hansen:aes_ctr_set_key_refactor

Conversation

@torben-hansen

@torben-hansen torben-hansen commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Issues:

Resolves #ISSUE-NUMBER1
Addresses #ISSUE-NUMBER2

Description of changes:

Describe AWS-LC’s current behavior and how your code changes that behavior. If there are no issues this pr is resolving, explain why this change is necessary.

Call-outs:

Point out areas that need special attention or support during the review process. Discuss architecture or design changes.

Testing:

How is this change tested (unit tests, fuzz tests, etc.)? Are there any testing steps to be verified by the reviewer?

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.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -300,23 +300,32 @@ ctr128_f aes_ctr_set_key(AES_KEY *aes_key, GCM128_KEY *gcm_key,
return aes_hw_ctr32_encrypt_blocks_wrapper;

@github-actions github-actions Bot Feb 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'aes_hw_ctr32_encrypt_blocks_wrapper'; did you mean 'aes_hw_ctr32_encrypt_blocks'? [clang-diagnostic-error]

Suggested change
return aes_hw_ctr32_encrypt_blocks_wrapper;
return aes_hw_ctr32_encrypt_blocks;
Additional context

crypto/fipsmodule/aes/internal.h:96: 'aes_hw_ctr32_encrypt_blocks' declared here

void aes_hw_ctr32_encrypt_blocks(const uint8_t *in, uint8_t *out, size_t len,
 ^

if (vpaes_capable()) {
vpaes_set_encrypt_key(key, (int)key_bytes * 8, aes_key);
if (out_block) {
*out_block = vpaes_encrypt_wrapper;

@github-actions github-actions Bot Feb 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'vpaes_encrypt_wrapper' [clang-diagnostic-error]

 *out_block = vpaes_encrypt_wrapper;
 ^

*out_block = vpaes_encrypt_wrapper;
}
if (gcm_key != NULL) {
CRYPTO_gcm128_init_key(gcm_key, aes_key, vpaes_encrypt_wrapper, 0);

@github-actions github-actions Bot Feb 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'vpaes_encrypt_wrapper' [clang-diagnostic-error]

 CRYPTO_gcm128_init_key(gcm_key, aes_key, vpaes_encrypt_wrapper, 0);
 ^

if (gcm_key != NULL) {
CRYPTO_gcm128_init_key(gcm_key, aes_key, vpaes_encrypt_wrapper, 0);
}
return vpaes_ctr32_encrypt_blocks_wrapper;

@github-actions github-actions Bot Feb 20, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

warning: use of undeclared identifier 'vpaes_ctr32_encrypt_blocks_wrapper'; did you mean 'vpaes_ctr32_encrypt_blocks'? [clang-diagnostic-error]

Suggested change
return vpaes_ctr32_encrypt_blocks_wrapper;
return vpaes_ctr32_encrypt_blocks;
Additional context

crypto/fipsmodule/aes/internal.h:240: 'vpaes_ctr32_encrypt_blocks' declared here

void vpaes_ctr32_encrypt_blocks(const uint8_t *in, uint8_t *out, size_t len,
 ^

codecov-commenter commented Feb 20, 2026
edited
Loading

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 46.66667% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.33%. Comparing base (ab1b674) to head (1a83245).
⚠️ Report is 59 commits behind head on main.

Files with missing lines Patch % Lines
crypto/fipsmodule/cipher/e_aes.c 22.22% 7 Missing ⚠️
crypto/fipsmodule/aes/internal.h 83.33% 1 Missing ⚠️
Additional details and impacted files
@@ Coverage Diff @@
## main #3019 +/- ##
==========================================
+ Coverage 78.31% 78.33% +0.02% 
==========================================
 Files 689 689 
 Lines 121007 120988 -19 
 Branches 16996 16994 -2 
==========================================
+ Hits 94765 94776 +11 
+ Misses 25346 25316 -30 
 Partials 896 896 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@github-actions github-actions[bot] github-actions[bot] left review comments

At least 2 approving reviews are required to merge this pull request.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /