Générateur de paires de clés RSA
Générez des paires de clés publiques et privées RSA sécurisées (jusqu'à 4 096 bits) entièrement dans votre navigateur. Il s'exécute entièrement dans votre navigateur — aucune donnée n'est envoyée à aucun serveur, aucun compte n'est requis, et c'est entièrement gratuit.
The Definitive Guide to RSA Cryptography: Mathematics, Key Formats, and Security Standards
Rivest–Shamir–Adleman (RSA) is an asymmetric public-key cryptosystem developed in 1977 that remains one of the foundational security protocols powering modern digital communication. From securing HTTPS traffic via Transport Layer Security (TLS/SSL) to authenticating developer access over SSH and signing JSON Web Tokens (JWTs), RSA key pairs provide non-repudiation, identity verification, and confidential data transmission.
Our free RSA Key Generator uses your web browser's native, cryptographically secure Web Crypto API (window.crypto.subtle). Key generation happens 100% locally in hardware-accelerated memory; your private keys never leave your browser and are never transmitted over the internet or logged to any server.
Cryptographic Key Strength & NIST Security Comparison
The table below summarizes standard RSA key sizes, their estimated equivalent symmetric encryption strength according to the National Institute of Standards and Technology (NIST SP 800-57), and their current production status.
| Key Size (Modulus) | Equivalent Symmetric Strength | NIST Status | Primary Use Cases | Performance Cost |
|---|---|---|---|---|
| 1024-bit | 80 bits | DEPRECATED & INSECURE | Legacy backward compatibility only (Do NOT use) | Very Fast |
| 2048-bit | 112 bits | STANDARD (Recommended) | SSH keys, standard TLS certificates, RS256 JWT tokens | Baseline (~1.0×) |
| 3072-bit | 128 bits (AES-128 equivalent) | RECOMMENDED FOR LONG-TERM | Enterprise CA roots, long-term confidential archiving | ~2.5× slower |
| 4096-bit | 140+ bits | MAXIMUM SECURITY | PGP / GPG master identities, high-security government PKI | ~4.5× slower |
The Mathematical Foundation of RSA
The mathematical security of RSA relies on the computational difficulty of the Integer Factorization Problem: multiplying two large prime numbers is computationally trivial, but discovering those original primes given only their product is practically impossible within a reasonable timeframe using classical computers.
- Key Generation: Two distinct large prime numbers
pandqare chosen randomly. Their product is the modulusn = p × q. - Euler's Totient Function: Compute
φ(n) = (p − 1) × (q − 1). - Public Exponent: Choose an integer
esuch that1 < e < φ(n)andgcd(e, φ(n)) = 1. Almost all modern implementations use the Fermat prime65537 (0x10001)because it provides optimal verification speed without compromising security. - Private Exponent: Compute
das the modular multiplicative inverse ofe modulo φ(n), such that(d × e) ≡ 1 (mod φ(n)).
The Public Key consists of the pair (n, e). The Private Key consists of (n, d) (along with components p, q, dp, dq, qinv for Chinese Remainder Theorem acceleration).
Understanding PEM Key Formats (PKCS#1 vs. PKCS#8)
Cryptographic keys are stored as Base64-encoded ASN.1 structures enclosed by ASCII header and footer banners (Privacy Enhanced Mail - PEM format):
| Header Banner | Standard | Description |
|---|---|---|
| -----BEGIN RSA PRIVATE KEY----- | PKCS#1 | Traditional format containing raw RSA private key parameters only. |
| -----BEGIN PRIVATE KEY----- | PKCS#8 (Modern Standard) | Universal container format that includes an algorithm identifier OID (used by WebCrypto, Node.js, and Java). |
| -----BEGIN PUBLIC KEY----- | SPKI (X.509) | Standard SubjectPublicKeyInfo format for sharing public keys across platforms. |
Essential Security Best Practices for RSA Private Keys
- Restrict File Permissions: On Unix and macOS servers, always secure private keys with
chmod 600 id_rsaso only the owner has read access. - Never Commit to Git: Ensure
*.pem,*.key, andid_rsa*patterns are included in your project's.gitignore. - Use Passphrase Encryption: Protect private keys at rest with AES-256 passphrase encryption (e.g.
ssh-keygen -p -f id_rsa). - Enforce Regular Key Rotation: Rotate enterprise TLS and JWT signing keys on a scheduled 90-day to 1-year cycle.
Use our client-side RSA Key Generator above whenever you need instant, cryptographically sound keys for local development, API prototyping, or cryptographic demonstrations without exposing secrets to third-party networks.
From the Blog
Why Client-Side Web Utilities are Superior for Privacy and Data Security →
Deep dive into related concepts, tutorials, and best practices.