Generate RSA Key Pair

Generate an RSA key pair with a given number of bits.

Input: TextResult: Text

Text input

Tool options

Examples

Example keys and passwords are public test material.

Generate a disposable demonstration key. Native Web Crypto imports the private key and checks its modulus length and a sign/verify round trip. A 1024-bit key is obsolete for new security designs; do not retain these example keys.

1024-bit RSA keys as PEM

Input

Expected checks

RSA 1024 bits
Native key import and signing/verification succeed.
RSA Key Length
1024
Output Format
PEM
2048-bit RSA keys as PEM

Input

Expected checks

RSA 2048 bits
Native key import and signing/verification succeed.
RSA Key Length
2048
Output Format
PEM
4096-bit RSA keys as PEM

Input

Expected checks

RSA 4096 bits
Native key import and signing/verification succeed.
RSA Key Length
4096
Output Format
PEM
1024-bit RSA keys as DER

Input

Expected checks

RSA 1024 bits
Native key import and signing/verification succeed.
RSA Key Length
1024
Output Format
DER
2048-bit RSA keys as DER

Input

Expected checks

RSA 2048 bits
Native key import and signing/verification succeed.
RSA Key Length
2048
Output Format
DER

WARNING: Cryptographic operations in CyberChef should not be relied upon to provide security in any situation. No guarantee is offered for their correctness. We advise you not to use keys generated from CyberChef in operational contexts.

Format reference: Generate RSA Key Pair background and specification

Parameters

ParameterDefault valueInput and choices
RSA Key Length10241024, 2048, 4096
Output FormatPEMPEM, JSON, DER

Related tools

Browse public key tools