pqc
Post-quantum cryptography for JavaScript
A pure-JavaScript implementation of the NIST post-quantum standards (ML-KEM, ML-DSA, and SLH-DSA, covering FIPS 203, 204, and 205) made for the web with no native dependencies. I wrote it in college and don't maintain it anymore.
- npm downloads3,493
- ML-KEM keygens / sec2,300+
- NIST standards3
How this happened
This one started with a Veritasium video on the quantum threat. I was intrigued, started reading about it, and found the math behind it (lattices, polynomial rings) interesting. NIST had just standardised its post-quantum algorithms and I was like, I want to try implementing these. So I went ahead and started.
It was not easy. I didn't even know how to read a spec. Half the language in it, no clue. So I started reading stuff, took help from AI to understand things, and slowly started building.
Somewhere in the middle I found out that Paul Miller, whose hashes library I was already using, had also made a post-quantum library. I read his code for hours, understood it, and essentially wrote that into mine.
In the end, I'm not maintaining it anymore. Several better ones have come out since.