1. RSA Key Vulnerability Assessment with Shor’s Algorithm

Problem: Assess whether RSA keys used in your infrastructure are vulnerable to quantum attacks. Demonstrate to regulators and boards that your organisation understands the quantum threat. Quantum advantage: Shor’s algorithm factors large integers in polynomial time. RSA-2048 is theoretically broken by a fault-tolerant QPU with ~4000 logical qubits.
Important: QCOS runs Shor’s on simulators for research and demonstration purposes. Current QPUs do not have enough qubits for RSA-2048. Use this for research, proof-of-concept, and regulatory awareness.
Full example: github.com/softquantus/qcos/examples/cryptography/shor_rsa.py

2. Quantum-Safe Key Generation with QRNG + PQC

Problem: Generate cryptographic keys that are secure against both classical and quantum attacks.

3. QRNG for secure token generation

Replace secrets.token_hex() with quantum entropy for highest-assurance tokens:

More cryptography examples on GitHub

  • shor_rsa.py — Factor integers, demonstrate RSA vulnerability
  • pqc_signing.py — Post-quantum document signing workflow
  • qrng_keygen.py — Key generation with quantum entropy
  • quantum_safe_tls.py — PQC certificate generation
→ View all cryptography examples