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

chacha20_poly1305 internals: DRY per-packet initialization. #2230

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

briansmith
Copy link
Owner

Create a new function begin that is used by all the opening and sealing operations in both chacha20_poly1305 and chacha20_poly1305_openssh. Inline derive_poly1305_key into it.

@briansmith briansmith self-assigned this Jan 16, 2025
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.19%. Comparing base (f2116eb) to head (675fa0b).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2230      +/-   ##
==========================================
- Coverage   97.00%   96.19%   -0.82%     
==========================================
  Files         165      165              
  Lines       20511    20502       -9     
  Branches      464      464              
==========================================
- Hits        19897    19722     -175     
- Misses        505      665     +160     
- Partials      109      115       +6     

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

Create a new function `begin` that is used by all the opening and
sealing operations in both `chacha20_poly1305` and
`chacha20_poly1305_openssh`. Inline `derive_poly1305_key` into it.

In `seal_in_place`, put the `begin` after the parsing so that we avoid
doing it if the parsing fails.
@briansmith briansmith force-pushed the b/chacha20_poly1305_openssh-dry branch from 34c10b0 to 675fa0b Compare January 16, 2025 21:41
@briansmith
Copy link
Owner Author

Hmm....something is going on with the code coverage measurement.

@briansmith briansmith merged commit 7e93807 into main Jan 16, 2025
163 of 164 checks passed
@briansmith briansmith deleted the b/chacha20_poly1305_openssh-dry branch January 16, 2025 23:05
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