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

aes: Clarify counter overflow checking. #2120

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

Conversation

briansmith
Copy link
Owner

Create a more robust internal API for counter/nonce/IV management that makes the usage within AES-GCM more clearly correct. The new design is easier to test.

@briansmith briansmith self-assigned this Jun 24, 2024
Copy link

codecov bot commented Jun 24, 2024

Codecov Report

Attention: Patch coverage is 93.73737% with 31 lines in your changes missing coverage. Please review.

Project coverage is 97.04%. Comparing base (fd06b00) to head (812ebfc).

Files Patch % Lines
src/aead/aes_gcm.rs 81.91% 17 Missing ⚠️
src/aead/gcm.rs 41.66% 7 Missing ⚠️
src/aead/aes/counter.rs 99.23% 1 Missing and 1 partial ⚠️
src/aead/aes/ffi.rs 81.81% 1 Missing and 1 partial ⚠️
src/aead/aes/vp.rs 96.87% 2 Missing ⚠️
src/aead/aes.rs 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2120      +/-   ##
==========================================
- Coverage   97.12%   97.04%   -0.09%     
==========================================
  Files         151      152       +1     
  Lines       20101    20475     +374     
  Branches      447      454       +7     
==========================================
+ Hits        19524    19870     +346     
- Misses        482      508      +26     
- Partials       95       97       +2     

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

@briansmith briansmith force-pushed the b/ctr-checking branch 2 times, most recently from 4a24c88 to dfb4f00 Compare June 24, 2024 01:55
Move all the counter management to a submodule that can, in the future,
be encapsulated from the rest of the AES and AES-GCM logic.

`git difftool HEAD^1:src/aead/aes.rs src/aead/aes/counter.rs`
@briansmith briansmith force-pushed the b/ctr-checking branch 4 times, most recently from 686acdd to 5c56776 Compare June 28, 2024 22:17
Move `Conuter` and `Iv` to aes/counter.rs.

Create a more robust internal API for counter/nonce/IV management that
makes the usage within AES-GCM more clearly correct. The new design is
easier to test.

`git difftool HEAD^1:src/aead/aes.rs src/aead/aes/counter.rs`
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.

1 participant