Show HN: Ed – A modern take on ancient codebook technology
smalltorch Monday, March 02, 2026ED is a new way to protect your messages in a old way.
The typical codebook comes with many challenges. They are hard to transport, hard to update, distribute. They do have one solid feature however. If the codebook can be kept secret, it will not be broken with compute.
ED attempts to solve these issues.
The words database included in the repo is a collection of over 2million common words, phrases, people, places and things. Each entry is tied to a unique string of numbers. To generate a 'key' we simply shuffle the map using secrets.randbelow() function. This is important as it's using device level entropy. Each entry reaches the 2million+! Permutation equally.
The combination of shuffles is now considered your key. This is what you can share with Bob.
Because each entry has multiple entries, based on how common a word or phrase is. You can send the same exact message many times without it ever repeating.
Alice and Bob can also generate long term keys that can be rotated. This comes at the cost of key size, but a 365 day key schedule is still only around 4gb.
Because of the ability to compress a long phrase into a single entry, this codebook shrinks the data efficiently.
Once the two ends are established, you should be able to privately communicate over any channel, including public channels.
Example Gallery: https://postimg.cc/gallery/Gs23JQW