Thanks to the introduction of EIP 198, RSA signature verification is now feasible in Ethereum.

How much gas is required for such a verification?

1 Answer 1


You can read about it here: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-198.md

A 4096-bit RSA exponentiation would cost mult_complexity(512) * 4095 / 100 = 22853376 gas in the worst case, though RSA verification in practice usually uses an exponent of 3 or 65537, which would reduce the gas consumption to 5580 or89292, respectively.

According with the first example of the EIP, the function modExp() implemented here and the inputs:


the execution cost was 14248 gas.

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.