Add modular square root calculation for prime modulus ConstMontyForm#1139
Merged
tarcieri merged 7 commits intoRustCrypto:masterfrom Feb 13, 2026
Merged
Add modular square root calculation for prime modulus ConstMontyForm#1139tarcieri merged 7 commits intoRustCrypto:masterfrom
ConstMontyForm#1139tarcieri merged 7 commits intoRustCrypto:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1139 +/- ##
==========================================
+ Coverage 86.72% 86.99% +0.27%
==========================================
Files 182 185 +3
Lines 20390 20729 +339
==========================================
+ Hits 17683 18034 +351
+ Misses 2707 2695 -12 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
baf27ac to
a1f122a
Compare
a1f122a to
3208d84
Compare
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
Signed-off-by: Andrew Whitehead <cywolf@gmail.com>
eeaf5e0 to
263a7df
Compare
4 tasks
Contributor
Author
|
This is really only in draft because I thought there might be debate about the macro naming or other aspects, I can mark it for review |
Member
|
Would be nice to get it into a release, especially as it could be useful for |
tarcieri
approved these changes
Feb 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This implements a new macro,
const_prime_monty_params!as an alternative toconst_monty_params!for a prime modulus. The resultingConstMontyFormvalues support asqrtmethod, calculating the modular square root (if it exists). Support forMontyFormis possible, but it would not be very ergonomic as thePrimeParamswould need to be passed around separately.