briansmith / ring

Safe, fast, small crypto using Rust
Other
3.77k stars 708 forks source link

AES-GCM AArch64: Clarify integrated AES-GCM control flow. #2028

Closed briansmith closed 7 months ago

briansmith commented 7 months ago

When we use aes_gcm_enc_kernel it will process all the whole blocks, leaving only the last partial block, if any. Clarify this in the sealing implementation. With this change, the compiler understands what's happening well enough to jump directly to processing the last partial block after calling aes_gcm_enc_kernel.

Ideally we'd do the same for the opening implementation, but we can't right now due to the support for overlapping input/output. We should revisit this later when we have a better abstraction for that.

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.26%. Comparing base (80eb6e4) to head (8535d0a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2028 +/- ## ========================================== - Coverage 96.26% 96.26% -0.01% ========================================== Files 140 140 Lines 20421 20410 -11 Branches 226 226 ========================================== - Hits 19659 19648 -11 Misses 728 728 Partials 34 34 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.