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

modexp unsupported: precompile 0x5 (eip-198) #882

Closed
flipdazed opened this issue Jan 14, 2025 · 1 comment
Closed

modexp unsupported: precompile 0x5 (eip-198) #882

flipdazed opened this issue Jan 14, 2025 · 1 comment

Comments

@flipdazed
Copy link

It appears that zksync doesn't support modexp as a precompile like ethereum mainnet

The EIP standard is available on mainnet since byzantine fork: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md

I may stand corrected but this makes it harder to compute cryptographic operations that rely on modular exponentiation (e.g. RSA signature verification).

Has this been raised before ? Are there templated workarounds?

@popzxc
Copy link

popzxc commented Jan 15, 2025

Hello! Indeed, the modexp precompile is not yet supported on ZKsync. It is, however, in our plans, and will become available in the future.

As for the workarounds, there is an implementation of modexp in Yul in zksync_era_precompiles by LambdaClass -- you may take a look at it and see whether it's something you can reuse. However, this implementation is not provided by Matter Labs and I cannot comment on the quality or correctness.

@popzxc popzxc closed this as completed Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants