> 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

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://vector-privacy.gitbook.io/vector-privacy/vector-messenger/intro/encryption.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
