Secure storage is all about protecting data and keeping secrets secret.

Jacob Beningo

October 5, 2022

4 Min Read
secure storage GNCBDY.jpg
Image courtesy of YAY Media AS / Alamy Stock Vector

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:

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. 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

  • Cryptography

  • Firmware Updates

  • Attestation

  • 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 given 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.

About the Author(s)

Jacob Beningo

Jacob Beningo is an embedded software consultant who currently works with clients in more than a dozen countries to dramatically transform their businesses by improving product quality, cost and time to market. He has published more than 300 articles on embedded software development techniques, has published several books, is a sought-after speaker and technical trainer and holds three degrees which include a Masters of Engineering from the University of Michigan.

Sign up for the Design News Daily newsletter.

You May Also Like