# Recovery key

> What the recovery key is, where Rasum stores it and how to create a new one, enter it or see it.

Source: https://doc.rasum.chat/en/sicherheit/wiederherstellungsschluessel/

The recovery key unlocks your chat backup. Rasum creates it automatically and stores it in your own Apple or Google account. Here you learn how this works and what you can do yourself.

> **Caution:**
Never give your recovery key to anyone. Not to Rasum support either. Together with access to your account, it opens your older encrypted messages.

## What is the recovery key?

The recovery key is a long code. It unlocks the chat backup. The chat backup is an encrypted backup of your message keys on the server.

You need the recovery key when you sign in on a new device. With it, the new device can read your older encrypted messages.

## Do I have to create the recovery key myself?

No. Rasum creates the recovery key automatically after you sign in. You do not need to write anything down for this.

Rasum stores the key encrypted in **key storage**:

- **iPhone:** in your iCloud Keychain.
- **Android:** in your Google account.

This means the key is in your own Apple or Google account. Rasum does not store it on its own servers.

**Android from F-Droid:** Without Google services there is no key storage. The switch is greyed out, and below it says **"Not available on this device"**. Then you create the key yourself with **"Get recovery key"** and write it down safely.

## Where do I find the recovery key settings?

You find the settings under **"Settings"** → **"Encryption"** (icon [Icon: key]). You open the settings with your profile picture at the top left of the chat list.

- **iPhone:** The **"Encryption"** entry is always there. A red dot shows that you should do something.
- **Android:** The **"Encryption"** entry only appears once this device is confirmed. See [Confirm your device and identity](https://doc.rasum.chat/en/sicherheit/geraet-bestaetigen/).

At the very top is the **"Key storage"** section with a switch:

- **iPhone:** **"Save key in iCloud"**
- **Android:** **"Store key in your Google account"**

Below it, depending on the state, you see **"Change recovery key"**, **"Enter recovery key"** or **"Get recovery key"**.

## Can I display my recovery key?

There is no "Show key" button. You only see your key in two ways:

1. **You create a new key** with **"Change recovery key"**. The app shows you the new key. The old one no longer works after that. See the next section.
2. **You turn off key storage.** Then the app shows the key once so that you can write it down. See [Turn off key storage](#turn-off-key-storage).

For most people, way 1 is the right one. The new key is automatically stored in key storage again if key storage is turned on.

## Create a new recovery key

A new recovery key replaces the old one. This helps if you have lost your key or want to write it down yourself.

1. Open **"Settings"** → **"Encryption"**.
2. Tap **"Change recovery key"**.
3. Confirm the question **"Change recovery key?"**.
4. The app shows the new key under **"Save your recovery key somewhere safe"**. Tap it to copy it.
5. Keep the key in a safe place, for example in a password manager.
6. Confirm the question **"Have you saved your recovery key?"**.

After that, the app shows **"Recovery key changed"**. Your old key no longer works.

## Enter the recovery key

The app asks you for the recovery key if the chat backup is not unlocked on this device. The note **"Your chat backup is out of sync"** then appears in the chat list.

1. Tap **"Enter your recovery key"**. Alternatively: **"Settings"** → **"Encryption"** → **"Enter recovery key"**.
2. Type the key into the **"Enter…"** field or paste it.
3. Confirm.

If it works, the app shows **"Recovery key confirmed"**. If you make a typing mistake, **"Incorrect recovery key"** appears. Then check the key and try again.

> **Tip:**
While you enter the key, the app shows the note "Make sure nobody can see this screen!". Only enter the key when nobody is looking.

## What happens the first time I start the app on a new device?

On the first start, Rasum looks for the recovery key in key storage. If Rasum finds it, the app restores your history by itself.

- **iPhone:** You see **"Verlauf wird wiederhergestellt …"** (the app currently shows this in German only).
- **Android:** You see **"Restoring your message history…"**.

If this does not work, the app shows a note:

- **iPhone:** **"Wiederherstellung fehlgeschlagen"** with the buttons **"Schlüssel manuell eingeben"** and **"Später"** (this screen is currently shown in German only; it means "Recovery failed", "Enter key manually" and "Later").
- **Android:** **"We couldn't restore your message history"** with the buttons **"Enter recovery key manually"** and **"Not now"**.

Then enter your key or confirm the device with another device. See [Confirm your device and identity](https://doc.rasum.chat/en/sicherheit/geraet-bestaetigen/).

## Does automatic recovery work when switching between iPhone and Android?

Automatic recovery only works within the same system:

- from iPhone to iPhone with the same Apple ID,
- from Android to Android with the same Google account.

When you switch between iPhone and Android, the key is in the account of the other system. The new device cannot reach it by itself. You then have two ways:

- **Confirm with the old device:** Keep your old device signed in and confirm the new device by comparing emojis. See [Confirm your device and identity](https://doc.rasum.chat/en/sicherheit/geraet-bestaetigen/).
- **Enter the key:** Type in your recovery key by hand. If you do not know it, first create a new one on the old device. See [Create a new recovery key](#create-a-new-recovery-key).

On Android, a **"Transfer from iPhone"** button may also appear. This way is still being tested. It is better to use one of the two ways above.

More about switching devices: [New phone or additional device](https://doc.rasum.chat/en/konto/neues-geraet/).

## Turn off key storage

You can turn off key storage. Then only you have your recovery key. Without it, you can no longer get to your older messages on a new device.

1. Open **"Settings"** → **"Encryption"**.
2. Turn off **"Save key in iCloud"** (iPhone) or **"Store key in your Google account"** (Android).
3. A warning appears: **iPhone:** **"Delete key from iCloud?"** · **Android:** **"Turn off key storage?"**.
4. The warning shows your key. Write it down or copy it.
5. Tap **"Noted – delete key"** (iPhone) or **"Written down – delete key"** (Android).

If the app does not know your key on this device, it cannot show it. In that case, afterwards create a new one with **"Change recovery key"** and write it down.

> **Note:**
If you turn key storage back on later, Rasum creates a new key. The key you wrote down then no longer works.

## I have lost my recovery key. What now?

That depends on whether you still have a signed-in device.

- **You are still signed in on a device:** Create a new key there with **"Change recovery key"**. See [Create a new recovery key](#create-a-new-recovery-key).
- **Key storage is turned on:** On a new device of the same system, Rasum fetches the key by itself. You do not need to enter anything.
- **You have no device and no key left:** Then the only option is to reset your digital identity. Older messages can be lost in the process. See [Reset your identity](https://doc.rasum.chat/en/sicherheit/geraet-bestaetigen/#reset-your-identity).

## Related pages

- [End-to-end encryption](https://doc.rasum.chat/en/sicherheit/verschluesselung/)
- [Confirm your device and identity](https://doc.rasum.chat/en/sicherheit/geraet-bestaetigen/)
- [New phone or additional device](https://doc.rasum.chat/en/konto/neues-geraet/)
- [Terms](https://doc.rasum.chat/en/begriffe/)
