What problem does it solve?
Managing RSA keys incorrectly leads to weak key sizes, unprotected private keys, and vulnerable padding schemes like PKCS#1 v1.5 that enable Bleichenbacher padding oracle attacks. This Skill provides structured guidance for generating, storing, rotating, and validating RSA key pairs according to NIST SP 800-57 key management guidelines.
Core Features & Use Cases
- Key Generation & Serialization: Generate RSA key pairs at 2048, 3072, or 4096 bits and serialize them in PEM, DER, and PKCS#8 formats with passphrase protection.
- Secure Signing & Encryption: Implement RSA-PSS for signatures and RSA-OAEP for encryption, avoiding deprecated PKCS#1 v1.5 padding.
- Key Rotation & Validation: Rotate keys with versioning, compute fingerprints, detect weak keys (small factors, low public exponent, ROCA), and enforce minimum key sizes.
- Use Case: When deploying a new service that signs API tokens, use this Skill to generate a 3072-bit RSA key pair, encrypt the private key with AES-256 in PKCS#8 format, and verify that tampered signatures are rejected.
Quick Start
Use the implementing-rsa-key-pair-management skill to generate a 3072-bit RSA key pair with passphrase-protected PKCS#8 storage and verify an RSA-PSS signature.