flash加密,使用主机生成的密钥的问题

ddffww
Posts: 4
Joined: Fri Jun 25, 2021 10:40 pm

flash加密,使用主机生成的密钥的问题

Postby ddffww » Wed Mar 08, 2023 2:07 am

参照文档,使用主机生成的密钥
espsecure.py generate_flash_encryption_key my_flash_encryption_key.bin
写入
espefuse.exe --port com15 burn_key BLOCK_KEY1 my_flash_encryption_key.bin XTS_AES_128_KEY
配置 仅使能flash加密 开发模式
222.png
222.png (29.08 KiB) Viewed 626 times
然后编译烧录,正常启动后查询efuse状态espefuse.exe -p com15 summary提示
espefuse.py v4.4
Connecting...
Failed to get PID of a device on com15, using standard reset sequence.
.
Detecting chip type... ESP32-C3

A fatal error occurred: Secure Download Mode is enabled. The tool can not read eFuses.
请问这是什么原因,这个Secure Download Mode is enabled是怎么回事
这是想关闭flash机密也不可以了
espefuse.exe -p com15 burn_efuse SPI_BOOT_CRYPT_CNT
espefuse.py v4.4
Connecting...
Failed to get PID of a device on com15, using standard reset sequence.
.
Detecting chip type... ESP32-C3

A fatal error occurred: Secure Download Mode is enabled. The tool can not read eFuses.
我换了个芯片试了不写入主机生成的key,就没有这个问题。
是不是写入了key就自动开启了Secure Download,不能关闭加密,也不能查询efuse状态

ESP_WangYX
Posts: 90
Joined: Mon Jun 28, 2021 12:48 pm

Re: flash加密,使用主机生成的密钥的问题

Postby ESP_WangYX » Tue Mar 21, 2023 9:24 am

这是因为你的配置中,将 [CONFIG_SECURE_UART_ROM_DL_MODE][/https://docs.espressif.com/projects/esp ... om-dl-mode] 配置为 Secure mode 了。当前你无法通过 espefuse.py 查看 efuse 的 summary 了。
请参考:https://docs.espressif.com/projects/esp ... rt-dl-mode
如需查看 efuse,请在开发阶段选择 "UART ROM download mode (Enabled (not recommended))"。量产阶段仍建议至少选择 Secure mode。

Who is online

Users browsing this forum: No registered users and 47 guests