Last updated 3 December 2026
A few library calls create almost every RSA and curve key.
A text search misses aliases and key sizes in variables.
CryptoRot scans a repo and dates each finding.
Python projects reach RSA and elliptic curves through a small set of library calls. Find those calls and you have most of your post-quantum inventory. Here is what to look for, with examples from open-source projects.
| Library | Call | What it is |
|---|---|---|
| cryptography | rsa.generate_private_key | RSA key pair |
| cryptography | ec.generate_private_key, ec.derive_private_key | Elliptic curve key for ECDSA or ECDH |
| cryptography | X25519PrivateKey.generate, Ed25519PrivateKey.generate | Curve25519 key exchange and signatures |
| cryptography | dh.generate_parameters | Finite field Diffie-Hellman |
| pycryptodome | RSA.generate, ECC.generate | RSA and elliptic curve keys |
| rsa | rsa.newkeys | RSA key pair |
| paramiko | RSAKey, ECDSAKey | SSH keys |
All of these are deprecated after 2030 under NIST IR 8547. While you are in there, look for hashlib.sha1 and hashlib.md5 too. NIST retires SHA-1 by the end of 2030, and MD5 is already broken.
CryptoRot scanned 20 popular open-source Python projects. A few of the calls it found:
# certbot, client.py, line 199
rsa_key = generate_private_key(
# paramiko, kex_curve25519.py, line 30
X25519PrivateKey.generate()
# authlib, jose/rfc7518/ec_key.py, line 102
raw_key = ec.generate_private_key(
Each one is normal, correct code today. Each one also needs a post-quantum plan before 2031. The full reports list every finding with its file, line and deadline.
import hashlib as h
ALGO = "md" + "5"
def store_password(pw):
return h.new(ALGO, pw.encode()).hexdigest()
A search for "md5" finds nothing here. CryptoRot follows the import alias and the string to see that this function hashes with MD5. The same applies to RSA key sizes passed in through variables or config.
Every scan can be exported as a CycloneDX 1.6 CBOM, SARIF, JSON or CSV.
Code often imports algorithms under other names, builds the algorithm name from strings or reads the key size from a variable. A search finds the word, while a scanner that reads the code finds the call and the key size it actually uses.
CryptoRot scans the Python files in the repository you give it. Your own code is where the calls you control live, so that is where it starts.
Yes. Create a free API key, add the CryptoRot workflow to GitHub Actions and pull requests that add new quantum-vulnerable code on changed lines fail the check.
Paste a GitHub link and CryptoRot lists every RSA, elliptic curve and weak cipher call in your Python with the year each one has to go.