AMR TrustZone

ARM TrustZone

TEE

When you use a Trusted Execution Environment (TEE), you protect your code and data in a secure environment.

What is a TEE

A Trusted Execution Environment is a segregated area of memory and CPU that's protected from the rest of the CPU by using encryption. Any code outside that environment can't read or tamper with the data in the TEE. Authorized code can manipulate the data inside the TEE. Code that executes inside the TEE is processed in the clear, but it's visible in encrypted form only when anything outside tries to access it. The platform security processor embedded inside the CPU die manages this protection.

Trusted Execution Environment: What It Is, and What It Is Not

A TEE is a secure, integrity-protected processing environment, consisting of memory and storage capabilities.

Prerequisite
Separation Kernel concept

It is the element that assures the property of isolated execution. Basically, it divides the system into several partitions, and guarantees a strong isolation between them, except for the carefully controlled interface for inter-partition communication. The security requirements for separation kernels are described in the Separation Kernel Protection Profile (SKPP). The SKPP defines separation kernel as

  • Hardware
  • Firmware
  • Software

Unlike traditional security kernels, such as:

  • operating systems
  • micro-kernels
  • hypervisors

the separation kernel is quite simple, providing both time and space partitioning. The security requirements are composed of four main security policies:

  • Data (Spatial) separation Data within one partition cannot be read or modified by other partitions.
  • Sanitization (temporal separation) Shared resources cannot be used to leak information into other partitions.
  • Control of information flow Communication between partitions cannot occur unless explicitly permitted
  • Fault isolation Security breach in one partition cannot spread to other partitions
Definition
  • Trusted Execution Environment (TEE) is a tamper-resistant processing environment that runs on a separation kernel Its guarantees:

    • auth of the executed code
    • integrity of runtime state
    • confidentiality of its code

    The content of TEE is not static it can be securely updated

Discussion

Introduction of the truth concept that will discuss later. Secure execution, openness and trust are its main parts, events include not only the execution of instructions, but also traps,exceptions and interruptions.

How trust can be measured

In the real world, an entity is trusted if it has behaved and/will behave as expected. In computing we have two type of trus

  • static trust is a trust based on a comprehensive evaluation against a specific set of security requirements. In static trust, the trustworthiness of a system is measured only once and before its deployment
  • Dynamic trust It is based on the state of the running system. A system continuosly changes its "trust" state. Trust, in this context, can be defined as an expectation that the system state is as it is considered to be: secure. This definition requires a trusted entity called root of trust (RoT) to provide trustworthy evidence regarding the state of a system. Therefore, RoT is necessarily a tamper-resistant hardware module. RoT, sometimes called trust anchor, can be implemented using various technologie

    • TrustZone rely on secureROM or eFuse tech as trust anchor.
    • PUF
TEE Building Blocks
  • Secure boot assures that only the code of a certain propriety can be loaded. If a modification is detected, the bootstrap process is interrupted. Generally speaking, the design of secure boot consists of various stages, and therefore, a chain of trust is established. This chain can be represented by the recurrence:

    I_{0} = True;
    I_{i+1} = I_{1} ∧ V_{i}(L_{i+1})
    

    Where Ii is the integrity of the layer i and Vi is the corrisponding verification function. The verification function performs cryptographic hash of the ith layer and compare the value to the reference value.