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

Make inv_mod2k(_vartime) return a CtChoice #416

Merged
merged 4 commits into from
Dec 12, 2023

Conversation

fjarri
Copy link
Contributor

@fjarri fjarri commented Dec 11, 2023

  • inv_mod2k(_vartime) return a tuple with the second parameter indicating whether the inverse exists
  • In inv_mod2k(_vartime) docstrings, removed the note about self having to be less than 2^k - the algorithm works just fine even if it's not
  • Simplified the usage of inv_mod2k in the creation of DynResidueParams
  • inv_odd_mod() now also returns a falsy CtChoice in case of an even modulus

@fjarri fjarri marked this pull request as ready for review December 12, 2023 00:05
@tarcieri tarcieri merged commit 5ee582b into RustCrypto:master Dec 12, 2023
16 checks passed
@fjarri fjarri deleted the inv_returns branch December 12, 2023 21:26
@tarcieri tarcieri mentioned this pull request Jan 22, 2025
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.

2 participants