[已解决]无法将主机生成的密钥写入esp32

tom13a
Posts: 2
Joined: Fri Mar 08, 2024 8:37 am

[已解决]无法将主机生成的密钥写入esp32

Postby tom13a » Tue Jun 11, 2024 7:08 am

开发板型号:esp32s3 n16r8
idf版本:ESP-IDF v5.3-dev-2218-g7cf8cc79a1-dirty

问题描述: 无法在使用手动flash加密时,将主机生成的密码bin文件写入esp32。 报错摘要:“espefuse.py burn_key: error: argument block: invalid choice:” 'flash_encryption'

报错反馈:

espefuse.py --port /dev/ttyACM0 burn_key flash_encryption my_flash_encryption_key.bin



espefuse.py vv4.8.dev1
Connecting....
Detecting chip type... ESP32-S3
usage: espefuse.py burn_key [-h] [--no-write-protect] [--no-read-protect]
[--force-write-always] [--show-sensitive-info]
{MAC_SPI_8M_0,BLOCK1,BLOCK_SYS_DATA,BLOCK2,BLOCK_USR_DATA,BLOCK3,BLOCK_KEY0,BLOCK4,BLOCK_KEY1,BLOCK5,BLOCK_KEY2,BLOCK6,BLOCK_KEY3,BLOCK7,BLOCK_KEY4,BLOCK8,BLOCK_KEY5,BLOCK9,BLOCK_SYS_DATA2,BLOCK10}
keyfile
{USER,RESERVED,XTS_AES_256_KEY_1,XTS_AES_256_KEY_2,XTS_AES_128_KEY,HMAC_DOWN_ALL,HMAC_DOWN_JTAG,HMAC_DOWN_DIGITAL_SIGNATURE,HMAC_UP,SECURE_BOOT_DIGEST0,SECURE_BOOT_DIGEST1,SECURE_BOOT_DIGEST2,XTS_AES_256_KEY}
[BLOCK] [KEYFILE] [KEYPURPOSE] [BLOCK] [KEYFILE]
[KEYPURPOSE] [BLOCK] [KEYFILE] [KEYPURPOSE]
[BLOCK] [KEYFILE] [KEYPURPOSE] [BLOCK] [KEYFILE]
[KEYPURPOSE] [BLOCK] [KEYFILE] [KEYPURPOSE]
[BLOCK] [KEYFILE] [KEYPURPOSE] [BLOCK] [KEYFILE]
[KEYPURPOSE] [BLOCK] [KEYFILE] [KEYPURPOSE]
[BLOCK] [KEYFILE] [KEYPURPOSE] [BLOCK] [KEYFILE]
[KEYPURPOSE] [BLOCK] [KEYFILE] [KEYPURPOSE]
[BLOCK] [KEYFILE] [KEYPURPOSE] [BLOCK] [KEYFILE]
[KEYPURPOSE] [BLOCK] [KEYFILE] [KEYPURPOSE]
[BLOCK] [KEYFILE] [KEYPURPOSE] [BLOCK] [KEYFILE]
[KEYPURPOSE] [BLOCK] [KEYFILE] [KEYPURPOSE]
[BLOCK] [KEYFILE] [KEYPURPOSE] [BLOCK] [KEYFILE]
[KEYPURPOSE]
espefuse.py burn_key: error: argument block: invalid choice: 'flash_encryption' (choose from 'MAC_SPI_8M_0', 'BLOCK1', 'BLOCK_SYS_DATA', 'BLOCK2', 'BLOCK_USR_DATA', 'BLOCK3', 'BLOCK_KEY0', 'BLOCK4', 'BLOCK_KEY1', 'BLOCK5', 'BLOCK_KEY2', 'BLOCK6', 'BLOCK_KEY3', 'BLOCK7', 'BLOCK_KEY4', 'BLOCK8', 'BLOCK_KEY5', 'BLOCK9', 'BLOCK_SYS_DATA2', 'BLOCK10')



[已解决] 后来发现是官方网站有更新的操作命令,将写入命令改为:
espefuse.py --port /dev/ttyACM0 burn_key BLOCK_KEY1 my_n16r8_key.bin XTS_AES_128_KEY
就可以正常写入了。
Last edited by tom13a on Wed Jun 12, 2024 9:10 am, edited 1 time in total.

tom13a
Posts: 2
Joined: Fri Mar 08, 2024 8:37 am

Re: 无法将主机生成的密钥写入esp32

Postby tom13a » Tue Jun 11, 2024 2:32 pm

我的esp32s3 n16r8 开发板以前没有做过任何加密相关的操作。

Who is online

Users browsing this forum: No registered users and 41 guests