briansmith / ring

Safe, fast, small crypto using Rust
Other
3.68k stars 693 forks source link

AES-GCM Aarch64: Clarify bytes -> bits conversion bounds checking. #1950

Closed briansmith closed 6 months ago

briansmith commented 6 months ago

The conversion of bytes to bits looked like it could potentially overflow usize::MAX, but it couldn't. Make this more obvious at the call site.

There are two commits. The first one just reorganizes/re-nests code, so it is easier to review this commit-by-commit.

codecov[bot] commented 6 months ago

Codecov Report

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

Comparison is base (018f16b) 96.23% compared to head (9c25456) 96.23%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1950 +/- ## ======================================= Coverage 96.23% 96.23% ======================================= Files 135 135 Lines 20649 20656 +7 Branches 226 226 ======================================= + Hits 19872 19879 +7 Misses 743 743 Partials 34 34 ```

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