As titled. I understand that there's an ecrecover function in Solidity. Can I use it for recovering a wallet address from a signature? Is it cheaper than a Keccak hash operation?


Public key recovery of an ECDSA signature uses the ECRECOVER operation and costs 3000 gas. If you have the public key you can derive the address and afaik a keccak operation(sha3) costs 30 gas.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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