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

Support for AES CFB (128-bit) mode #585

Merged
merged 3 commits into from
Nov 14, 2024
Merged

Support for AES CFB (128-bit) mode #585

merged 3 commits into from
Nov 14, 2024

Conversation

skmcgrail
Copy link
Member

Issues:

Resolves #575

Description of changes:

Adds support for AES cipher feedback 128-bit mode (CFB-128). I was going to also support CFB 1-bit and CFB 8-bit modes but have a smaller concern around being able to support that with the fips feature enabled currently. Need to investigate that further, so we may come back at a later date and add support for those additional bit-mode variants. For now this resolves the requester's needs.

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.

@skmcgrail skmcgrail requested a review from a team as a code owner November 12, 2024 19:39
@codecov-commenter
Copy link

codecov-commenter commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 18 lines in your changes missing coverage. Please review.

Project coverage is 92.60%. Comparing base (c358484) to head (113cfff).
Report is 105 commits behind head on main.

Files with missing lines Patch % Lines
aws-lc-rs/src/cipher.rs 82.10% 15 Missing and 2 partials ⚠️
aws-lc-rs/src/cipher/streaming.rs 98.48% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #585      +/-   ##
==========================================
- Coverage   95.80%   92.60%   -3.20%     
==========================================
  Files          61       67       +6     
  Lines        8143     9516    +1373     
  Branches        0     9516    +9516     
==========================================
+ Hits         7801     8812    +1011     
- Misses        342      430      +88     
- Partials        0      274     +274     

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

@mariusknaust
Copy link

I've tried it with the use case described in #575 and it works as expected 👍🏻 Thanks a lot!

justsmth
justsmth previously approved these changes Nov 13, 2024
Copy link
Contributor

@justsmth justsmth left a comment

Choose a reason for hiding this comment

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

I have a few nit-picks, but no significant concerns.

aws-lc-rs/src/cipher.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/cipher.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/cipher.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/cipher.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/cipher.rs Outdated Show resolved Hide resolved
aws-lc-rs/src/cipher.rs Show resolved Hide resolved
aws-lc-rs/src/cipher.rs Outdated Show resolved Hide resolved
Comment on lines +686 to +687
for i in 13..=21 {
for j in 124..=131 {
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry if I've asked this before and I've noticed this is used in the other tests as well.
What do these pair of numbers mean and should we abstract them into variables?

@skmcgrail skmcgrail merged commit 7ff37f1 into aws:main Nov 14, 2024
241 of 246 checks passed
@skmcgrail skmcgrail deleted the issue575 branch November 14, 2024 00:26
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.

[Feature Request] Support CFB mode for AES
5 participants