Skip to content

Commit f586080

Browse files
leeeboZheng Zhong
andcommitted
fix(docs): Apply suggeston(s) from reviewer
Co-authored-by: Zheng Zhong <[email protected]>
1 parent af15e33 commit f586080

File tree

6 files changed

+188
-126
lines changed

6 files changed

+188
-126
lines changed

docs/zh_CN/gettingstarted.rst

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,34 @@
99
ESP-IoT-Solution 版本说明
1010
--------------------------
1111

12-
ESP-IoT-Solution 自 ``release/v2.0`` 起采用组件化管理,各组件与示例独立迭代,依赖的 ESP-IDF 版本请查阅组件 ``idf_component.yml`` 文件。release 分支仅维护历史大版本,master 分支持续集成新特性。建议新项目通过组件注册表获取所需组件。
12+
ESP-IoT-Solution 自 ``release/v2.0`` 起采用组件化管理,各组件与示例独立迭代,依赖的 ESP-IDF 版本请查阅组件 ``idf_component.yml`` 文件。release 分支仅维护历史大版本,master 分支持续集成新特性。建议新项目通过组件注册表获取所需组件。
1313

1414
不同版本说明如下,详情及组件列表请见 `README_CN.md <https://github.com/espressif/esp-iot-solution/blob/master/README_CN.md>`_:
1515

16-
+------------------+------------------+------------------------+----------------+
17-
| ESP-IoT-Solution | 依赖的 ESP-IDF | 主要变更 | 支持状态 |
18-
+==================+==================+========================+================+
19-
| master | >= v5.3 | 新芯片支持 | 新功能开发分支 |
20-
+------------------+------------------+------------------------+----------------+
21-
| release/v2.0 | <= v5.3, >= v4.4 | 支持组件管理器 | 历史版本维护 |
22-
+------------------+------------------+------------------------+----------------+
23-
| release/v1.1 | v4.0.1 | IDF 版本更新,代码迁移 | 备份,停止维护 |
24-
+------------------+------------------+------------------------+----------------+
25-
| release/v1.0 | v3.2.2 | 历史版本 | 备份,停止维护 |
26-
+------------------+------------------+------------------------+----------------+
16+
.. list-table:: ESP-IoT-Solution 版本支持情况
17+
:header-rows: 1
18+
:widths: 20 20 30 20
19+
20+
* - ESP-IoT-Solution
21+
- 依赖的 ESP-IDF
22+
- 主要变更
23+
- 支持状态
24+
* - master
25+
- >= v5.3
26+
- 新芯片支持
27+
- 新功能开发分支
28+
* - release/v2.0
29+
- <= v5.3, >= v4.4
30+
- 支持组件管理器
31+
- 历史版本维护
32+
* - release/v1.1
33+
- v4.0.1
34+
- IDF 版本更新,代码迁移
35+
- 备份,停止维护
36+
* - release/v1.0
37+
- v3.2.2
38+
- 历史版本
39+
- 备份,停止维护
2740

2841

2942
开发环境搭建
@@ -45,8 +58,8 @@ ESP-IDF 是乐鑫为 ESP 系列芯片提供的物联网开发框架:
4558

4659
ESP 系列 SoC 支持以下功能:
4760

48-
- Wi-Fi (2.4 GHz/5 GHz 双频)
49-
- 蓝牙 5.x (BLE/Mesh)
61+
- Wi-Fi2.4 GHz/5 GHz 双频
62+
- 蓝牙 5.xBLE/Mesh
5063
- 高性能多核处理器,主频最高可达 400 MHz
5164
- 超低功耗协处理器和深度睡眠模式
5265
- 丰富的外设接口:
@@ -94,7 +107,7 @@ ESP 系列 SoC 采用先进工艺制程,提供业界领先的射频性能、
94107
如何使用示例程序
95108
--------------------------
96109

97-
ESP-IoT-Solution 提供了丰富的示例程序,帮助用户快速上手。以 ``button_power_save`` 示例为例:
110+
ESP-IoT-Solution 提供了丰富的示例程序,帮助用户快速上手。以 ``button_power_save`` 示例为例:
98111

99112
1. 确保已经完成 ESP-IDF 开发环境的搭建,并成功配置了环境变量
100113

docs/zh_CN/security_solution/flash_encryption.rst

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
Flash 加密
22
****************
33

4-
flash 加密是 ESP32 系列芯片的重要安全特性,用于保护存储在外部 flash 中固件和数据的机密性。启用 flash 加密后,flash 中的内容将被透明加密,防止通过物理方式读取获得明文固件和数据。
4+
Flash 加密是 ESP32 系列芯片的重要安全特性,用于保护存储在外部 Flash 中固件和数据的机密性。启用 Flash 加密后,Flash 中的内容将被透明加密,防止通过物理方式读取获得明文固件和数据。
55

6-
flash 加密的核心特点:
6+
Flash 加密的核心特点:
77

88
- **透明加密解密**:通过 MMU 缓存访问时自动处理加密解密
99
- **硬件实现**:加密密钥存储在 eFuse 中,软件无法直接访问
1010
- **XTS-AES 算法**:采用专为存储设备设计的安全加密算法
1111
- **分区选择性加密**:可指定需要加密的分区类型
1212

13-
更多详细信息请参考:`ESP-IDF flash 加密文档 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html>`_
13+
更多详细信息请参考:`ESP-IDF Flash 加密文档 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html>`_
1414

15-
flash 加密与安全启动
15+
Flash 加密与安全启动
1616
~~~~~~~~~~~~~~~~~~~~~~~
1717

18-
flash 加密与安全启动是互补的安全功能:
18+
Flash 加密与安全启动是互补的安全功能:
1919

20-
- **flash 加密**:保护数据机密性,防止读取 flash 内容
20+
- **Flash 加密**:保护数据机密性,防止读取 Flash 内容
2121
- **安全启动**:保证代码完整性,防止运行未授权固件
2222

23-
建议在生产环境中同时启用两项功能以获得最佳安全保护。详情参考:`flash 加密与安全启动 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#flash-encryption-and-secure-boot>`_
23+
建议在生产环境中同时启用两项功能以获得最佳安全保护。详情参考:`Flash 加密与安全启动 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#flash-encryption-and-secure-boot>`_
2424

2525
加密范围
2626
~~~~~~~~~
2727

28-
flash 加密会自动加密以下内容:
28+
Flash 加密会自动加密以下内容:
2929

3030
- 二级引导加载程序
3131
- 所有 app 类型分区
3232
- 分区表
3333
- NVS 密钥分区
3434
- 用户标记为 "encrypted" 的分区
3535

36-
**重要提示**:NVS 分区加密和 flash 加密是两个独立的功能。需要使用 NVS 加密功能。详见:`NVS 加密文档 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/storage/nvs_encryption.html>`_
36+
**重要提示**:NVS 分区加密和 Flash 加密是两个独立的功能。需要使用 NVS 加密功能。详见:`NVS 加密文档 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/storage/nvs_encryption.html>`_
3737

3838
加密范围详细说明:`加密分区 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#encrypted-partitions>`_
3939

40-
flash 加密功能支持列表
40+
Flash 加密功能支持列表
4141
~~~~~~~~~~~~~~~~~~~~~~~
4242

43-
以下是根据知识源整理的 ESP32 系列芯片 Flash 加密功能对比表,包含加密算法、密钥长度/类型、硬件支持、密钥存储方式、密钥来源(精简描述):
43+
以下是 ESP32 系列芯片 Flash 加密功能对比表,包含加密算法、密钥长度/类型、硬件支持、密钥存储方式、密钥来源(精简描述):
4444

4545
.. list-table:: ESP32 系列芯片 Flash 加密功能对比
4646
:header-rows: 1
@@ -107,13 +107,13 @@ flash 加密功能支持列表
107107
- 硬件随机数或主机生成
108108

109109
**说明:**
110-
- ESP32-C5 支持 Key Manager 作为密钥来源和存储方式[ESP32-C5 SoC Capability Macros](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c5/api-reference/system/soc_caps.html#macros)。
111-
- 其它芯片均为 eFuse 存储,密钥可由硬件随机数生成或主机生成后烧录[ESP32-S2 Flash Encryption](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/security/flash-encryption.html#key-points-about-flash-encryption)[ESP32-C3 Flash Encryption](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/flash-encryption.html)。
110+
- ESP32-C5 支持 Key Manager 作为密钥来源和存储方式 [ESP32-C5 SoC Capability Macros](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c5/api-reference/system/soc_caps.html#macros)。
111+
- 其它芯片均为 eFuse 存储,密钥可由硬件随机数生成或主机生成后烧录 [ESP32-S2 Flash Encryption](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/security/flash-encryption.html#key-points-about-flash-encryption)[ESP32-C3 Flash Encryption](https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/security/flash-encryption.html)。
112112

113113
开发模式和发布模式
114114
~~~~~~~~~~~~~~~~~~~~~
115115

116-
flash 加密提供两种模式:
116+
Flash 加密提供两种模式:
117117

118118
**开发模式 (Development Mode)**
119119

@@ -131,43 +131,43 @@ flash 加密提供两种模式:
131131

132132
**状态检查**:
133133

134-
- 使用 `esp_flash_encryption_enabled() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/peripherals/spi_flash/index.html#_CPPv428esp_flash_encryption_enabledv>`__ 检查 flash 加密状态
134+
- 使用 `esp_flash_encryption_enabled() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/peripherals/spi_flash/index.html#_CPPv428esp_flash_encryption_enabledv>`__ 检查 Flash 加密状态
135135
- 使用 `esp_get_flash_encryption_mode() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/peripherals/spi_flash/index.html#_CPPv429esp_get_flash_encryption_modev>`__ 获取加密模式(开发模式或发布模式)
136136

137-
配置方法详见:`flash 加密设置 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#id4>`_
137+
配置方法详见:`Flash 加密设置 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#id4>`_
138138

139139
加密过程
140140
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
141141

142-
flash 加密的基本过程:
142+
Flash 加密的基本过程:
143143

144144
1. **首次启动**:检测 eFuse 状态,启动加密流程
145145
2. **密钥生成**:生成随机加密密钥并存储到 eFuse (可跳过,支持烧录自定义密钥)
146-
3. **就地加密**:加密 flash 中的指定分区内容
147-
4. **设置标志**:标记 flash 加密已启用
146+
3. **就地加密**:加密 Flash 中的指定分区内容
147+
4. **设置标志**:标记 Flash 加密已启用
148148
5. **重启系统**:开始正常的加密模式运行
149149

150-
完整的加密过程说明:`flash 的加密过程 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#id3>`_
150+
完整的加密过程说明:`Flash 的加密过程 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#id3>`_
151151

152152
应用程序访问加密分区
153153
~~~~~~~~~~~~~~~~~~~~~~~
154154

155-
应用程序可以透明地访问加密的 flash 内容:
155+
应用程序可以透明地访问加密的 Flash 内容:
156156

157-
**读取加密 flash**:
157+
**读取加密 Flash**:
158158

159159
- 使用 `esp_partition_read() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/storage/partition.html#_CPPv418esp_partition_readPK15esp_partition_t6size_tPv6size_t>`__ 或 `esp_flash_read_encrypted() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/peripherals/spi_flash/index.html#_CPPv424esp_flash_read_encryptedP11esp_flash_t8uint32_tPv8uint32_t>`__ 读取明文内容(自动解密)
160160
- 使用 `esp_flash_read() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/peripherals/spi_flash/index.html#_CPPv414esp_flash_readP11esp_flash_tPv8uint32_t8uint32_t>`__ 读取原始加密数据(不解密)
161161

162-
**写入加密 flash**:
162+
**写入加密 Flash**:
163163

164164
- 使用 `esp_partition_write() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/storage/partition.html#_CPPv419esp_partition_writePK15esp_partition_t6size_tPKv6size_t>`__ 写入明文内容(自动加密)
165165
- 使用 `esp_flash_write_encrypted() <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/api-reference/peripherals/spi_flash/index.html#_CPPv425esp_flash_write_encryptedP11esp_flash_t8uint32_tPKv8uint32_t>`__ 写入原始加密内容(跳过自动加密)
166166

167167

168-
更多 API 详情:`在加密的 flash 中读写数据 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#reading-writing-content>`_
168+
更多 API 详情:`在加密的 Flash 中读写数据 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#reading-writing-content>`_
169169

170-
重新烧录 flash
170+
重新烧录 Flash
171171
~~~~~~~~~~~~~~~
172172

173173
**开发模式下**:
@@ -178,30 +178,30 @@ flash 加密的基本过程:
178178
**发布模式下**:
179179

180180
- 只能通过 OTA 更新明文固件
181-
- 只能手动烧录密文固件 (仅当 UART ROM Downloads 启用时支持)
181+
- 只能手动烧录密文固件仅当 UART ROM Downloads 启用时支持
182182

183183
详细说明:`重新烧录更新后的分区 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#encrypt-partitions>`_
184184

185185
取消加密
186186
~~~~~~~~~~~
187187

188-
**仅开发模式支持** (发布模式无法取消):在加密状态下通过烧录 eFuse ``SPI_BOOT_CRYPT_CNT`` 以禁用 flash 加密。
188+
**仅开发模式支持**(发布模式无法取消):在加密状态下通过烧录 eFuse ``SPI_BOOT_CRYPT_CNT`` 以禁用 Flash 加密。
189189
190190
**警告**:每个芯片只有有限次数的开关加密次数,通常为 3 次(关闭->开启->关闭->开启),请谨慎操作。
191191

192-
详细步骤:`关闭 flash 加密 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#disabling-flash-encryption>`_
192+
详细步骤:`关闭 Flash 加密 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#disabling-flash-encryption>`_
193193

194194
示例代码
195195
~~~~~~~~~~~
196196

197-
完整的 flash 加密使用示例请参考:
197+
完整的 Flash 加密使用示例请参考:
198198

199-
- `ESP-IDF flash 加密示例 <https://github.com/espressif/esp-idf/tree/master/examples/security/flash_encryption>`_
199+
- `ESP-IDF Flash 加密示例 <https://github.com/espressif/esp-idf/tree/master/examples/security/flash_encryption>`_
200200
- `安全功能综合示例 <https://github.com/espressif/esp-idf/tree/master/examples/security/security_features_app>`_
201201

202202
这些示例展示了:
203203

204-
- flash 加密状态检查
204+
- Flash 加密状态检查
205205
- 加密分区读写操作
206206
- NVS 和 FATFS 在加密环境下的使用
207207
- 开发模式和发布模式的配置方法
@@ -215,7 +215,7 @@ flash 加密的基本过程:
215215
4. **合理规划分区加密策略**
216216
5. **测试 OTA 更新流程**
217217

218-
更多最佳实践:`flash 加密最佳实践 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#flash-encrypt-best-practices>`_
218+
更多最佳实践:`Flash 加密最佳实践 <https://docs.espressif.com/projects/esp-idf/zh_CN/latest/esp32s3/security/flash-encryption.html#flash-encrypt-best-practices>`_
219219

220220
常见问题 (FAQ)
221221
~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)