Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for sparce Montgomery multiplication in EVMMAX #778

Open
chfast opened this issue Jan 5, 2024 · 0 comments
Open

Add support for sparce Montgomery multiplication in EVMMAX #778

chfast opened this issue Jan 5, 2024 · 0 comments
Labels
EVMMAX optimization Iproves performance without functional changes

Comments

@chfast
Copy link
Member

chfast commented Jan 5, 2024

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.

@chfast chfast added optimization Iproves performance without functional changes precompiles Related to EVM precompiles EVMMAX and removed precompiles Related to EVM precompiles labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EVMMAX optimization Iproves performance without functional changes
Projects
None yet
Development

No branches or pull requests

1 participant