Closed unzvfu closed 6 years ago
One way to do this might be to make Monty arithmetic into a fixnum_impl
and then combine it with common functionality from an RNS fixnum_impl
.
This is possible now that all precomputations are done on the device (see ff63e4c5789159d11c2d810a28cbb07a7dbbe4bc).
Currently we only support a single fixed modulus in the Montgomery arithmetic, but there's no reason why we shouldn't also support moduli that vary with the slot.
This would involve doing all the Montgomery preprocessing on the GPU, which is a non-trivial amount of work.