The RSA Key Generator creates a public and private key pair (2048, 3072, or 4096 bits) in PEM and JWK format, for RSA-OAEP encryption or RSA-PSS and PKCS#1 v1.5 signatures, plus a SHA-256 fingerprint of the public key. Unlike the AES and encryption key generators, which make one shared secret, it produces two keys: the public one you can hand out and the private one you keep.
Click Generate to create an RSA key pairInput
2048-bit, RSA-OAEP (public key, PEM)
Output
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArbNI2JjTkocWRmXjdoAd VXLjzTJSssCrvCYZFJTieTW2XGN3Mwtl3H1uqiJ3YexOoCYuWn5tSOg86E3sIsBW dlLa/SD0YGooDqFktB8GICOgpXyZkgvQgWiqD7uirFM0NLfEWCxWTZZXRcZnqBcp StJhVAUWD7wmlMP3OQVDN7dMfASOj53Z6yVINcwdFI8vYMTN3rVLW8xU1HgP9DFA 6PQQXKwLG1tV7oePX5TSbH7SsRgNOTy1L3+4q7exb/MDo3sagHVQ3km1nwCma/ue PGcXLUNEQEnuYZqDHDl27ClY6WsVAfym2tjYN6RCJ/1nuNqQ8dcjrdKF7yO2YPJ2 4wIDAQAB -----END PUBLIC KEY-----
RSA key pairs still anchor a huge share of the internet's encrypted connections and digital signatures, decades after the algorithm was first published. The math behind it relies on how hard it is to factor the product of two very large prime numbers, and that one-way difficulty is what makes the whole scheme work.
Key generation here runs through `crypto.subtle.generateKey`, the browser's native Web Crypto implementation, not a hand-rolled algorithm. For 3072 and 4096-bit keys the generation runs inside a Web Worker, so the page keeps responding to input instead of freezing while the math grinds through finding two suitable primes, which gets noticeably slower as the bit size grows.
Which algorithm to pick depends on what you're actually doing with the key. RSA-OAEP is for encrypting and decrypting data directly. RSASSA-PKCS1-v1.5 and RSA-PSS are both for signing and verifying, with RSA-PSS being the newer, generally recommended choice when a system supports it. None of the three are interchangeable, a key generated for one won't work correctly plugged into another.
2048-bit RSA is still considered secure today, though 3072-bit has become the more conservative recommendation for anything that needs to stay protected well into the future, since computing power only moves in one direction. The SHA-256 fingerprint shown alongside your public key is a short, unique identifier for it, handy for confirming two parties have the exact same key without comparing the full PEM block character by character.
More Security