# How your keys are kept

> Your keys are made in your browser and locked with your password before anything is saved. Raven keeps a locked copy, and cannot open it.

Source: https://ravenwallet.pro/docs/keys

### Your keys, in short

*AES-256-GCM, PBKDF2-SHA256, the browser’s own WebCrypto*

Your keys are made and used only in your browser. Raven’s server keeps a locked copy so your wallets open on any device, and it has no way to open that copy.

| | |
|---|---|
| Keys are made | In your browser |
| The vault is locked with | AES-256-GCM |
| Password stretching | PBKDF2, 600,000 rounds |
| Raven’s server keeps | A locked copy it cannot open |
| Who can sign | Only your browser, unlocked |

## Three locks, one inner key

Your keys and settings live in one locked document, the vault. A random inner key opens the vault, and that inner key is itself locked three ways. Any one of the three opens it.

- Your password (you type it) → Lock 1 (600,000 rounds) → Inner key (256-bit, random) → opens → The vault (keys and settings)
- Your 12 words (from sign-up) → Lock 2 (600,000 rounds) → Inner key
- Face ID (or a fingerprint) → Lock 3 (passkey, HKDF) → Inner key

Changing your password makes one small lock again. The vault itself does not change.

## Where the vault lives

| Place | What is there |
|---|---|
| Your device | The locked vault, in the browser’s own storage |
| Raven’s server | The same locked copy, so it opens on your other devices |

The server never has your password, your 12 words or your passkey, so what it holds is a copy nobody can open.

## While it is unlocked

Once unlocked, your keys exist in one place only: the key worker, a separate part of your browser tab. The page talks to it in short, named requests and gets back addresses, numbers and previews, never keys.

The worker builds every transaction itself from a plan. The page cannot hand it a transaction to sign. The one exception is a site’s request in [Raven for Chrome](https://ravenwallet.pro/docs/chrome), and only after the checks in [Checks before you sign](https://ravenwallet.pro/docs/checks).

## Your password

At least 12 characters. Raven turns down what attackers try first: one word with a number on the end, a keyboard run, the same few letters over and over. A strong password is what stands between a stolen copy of the vault and your keys.

## Under the hood

- **WebCrypto only**: Every lock uses the browser’s own cryptography. No third-party code touches a key.
- **A tag over the locks**: The locks sit outside the locked data, so whoever stores a copy could try to swap them. The vault keeps a tag over its locks, made with the inner key, inside the locked data. A copy whose locks do not match its tag was not written by you, and Raven will not use it.
- **600,000 rounds**: Each guess at your password costs an attacker 600,000 rounds of SHA-256. That is what makes a long password hold against a stolen copy.
- **The passkey lock**: Face ID releases a secret through the passkey’s PRF extension, only on Raven’s own address. HKDF turns it into the key for that device’s lock. It never leaves your browser.
