ZeroUtil

RSA Key Generator

Generate RSA key pairs (2048 or 4096 bit) in PEM format using the Web Crypto API.

How to Use the RSA Key Generator

Select your desired key size (2048 or 4096 bits) and click "Generate RSA Key Pair". The tool generates a public key and private key in PEM format. Click "Copy" to copy either key to your clipboard.

Key Sizes

  • 2048-bit — minimum recommended size. Fast to generate, sufficient for most applications.
  • 4096-bit — higher security margin. Recommended for long-term keys or high-security applications. Takes a few seconds longer to generate.

Key Formats

  • Public Key — exported in SPKI (Subject Public Key Info) format, base64-encoded with PEM headers. Safe to share publicly.
  • Private Key — exported in PKCS#8 format, base64-encoded with PEM headers. Keep this secret and never share it.

Common Use Cases

RSA key pairs are used for SSH authentication, SSL/TLS certificates, digital signatures, encrypted email (PGP/GPG), JWT signing, and secure API communication.

Frequently Asked Questions

Is my private key sent to a server?

No. Key generation happens entirely in your browser using the Web Crypto API. Neither the public nor private key is transmitted anywhere. They exist only in your browser memory until you copy them.

Should I use 2048 or 4096 bits?

2048-bit keys are considered secure through 2030 and beyond by most security standards. 4096-bit keys provide extra margin for long-lived keys. Use 2048 for general purposes and 4096 for high-security applications.

Can I use these keys for SSH?

The generated keys are in PEM format (SPKI/PKCS8), which is compatible with many cryptographic tools. For SSH specifically, you may need to convert the format using tools like ssh-keygen or openssl.

What is RSA-OAEP?

RSA-OAEP (Optimal Asymmetric Encryption Padding) is the modern padding scheme for RSA encryption. It provides stronger security guarantees than older schemes like PKCS#1 v1.5 and is resistant to known padding oracle attacks.

How long does key generation take?

2048-bit keys typically generate in under a second. 4096-bit keys may take 2-5 seconds depending on your device. The generation uses your browser's built-in cryptographic functions, which are highly optimized.

Ad

More Security & Privacy