Zksync modexp #887
-
Team or ProjectKeyring Network EnvironmentMainnet L2 block numberNo response Provide a brief description of the functionality you're trying to implement and the issue you are running into.The lack of modexp is preventing the deployment of assets in Zksync. This functionality is necessary because we use 1024 bit RSA (with exponent 3 to minimize gas cost) for blind signatures in our system. These RSA signatures are unblinded by the user and submitted in a transaction that requires a smart contract to validate the signature in chain. Repo Link (Optional)No response Additional DetailsA deeper look at the concerns thus far is as follows:
I would appreciate any further guidance on timelines for your implementation of modexp, any alternative solutions for performing such calcs you are aware of (since this may have already come up elsewhere I am sure), and finally any thoughts you have on the gas limitations of performing a pure solidity modexp in chain. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hey, modexp is planned in the future, but it will not be present in the short term. We plan to introduce it somewhere in the middle term, but it is a bit hard to tell you a release date. So yes, using a modexp library is the best option for you.
You should probably try out compiling + testing as explained in the repo's README. Remix works with solc compiler, which compiles EVM bytecode, while Era requires zkEVM bytecode, compiled via zksolc compiler. The issues should disappear in that case. It would also allow you to test the gas consumption. |
Beta Was this translation helpful? Give feedback.
-
ok thanks - we also have an engineer looking at polynomial identity testing with me as a potential workaround. Is anyone familiar with this on your side? |
Beta Was this translation helpful? Give feedback.
Hey, modexp is planned in the future, but it will not be present in the short term. We plan to introduce it somewhere in the middle term, but it is a bit hard to tell you a release date. So yes, using a modexp library is the best option for you.
You should probably try out compiling + testing as explained in the repo's README. Remix works with solc compiler, which compiles EVM bytecode, while Era requires zkEVM bytecode, compiled via zksolc comp…