What is a key pair for?
In asymmetric cryptography, two keys go together. The public key can be given out freely: to a server, a service or a correspondent. The private key stays with you. It lets you sign or prove who you are, and the public key lets others verify it.
Key pairs are used to connect to a server over SSH, sign tokens, configure a service or learn how certificates work.
Which type should you choose?
- RSA 3072: a good general-purpose choice, accepted almost everywhere.
- RSA 2048: for systems that do not accept anything larger.
- RSA 4096: more margin, at the cost of longer keys and slower computations.
- ECDSA P-256, P-384 or P-521: short, fast keys on the NIST curves.
The files produced
The public key is provided in PEM format (SubjectPublicKeyInfo) and as a single OpenSSH line, to be added to a server's authorized_keys file. The private key is in PKCS #8 format. With a password, it is encrypted with AES-256 after 600,000 iterations of PBKDF2-SHA-256; OpenSSL and OpenSSH can read it.
On Linux or macOS, restrict the permissions on the private file (chmod 600 private-key.pem) before using it with ssh.
Should you create your keys in a browser?
The keys are drawn by the cryptography built into your browser and do not leave your device. They do, however, depend on how much you trust the machine, its extensions and this page. For sensitive or production access, it is preferable to create them with the system's own tool, such as ssh-keygen or OpenSSL, on the machine that will use them.
Frequently asked questions
Are the keys sent or stored anywhere?
No. They are created in the page, are neither sent nor saved, and disappear when you click “Clear” or leave the page. Downloaded files, however, remain on your device.
I forgot my key's password. What can I do?
There is no way to recover it. Create a new pair and replace the old public key wherever it is installed.
Why is Ed25519 not offered?
Not all browsers can create this type of key yet, and old versions of OpenSSH cannot read its file in the format used here. The command ssh-keygen -t ed25519 remains the safest route.
Can I use accented characters in the password?
Yes, it is read as UTF-8. However, some terminals enter accented characters differently: unaccented letters, digits and common symbols avoid surprises.
Can one RSA key be used both to sign and to encrypt?
The file allows it, but it is better to create one pair per use.