In “5 Elements to a Secure Embedded System – Part 4 Secure Bootloaders,” we continued to discuss the five elements of a secure embedded system. So far, we have seen that these five elements include:
- Hardware-based isolation
- A Root-of-Trust (RoT)
- A secure boot solution
- A secure bootloader
- Secure storage
We’ve explored each element in detail except for secure storage in the previous posts. Today’s post will dive deeper into secure storage and how it applies to embedded systems.
What is Secure Storage?
Secure storage is often a memory location within a system used to protect access to sensitive data such as encryption keys, user and service credentials, and other system data. Secure storage can be on the chip, such as within a flash memory bank or RAM location, or an external flash device like a NOR flash chip.The goal of secure storage is to prevent private data from being revealed outside the device or service using the data and from being cloned. Click To Tweet
The goal of secure storage is to prevent private data from being revealed outside the device or service using the data and from being cloned. As you might imagine, secure storage is often tied to the system Root-Of-Trust services and uses cryptographic keys to encrypt the data and maintain its confidentiality and integrity.
Secure storage is all about protecting data and keeping secrets secret.
Secure Storage with Trusted Firmware-M
Developers can use several mechanisms to create secure storage within their embedded systems. As I mentioned earlier, secure storage is often linked to the systems Root-Of-Trust, and the first place to look is the service solutions that come with your microcontroller of choice. For example, if you are using an Arm Cortex®-M processor, there is a high chance that your vendor will support Trusted Firmware-M (TF-M).
Trusted Firmware-M is a reference implementation of the Platform Security Architecture (PSA) IoT Security Framework. The framework provides developers with several different secure services such as:
- Audit Logging
- Firmware Updates
- Secure Storage
The secure storage capabilities of TF-M are broken up into two primary services: internal trusted storage (ITS) and protected storage (PS). Internal trusted storage is a PSA Root-Of-Trust service for storing the most security-critical device data in internal memory. Internal trusted storage differs from protected storage in several ways. First, ITS is an internal PSA Root-Of-Trust service, whereas PS is a PSA Root-Of-Trust Application service. Next, ITS is meant to protect memory on-chip, while PS is intended to protect data stored off-chip. Finally, PS has additional functionality for encrypting the external data, authenticating, and providing rollback protection. ITS can be considered storage to protect data like keys and user credentials, whereas PS might be regarded for larger datasets like firmware updates or other user data assets.
Secure Storage using PUFs
An exciting solution for creating Root-Of-Trust and secure storage that has appeared in recent years is to use SRAM PUFs (physical unclonable functions). The idea behind SRAM PUFs is that the algorithm uses a section of SRAM, which has sub-micron variations due to the production process, to create a unique device key. The unique device key then becomes the private Root-Of-Trust key for the device. The PUF solution is attractive because it makes an unclonable key that only exists while the device is powered on. The key can then be used to create a key store tied to hardware to create secure storage solutions.
Off-chip Secure Storage
Beyond the specific software solutions that one might find to create secure storage solutions, external memory devices have also started to take secure storage seriously. In an embedded system that uses external memory, one would typically look at any external memory as a perfect place to try to pull firmware and other device essentials. Unfortunately, external memory has generally been left unprotected, which makes it very easy to use standard memory interfaces to pull any data that might reside there.
External memory vendors are starting to employ secure storage solutions in their memory devices that allow data to be stored securely on the memory device. For example, Winbond Electronics Corporation has a 32Mbit TrustME® Secure Memory Element that has been PSA certified for use in systems with security requirements. Devices like this, which is just one random example I selected, can provide RoT hardware-protected storage that prevents data cloning, modification, or access to the stored data.
Secure Storage Conclusions
Over several posts, we’ve been exploring the major security elements that every embedded system concerned with security should have. Secure storage is an essential service that developers should not overlook. We’ve explored several different options that developers can utilize, such as security frameworks, physical unclonable functions, and off-chip solutions that are finding their way into the industry. The right solution for your secure storage needs will depend on the security threats you expect your system to face and the level of protection you need from those threats.
Suppose you are just getting started with designing secure applications for embedded systems. In that case, I’d highly recommend that your next steps be to understand how to perform a threat model security analysis (TMSA) and that you understand the 10 Security Goals that Platform Security Architecture recommends. These contain additional insights that will help to guide you on your path to developing a secure embedded system.