Use this when using RSA for signatures or key transport.
RSA
RSA is the classic public-key algorithm based on factoring large numbers, used for signatures and key transport. Use at least 2048-bit keys, preferably 3072, with OAEP or PSS padding.
1. RSA security rests on factoring.
2. ≥ 2048 bits; 3072 for beyond 2030.
3. Use OAEP/PSS, not PKCS#1 v1.5 where possible.
4. Slower than ECC.
5. Not quantum-safe.
key pair → OAEP encrypt / PSS sign
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Common mistakes Narrow the fault
- 1024-bit keys still in use.
- Using RSA for key exchange in TLS (no forward secrecy; removed in TLS 1.3).
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Use at least 2048 bits; 3072 recommended.
- Use OAEP for encryption and PSS for signatures.
- RSA key exchange has no forward secrecy.
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072 -out rsa.pem— generateopenssl rsa -in rsa.pem -noout -text | head -1— key size- Padding: OAEP (encryption), PSS (signatures) — safe padding
ReferenceWhy it matters1 section · depth on demand
How it works
RSA uses a key pair from two large primes: the public key (n, e) encrypts or verifies, the private key (d) decrypts or signs. In practice RSA signs certificates and authenticates TLS servers; it rarely encrypts data directly. Security rests on the difficulty of factoring n.
ReferenceImportant terms & boundaries1 section · depth on demand
Key facts
| Item | Value |
|---|---|
| Minimum key size | 2048 bits (3072+ for long-term) |
| Padding (encryption) | OAEP — not PKCS#1 v1.5 |
| Padding (signatures) | PSS preferred; PKCS#1 v1.5 still common |
| Security based on | Factoring large numbers |
openssl genpkey -algorithm RSA -pkeyopt rsa_keygen_bits:3072 -out key.pem
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Asymmetric Cryptography → RSA. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://csrc.nist.gov/pubs/fips/186-5/final · confidence 94%