My understanding is that bootnode --genkey commands generate private key of node, and bootnode --writeaddress commands generate public key of node.

However, why node needs private key and public key?

Main usage of node's public key seems to be an identifier of nodes. If the node key is only used as identifier, no need for cryptography.

What is nodekey of bootnode command?


Bootnodes must be identified by an enode. Enodes are derived from private key.

Full quote:

Each ethereum node, including a bootnode is identified by an enode identifier. These identifiers are derived from a key. Therefore you will need to give the bootnode such key.

Source: https://github.com/ethereum/go-ethereum/wiki/Setting-up-private-network-or-local-cluster#setup-bootnode

  • Thank you. Then, what if private key leaks? Is there any risk of leaking nodekey ? – 久保圭司 Jan 23 '20 at 9:08
  • 1
    I am not sure @久保圭司. I suppose you can obtain the enode identifier and you MIGHT (again, not sure) connect to this node or even play as a "node in the middle" (take this node identity). But again, this is pure speculation from me. – Florian Castelain Jan 23 '20 at 9:17

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.