P2P message encryption

P2P messages are currently all unencrypted which can potentially open up vulnerabilities like:

  • Associated metadata in P2P messages may reveal private information.

  • Possibilities for attackers who control the routing infrastructure of the P2P network to censor P2P messages since P2P messages can be detected trivially - they always start with a fixed sequence of magic bytes.

BIP 324 proposes a new Bitcoin P2P protocol which features transport encryption and slightly lower bandwidth usage.

bip324.com contains a list of all the open PRs and great resources to understand the proposal. A visual explanation of how BIP 324 works can be found in this blog - How to encrypt the P2P protocol?