A post-quantum cryptography (PQC) testing framework that simulates quantum algorithms and evaluates cryptographic threat posture. Use it to assess which cryptosystems in your stack are vulnerable to quantum attacks — and what to migrate to before Cryptographically-Relevant Quantum Computers (CRQCs) arrive.
- Simulates quantum algorithms — Shor's, Grover's, Simon's, Bernstein-Vazirani, QFT
- Analyzes 21 cryptosystems — RSA, ECC, AES, SHA, Kyber, Dilithium, Falcon, SPHINCS+
- Models lattice attacks — BKZ cost estimation for LWE/RLWE parameters
- Evaluates PQXDH protocols — hybrid post-quantum handshake analysis
- Probes live systems — Matrix homeserver connectivity and key size validation
- Interactive dashboard — run all tests from the browser with real-time results
| Layer |
Technology |
| Backend |
Python 3.11+, FastAPI, Uvicorn |
| Simulation |
NumPy, SciPy, SymPy |
| Validation |
Pydantic v2 |
| Frontend |
Vanilla JS, Tailwind CSS (CDN) |
| Testing |
pytest, pytest-asyncio |
- Python 3.11 or higher
- pip
1. Clone the repository
git clone <repo-url>
cd quantum-suit
2. Create a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS / Linux
.venv\Scripts\activate # Windows
3. Install dependencies
pip install -r requirements.txt
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
| URL |
Description |
http://localhost:8000/dashboard |
Interactive test dashboard |
http://localhost:8000/docs |
Swagger UI (auto-generated) |
http://localhost:8000/redoc |
ReDoc API reference |
http://localhost:8000/health |
Health check |
quantum-suit/
├── app/
│ ├── main.py # FastAPI app — all 18 endpoints
│ ├── models/
│ │ └── schemas.py # Pydantic request/response models
│ ├── algorithms/ # Quantum algorithm simulations
│ │ ├── shors.py # Integer factorization (Shor's)
│ │ ├── grovers.py # Unstructured search (Grover's)
│ │ ├── simons.py # Hidden XOR period finding
│ │ ├── bernstein_vazirani.py # Hidden bitstring recovery
│ │ └── qft.py # Quantum Fourier Transform
│ ├── analysis/ # Threat analysis modules
│ │ ├── pqc_analyzer.py # NIST PQC threat assessment
│ │ ├── lattice.py # LWE/RLWE attack cost estimation
│ │ └── pqxdh.py # Hybrid handshake analysis
│ └── probe/ # Live system probing
│ ├── matrix_probe.py # Matrix homeserver audit
│ └── handshake_probe.py # PQXDH key size validation
├── frontend/
│ └── index.html # Dashboard UI
├── tests/
│ └── test_algorithms.py # Integration tests
└── requirements.txt
| Method |
Endpoint |
Description |
| GET |
/ |
Status + algorithm catalog |
| GET |
/health |
Health check |
| GET |
/dashboard |
Serves the frontend |
| Method |
Endpoint |
Description |
| POST |
/algorithms/shors |
Factor an integer (Shor's algorithm) |
| POST |
/algorithms/grovers |
Quantum search speedup estimation |
| POST |
/algorithms/simons |
Hidden XOR period finding |
| POST |
/algorithms/bernstein-vazirani |
Hidden bitstring recovery |
| POST |
/algorithms/qft |
Quantum Fourier Transform on a state vector |
| Method |
Endpoint |
Description |
| POST |
/analysis/pqc |
Evaluate cryptosystems against quantum threats |
| POST |
/analysis/lattice |
BKZ attack cost for LWE/RLWE parameters |
| POST |
/analysis/pqxdh |
Hybrid protocol threat assessment |
| Method |
Endpoint |
Description |
| POST |
/probe/matrix |
Matrix homeserver connectivity audit |
| POST |
/probe/pqxdh-handshake |
Validate PQXDH handshake key sizes |
Factor a semiprime with Shor's algorithm:
curl -X POST http://localhost:8000/algorithms/shors \
-H "Content-Type: application/json" \
-d '{"n": 15}'
Assess RSA-2048 and AES-256 threat levels:
curl -X POST http://localhost:8000/analysis/pqc \
-H "Content-Type: application/json" \
-d '{"cryptosystems": ["RSA-2048", "AES-256"]}'
Estimate Grover's speedup for a 128-bit keyspace:
curl -X POST http://localhost:8000/algorithms/grovers \
-H "Content-Type: application/json" \
-d '{"n_qubits": 128}'
| Category |
Systems |
| Classical asymmetric |
RSA-1024, RSA-2048, RSA-4096, ECC-P256, ECC-P384, ECC-P521 |
| Classical symmetric |
AES-128, AES-192, AES-256 |
| Hash functions |
SHA-256, SHA-512 |
| NIST PQC (KEM) |
KYBER-512, KYBER-768, KYBER-1024 |
| NIST PQC (signatures) |
DILITHIUM-2, DILITHIUM-3, DILITHIUM-5, FALCON-512, FALCON-1024 |
| Hash-based signatures |
SPHINCS+-128, SPHINCS+-256 |
| Level |
Meaning |
critical |
Broken by near-term quantum computers |
high |
Significantly weakened by quantum attacks |
medium |
Reduced but not broken security margin |
low |
Minimal quantum impact |
none |
Quantum-resistant |
- No database — all computation is stateless and in-memory
- CORS is open (all origins) — suitable for local development
- The frontend requires no build step; it loads Tailwind from CDN
- To probe a live Matrix homeserver, point
/probe/matrix at your server's URL