You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When performing the crypto handshake, we send an auth and expect to receive an ack. But it is possible that at the same time as we send an auth message to a peer, the peer is sending their auth message to us.
From "Creating authenticated connection" in the RLPx docs
initiator generates auth from ecdhe-random, static-shared-secret, and nonce (auth = authInitiator handshake)
initiator connects to remote and sends auth
optionally, remote decrypts and verifies auth (checks that recovery of signature == H(ephemeral-pubk))
remote generates authAck from remote-ephemeral-pubk and nonce (authAck = authRecipient handshake)
optional: remote derives secrets and preemptively sends protocol-handshake (steps 9,11,8,10)
@hayesgm sorry for the late response. I don't know if this issue has been handled, but I also don't know if other clients actually do this. I think mana's flow assumes the peers will not preemptively send the protocol handshake. But I could be wrong.
When performing the crypto handshake, we send an
auth
and expect to receive anack
. But it is possible that at the same time as we send anauth
message to a peer, the peer is sending theirauth
message to us.From "Creating authenticated connection" in the RLPx docs
... 5-7 omitted here
Currently, we do not handle that optional scenario. If we send an
auth
message, we only expect to receive anack
message.All of the logic for the crypto handshake currently resides in the
ExWire.P2P
module.The text was updated successfully, but these errors were encountered: