Mamy Ratsimbazafy 14af7e8724
Low-level refactoring (#175)
* Add specific fromMont conversion routine. Rename montyResidue to getMont

* missed test file

* Add x86_64 ASM for fromMont

* Add x86_64 MULX/ADCX/ADOX for fromMont

* rework Montgomery Multiplication with prefetch/latency hiding techniques

* Fix ADX autodetection, closes #174. Rollback faster mul_mont attempt, no improvement and debug pain.

* finalSub in fromMont & adx_bmi -> adx

* Some {.noInit.} to avoid Nim zeroMem (which should be optimized away but who knows)

* Uniformize name 'op+domain': mulmod - mulmont

* Fix asm codegen bug "0x0000555555565930 <+896>:   sbb    0x20(%r8),%r8" with Clang in final substraction

* Prepare for skipping final substraction

* Don't forget to copy the result when we skip the final substraction

* Seems like we need to stash the idea of skipping the final substraction for now, needs bounds analysis https://eprint.iacr.org/2017/1057.pdf

* fix condition for ASM 32-bit

* optim modular addition when sparebit is available
2022-02-14 00:16:55 +01:00
..
2021-12-15 00:02:11 +01:00
2021-08-13 22:07:26 +02:00
2022-02-10 14:05:07 +01:00
2022-02-06 15:38:26 +01:00
2020-10-09 07:51:47 +02:00
2022-02-06 15:38:26 +01:00
2021-02-09 22:57:45 +01:00
2020-10-09 07:51:47 +02:00
2022-02-06 15:38:26 +01:00
2022-02-06 15:38:26 +01:00
2021-02-09 22:57:45 +01:00
2021-01-29 20:42:36 +01:00
2020-07-24 22:02:30 +02:00
2020-09-27 09:15:14 +02:00