You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Adds faster 256-bit modular addition and multiplication
* Fix problems identified by CI
* Use AddOverflow and SubOverflow instead of add256 and sub256
* Remove unnecessary assignment and replace use of SubOverflow with Sub
* Use explicit returns
* Add comment about iteration count in AddMod
* Fix mistake in calculation of reciprocal for (64n+1)-bit moduli
* Change expression according to readability preference
Co-authored-by: Paweł Bylica <chfast@gmail.com>
* Remove unnecessary case safeguards (CI: SCC-S1023, RVV-A0010)
* Omit unnecessary break at end of case clause (CI: RVV-A0010)
* Remove new shift function, use Lsh instead
* Use unsigned shift count
* Fix AddMod
* Replace unnecessary use of SubOverflow with Sub
Co-authored-by: Paweł Bylica <chfast@gmail.com>
* create reciprocalCache type
* mod: modularize cache
* Pass cache by reference
* Reduce overhead to a single pair of hit/miss counters for the reciprocalCache
* Add some more explicit returns
* Improve explanation of cache size parameters
* gofmt benchmarks_test.go
Includes reordering of some tests to preserve readability
* Add MulMod tests with one operand a power of 2
* Add MulMod tests with one operand a power of 2 plus/minus 1
* test: Add AddMod test cases for unoptimized case with overflow
* test: Add tests for leadingZeros()
* Add tests with one operand being 2^256 minus a power of 2 (only one 0-bit)
* Disable the cache if configured to 0-way cache sets
* Add fixed modulus and precalculation of its reciprocal
* tests: more ternary ops cases, more coverage
* squashmelater: commit to trigger codecov
* mod: remove global cache
* move reciprocal cache to separate file, un-export
* make fixed modulus non-global
* lint fix
* Remove automatic cache
* Pass modulus and reciprocal by reference instead of value
* Make reciprocal() specialized for m[3] != 0 (modulus >= 2^193)
* Add two corner case tests for reciprocal
* Remove unreachable safeguard code in reciprocal
* Comment out unused onesCount
* Make leadingZeros faster
* Simplify detection of whether a modulus is a power of 2
* Speed up the end of reciprocal
* Add MulModWithReciprocal, export Reciprocal
* Pass reciprocal as pointer parameter to MulModWithReciprocal
* Remove unused func onesCount
* Add testing of MulModWithReciprocal
* Adjust comments and tests to reflect that Reciprocal now only supports m[3] != 0
* Also test MulModWithReciprocal on regular test cases
Co-authored-by: Paweł Bylica <chfast@gmail.com>
Co-authored-by: Martin Holst Swende <martin@swende.se>
0 commit comments