Loading

evm_modexp

Scalar function

EVM MODEXP precompile: Computes base^exp mod mod using modular exponentiation. Returns 0 if mod is 0 or 1. Uses square-and-multiply algorithm. Critical for cryptographic operations like RSA verification.

evm_modexp(UINT256, UINT256, UINT256)

Parameters

Name Type
base UINT256
exp UINT256
mod UINT256

Returns

Name Type
result UINT256
1
SELECT evm_modexp(base, exponent, modulus) AS result;
Notebook ready in readonly mode.