RLPx is a Glossary P Terms suite and not a single protocol. On the one hand it maintains the Peer-to-Peer (P2P) overlay network with the means of a modified version of the Kademlia node discovery protocol (using User Datagram Protocol (UDP) messages). We could name it RLPx Node Discovery Protocol.
The first time two Peers meet each other, they should perform a two-phase handshake (i.e. two different handshakes). In the first handshake, they exchange some ryptographic secrets (the details are explained here (in the RLPx specification)) that are used for the subsequent communications between them. The subsequent messages are therefore encrypted and authenticated.
In the second handshake, they exchange their capabilities, i.e. which devp2p
subprotocols they support (the peers can support multiple protocols). This second handshake could be considered already part of devp2p
wire protocol (the Hello
message). The documentation says that:
(this time using TCP messages). I list some devp2p
wire subprotocols that are widely used:
Therefore, RLPx messages are encrypted and authenticated and on top of them you can communicate with different protocols. We can say that RLPx is the transport layer protocol and devp2p
and its subprotocols are the application level protocols.