Pre-encrypted OTA Update - Check magic byte before erase?
Posted: Mon Apr 08, 2019 8:23 am
Hello,
I am currently doing OTA updates with pre-encrypted data. I use two partitions for each app (one updateable, one fallback in case of update fails). When the update is succesful, the partitions swap their roles, so that the other partition gets updated next time.
This creates a problem because images have to be encrypted with flash offset. So currently I try to provide Images for both partitions via OTA. In this case one update will definitely fail because the flash Offset in the encryption doesnt fit the partition.
How can I decrypt Incoming OTA data before erasing / writing to flash to check the magic byte and determine if I can process the Image or continue with the next one?
Thanks for the support
I am currently doing OTA updates with pre-encrypted data. I use two partitions for each app (one updateable, one fallback in case of update fails). When the update is succesful, the partitions swap their roles, so that the other partition gets updated next time.
This creates a problem because images have to be encrypted with flash offset. So currently I try to provide Images for both partitions via OTA. In this case one update will definitely fail because the flash Offset in the encryption doesnt fit the partition.
How can I decrypt Incoming OTA data before erasing / writing to flash to check the magic byte and determine if I can process the Image or continue with the next one?
Thanks for the support