Generate a pair of public and private keys. The keys can be used for encryption, decryption, signing, and verification.
Select options.
Option | Description |
---|---|
Algorithm | Key pairs serve different purposes depending on the algorithm, and most algorithms are tailored for specific use cases. Details will be explained later. |
Format | PEM: A Base64-encoded text format for storing cryptographic keys and certificates, often wrapped with header/footer lines like -----BEGIN PUBLIC KEY----- . JWK: A JSON-based format for representing cryptographic keys, used especially in web applications and JWTs. |
Public exponent | In RSA, the public exponent (often denoted as e) is part of the public key, used during encryption or signature verification. e=65537 is most commonly used. |
Hash | A hash function is used to compress a message into a fixed-size digest before signing it (or verifying it) with a public-key algorithm. |
Modulus bit length | This is the bit length of the RSA modulus n=pimesq, where p and q are prime numbers. Greater bit length means better security, but slower operations. |
Named curve | This is a predefined set of parameters for an elliptic curve used in cryptography, identified by a standard name. |
Click Regenerate
button. The keys will be generated.
Download the keys.
In public-key cryptography (also called asymmetric cryptography), two keys are used: a public key and a private key.
This system allows secure communication, digital signatures, and key exchange—even over insecure networks.
Different cryptographic algorithms use different mathematical foundations and are optimized for specific purposes. Here's a brief explanation of the listed algorithms:
Algorithm | Key Type | Based On | Primary Use |
---|---|---|---|
RSASSA-PKCS1-v1_5 | RSA | Integer factorization | Digital signatures |
RSA-PSS | RSA | Integer factorization (with probabilistic padding) | Secure digital signatures (improved over RSASSA) |
RSA-OAEP | RSA | Integer factorization (with padding) | Secure message encryption |
ECDSA | ECC (Elliptic Curve Cryptography) | Elliptic curves | Digital signatures (efficient & compact) |
ECDH | ECC | Elliptic curves | Key exchange (establishing shared secrets) |
Ed25519 | EdDSA (Edwards-curve Digital Signature Algorithm) | Twisted Edwards curve | High-speed, highly secure digital signatures. Since it is not officially supported yet, many browsers do not support it. |
RSA is one of the most well-known public-key cryptographic systems. It is based on the mathematical difficulty of factoring large integers into their prime components.
Encryption (using the public key (e,n)): c=memodn.
Decryption (using the private key (d,n)): m=cdmodn.
ECC is a modern public-key cryptographic technique that is based on the mathematics of elliptic curves over finite fields. It achieves equivalent security with much smaller key sizes compared to RSA.
Over a prime field Fp, an elliptic curve is defined as: y2=x3+ax+bmodp
Where the curve is non-singular (i.e., it has no cusps or self-intersections), which requires:
4a3+27b2≡0modp
The Elliptic Curve Discrete Logarithm Problem (ECDLP) is the basis of ECC's security: Given P and Q=kP, find k
This problem is computationally infeasible with current algorithms for appropriately chosen curves.
Feature | RSA | ECC |
---|---|---|
Security Basis | Integer factorization | Elliptic curve discrete log |
Typical Key Size | 2048–4096 bits | 256–521 bits |
Performance | Slower | Faster (especially in signing) |
Compatibility | Very high (legacy systems) | Increasing support (modern apps) |
Use Cases | TLS, email, PGP | Mobile apps, blockchain, SSH |