Generate quantum-safe code like it’s 1999.
A retro-flavoured toolkit for generating clean Kyber & Dilithium templates — fast, predictable, and developer-first.
The PQC Code Generator is built for one purpose:
Not buried in academic PDFs. Not scattered across broken GitHub gists. Not locked behind enterprise silver bullets.
Just clean, reproducible scaffolds for:
- Kyber (ML-KEM) — secure key exchange
- Dilithium (ML-DSA) — digital signatures
- Use-cases like API encryption, TLS handshake, file signing, key exchange
- Python-first templates that actually run
- Auto-generated tests, README, requirements
Every template includes:
main.pywith Kyber/Dilithium logic- Optional
tests/folder - A self-contained
requirements.txt - Auto-generated usage instructions
- ZIP export
- A retro UI where choosing an algorithm feels like selecting an RPG character
Most engineers know PQC is important. Few are able to use it confidently today.
This project bridges the gap between:
“PQC is the future.” and “I just generated a working Kyber or Dilithium module in 2 clicks.”
The goal:
- Give teams a reproducible starting kit
- Reduce decision fatigue around parameters
- Provide safe defaults
- Hide the boilerplate but expose the essentials
- Make PQC feel like something you can ship — not fear
Think of it as:
-
ML-KEM (Kyber-512/768/1024)
-
ML-DSA (Dilithium-2/3/5)
-
Python scaffold output
-
General / API Encryption / TLS Handshake / Signing / Key Exchange variants
-
Optional test suite
-
Retro live console preview
-
ZIP bundling
-
API endpoint for programmatic generation
-
Clean internal architecture with:
- Algorithm logic
- Use-case logic
- Template rendering
- Pluggable code generators
No unnecessary abstractions. No magic wrappers. Everything is understandable at a glance.
git clone https://github.com/Vishnu2707/PQC-Code-Generator
cd PQC-Code-Generatorpip install -r requirements.txtpython manage.py runserverOpen:
http://127.0.0.1:8000/generator/
You’ll get:
- Algorithm selector
- Use-case selector
- Retro console preview
- Tabs for main/tests/requirements
- ZIP download
Everything updates live using htmx.
If you want to generate templates from inside pipelines/scripts:
from core.pqc_codegen import CodeGenConfig, generate_code
cfg = CodeGenConfig(
algorithm="kyber768",
language="python",
use_case="general"
)
result = generate_code(cfg)
print(result.files["main.py"])This is useful for:
- CI/CD toolchains
- Secure build pipelines
- Automated code generation
- Research prototyping
- Distributed system bootstrapping
/scaffold/
│
├── main.py # Generated code
├── README.md # Auto-written usage guide
├── requirements.txt # Dependencies
└── tests/
└── test_cases.py # Optional
Predictable. Auditable. Easy to diff and review.
The generated templates are safe defaults, but they are not a replacement for a professional security review.
General advice:
- Never log private keys
- Validate key sizes & parameters
- Benchmark in your environment
- Use hybrid mode during migration (X25519 + Kyber)
- Treat PQC as part of a defence-in-depth strategy
- Review generated code for production deployments
This project does not implement cryptographic primitives. All algorithms rely on the official, audited Kyber/Dilithium implementations from pqcrypto or third-party libraries.
Generated templates are intended as reference scaffolds, not drop-in production cryptography.
Users must:
• perform their own security review
• validate configurations
• use audited PQC libraries
• understand the limits of the threat model
The goal is to help you start smart — not bypass good engineering practices.
Upcoming features:
-
Multi-language output:
- Go
- Node/TypeScript
- Rust
-
Falcon + SPHINCS+ support
-
Plug-and-play SDKs
-
Hosted API with rate-limits
-
Performance benchmarking utilities
-
CI/CD templates
-
PQC migration patterns for microservices
-
More developer presets
Open an issue if there's something you want early.
Contributions welcome!
You can:
- Add additional language targets
- Improve template clarity
- Submit new use-case presets
- Share performance benchmarks
- Review documentation
- Suggest security improvements
This project is designed to grow with real-world usage.
Vishnu Ajith Founder — Quardian
Works across:
- Post-Quantum Cryptography (Kyber, Dilithium, Falcon)
- Secure distributed systems
- Quantum-Safe DevOps & CI/CD automation
- Cloud security & modern infrastructure
- Quantum-inspired optimisation (QAOA / VQC)
The PQC Arcade suite is part of a larger mission: make the quantum era developer-friendly, not intimidating.





