🎯 Goal

Understand the threat posed by quantum computing to classical cryptographic algorithms, and get hands-on with emerging post-quantum cryptography (PQC) tools and implementations.


🧠 1. The Quantum Threat

πŸ“‰ Problem

Quantum computers (with enough qubits) could:

  • Break RSA, DSA, and DH using Shor’s algorithm
  • Break elliptic-curve crypto (ECC) like Curve25519
  • Render GPG, SSL/TLS, and Bitcoin signatures insecure

Most modern crypto is quantum-vulnerable

πŸ•’ Timeline

Milestone Estimate
Large-scale quantum ~10–20 years
Store-now-decrypt-later risk βœ… Now
PQC standards βœ… 2022–2024 (NIST)

🧬 2. NIST Post-Quantum Algorithms

As of 2024, NIST has selected finalists:

βœ… Approved Algorithms

Purpose Algorithm Type
Key Encapsulation Kyber Lattice-based (Module-LWE)
Digital Signatures Dilithium Lattice-based (Module-LWE)
Signatures (Alt) Falcon, SPHINCS+ Hash-based & structured-lattice

πŸ” 3. age + Post-Quantum Plugin

✨ age-plugin-pq by Filippo Valsorda

Combines Kyber (post-quantum KEM) + X25519 for hybrid encryption.

πŸ“¦ Install age (if not already):

sudo apt install age

πŸ“¦ Install age-plugin-pq:

mkdir -p ~/.config/age/plugins
cd ~/.config/age/plugins

# Download the prebuilt binary from:
# https://github.com/FiloSottile/age-plugin-pq/releases

chmod +x age-plugin-pq

Verify install:

age-plugin-pq --help

πŸ”‘ 4. Generate Post-Quantum Key

age-plugin-pq keygen > pqkey.txt
grep "public key" pqkey.txt > pqkey.pub

Example public key:

# public key: pq-pub1...

πŸ“ 5. Encrypt & Decrypt with PQ

πŸ” Encrypt

age -r pq-pub1abcdef... -o encrypted.txt.age plaintext.txt

πŸ”“ Decrypt

age -d -i pqkey.txt -o plaintext.txt encrypted.txt.age

You are now encrypting with Kyber + X25519 hybrid encryption, secure against classical and quantum adversaries.


πŸ›‘ 6. PQ-TLS (Experimental Browsing / Networking)

πŸš€ TLS Libraries with PQ Support

  • liboqs + OpenSSL (quantum-safe ciphersuites)
  • Chrome/Firefox (Cloudflare testnet)
  • SSH PQ key types (OpenSSH 9.0+)

πŸ§ͺ Try PQ in OpenSSH (if supported):

ssh-keygen -t x25519-sk # classical + PQ hybrids soon

Check for sntrup761x25519 support in:

ssh -vv user@host

πŸ’» 7. Try PQ Signing with openssl + liboqs

πŸ§ͺ Install liboqs + oqs-openssl (if you’re on Linux)

Follow build instructions:
https://github.com/open-quantum-safe/oqs-openssl

You can then generate PQC certs:

./apps/openssl req -new -newkey dilithium3 -keyout pq.key -out pq.csr

Sign and test PQ certs (experimental).


πŸ”— 8. PQ Resources & Projects


πŸ“ 9. Journal & Git Commit

✍️ Reflect on PQCrypto

echo "Bonus 1: Learned about quantum threats to classical crypto. Used age-plugin-pq to encrypt files with Kyber hybrid encryption. Reviewed NIST PQ algorithms and explored experimental TLS + SSH tools." >> notes/bonus1_pqcrypto.md

πŸ“¦ Git Commit

git add .
git commit -S -m "Bonus 1 – Post-Quantum Cryptography with Kyber and Dilithium"

βœ… Bonus 1 Checklist

  • Understood the threat of quantum computing to RSA/ECC
  • Installed age-plugin-pq and generated PQ keys
  • Encrypted/decrypted files with Kyber+X25519
  • Explored PQTLS and PQSSH concepts
  • Wrote journal entry and committed code

🧭 Up Next Bonus Suggestions

  • Bonus 2: Self-Sovereign Identity (DIDs + Verifiable Credentials)
  • Bonus 3: Metadata-Resistant Messaging (Nym, Loopix, Sphinx)
  • Bonus 4: Zero-Knowledge Proofs & zkSnarks
  • Bonus 5: Privacy-Focused Smart Contracts

πŸ“Œ Notes

  • Post-quantum readiness is a moving target β€” monitor NIST, OQS, and browser announcements
  • Hybrid crypto (classical + PQ) is currently the best of both worlds
  • age-plugin-pq is a secure and elegant way to get hands-on with PQC today