this gives a valid address from two points;

address(uint256(keccak256(abi.encodePacked(point[0], point[1]))) & 0x00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF);

but does that mean that if you are given just an address, you cannot get the two points that were used to generate it (because of the hash function)?

1 Answer 1


The main features of a hashing algorithm is that they are a one way function – or in other words you can get the output from the input but you can’t get the input from the output – just like elliptic curve cryptography where you can’t get the private key from the public key. In this case:

keccak256(...) returns (bytes32)

Compute the Ethereum-SHA-3 (Keccak-256) hash of the (tightly packed) arguments

In this case the two points.

Basically you're generating a hash from the points you specify and as stated above hash functions are one way functions. So you wont be able to get the points from the hash.

If you want to learn more about hash fucntions visit:


or about keccak256(...) visit the Ethereum documentation:


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.