SPRADO0 November 2024 F29H850TU , F29H859TU-Q1
One challenge many users face in deploying embedded systems is how to maintain the security of code, secrets, and intellectual property through the manufacturing process. A process called secure provisioning involves programming secret cryptographic keys into the microcontroller while in an unsecure environment. These keys are subsequently used to authenticate and decrypt incoming application code. In many cases, a third-party manufacturing and programming facility is involved in the provisioning process; and even with signed non-disclosure agreements, it is still possible for a rogue actor to intercept and steal secrets, or potentially install compromised software on the microcontroller. A process must therefore be established that preserves the confidentiality, integrity, and authenticity of secret keys, certificates and code at all stages, starting with the servers from which these assets are sourced, and ending with successful decryption and programming of the assets inside the microcontroller.
A secure provisioning process begins with the IT infrastructure that is used to source encryption keys and data. Keys used to perform encryption and decryption must be stored in a secure container and handled within a trusted execution environment, accessible only by key personnel. Within this trusted execution environment, a user key provisioning package is prepared, with user keys encrypted and signed using the chip manufacturer’s keys. This package is then securely transmitted to the factory and programmed into the device, preserving the confidentiality of the user keys throughout the process. Once user encryption keys are provisioned, application code can be programmed into the device. This process is similar to the key provisioning process, with the primary difference being that user code is now encrypted and signed using the user keys that were previously programmed into the device’s secure storage. For devices with internal Flash memory, there is an additional security benefit: the code remains encrypted and inaccessible until it is programmed into the device. It can then be decrypted and stored in plain text to maximize code execution performance, as confidentiality is maintained using device-level security controls. On the other hand, devices that rely on external Flash chips can use a symmetric key that is unique to each device to encrypt and decrypt code being transmitted between external Flash and internal RAM. For additional security, a unique customer ID can be pre-programmed into the device before shipping to the customer programming facility. This unique ID can be further used to authenticate genuine parts, and help eliminate the risk of unauthorized clones created by rogue third parties.