-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Reactivate fast squaring algorithms #68
Comments
In the Montgomery domain, the off-by-one is the least significant bit Also it doesn't happen only for generic square but also the fast square
vs constantine/constantine/arithmetic/limbs_montgomery.nim Lines 208 to 244 in 0400187
|
* Add test case for #30 - Euler's criterion doesn't return 1 for a square * Detect #42 in the test suite * Detect #43 in the test suite * comment in sqrt tests * Add #67 to the anti-regression suite * Add #61 to the anti-regression suite * Add #62 to anti-regression suite * Add #60 to the anti-regression suite * Add #64 to the test suite * Add #65 - case 1 * Add #65 case 2 * Add #65 case 3 * Add debug check to isSquare/Euler's Criterion/Legendre Symbol * Make sure our primitives are correct * For now deactivate montySquare CIOS fix #61 #62 * Narrow down #42 and #43 to powinv on 32-bit * Detect #42 #43 at the fast squaring level * More #42, #43 tests, Use multiplication instead of squaring as a temporary workaround, see #68 * Prevent regression of #67 now that squaring is "fixed"
unfused squaring was added in #144 The normal assembly version is as fast as multiplication with MULX/ADOX/ADCX. |
Closed in #160 |
Commit 2971965
deactivates the fast path for generic squaring as there is an off-by-one on 32-bit with inputs from the test suite (from #61 #62):
constantine/tests/t_finite_fields_mulsquare.nim
Lines 163 to 214 in 2971965
To be reactivated:
constantine/constantine/arithmetic/limbs_montgomery.nim
Lines 246 to 316 in 2971965
The text was updated successfully, but these errors were encountered: