Trusted execution environment explained

A trusted execution environment (TEE) is a secure area of a main processor. It helps the code and data loaded inside it be protected with respect to confidentiality and integrity. Data confidentiality prevents unauthorized entities from outside the TEE from reading data, while code integrity prevents code in the TEE from being replaced or modified by unauthorized entities, which may also be the computer owner itself as in certain DRM schemes described in Intel SGX.

This is done by implementing unique, immutable, and confidential architectural security, which offers hardware-based memory encryption that isolates specific application code and data in memory. This allows user-level code to allocate private regions of memory, called enclaves, which are designed to be protected from processes running at higher privilege levels.[1] [2] [3] A TEE as an isolated execution environment provides security features such as isolated execution, integrity of applications executing with the TEE, and confidentiality of their assets. In general terms, the TEE offers an execution space that provides a higher level of security for trusted applications running on the device than a rich operating system (OS) and more functionality than a 'secure element' (SE).

History

The Open Mobile Terminal Platform (OMTP) first defined TEE in their "Advanced Trusted Environment:OMTP TR1" standard, defining it as a "set of hardware and software components providing facilities necessary to support applications," which had to meet the requirements of one of two defined security levels. The first security level, Profile 1, was targeted against only software attacks, while Profile 2, was targeted against both software and hardware attacks.[4]

Commercial TEE solutions based on ARM TrustZone technology, conforming to the TR1 standard, were later launched, such as Trusted Foundations developed by Trusted Logic.[5]

Work on the OMTP standards ended in mid-2010 when the group transitioned into the Wholesale Applications Community (WAC).[6]

The OMTP standards, including those defining a TEE, are hosted by GSMA.[7]

Details

The TEE typically consists of a hardware isolation mechanism plus a secure operating system running on top of that isolation mechanism, although the term has been used more generally to mean a protected solution.[8] [9] [10] [11] Whilst a GlobalPlatform TEE requires hardware isolation, others, such as EMVCo, use the term TEE to refer to both hardware and software-based solutions.[12] FIDO uses the concept of TEE in the restricted operating environment for TEEs based on hardware isolation.[13] Only trusted applications running in a TEE have access to the full power of a device's main processor, peripherals, and memory, while hardware isolation protects these from user-installed apps running in a main operating system. Software and cryptogaphic inside the TEE protect the trusted applications contained within from each other.[14]

Service providers, mobile network operators (MNO), operating system developers, application developers, device manufacturers, platform providers, and silicon vendors are the main stakeholders contributing to the standardization efforts around the TEE.

To prevent the simulation of hardware with user-controlled software, a so-called "hardware root of trust" is used. This is a set of private keys that are embedded directly into the chip during manufacturing; one-time programmable memory such as eFuses is usually used on mobile devices. These cannot be changed, even after the device resets, and whose public counterparts reside in a manufacturer database, together with a non-secret hash of a public key belonging to the trusted party (usually a chip vendor) which is used to sign trusted firmware alongside the circuits doing cryptographic operations and controlling access.

The hardware is designed in a way which prevents all software not signed by the trusted party's key from accessing the privileged features. The public key of the vendor is provided at runtime and hashed; this hash is then compared to the one embedded in the chip. If the hash matches, the public key is used to verify a digital signature of trusted vendor-controlled firmware (such as a chain of bootloaders on Android devices or 'architectural enclaves' in SGX). The trusted firmware is then used to implement remote attestation.[15]

When an application is attested, its untrusted components loads its trusted component into memory; the trusted application is protected from modification by untrusted components with hardware. A nonce is requested by the untrusted party from verifier's server and is used as part of a cryptographic authentication protocol, proving integrity of the trusted application. The proof is passed to the verifier, which verifies it. A valid proof cannot be computed in simulated hardware (i.e. QEMU) because in order to construct it, access to the keys baked into hardware is required; only trusted firmware has access to these keys and/or the keys derived from them or obtained using them. Because only the platform owner is meant to have access to the data recorded in the foundry, the verifying party must interact with the service set up by the vendor. If the scheme is implemented improperly, the chip vendor can track which applications are used on which chip and selectively deny service by returning a message indicating that authentication has not passed.[16]

To simulate hardware in a way which enables it to pass remote authentication, an attacker would have to extract keys from the hardware, which is costly because of the equipment and technical skill required to execute it. For example, using focused ion beams, scanning electron microscopes, microprobing, and chip decapsulation[17] [18] [19] [20] [21] [22] is difficult, or even impossible, if the hardware is designed in such a way that reverse-engineering destroys the keys. In most cases, the keys are unique for each piece of hardware, so that a key extracted from one chip cannot be used by others (for example physically unclonable functions[23] [24]).

Though deprivation of ownership is not an inherent property of TEEs (it is possible to design the system in a way that allows only the user who has obtained ownership of the device first to control the system by burning a hash of their own key into e-fuses), in practice all such systems in consumer electronics are intentionally designed so as to allow chip manufacturers to control access to attestation and its algorithms. It allows manufacturers to grant access to TEEs only to software developers who have a (usually commercial) business agreement with the manufacturer, monetizing the user base of the hardware, to enable such use cases as tivoization and DRM and to allow certain hardware features to be used only with vendor-supplied software, forcing users to use it despite its antifeatures, like ads, tracking and use case restriction for market segmentation.

Uses

There are a number of use cases for the TEE. Though not all possible use cases exploit the deprivation of ownership, TEE is usually used exactly for this.

Premium Content Protection/Digital Rights Management

Note: Much TEE literature covers this topic under the definition "premium content protection," which is the preferred nomenclature of many copyright holders. Premium content protection is a specific use case of digital rights management (DRM) and is controversial among some communities, such as the Free Software Foundation.[25] It is widely used by copyright holders to restrict the ways in which end users can consume content such as 4K high-definition films.

The TEE is a suitable environment for protecting digitally encoded information (for example, HD films or audio) on connected devices such as smartphones, tablets, and HD televisions. This suitability comes from the ability of the TEE to deprive the owner of the device of access stored secrets, and the fact that there is often a protected hardware path between the TEE and the display and/or subsystems on devices.

The TEE is used to protect the content once it is on the device. While the content is protected during transmission or streaming by the use of encryption, the TEE protects the content once it has been decrypted on the device by ensuring that decrypted content is not exposed to the environment not approved by the app developer or platform vendor.

Mobile financial services

Mobile commerce applications such as: mobile wallets, peer-to-peer payments, contactless payments or using a mobile device as a point of sale (POS) terminal often have well-defined security requirements. TEEs can be used, often in conjunction with near-field communication (NFC), SEs, and trusted backend systems to provide the security required to enable financial transactions to take place

In some scenarios, interaction with the end user is required, and this may require the user to expose sensitive information such as a PIN, password, or biometric identifier to the mobile OS as a means of authenticating the user. The TEE optionally offers a trusted user interface which can be used to construct user authentication on a mobile device.

With the rise of cryptocurrency, TEEs are increasingly used to implement crypto-wallets, as they offer the ability to store tokens more securely than regular operating systems, and can provide the necessary computation and authentication applications.[26]

Authentication

The TEE is well-suited for supporting biometric identification methods (facial recognition, fingerprint sensor, and voice authorization), which may be easier to use and harder to steal than PINs and passwords. The authentication process is generally split into three main stages:

A TEE is a good area within a mobile device to house the matching engine and the associated processing required to authenticate the user. The environment is designed to protect the data and establish a buffer against the non-secure apps located in mobile OSes. This additional security may help to satisfy the security needs of service providers in addition to keeping the costs low for handset developers.

Enterprise, government, and cloud

The TEE can be used by governments, enterprises, and cloud service providers to enable the secure handling of confidential information on mobile devices and on server infrastructure. The TEE offers a level of protection against software attacks generated in the mobile OS and assists in the control of access rights. It achieves this by housing sensitive, ‘trusted’ applications that need to be isolated and protected from the mobile OS and any malicious malware that may be present. Through utilizing the functionality and security levels offered by the TEE, governments, and enterprises can be assured that employees using their own devices are doing so in a secure and trusted manner. Likewise, server-based TEEs help defend against internal and external attacks against backend infrastructure.

Secure modular programming

With the rise of software assets and reuses, modular programming is the most productive process to design software architecture, by decoupling the functionalities into small independent modules. As each module contains everything necessary to execute its desired functionality, the TEE allows the organization of the complete system featuring a high level of reliability and security, while preventing each module from vulnerabilities of the others.

In order for the modules to communicate and share data, TEE provides means to securely have payloads sent/received between the modules, using mechanisms such as object serialization, in conjunction with proxies.

See Component-based software engineering

TEE operating systems

CompanyProductHardware UsedAPI StandardCertification typeReferences
AlibabaCloud Link TEEGlobalPlatformFull[27]
AppleSecure EnclaveSeparate processorProprietary[28]
BeanPodARM TrustZoneGlobalPlatform[29]
HuaweiiTrusteeARM TrustZoneGlobalPlatformFull[30]
GoogleTrustyARM / IntelProprietary[31]
LinaroOPTEEARM TrustZoneGlobalPlatform[32]
ProvenRunProvenCoreARM TrustZone[33]
QualcommQTEEARM TrustZoneGlobalPlatform + Proprietary[34]
SamsungTEEgrisARM TrustZoneGlobalPlatformFull[35]
TrustKernelT6Arm / IntelGlobalPlatform[36]
TrustonicKinibiARM TrustZoneGlobalPlatformFull[37]
TrustonicSW TEESW TEE onGlobalPlatform
uberSparkuberXMHFARM TrustZone / IntelFormal Mechanized Proof[38]
WatchdataWatchTrustARM TrustZoneGlobalPlatformFull[39]

Hardware support

The following hardware technologies can be used to support TEE implementations:

See also

Notes and References

  1. Web site: Introduction to Trusted Execution Environment: ARM's TrustZone .
  2. Web site: Security evaluation of Trusted execution environments: Why and how? . 2024-02-15.
  3. Web site: Trusted Execution Environment, millions of users have one, do you have yours? . Poulpita . 2014-02-18 . 2017-05-17 . 2021-01-27 . https://web.archive.org/web/20210127231827/https://poulpita.com/2014/02/18/trusted-execution-environment-do-you-have-yours/ . live .
  4. Web site: Omtp Hardware Requirements And Defragmentation . Gsma.org . 2017-05-17 . 2018-12-14 . https://web.archive.org/web/20181214114609/https://www.gsma.com/newsroom/wp-content/uploads/2012/03/omtpadvancedtrustedenvironmentomtptr1v11.pdf . live .
  5. Web site: Gemalto's website has moved to Thales. https://web.archive.org/web/20140903041544/http://www.trusted-logic.com/IMG/pdf/TRUSTED_LOGIC_TRUSTED_FOUNDATIONS_OMTP_FINAL.pdf. 2014-09-03.
  6. Web site: OMTP announces final documents prior to transition into Wholesale Application Community. Mobileeurope.co.uk. 2014-08-27. 2018-12-14. https://web.archive.org/web/20181214115741/https://www.mobileeurope.co.uk/Press-Wire/omtp-announces-final-documents-prior-to-transition-into-wholesale-application-community. dead.
  7. Web site: OMTP documents. May 2012. Gsma.com. 12 September 2014. 19 February 2015. https://web.archive.org/web/20150219080703/http://www.gsma.com/newsroom/gsmadocuments/omtp-documents/. live.
  8. Book: Sabt . M . 2015 IEEE Trustcom/BigDataSE/ISPA . 57–64 . Achemlal . M . Bouabdallah . A . Trusted Execution Environment: What It is, and What It is Not . IEEE . 10.1109/Trustcom.2015.357 . 2015 . 978-1-4673-7952-6 . 206775888 . 2020-04-19 . 2020-07-18 . https://web.archive.org/web/20200718094655/https://hal.archives-ouvertes.fr/hal-01246364/file/trustcom_2015_tee_what_it_is_what_it_is_not.pdf . live .
  9. Pinto . S. . Santos . N. . 2019 . Demystifying Arm TrustZone: A Comprehensive Survey . ACM Computing Surveys . 51 . 1–36 . 10.1145/3291047. 59337370 .
  10. Lee . S . Lee . JH . TEE based session key establishment protocol for secure infotainment systems . Design Automation for Embedded Systems . 22 . 3 . 215–224 . Springer . 10.1007/s10617-018-9212-5 . 2018 . 52081114 .
  11. Book: Shepherd . C . 2016 IEEE Trustcom/BigDataSE/ISPA . 168–177 . Arfaoui . G . Gurulian . I . Lee . R . Markantonakis . K . Akram . R . Sauveron . D . Conchon . E . Secure and Trusted Execution: Past, Present, and Future - A Critical Review in the Context of the Internet of Things and Cyber-Physical Systems . IEEE . 10.1109/TrustCom.2016.0060 . 2016 . 978-1-5090-3205-1 . 8717045 . 2021-05-14 . 2021-05-14 . https://web.archive.org/web/20210514194356/https://core.ac.uk/download/pdf/77298166.pdf . live .
  12. Web site: Software-Based Mobile Payment Evaluation Process . EMVCo . 2021-10-13 . 2021-03-02 . https://web.archive.org/web/20210302083210/https://www.emvco.com/processes-forms/product-approval/mobile/sbmp/ . live .
  13. Web site: FIDO Authenticator Allowed Restricted Operating Environments List . FIDO Alliance . 2021-10-13 . 2021-07-13 . https://web.archive.org/web/20210713153906/https://fidoalliance.org/specs/fido-security-requirements-v1.0-fd-20170524/fido-authenticator-allowed-restricted-operating-environments-list_20170524.html . live .
  14. Web site: Solutions - Trustonic- Securing Smart Devices & Mobile Applications. Trustonic.com. 2014-07-31. 2014-08-10. https://web.archive.org/web/20140810221846/https://www.trustonic.com/products-services/trusted-execution-environment. live.
  15. Web site: Towards Formalization of Enhanced Privacy ID (EPID)-based Remote Attestation in Intel SGX.
  16. Web site: QEMU v7 — OP-TEE documentation documentation .
  17. Web site: Editing Circuits with Focused Ion Beams. April 2014. 2020-11-14. 2020-11-28. https://web.archive.org/web/20201128163919/https://hackaday.com/2014/04/01/editing-circuits-with-focused-ion-beams/. live.
  18. Web site: Advanced IC reverse engineering techniques: in depth analysis of a modern smart card . 2020-11-14 . 2020-11-14 . https://web.archive.org/web/20201114133949/https://www.blackhat.com/docs/us-15/materials/us-15-Thomas-Advanced-IC-Reverse-Engineering-Techniques-In-Depth-Analysis-Of-A-Modern-Smart-Card.pdf . live .
  19. Finding the AES Bits in the Haystack: Reverse Engineering and SCA Using Voltage Contrast by Christian Kison, Jürgen Frinken, and Christof Paar - https://www.iacr.org/archive/ches2015/92930620/92930620.pdf
  20. News: Cassy . John . Murphy . Paul . 2002-03-13 . How codebreakers cracked the secrets of the smart card . en-GB . The Guardian . 2023-08-09 . 0261-3077.
  21. Web site: X-Ray Tech Lays Chip Secrets Bare - IEEE Spectrum . 7 October 2019 . 2020-11-14 . 2020-12-08 . https://web.archive.org/web/20201208180315/https://spectrum.ieee.org/nanoclast/semiconductors/design/xray-tech-lays-chip-secrets-bare . live .
  22. Design Principles for Tamper-Resistant Smartcard Processors by Oliver Kömmerling Advanced Digital Security and Markus G. Kuhn University of Cambridge https://www.usenix.org/legacy/events/smartcard99/full_papers/kommerling/kommerling.pdf
  23. Web site: Physically Unclonable Functions (PUFs). Semiconductor Engineering. 2020-11-15. 2020-11-16. https://web.archive.org/web/20201116222448/https://semiengineering.com/knowledge_centers/semiconductor-security/physically-unclonable-functions/. live.
  24. Areno, Matthew & Plusquellic, J.. (2012). Securing Trusted Execution Environments with PUF Generated Secret Keys. 1188-1193. 10.1109/TrustCom.2012.255.
  25. Web site: Digital Restrictions Management and Treacherous Computing Free Software Foundation working together for free software . 2019-08-20 . 2018-07-05 . https://web.archive.org/web/20180705233004/https://www.fsf.org/campaigns/drm.html . live .
  26. Web site: Ethereum Wallet in a Trusted Execution Environment / Secure Enclave . 7 June 2018 . Medium . 2021-10-13 . 2021-07-15 . https://web.archive.org/web/20210715233259/https://medium.com/weeves-world/ethereum-wallet-in-a-trusted-execution-environment-secure-enclave-b200b4df9f5f . live .
  27. Web site: Alibaba Cloud Link Tee V1.1.3 . GlobalPlatform . 2021-10-13 . 2021-10-26 . https://web.archive.org/web/20211026232042/https://globalplatform.org/certified-products/alibaba-cloud-link-tee-pro-edition-v113/ . live .
  28. Web site: Secure Enclave overview . Apple Inc. . 2021-10-13 . 2021-08-13 . https://web.archive.org/web/20210813234053/https://support.apple.com/en-gb/guide/security/sec59b0b31ff/web . live .
  29. Web site: GlobalPlatform Welcomes New Participating Member Beijing Beanpod Technology . GlobalPlatform . 2021-10-13 . 2021-10-26 . https://web.archive.org/web/20211026232021/https://globalplatform.org/latest-news/globalplatform-welcomes-new-participating-member-beijing-beanpod-technology/ . live .
  30. Web site: Huawei iTrustee V3.0 on Kirin 980 . GlobalPlatform . 2021-10-13 . 2021-04-14 . https://web.archive.org/web/20210414192529/https://globalplatform.org/certified-products/huawei-itrustee-v3-0-on-kirin-980/ . live .
  31. Web site: Trusty TEE . Google Android . 2021-10-13 . 2021-10-14 . https://web.archive.org/web/20211014154123/https://source.android.com/security/trusty . live .
  32. Web site: Security, Trustzone and OP-TEE . . 2021-10-13 . 2021-02-27 . https://web.archive.org/web/20210227094924/https://www.linaro.org/services/security/ . live .
  33. Web site: ProvenCore . ProvenRun . 2024-06-23 . 2024-02-26 . http://web.archive.org/web/20240226182841/https://provenrun.com/provencore/ . live .
  34. Web site: Guard your Data with Qualcomm Snapdragon Mobile Platform . Qualcomm . 2021-10-13 . 2021-06-25 . https://web.archive.org/web/20210625084928/https://www.qualcomm.com/media/documents/files/guard-your-data-with-the-qualcomm-snapdragon-mobile-platform.pdf . live .
  35. Web site: Samsung TeeGris V4.1 . GlobalPlatform . 2021-10-13 . 2021-01-17 . https://web.archive.org/web/20210117215311/https://globalplatform.org/certified-products/samsung-teegris-v4-1/ . live .
  36. Web site: Enhance Device Security With T6 . TrustKernel.
  37. Web site: Certificate of Security Evaluation - Kinibi 410A . GlobalPlatform.
  38. Web site: uberXMHF .
  39. Web site: WatchTrust 2.1.1 on SC9860 . GlobalPlatform.
  40. Web site: AMD Secure Processor (Built-in technology). Amd.com. 2017-09-17. 2017-09-19. https://web.archive.org/web/20170919154841/http://www.amd.com/en-us/innovations/software-technologies/security. live.
  41. Web site: Secure Hardware and the Creation of an Open Trusted Ecosystem . Classic.regonline.com . 2017-05-17 . 2017-01-15 . https://web.archive.org/web/20170115011459/https://classic.regonline.com/custImages/360000/369552/TCC%20PPTs/TCC2013_VanDoorn.pdf . live .
  42. Web site: Chiappetta . Marco . AMD Beema and Mullins Low Power 2014 APUs Tested - Page 2 . HotHardware . 2014-04-29 . 2017-05-17 . 2017-04-07 . https://web.archive.org/web/20170407031130/http://hothardware.com/reviews/amd-beema-and-mullins-mainstream-and-lowpower-2014-apus-tested?page=2#!bFIw4K . dead .
  43. Web site: April 21, 2016. AMD MEMORY ENCRYPTION. developer.amd.com.
  44. Web site: January 2020. AMD SEV-SNP: Strengthening VM Isolation with Integrity Protection and More. live. https://web.archive.org/web/20201105002318/https://www.amd.com/system/files/TechDocs/SEV-SNP-strengthening-vm-isolation-with-integrity-protection-and-more.pdf. 2020-11-05.
  45. Web site: GlobalPlatform based Trusted Execution Environment and TrustZone Ready. Arm.com. 2020-04-24. 2020-07-04. https://web.archive.org/web/20200704081700/https://community.arm.com/cfs-file/__key/telligent-evolution-components-attachments/01-2142-00-00-00-00-51-36/GlobalPlatform-based-Trusted-Execution-Environment-and-TrustZone-R.pdf. live.
  46. Web site: IBM Secure Service Container. ibm.com. 2019-07-12. 2019-07-12. https://web.archive.org/web/20190712013401/https://www.ibm.com/us-en/marketplace/secure-service-container. live.
  47. Web site: Family 2965+01 IBM z13s Models N10 and N20. ibm.com. 22 May 2018 . 2021-10-27. 2021-01-26. https://web.archive.org/web/20210126093415/https://www-01.ibm.com/common/ssi/ShowDoc.wss?docURL=%2Fcommon%2Fssi%2Frep_sm%2F1%2F877%2FENUS2965-_h01%2Findex.html&lang=en&request_locale=en. live.
  48. Web site: Technical overview of Secure Execution for Linux on IBM Z. ibm.com. 2020-04-15. 2020-04-15. https://web.archive.org/web/20200415005646/https://developer.ibm.com/blogs/technical-overview-of-secure-execution-for-linux-on-ibm-z/. live.
  49. Web site: The Trusted Execution Environments on Mobile Devices . Cs.helsinki.fi . 2017-05-17 . 2016-04-18 . https://web.archive.org/web/20160418104838/https://www.cs.helsinki.fi/group/secures/CCS-tutorial/tutorial-slides.pdf . live .
  50. Web site: WW46_2014_MCG_Tablet_Roadmap_图文_百度文库. Wenku.baidu.com. 2017-01-04. 2017-02-27. https://web.archive.org/web/20170227010510/http://wenku.baidu.com/view/cb01a885c8d376eeaeaa31a9.html. live.
  51. Web site: CyanogenMod/android_device_asus_mofd-common. GitHub. 2017-01-04. 2017-03-24. https://web.archive.org/web/20170324095520/https://github.com/CyanogenMod/android_device_asus_mofd-common/blob/b52bb27be47485df8646340b43a97f2dda974385/sepolicy/file.te. live.
  52. Web site: heidiao/sfp_m2_bt. GitHub. 2017-01-04. 2017-03-24. https://web.archive.org/web/20170324095926/https://github.com/heidiao/sfp_m2_bt/blob/master/source/device/intel/cherrytrail/cht_cr_rvp/init.rc. live.
  53. Web site: Hex Five Security Adds MultiZone™ Trusted Execution Environment to the SiFive Software Ecosystem . hex-five.com . 22 August 2018 . 2018-09-13 . 2018-09-13 . https://web.archive.org/web/20180913223422/https://hex-five.com/press/hex-five-adds-multizone-security-to-sifive-software-ecosystem/ . live .
  54. Web site: Keystone Paper and Customizable TEEs . keystone-enclave.org . 22 July 2019 . 2021-06-10 . 2020-07-14 . https://web.archive.org/web/20200714212312/https://keystone-enclave.org/2019/07/22/Keystone-Paper.html . live .
  55. Web site: Penglai Enclave . penglai-enclave.systems/ . 2021-06-10 . 2021-05-06 . https://web.archive.org/web/20210506151417/https://penglai-enclave.systems/ . live .