I see address everywhere in ethereum but not public key, and I understood that address is Keccak-256 of pubkey, and I do not think it is possible to derive pubkey from address. So, my question is during signature verification does the crypto engine somehow recover the pubkey from somewhere or it is able to verify using address directly?
1 Answer
The public key is recovered from the signature. The address can then be derived from the recovered public key.
-
1Why ethereum (also bitcoin I think) uses hashed public key as an address instead of directly use public key. This can easily verify signature.– KronosMay 23, 2018 at 11:45
-
Most likely for brevity. The address isn't even the hash, it is a hexadecimal string representation of the last 20 bytes of the hash, which is why I assume this is done for brevity. (A system I am working on uses the entire hash, actually, and they are somewhat large, but nothing compared to the DER representation of the entire key.)– zxq9Apr 28, 2021 at 11:32