Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

ESP32: encrypt multiple devices with same flash key?

I've been following the examples at https://mongoose-os.com/blog/mongoose-os-implements-esp32-flash-encryption/

It seems as if the first command wants to generate a new unique key for each device. I would like to use the same key for multiple devices - is there any way to do this?

Comments

  • I tried:

    espefuse.py --port /dev/blah burn_key flash_encryption fe.key
    mos flash --esp32-encryption-key-file fe.key
    

    where fe.key is a key previously generated with mos -X esp32-gen-key ... but this gives the dreaded "flash read error, 1000" indicating a key disparity.

  • NeedlerpNeedlerp United Kingdom

    Did you ever get an answer to this?

  • rojerrojer Dublin, Ireland

    this may be because espefuse and mos flash use different byte order in key files. you can use mos esp32-efuse-set to set the key, like so: mos esp32-efuse-set flash_encryption_key=@key.bin --dry-run=false where key.bin is a 32-byte file. then use the same file for mos flash.
    don't forget to read- and write-protect the key fuses as well: mos esp32-efuse-set flash_encryption_key.RD=1 flash_encryption_key.WD=1 --dry-run=false

Sign In or Register to comment.