# 加密协议

{% hint style="success" %}
对应的[官方文档地址](https://bitwarden.com/help/article/what-encryption-is-used/)
{% endhint %}

在将任何内容发送到云服务器进行存储之前，Bitwarden **始终**会在本地设备上对数据进行加密和/或哈希。**Bitwarden 服务器仅用于存储已加密的数据。**&#x66F4;多信息，请参阅[存储](/docs/security/data/data-storage.md)。

所有的密码库数据在存储到任何位置之前都会由 Bitwarden 加密。要了解是如何加密的，请参阅 [Bitwarden 安全白皮书](/docs/security/bitwarden-security-whitepaper.md)。Bitwarden 是一种零知识的解决方案，这意味着只有您拥有解密密码库数据所需的密钥。

{% hint style="success" %}
如果您想了解更多关于这些加密密钥是如何用来保护您的密码库的，您可以查看我们的[安全白皮书](https://bitwarden.com/images/resources/security-white-paper-download.pdf)。
{% endhint %}

## 认证的对称加密 <a href="#authenticated-symmetric-encryption" id="authenticated-symmetric-encryption"></a>

Bitwarden 采用高级加密标准的密码块链模式 (AES-CBC)，并使用 256 位密钥。AES 是一种密码学标准，被美国政府和全球其他领先的安全机构用于保护绝密数据。正确的实施（使用 CSPRNG 生成，或由强主密码通过 KDF 派生），并配合足够强的加密密钥，AES 被认为是无法破解的。

为确保 AES 加密的完整性与可验证，Bitwarden 同时采用基于哈希的消息认证码 (HMAC) 配合 SHA-256 算法。HMAC 是 Bitwarden 为验证加密数据来源可信且传输无损而采取的额外措施。该组合方案被称为 AES256-CBC-HMAC-SHA256。

## 公钥密码学 <a href="#public-key-cryptography" id="public-key-cryptography"></a>

公钥密码学，也称为非对称密码学，在 Bitwarden 中提供安全数据共享功能，例如组织和紧急访问。Bitwarden 使用 RSA 加密系统，并结合最优非对称加密填充 (OAEP ) 方案。

{% hint style="info" %}
Bitwarden 目前正在研究后量子密码学技术方案。
{% endhint %}

> **\[译者注]**：后量子密码学 (post-quantum cryptography) 是一种为防御未来量子计算机攻击而设计的加密技术。目前的常用加密方式（如 RSA、ECC）在理论上会被强大的量子计算机快速破解。因此，后量子密码学主要研究在量子计算机出现后依旧无法轻易被破解的加密算法。


---

# Agent Instructions: 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://help.ppgg.in/docs/security/encryption/encryption-protocols.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.
