Working on Longevity

// #Craft

I believe in bitcoin, but I don’t believe it will last forever all on its own. I don’t have the technical chops (yet!) to figure out how to make UTXO’s more value dense, but I would still like my cycles to somehow go towards improving bitcoin’s odds of longevity. Luckily, I think I was given the opportunity to push that ball forward a few yards.

BIP-324 introduces transport level encryption to bitcoin’s peer to peer messaging. It defines the V2 version of the p2p protocol which is an encryption scheme, along with some message serialization tweaks to squeeze out some performance. Bitcoin’s V1 p2p protocol is entirely in plaintext. And at first blush this might not seem like such a big deal given that all information on the blockchain is public anyways. However, it is a massive privacy leak with major implications.

Bitcoin needs to be as decentralized as possible to increase its odds of longevity. Like a wildfire which can’t be stamped out. If all users in the bitcoin ecosystem are transmitting in plaintext, it becomes entirely too easy for internet service providers (ISPs) to censor bitcoin activity. This results in centralizing the bitcoin ecosystem, lowering its odds of surviving.

As of Bitcoin Core v26, the encrypted V2 protocol is enabled by default. This is great as more and more nodes opt into privacy preserving encryption. However, ideally every part of the bitcoin ecosystem is using encryption in order to throw a wrench into any sort of traffic analysis. And this includes light clients which use the same p2p protocol to pull information from the nodes of the bitcoin network.

Rust is a popular language to write bitcoin applications in these days for many reasons, including its performance, safety guarantees, and ability to offer bindings in other languages. However, the rust bitcoin ecosystem lacked a BIP-324 implementation, which is the void Rob and I filled with the bip324 crate. Over the past year, I have worked on the library’s use-ability and robustness, helped integrate it into clients, and improved its lower lever cryptography.

The library is written in an ultra compatibly fashion. It takes a sans-io approach, works no_std environments, and has a low MSRV (Minimum Supported Rust Version). But it also includes some helpful wrappers for integration which are leveraged by clients today like kyoto and Floresta. The lower level chacha20 stream cipher cryptography has been split out into its own crate, chacha20_poly1305, for visibility. But it also opens the door for bitcoin-adjacent applications (e.g. nostr) to leverage the same encryption.

Encryption strengthens the entire bitcoin ecosystem, and is essential for its long term survival. If you maintain a bitcoin application, you should consider using BIP-324’s V2 protocol! Or even just make use of the lower level ciphers if they work for your use case. All these little steps increase the odds of bitcoin’s longevity.