Skip to content

Avoid incorrect creation of an Odd<BoxedUint> in invert_mod2k#1257

Open
andrewwhitehead wants to merge 1 commit intoRustCrypto:masterfrom
andrewwhitehead:fix/boxed-inv-mod
Open

Avoid incorrect creation of an Odd<BoxedUint> in invert_mod2k#1257
andrewwhitehead wants to merge 1 commit intoRustCrypto:masterfrom
andrewwhitehead:fix/boxed-inv-mod

Conversation

@andrewwhitehead
Copy link
Copy Markdown
Contributor

@andrewwhitehead andrewwhitehead commented Apr 27, 2026

This fixes an issue where Odd::new_unchecked could be used on an even value prior to calling invert_mod_precision. This does not currently create an issue in practice because the result, while incorrect, is reduced to zero bits in that specific case.

Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.83%. Comparing base (ecf51af) to head (e789115).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1257      +/-   ##
==========================================
- Coverage   90.84%   90.83%   -0.01%     
==========================================
  Files         186      186              
  Lines       21673    21670       -3     
==========================================
- Hits        19688    19685       -3     
  Misses       1985     1985              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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