0

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?

1

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.

| improve this answer | |

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.