ethereum / devp2p

Ethereum peer-to-peer networking specifications
984 stars 275 forks source link

discv5: document session key cache #117

Closed fjl closed 3 years ago

fjl commented 4 years ago

When a man-in-the-middle responds to a call message (PING, FINDNODE, ...) with WHOAREYOU, the spec explicitly says that the new session should be considered established only when a valid authenticated call response comes through with the new keys. We should document that the reason for this requirement is to prevent messing up existing sessions through MITM.

fjl commented 4 years ago

Coming back to this issue, I feel what we'd really need is a good description of the session key cache in discv5-theory.md. This text should go into sufficient detail to cover this issue as well, i.e. we should define precisely when the session is considered established and also what it's tied to.