# 存储加密

Source: [https://docs.qualcomm.com/doc/80-70014-11Y/topic/file-based-encryption.html](https://docs.qualcomm.com/doc/80-70014-11Y/topic/file-based-encryption.html)

存储加密通过支持文件和目录的透明加密来增强安全性。

Qualcomm 平台支持使用[内联加密引擎 (Inline crypto engine)](https://docs.qualcomm.com/doc/80-70014-11Y/topic/crypto-core.html#crypto-core__section_glj_gfy_lzb)和硬件封装的密钥进行存储加密。它提供了更好的效率和增强的密钥保护。

存储加密功能允许：

- 提供 32 字节到 64 字节的标准密钥用于内容加密。
- 使用单独的密钥对文件名和文件内容进行加密。
- 生成 32 字节密钥标识符。

添加了 Qualcomm 平台 UFS 存储驱动程序以支持 `fscrypt` API。

Note: eMMC 支持将在将来的版本中提供。

有关 `fscrypt` API 的更多信息，参见内核文档 Documentation/ filesystems/fscrypt.rst。

有关相关的内核文档，请参阅以下文件：

- 内联加密： `Documentation/block/inline-encryption.rst`
- 对存储加密的 IOCTL 支持： `Documentation/userspace-api/ioctl/ioctl- number.rst`

您可以使用开源 `fscryptctl` 工具调用存储加密功能，该工具可在 [https://github.com/google/fscryptctl](https://github.com/google/fscryptctl) 中找到。

**Parent Topic:** [功能](https://docs.qualcomm.com/doc/80-70014-11Y/topic/features.html)

Last Published: Aug 27, 2024

[Previous Topic
存储安全](https://docs.qualcomm.com/bundle/publicresource/80-70014-11Y/topics/secure-file-system.md) [Next Topic
SMC 调用](https://docs.qualcomm.com/bundle/publicresource/80-70014-11Y/topics/smcinvoke.md)