> For the complete documentation index, see [llms.txt](https://vector-privacy.gitbook.io/vector-privacy/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vector-privacy.gitbook.io/vector-privacy/vector-messenger/intro/encryption.md).

# Encryption

<figure><img src="/files/EQ2lWmXt4InrtuEewjxq" alt="Vector Messenger Infographic (Encrypted Messages)"><figcaption></figcaption></figure>

## Encryption Types

* **secp256k1** for key exchange & signing
* **XChaCha20-Poly1305** for message encryption
* **AES-256-GCM** for file encryption
* **Argon2id** for password protection
* **ChaCha20-Poly1305** for local storage encryption

***

### **Symmetric Encryption**

`For Message/Data Protection`

* **XChaCha20-Poly1305**: NIP-44 encrypted DMs (the main E2E encryption)
* **AES-256-GCM**: file/attachment encryption in DMs
* **ChaCha20-Poly1305**: local database encryption (messages, keys, secrets stored on-device)

***

### **Asymmetric Cryptography**

`For Identity & Signing`

* **secp256k1**: Nostr keypair generation + event signing (ECDSA)

***

### **Key Derivation & Hashing**

* **Argon2id**: password-based key derivation (150MB memory, 10 iterations — very strong)
* **SHA-256**: file hashing, various protocol operations
* **BIP39**: 12-word seed phrase generation for account recovery

***

### **Protocols**

* [**NIP-44**](https://github.com/nostr-protocol/nips/blob/master/44.md): modern encrypted DMs
* [**NIP-59**](https://github.com/nostr-protocol/nips/blob/master/59.md): gift wrap (hides metadata with ephemeral keys)
* [**NIP-17**](https://github.com/nostr-protocol/nips/blob/master/17.md): private DM delivery
* [**Concord**](https://github.com/VectorPrivacy/Vector/blob/master/docs/concord/README.md): end-to-end encryption for group messaging

***
