
May’s Nerd of the Month is written by Nick Johnson and features his work on BIP-324, a bitcoin improvement proposal (BIP) that outlines a new bitcoin peer-to-peer (P2P) transport protocol.
—
I believe in bitcoin, but I do not think it will last forever on its own. Therefore, I want to direct my energy toward improving bitcoin's chances of longevity. While I may not have the technical skills (yet!) to enhance the value density of unspent transaction outputs (UTXOs), I believe I have found a way to contribute bitcoin in a meaningful capacity.
The Importance of BIP-324 and Protecting Decentralization
BIP-324 introduces transport-level encryption to bitcoin's P2P messaging. It defines the second version (V2) of the P2P protocol, which includes an encryption scheme and some tweaks to message serialization for improved performance. Bitcoin's original P2P protocol (V1) operates entirely in plaintext.
At first glance, this might not seem like a big deal, given that all information on the blockchain is public. However, plaintext represents a privacy leak for users, because any passive network observer, including internet service providers (ISPs), can track that user's bitcoin usage.
Decentralization is critical to bitcoin’s longevity, we want it to be impossible to stamp out. However, if every user in the bitcoin ecosystem transmits in plaintext, it becomes entirely too easy for ISPs to censor bitcoin activity. Inevitably, this leads to centralizing the bitcoin ecosystem and lowering its survival odds.
BIP-324’s Progress
As of Bitcoin Core v26, the encrypted V2 protocol is enabled by default. This is a great improvement, as it enables more and more nodes to opt into privacy preserving encryption. However, in order to throw a wrench into any sort of traffic analysis, every part of the bitcoin ecosystem should be using encryption. This includes *light clients* which use the same P2P protocol to pull information from the nodes in the bitcoin network.
Rust is great for writing bitcoin applications for many reasons, including its performance, safety guarantees, and ability to offer bindings in other languages. Unfortunately, a year ago, the Rust bitcoin ecosystem still lacked a BIP-324 implementation.
To the Rust Rescue
Rob and I addressed that problem by creating the bip324 crate written in Rust. Since then, I have worked on the library's usability and robustness, helped integrate it into clients, and improved its lower lever cryptography.
We wrote the bip324 library in an ultra compatible fashion that takes a sans-io approach, works in no_std environments, and has a low MSRV (Minimum Supported Rust Version). The crate includes some helpful wrappers for integrations which clients such as kyoto and Floresta leverage today. The lower level chacha20 stream cipher cryptography was split out into its own crate, chacha20_poly1305, for visibility. This opens the door for bitcoin-adjacent applications (e.g. Nostr) to leverage the same encryption.
Summary
If you maintain a bitcoin application, consider using BIP-324's V2 protocol. Or even just make use of the lower-level ciphers if that works for your use case. Each of these little steps increase the odds of bitcoin's longevity.