-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Modular exponentiation precompile wrapper #1985
Comments
Is anyone still working on this? If not I'd like to have a crack at this. |
I found this useful function on StackExchange that could be the solution to this: |
…ion-precompile-wrapper-OpenZeppelin#1985
…1985' of https://github.com/mw2000/openzeppelin-contracts into modular-exponentiation-precompile-wrapper-OpenZeppelin#1985
I'm not sure if #3298 's implementation is actually useful in the majority of the cases. The main reason why I see developers using When working with RSA signatures, a private key consists of a modulus Similarly, for verifying it's needed to do Both operations don't fit in an Although RSA signatures have never been popular on Ethereum, with the new Account Abstraction trend it can be used as an alternative authorization mechanism. So, I'm afraid that this implementation wouldn't solve that particular use case. |
EIP 198 introduced the modular exponentiation precompile, also known as "modexp".
It's a useful primitive for cryptographic operations, which we would like to wrap in a library so that developers can use it without having to write assembly.
One of the challenges is the fact that the precompile receives and returns bignums, i.e. numbers of arbitrary size. In order to provide a good interface, we might need to define a struct to represent bignum types.
The text was updated successfully, but these errors were encountered: