[BIP Proposal] Peer to Peer Message Transport Protocol V2

Peer to Peer messaging is already applied in Bitcoin courtesy of BIP 151, but the current way it is applied is inefficient and insecure, currently messages transported are non-encrypted so message tampering, block delay attacks and BGP hijacks are all valid threats using man in the middle attacks. A new BIP is aiming at adding opportunistic encryption using ChaCha20 as a cipher and Poly1305 as a message authentication code, which has been lately getting adopted in many state of the art protocol encryption schemes such as Wireguad and tinyssh.

The computation power required for encrypting and authenticating a message using these algorithms would be almost as much the current double-SHA256 checksum.

Each node supporting V2 will have to signal NODE_P2P_V2 and it will only make outbound connections to other peers supporting NODE_P2P_V2, the process of connection starts with the outbound peer calculating an odd secp256k1 public key then sending it to the inbound peer, this peer calculates a shared secret key and completes the handshake. Messages after the handshake are strictly V2 messages and any non-encrypted v1 messages will lead to termination of connection.

V2 helps detect man in the middle attacks as peers can check for encryption in session IDs. The BIP also describes a way to identify manipulated messages.

Encrypted messages are already possible with tor or VPN connections, but these solutions are often not beginner friendly and aren’t widely deployed, this BIP will help secure messages for users with lesser technical expertise.


Support us and the authors of this article by donating to the following address:


Comments powered by Talkyard.