cd /news/artificial-intelligence/i-made-a-sota-post-quantum-encryptio… · home › topics › artificial-intelligence › article
[ARTICLE · art-181689] src=cobalt769.org ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

I made a SOTA post quantum encryption in 2 hours

Chaitanya Mishra and Aditya Singh Bhandari of Chony built Cobalt-769, a post-quantum key-exchange design that sends 1,727 bytes on the wire, 24% smaller than NIST's ML-KEM-768 at 2,272 bytes, using a prime-sized Artin–Schreier field of 769 instead of cyclotomic rings. The pair used Chony's internal Tow and Fusion meta-harnesses plus an in-development model called Dork and Factory AI to test more than a hundred candidate designs in a single session, with Mishra steering each review round by hand after an unattended model-to-model loop produced only "polite, safe answers." Earlier prototypes failed on size or speed — a lattice attempt at 7.7 KB, an isogeny design at 22 milliseconds to decrypt, and a cellular-automaton scheme with 64-byte ciphertexts but 3.5 MB public keys — before the 24-block BCH error-correcting NTRU design reached 1,727 bytes.

recommendation

Keep a human in the loop reviewing each model proposal instead of letting models critique each other unattended; the source found automated loops returned only polite, safe answers while manual steering tested over 100 designs in one session.

more in playbook: Designing agent systems
by read6 min views4 publishedDec 4, 2026
I made a SOTA post quantum encryption in 2 hours
Image: source

Chaitanya Mishra & Aditya Singh Bhandari (Mony) · Chony · December 2026

If you want the formal math, proofs, and security tables for Cobalt-769, they are all in the whitepaper. This post is just the normal, plain-English version of how we actually built it in a day, what broke along the way, and what surprised us about working with models this way.

Why we started #

I have been interested in encryption for a long time. I even have a private essay I wrote for myself on why encryption matters to the world. Watching Silicon Valley only made that itch worse.

Right now, the internet is moving to NIST's new post-quantum standard, ML-KEM-768, so encrypted traffic stays safe even if large quantum computers arrive. ML-KEM-768 is a good standard, and we are not claiming otherwise. Still, it sends 2,272 bytes on the wire for every key exchange, and it relies on a single family of structured math (cyclotomic rings) that the entire internet is now betting on at once. We wanted to see if we could build something noticeably smaller than ML-KEM-768, with strong estimated security, without using cyclotomic rings at all.

The setup: Tow, Fusion, Dork, and Factory AI #

Internally at Chony we have two tools, Tow and Fusion, that act as a meta-harness sitting on top of other coding harnesses. We also use an internal model we are still developing called Dork, alongside Factory AI (which really is the Porsche of coding harnesses). Tow and Fusion are expensive to run and buggy enough that probably only I can tolerate using them, which is why they are not public. They do work, though.

To start Cobalt, I spun up a fresh VM and used Fusion to pit our models against each other on unconventional ways to design a post-quantum key exchange. The setup was simple: each model had to propose five ideas, and a separate council of models would review them, argue over what was broken, and send critiques back to either fix or throw out.

Early on we tried letting a background script run the loop automatically. I killed that pretty quickly. Letting models talk to each other unattended just produces polite, safe answers. Staying in the loop, reading every candidate, and steering each round by hand made all the difference. Because the models are so fast, we could still test more than a hundred ideas in a single session instead of spending months nursing one bad design.

What did not work #

Most of the early ideas fell apart quickly, and the few that looked promising at first still died once we actually coded them up and tested them.

Our first lattice attempt came out to 7.7 KB on the wire, more than three times bigger than ML-KEM-768. An isogeny-based prototype had nice small keys, around 2.1 KB, but took 22 milliseconds to decrypt, which is hundreds of times too slow for normal internet traffic. We spent a while on weird non-lattice trapdoors too, including a cellular-automaton idea that had tiny 64-byte ciphertexts, until our red-team pass found structural leaks and realized the public keys blew up to 3.5 MB. Another ring design split into too many small algebraic pieces and was still bigger than ML-KEM.

The turning point came when one prototype tried packing a strong error-correcting code (24 small BCH blocks decoded in parallel) into a single-polynomial NTRU scheme. Suddenly the total wire size dropped to 1,727 bytes, 24% smaller than ML-KEM-768, while scoring higher on standard lattice security estimators. The only catch was that it still used a cyclotomic ring.

Landing on Cobalt-769 #

About an hour into the session, we moved that same error-correcting design onto a prime-sized field of size 769 (the Artin–Schreier field, covered in detail in the whitepaper).

You do not need number theory to see why that worked well. Because the size is a prime and the polynomial never factors, every secret key you generate is guaranteed to work on the first try with no retries. There are no smaller hidden sub-rings inside it for an attacker to exploit. And because the numbers only go up to 769 instead of 3,329, they pack tightly: a Cobalt-769 public key is 922 bytes and a ciphertext is 817 bytes, for 1,739 bytes total (23.5% smaller than ML-KEM-768).

The base protocol and first working version were written in under two hours.

The hard part: breaking our own work #

Building the first version took two hours. Trying to break it and making it safe to ship took the rest of the day.

First, we ran a dedicated red-team pass specifically trying to break our prime-field choice. The main algebraic attack we worried about ended up blowing secret vectors up into random noise, so it went nowhere. That same audit did catch a real theoretical gap, though: like many compact lattice schemes, our failure-rate math relied on a heuristic assumption that rounding errors behave independently. We built a tiny counterexample showing that assumption can fail for unlucky keys. So we added a second variant, Cobalt-769D (1,810 bytes, still 20.3% smaller than ML-KEM-768), which adds a small amount of random jitter before rounding. That lets us prove the decryption failure rate stays below 2<sup>−142</sup> for every accepted key with no heuristic assumptions.

Second, we rewrote the whole thing in pure safe Rust (#![forbid(unsafe_code)]) and spent a few hours profiling. Our first Rust build took 215 microseconds to encrypt. Replacing naive packing with a 5-level tree, speeding up the error-correction decoder, splitting polynomial multiplication across two small transforms that LLVM auto-vectorizes, and working around an LLVM optimizer quirk in our hash function brought encapsulation down to 17.9 microseconds and decapsulation to 20.6 microseconds.

Third, right before shipping, we audited the compiled binary and caught three real bugs:

  • If someone maliciously sends an all-zero public key, encryption multiplies by zero and leaks the message. We now reject all-zero keys everywhere.
  • When we compiled with size optimization (opt-level = z ), the compiler quietly inserted 26 hardware CPU division instructions (18 in our math, 8 inside a third-partysha3 crate). CPU division takes variable time depending on the numbers, which is the exact side-channel class behind KyberSlash. We replaced all of it with multiply-shift math and a tiny 60-line hash sponge, and added a check that fails the build if a singlediv instruction shows up at any optimization level.
  • Our first CLI loaded the whole input file into RAM before encrypting it. We rewrote it to stream in 64 KiB chunks so it uses about 10 MiB of RAM even on huge files.

After fixing those, we ran 69 Rust tests in debug and release, 12 byte-exact test vectors across Rust, C, and Python, 100,000 live roundtrips and 10,008 fuzz inputs under AddressSanitizer and UndefinedBehaviorSanitizer (zero failures, zero leaks), and dudect timing checks across all three suites (Cobalt-769, Cobalt-769D, and Category 5 Cobalt-1033).

What this is and what it isn't #

It is honestly still surprising to see how much capability is sitting inside modern models once you have a harness that lets them push back on each other and test every claim against real code.

At the same time, ML-KEM has had a decade of public cryptanalysis from the best cryptographers in the world, while Cobalt-769 was built and analyzed in a single day. It is not a NIST standard. Everything is public: the whitepaper, the source code, and prebuilt binaries for macOS and Linux (curl -fsSL https://cobalt769.org/install.sh | sh). If you can break the math, find a proof gap, or spot a side-channel leak, email chaitanya@chony.si. We will credit you publicly, and if you break it, we will write a post about that too.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @chony 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/i-made-a-sota-post-q…] indexed:0 read:6min 2026-12-04 · —