Computational cryptography › Live on mainnet today › Hashes and symmetric crypto
SYMMETRIC ENCRYPTIONPrimitive

P2P transport encryption

In plain words

Encrypts the traffic between Ethereum nodes.

The idea: Once the handshake has produced a shared secret, both nodes derive symmetric keys from it, and every message is encrypted and tagged, so outsiders can't read or alter it. Symmetric ciphers are fast and only modestly weakened by quantum computers. The weak spot is the elliptic-curve handshake that created the keys.

Why it matters: Keeps what peers tell each other private and unaltered.

The details

On the map: RLPx (AES-CTR), discv5 (AES-GCM), libp2p Noise (ChaCha20-Poly1305)

After the handshake, peer-to-peer traffic is encrypted with symmetric ciphers: RLPx (execution clients) uses AES in counter mode with a Keccak-based MAC[1], discv5 uses AES-GCM[2], and libp2p's Noise uses ChaCha20-Poly1305[3].

It hides what peers say to each other and stops tampering in transit. These ciphers are quantum-resistant. The key exchange that sets them up is not.

Rests on

If any of these breaks, this breaks too.

If it falls

If this breaks, these break with it.

References

  1. devp2p authors. The RLPx Transport Protocol. ethereum/devp2p, 2019. github.com/ethereum/devp2p/blob/master/rlpx.md
  2. devp2p authors. Node Discovery Protocol v5. ethereum/devp2p, 2021. github.com/ethereum/devp2p/blob/master/discv5/discv5.md
  3. libp2p authors. noise-libp2p: Secure Channel Handshake. libp2p/specs, 2020. github.com/libp2p/specs/blob/master/noise/README.md