Language: EN

← All guides

Keys: which type to choose, and how to keep them safe

Everything in CryptoPad rests on keys. This guide explains what a key is made of, which of the three types to pick, how to be sure a contact's key is really theirs, how to move keys to another phone, and what happens when a key is gone. It applies to iPhone and Android alike.

This guide names the buttons as version 0.9 shows them.

Two parts: one you keep, one you give away

Every key you make in CryptoPad is a pair.

A message encrypted for someone can be opened only by the private part of their key. Not even the sender can read it again once it is encrypted.

The name you give a key is only a label for you. It is not part of the public key, and nobody you send the key to sees it.

iPhone: Your Keys with one key, My phone, its Copy Public Key button and the ⋯ button iPhone: Your Keys with one key, My phone, its Copy Public Key button and the ⋯ button

Which type to choose

CryptoPad makes three types of key. All three encrypt and decrypt, and all three work between iPhone and Android: a message encrypted on one opens on the other, whatever the type.

TypeWhat it isGood to know
RSARSA with a 4096-bit keyThe longest public key and the longest messages; takes a few seconds to make.
NISTElliptic curve P-256Short and made at once. Works on every supported phone.
X25519Elliptic curve X25519Short, made at once, and the shortest messages. The default in both apps.

If someone you write to still uses CryptoPad 0.5 on Android 12 or older, give them an RSA or NIST key, not an X25519 one: that version cannot encrypt for X25519 there. Every current version of both apps works with all three.

The person writing to you does not need a key of the same type as yours. Each of you encrypts for the other's key, whatever its type.

Several keys

You can have as many keys as you like — for example, one per group of people, or a new one when you want to stop using an old one. You never choose which key to decrypt with: CryptoPad tries all of yours.

A contact holds one public key. If someone gives you two keys, add them as two contacts with different names.

Adding a contact by pasting a key

From version 0.8 a pasted key is checked as strictly as a scanned one, in the same way on iPhone and Android, so that a broken or doubled key is refused when you add it rather than found broken later:

Android: the Add Contact dialog with the name Design team and a public key filled in Android: the Add Contact dialog with the name Design team and a public key filled in

Make sure a key is really theirs

A public key travels through ordinary channels — a chat, an email. Someone who controls that channel could swap it for their own and read what you encrypt "for your contact". So before you trust a contact's key, compare it with the person through a different channel: side by side when you meet, or read aloud on a call. Compare the whole key, or at least a long stretch from its middle — not the first or last lines, which look alike for every key of the same type (every RSA key ends the same way). From version 0.8 it is easier: compare the key's fingerprint, as described below. For a contact you already have, however it was added, open its menu (⋯ on iPhone, ⋮ on Android) and tap Show Fingerprint; compare all 20 characters with the fingerprint their phone shows under Show QR Code for their key, in person or on a call where you know their voice.

Do the same for your own key: tell people which key is yours.

Android: Contact Fingerprint for Alice: Key type: X25519 and the 20 characters of the Fingerprint, with Done Android: Contact Fingerprint for Alice: Key type: X25519 and the 20 characters of the Fingerprint, with Done

Exchange keys by QR code

From version 0.8 you can hand over a public key face to face, with no chat or email in between. On one phone, open the key's menu (⋯ on iPhone, ⋮ on Android) and tap Show QR Code; on the other, tap Scan QR Code on the Contacts tab and point the camera at the code. Both phones need CryptoPad 0.8 or later; iPhone and Android read each other's codes. The steps are in the guide for your phone.

iPhone: Public Key QR Code: the key type X25519, the QR code, the Fingerprint and Copy Public Key iPhone: Public Key QR Code: the key type X25519, the QR code, the Fingerprint and Copy Public Key

Moving keys and contacts to another phone

From version 0.6 you can move a key — or everything: all your keys, your contacts and your App lock setting — to another phone yourself, between iPhone and Android in any direction:

  1. On the old phone, export. One key: its menu (⋯ on iPhone, ⋮ on Android), then Export…, which makes a key export file. Everything: Export All…, in Settings on iPhone (the gear button) or in the ⋮ menu at the top on Android, which makes a full export file.
  2. Confirm it is you. If the phone has a screen lock, it asks for it — Face ID, fingerprint or passcode.
  3. Choose a password, at least 12 characters, and type it twice. The file is encrypted with it.
  4. Save the file where the phone's save dialog lets you: on the phone, on a memory stick, in your cloud storage.
  5. Bring the file to the new phone, however you like. Keep the password to yourself, and never send it along with the file.
  6. On the new phone, import. Tap Import Key on the Keys tab (or Import…), pick the file and type the password. CryptoPad shows what the file holds; choose what to take and tap Import.

Everything in the file, names included, is encrypted. Anyone who gets the file can see only its name and size; anyone who has the file and the password can use your keys and see your contacts. So pick a password nobody can guess, and delete the file once you no longer need it. A forgotten password cannot be recovered — not by you, not by us.

Version 0.5 and older cannot make or import export files.

Android: This file holds: Keys — 1, ticked, with Cancel and Import Android: This file holds: Keys — 1, ticked, with Cancel and Import

Move a key to a new phone by QR code

From version 0.8 — build 11 on Android, build 8 on iPhone — one X25519 or NIST key can go from your old phone to a new one by two QR codes, with no file and no password, between iPhone and Android in any direction. Both phones need this build or later. The steps are in the guide for your phone; in short:

  1. On the new phone, Receive Key (on the Keys tab). It shows a QR code that holds only a one-time public key, made for this transfer.
  2. On the old phone, Send Key in the key's menu (⋯ on iPhone, ⋮ on Android). The phone asks for its unlock, as for an export, then the camera scans the new phone's code.
  3. Type the number the old phone shows — six digits — into the new phone.
  4. Compare the check code. Both phones now show a Check code of six characters. Tap Yes on the old phone only if they are the same.
  5. Scan the key. The old phone shows a second QR code; on the new phone, Scan Key reads it. Check that the fingerprint matches the old phone's, change the name if you like, and tap Save.
Android: Receive Key on the new phone: the QR code, the field Number from the old phone and Scan Key, still grey Android: Receive Key on the new phone: the QR code, the field Number from the old phone and Scan Key, still grey

Language

From version 0.9 CryptoPad is in English, Русский, Deutsch, Español, Polski and Čeština, on Android and on iPhone. Choose it in the app under Settings, Language, the first row. Your keys are the same in every language: the language changes only what you read on the screen.

Light or dark

From version 0.9 — build 13 on Android, build 10 on iPhone — CryptoPad can also be light or dark whatever the phone uses: in Settings, Theme, the row under Language. Like the language, it changes only how the screen looks, never your keys; it is kept on that phone only and is not part of a full export file. Section 16 of the Android guide and of the iPhone guide shows how.

When a key is gone

A private part can be used only on the phone that made it, or on a phone you moved it to with an export file or by QR code. Nobody else — including us — can move it or open a copy of it, so a lost key you never exported cannot be recovered. What a phone backup may contain is in the privacy policy.

When you replace a key, send the new public part to the people who write to you, and ask them to replace your old key in their contacts.

More answers are on the Support page.

← All guides