Generating RSA Keys with Less Than 2048 Bits
Code generates weak RSA keys: from Crypto.PublicKey import RSA; key = RSA.generate(1024). 1024-bit RSA factorizable with modern computing. NIST deprecated 1024-bit in 2013. Minimum 2048-bit required. 3072 or 4096-bit for long-term security. Key size directly impacts security.