based on EIP-198 and a question asked here After EIP 198 introduction, how much gas is required for RSA signature verification in solidity? it should now be possible to do RSA signature verification in Ethereum.

I want to do that on a private chain within a smart contract. Sadly I can't find any more details on how to implement that, besides the EIP description.

Is there an example contract available somewhere or a blog post which explains how to use EIP198 to achieve rsa signature verification within solidity?

If someone could point me to a description with more solidity-related details than https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md would be highly appreciated, I can't find anything other than the EIP itself.

1 Answer 1


I think you get it wrong the eip198 is a precompiled contract, it has already been written in the client console not on the blockchain. So if you geth client then it has already implemented it for you. You can read more on the answer on this question: List of pre-compiled contracts. It also included the tutorial on medium for you to use it on your geth client

To recreate it, you can check the source code of geth written in go: https://github.com/ethereum/go-ethereum/blob/bd6879ac518431174a490ba42f7e6e822dcb3ee1/core/vm/contracts.go#L149.

To implement it in solidity follow this answer: Verifying Modular exponentiation operation in etherum.

And finally if you want understand the core idea behind it i recommend you go to appendix E from ethereum yellow paper the fifth contract is what you are looking for


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.