1

Is there a solution to retrieve or calculate the public key of an EOA account from its Ethereum address in Solidity? Is it possible?

eth
  • 85,679
  • 53
  • 285
  • 406
Alireza
  • 533
  • 5
  • 15

3 Answers3

2

It is not possible, but if you have a signed transaction from an address you can get the public key from the signature. See this response.

I hope you find it helpful.

Agus Velez
  • 25
  • 5
1

calculate the public key of an EOA account from its Ethereum address in Solidity

It is not.

Mikko Ohtamaa
  • 22,269
  • 6
  • 62
  • 127
1

Short: No, it is not possible.

Long: The public key is derived from the private key. The address is derived by hashing the public key and cutting the result to the last 20 bytes. Due to the characteristics of hashing functions it is impossible to calculate the input with a given output. Thus, it can be regarded as impossible to get the public key of a given address.

Rachain
  • 71
  • 3