evmone
evmone copied to clipboard
Add support for sparce Montgomery multiplication in EVMMAX
If the modulus don't use all bits of an integer (e.g. 255-bit modulus in uint256) some overflows in modular addition and Montgomery multiplication cannot happen and the implementation can be simplified. This is called "sparse" Montgomery multiplication.
EVMMAX should select the better algorithm during setup.
Probably should be done after #777 and #742.