SoC
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
  • Arm Cortex M3
  • Contact
Reading: What is the TrustZone in the Arm Cortex?
SUBSCRIBE
SoCSoC
Font ResizerAa
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Search
  • Home
  • Arm
  • Arm Cortex M0/M0+
  • Arm Cortex M4
Have an existing account? Sign In
Follow US
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
© S-O-C.ORG, All Rights Reserved.
Arm

What is the TrustZone in the Arm Cortex?

Graham Kruk
Last updated: September 13, 2023 5:42 am
Graham Kruk 6 Min Read
Share
SHARE

The TrustZone is a security extension in the Arm Cortex series of processors that provides hardware-level isolation between secure and non-secure environments on the same system-on-a-chip (SoC). It creates a secure world for trusted code and data isolated from the non-secure world used by the main operating system and applications.

Contents
Overview of the TrustZoneKey Components of the TrustZoneHardware Security FeaturesSoftware Components in the Secure WorldHow the TrustZone Provides SecurityUse Cases Enabled by TrustZoneSoftware Interfaces for Non-secure WorldSummary

Overview of the TrustZone

The TrustZone divides system resources like memory, peripherals and processing cores into secure and non-secure domains. A context switch between the two worlds is controlled by secure monitor code running in monitor mode. This provides efficient switching while maintaining isolation.

The secure world is trusted and protects sensitive assets like cryptography keys, user credentials and payment details. It runs a trusted execution environment (TEE) with its own operating system and applications. The non-secure world runs the rich operating system and untrusted applications.

Hardware logic ensures no code executed in the non-secure world can access resources assigned to the secure world. The secure world has full access to the non-secure resources but not the other way around.

Key Components of the TrustZone

The main components that enable the TrustZone security are:

  • Secure and Non-secure Modes – The processor can operate in secure or non-secure mode based on the value of the NS bit. This enables access control to resources.
  • Monitor Mode – A new processor mode that handles world switching. Monitor mode runs the monitor code and configures security policies.
  • Secure Monitor – Trusted firmware that implements world switching and isolation. It saves/restores state during context switches.
  • TZPC – TrustZone Protection Controller configures security policies for peripherals like interrupts.
  • TZASC – TrustZone Address Space Controller partitions memory into secure and non-secure regions.

Hardware Security Features

The TrustZone hardware security features include:

  • Banked Registers – Separate secure and non-secure copies of registers like SP, LR, SPSR prevent leakage across worlds.
  • Translation Tables – Separate memory translation tables for secure and non-secure worlds prevent non-secure access.
  • Interrupt Handling – Interrupts can be configured as secure or non-secure. Secure interrupts handled in monitor mode.
  • Internal Buses – Hardware controls access to on-chip peripherals and memory via internal buses.
  • Secure Boot – Cryptographic checks validate bootloader integrity before loading secure world OS.

Software Components in the Secure World

The secure world software stack includes:

  • Trusted OS – Real-time OS like OP-TEE provides secure environment isolated from main OS.
  • Trustlets – Trusted applications that run in TEE with access to secure resources.
  • Secure Monitor – Low-level firmware that handles world switches and isolation.
  • Secure Bootloader – First code executed on reset that checks integrity of secure world software.

The TEE Trusted OS provides standard services like cryptographic operations, secure storage and trusted user interface. Trustlets leverage these services to implement security use cases.

How the TrustZone Provides Security

Here are some of the key ways the TrustZone provides security:

  • Isolation – Hardware mechanisms isolate secure world from non-secure software including the main OS.
  • Access Control – Secure world has access to all resources while non-secure access is restricted.
  • Trusted Execution – Sensitive code executes in a trusted environment isolated from main OS threats.
  • Secure Storage – Keys, credentials and sensitive data protected from unauthorized access.
  • Trusted Peripherals – Secure world has exclusive access or protects shared peripherals like display, keyboard.
  • Secure Boot – Cryptographic validation of initial bootloader before loading secure world software.

This hardware backed isolation and access control mechanisms enable building robust security use cases.

Use Cases Enabled by TrustZone

Here are some examples of security use cases enabled by the TrustZone:

  • Digital Rights Management (DRM) – Media decryption keys and algorithms protected in TEE from main OS threats.
  • Secure Payments – Payment credentials and transactions isolated in TEE from malware in main OS.
  • Authentication – Biometric template matching and storage done in isolated secure environment.
  • Secure Data – Trustlets in TEE can encrypt/decrypt sensitive data and keys without exposing them.
  • Root of Trust – Chained validation of each boot stage establishes hardware backed root of trust.
  • Trusted User Interface – Secure display and input channels for PIN entry, transaction confirmation etc.

Device OEMs and application developers can leverage the hardware security mechanisms to implement advanced trusted use cases.

Software Interfaces for Non-secure World

The non-secure or Rich Execution Environment (REE) running the main OS communicates with TEE running in secure world via software interfaces like:

  • GlobalPlatform TEE Client API – API for applications in REE to communicate with Trusted Applications in TEE.
  • ARM Trusted Firmware-A – Implements Secure Monitor mode and world switching.
  • TrustZone Software Communication – API that enables coordination between Normal and Secure worlds.

These standard interfaces enable application developers to leverage TrustZone services without dealing with low-level details.

Summary

The TrustZone is a hardware security feature in Arm Cortex processors that provides isolation of secure services from main OS. It enables building robust security use cases leveraging hardware backed access control and trusted execution. The secure world runs trusted applications and stores sensitive assets isolated from non-secure domain running rich OS and apps. This security architecture enables advanced use cases like digital rights management, secure payments and authentication.

Newsletter Form (#3)

More ARM insights right in your inbox

 


Share This Article
Facebook Twitter Email Copy Link Print
Previous Article What is the SVC instruction in the arm cortex?
Next Article What is the Thumb instruction set of the ARM controller?
Leave a comment Leave a comment

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

2k Followers Like
3k Followers Follow
10.1k Followers Pin
- Sponsored-
Ad image

You Might Also Like

What are the exceptions in ARM architecture?

The ARM architecture defines a set of exceptions that can…

5 Min Read

What are the purposes of the ARM ABI and EABI?

The ARM Application Binary Interface (ABI) and Embedded ABI (EABI)…

6 Min Read

ARM Cortex-M7

The ARM Cortex-M7 is a high-performance processor core designed for…

8 Min Read

ARM Cortex-M0 Clock Speed

The ARM Cortex-M0 is a 32-bit reduced instruction set computing…

8 Min Read
SoCSoC
  • Looking for Something?
  • Privacy Policy
  • About Us
  • Sitemap
  • Contact Us
Welcome Back!

Sign in to your account