nucypher / DarkIntegers.jl

A modulo arithmetic toolbox for integers and polynomials
https://nucypher.github.io/DarkIntegers.jl
GNU General Public License v3.0
7 stars 2 forks source link

Check the correctness of `mulmod_montgomery()` #22

Open fjarri opened 4 years ago

fjarri commented 4 years ago

See the line a = submod(a, p2, m). submod() requires both of its first two arguments to be lower than m, but I am not sure how to prove that a satisfies that.

On the other hand, exhaustive tests with MLUInt{2} pass, so perhaps it's okay?