Post-Quantum Cryptography in Pure Python, With the Audit Warning Up Front

On August 13, 2024, NIST released its first three finalized post-quantum standards: FIPS 203, a module-lattice key-encapsulation mechanism, FIPS 204, a module-lattice digital signature standard, and FIPS 205, a stateless hash-based signature standard. QuantumCrypt-AI is my implementation project built around those three documents.

What is in the box

The README lists eight parameter sets. For FIPS 203 there are ML-KEM-512, 768 and 1024, formerly Kyber. For FIPS 204 there are ML-DSA-44, 65 and 87, formerly Dilithium. For FIPS 205 it lists SLH-DSA-SHA2-128f and SLH-DSA-SHA2-256s, formerly SPHINCS+. Beyond the three standards it also includes threshold protocols for multi-party computation, format-preserving encryption, key derivation with HKDF, PBKDF2 and Argon2id, and a hybrid mode.

The hybrid example combines ML-KEM-768 with X25519. The README recommends hybrid mode during the transition, so a flaw in either the new or the old scheme does not break the whole exchange.

Why pure Python

The library has no C dependencies, so it runs anywhere Python runs and a reader can follow the code from the key generation call down to the arithmetic. The use of Python's secrets module for randomness is stated in the README. The cost is also stated: pure Python can leak timing information in some environments, and for high-security deployments the README points to compiled libraries such as liboqs or OpenSSL 3.2 and later.

The warning I put first

The README calls the project research and development and says it is in beta. Its first security note is that it has not undergone a third-party security audit and should not be used in production without further review. A reader should hear that before they read a feature list.

It also lists the practical pain of migration. Post-quantum keys and signatures are larger, so certificates, protocols and hardware modules need room for them. The standards are not backward compatible with existing PKI. NIST may revise or add algorithms, so systems should be built to swap algorithms.

Where this fits

The repository includes a security hardening report dated June 2026. If you need to protect real data today, use an audited library and treat this one as reading material.

Sources

NIST, Releases First 3 Finalized Post-Quantum Encryption Standards, August 13, 2024: nist.gov/news-events/news/2024/08/nist-releases-first-3-finalized-post-quantum-encryption-standards. QuantumCrypt-AI README: github.com/yethikrishna/QuantumCrypt-AI.

← back to the journal