2025-10-22 3:32 AM
Hello everyone,
We are working on a project using a STM32WB5MMG, facing a strange situation with AES encryption userkeys. Our application code performs data encryption using the internal AES module and for that we load the (previously saved) internal user key from index 1. Everything works fine if we only flash the application code.
But, our full project also uses BLE OTA, as long as SECoreBin and SBSFU, besides the previously mentioned application code. By the way, SBSFU uses the key in index 1 to decrypt the encrypted firmware image received from BLE OTA.
The thing is that when the full project is flashed, our application cannot load userkey from index 1 anymore and we have to use the one from index 2. It would seem that userkey index 1 is reserved for the secure core and cannot be used by the user application.
We could not find any documentation that states that index 1 is reserved for the secure core, in case it is present. So, are we doing something wrong then? We could not find any mistake in our code either.
Thanks in advance