Quantum DKIM Factoring
An educational look at the quantum threat to RSA-based email authentication.
This research explores a theoretical quantum computing threat to DKIM (DomainKeys Identified Mail), the RSA-based standard that authenticates email. It demonstrates how Shor's algorithm could, in principle, factor a DKIM public key if sufficiently powerful quantum hardware existed — and just how far current hardware is from that point.
How it works
- Retrieves a DKIM public key from DNS.
- Runs Shor's period-finding algorithm, implemented in Q#, on a quantum simulator.
- Applies continued-fraction analysis in C# to extract candidate factors.
- Falls back to classical Pollard's rho factorization for realistic key sizes.
- Reconstructs the private key to demonstrate the theoretical impact: forged DKIM signatures.
Status: theoretical
This is not a working attack against real cryptography. Breaking RSA-1024 requires on the order of 30 million physical qubits with error correction; the largest quantum computers available as of 2025 have roughly 1,000 physical qubits. The simulator demonstrates the algorithm on toy inputs, while actual DKIM keys remain computationally safe for the foreseeable future. The project targets Azure Quantum's Quantinuum H1-1 hardware as a future execution path, though current systems lack the capacity to run it for real.
The point isn't to break anything today — it's to make the post-quantum cryptography risk to email authentication concrete and inspectable.