-
Notifications
You must be signed in to change notification settings - Fork 709
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
NFC: Move low-level Montgomery arithmetic out of bigint
.
#1652
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1652 +/- ##
==========================================
- Coverage 92.10% 92.09% -0.02%
==========================================
Files 132 132
Lines 18869 18869
Branches 196 196
==========================================
- Hits 17379 17377 -2
- Misses 1453 1455 +2
Partials 37 37
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
a0afa48
to
a17e62a
Compare
a17e62a
to
2e4f0f9
Compare
I just pushed a new version to fix the |
fc59e1e
to
1f4998d
Compare
src/arithmetic/montgomery.rs
Outdated
// Nothing aliases `n` | ||
let n = unsafe { core::slice::from_raw_parts(n, num_limbs) }; | ||
|
||
let mut tmp = [0; 2 * MODULUS_MAX_LIMBS]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be BIGINT_MODULUS_MAX_LIMBS
, with this tweak it successfully builds and passes tests with --no-default-features
for powerpc64le-unknown-linux-gnu
.
When the `alloc` feature is disabled, on lesser-used targets we don't build `bigint` but we still need some of the Montgomery arithmetic. ``` git diff \ HEAD^1:src/arithmetic/bigint/bn_mul_mont_fallback.rs \ src/arithmetic/montgomery.rs ``` ``` git diff \ HEAD^1:src/arithmetic/bigint.rs \ src/arithmetic/montgomery.rs ```
1f4998d
to
ee24519
Compare
@briansmith - I don't remember having an issue with In the meantime, I'll ask around with the other fuchsia people in case they remember something. |
@erickt Sorry, it was a typo. I meant to ping erichte-ibm. |
When the
alloc
feature is disabled, on lesser-used targets we don't buildbigint
but we still need some of the Montgomery arithmetic.