idnits 2.17.1 draft-ietf-teep-architecture-12.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 13, 2020) is 1382 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-22) exists of draft-ietf-rats-architecture-05 == Outdated reference: A later version (-25) exists of draft-ietf-suit-manifest-08 == Outdated reference: A later version (-15) exists of draft-ietf-teep-otrp-over-http-06 == Outdated reference: A later version (-18) exists of draft-ietf-teep-protocol-02 Summary: 0 errors (**), 0 flaws (~~), 6 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TEEP M. Pei 3 Internet-Draft Broadcom 4 Intended status: Informational H. Tschofenig 5 Expires: January 14, 2021 Arm Limited 6 D. Thaler 7 Microsoft 8 D. Wheeler 9 Intel 10 July 13, 2020 12 Trusted Execution Environment Provisioning (TEEP) Architecture 13 draft-ietf-teep-architecture-12 15 Abstract 17 A Trusted Execution Environment (TEE) is an environment that enforces 18 that any code within that environment cannot be tampered with, and 19 that any data used by such code cannot be read or tampered with by 20 any code outside that environment. This architecture document 21 motivates the design and standardization of a protocol for managing 22 the lifecycle of trusted applications running inside such a TEE. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on January 14, 2021. 41 Copyright Notice 43 Copyright (c) 2020 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 This document may contain material from IETF Documents or IETF 57 Contributions published or made publicly available before November 58 10, 2008. The person(s) controlling the copyright in some of this 59 material may not have granted the IETF Trust the right to allow 60 modifications of such material outside the IETF Standards Process. 61 Without obtaining an adequate license from the person(s) controlling 62 the copyright in such materials, this document may not be modified 63 outside the IETF Standards Process, and derivative works of it may 64 not be created outside the IETF Standards Process, except to format 65 it for publication as an RFC or to translate it into languages other 66 than English. 68 Table of Contents 70 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 71 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 72 3. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 7 73 3.1. Payment . . . . . . . . . . . . . . . . . . . . . . . . . 7 74 3.2. Authentication . . . . . . . . . . . . . . . . . . . . . 7 75 3.3. Internet of Things . . . . . . . . . . . . . . . . . . . 8 76 3.4. Confidential Cloud Computing . . . . . . . . . . . . . . 8 77 4. Architecture . . . . . . . . . . . . . . . . . . . . . . . . 8 78 4.1. System Components . . . . . . . . . . . . . . . . . . . . 8 79 4.2. Multiple TEEs in a Device . . . . . . . . . . . . . . . . 11 80 4.3. Multiple TAMs and Relationship to TAs . . . . . . . . . . 13 81 4.4. Untrusted Apps, Trusted Apps, and Personalization Data . 14 82 4.4.1. Example: Application Delivery Mechanisms in Intel SGX 16 83 4.4.2. Example: Application Delivery Mechanisms in Arm 84 TrustZone . . . . . . . . . . . . . . . . . . . . . . 16 85 4.5. Entity Relations . . . . . . . . . . . . . . . . . . . . 17 86 5. Keys and Certificate Types . . . . . . . . . . . . . . . . . 18 87 5.1. Trust Anchors in a TEEP Agent . . . . . . . . . . . . . . 20 88 5.2. Trust Anchors in a TEE . . . . . . . . . . . . . . . . . 20 89 5.3. Trust Anchors in a TAM . . . . . . . . . . . . . . . . . 20 90 5.4. Scalability . . . . . . . . . . . . . . . . . . . . . . . 20 91 5.5. Message Security . . . . . . . . . . . . . . . . . . . . 21 92 6. TEEP Broker . . . . . . . . . . . . . . . . . . . . . . . . . 21 93 6.1. Role of the TEEP Broker . . . . . . . . . . . . . . . . . 22 94 6.2. TEEP Broker Implementation Consideration . . . . . . . . 22 95 6.2.1. TEEP Broker APIs . . . . . . . . . . . . . . . . . . 22 96 6.2.2. TEEP Broker Distribution . . . . . . . . . . . . . . 23 98 7. Attestation . . . . . . . . . . . . . . . . . . . . . . . . . 23 99 7.1. Information Required in TEEP Claims . . . . . . . . . . . 25 100 8. Algorithm and Attestation Agility . . . . . . . . . . . . . . 25 101 9. Security Considerations . . . . . . . . . . . . . . . . . . . 26 102 9.1. Broker Trust Model . . . . . . . . . . . . . . . . . . . 26 103 9.2. Data Protection . . . . . . . . . . . . . . . . . . . . . 26 104 9.3. Compromised REE . . . . . . . . . . . . . . . . . . . . . 27 105 9.4. Compromised CA . . . . . . . . . . . . . . . . . . . . . 28 106 9.5. Compromised TAM . . . . . . . . . . . . . . . . . . . . . 28 107 9.6. Malicious TA Removal . . . . . . . . . . . . . . . . . . 28 108 9.7. Certificate Expiry and Renewal . . . . . . . . . . . . . 29 109 9.8. Keeping Secrets from the TAM . . . . . . . . . . . . . . 30 110 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 30 111 11. Contributors . . . . . . . . . . . . . . . . . . . . . . . . 30 112 12. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 30 113 13. Informative References . . . . . . . . . . . . . . . . . . . 30 114 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 32 116 1. Introduction 118 Applications executing in a device are exposed to many different 119 attacks intended to compromise the execution of the application or 120 reveal the data upon which those applications are operating. These 121 attacks increase with the number of other applications on the device, 122 with such other applications coming from potentially untrustworthy 123 sources. The potential for attacks further increases with the 124 complexity of features and applications on devices, and the 125 unintended interactions among those features and applications. The 126 danger of attacks on a system increases as the sensitivity of the 127 applications or data on the device increases. As an example, 128 exposure of emails from a mail client is likely to be of concern to 129 its owner, but a compromise of a banking application raises even 130 greater concerns. 132 The Trusted Execution Environment (TEE) concept is designed to 133 execute applications in a protected environment that enforces that 134 any code within that environment cannot be tampered with, and that 135 any data used by such code cannot be read or tampered with by any 136 code outside that environment, including by a commodity operating 137 system (if present). In a system with multiple TEEs, this also means 138 that code in one TEE cannot be read or tampered with by code in the 139 other TEE. 141 This separation reduces the possibility of a successful attack on 142 application components and the data contained inside the TEE. 143 Typically, application components are chosen to execute inside a TEE 144 because those application components perform security sensitive 145 operations or operate on sensitive data. An application component 146 running inside a TEE is referred to as a Trusted Application (TA), 147 while an application running outside any TEE, i.e., in the Rich 148 Execution Environment (REE), is referred to as an Untrusted 149 Application. In the example of a banking application, code that 150 relates to the authentication protocol could reside in a TA while the 151 application logic including HTTP protocol parsing could be contained 152 in the Untrusted Application. In addition, processing of credit card 153 numbers or account balances could be done in a TA as it is sensitive 154 data. The precise code split is ultimately a decision of the 155 developer based on the assets he or she wants to protect according to 156 the threat model. 158 TEEs use hardware enforcement combined with software protection to 159 secure TAs and its data. TEEs typically offer a more limited set of 160 services to TAs than is normally available to Untrusted Applications. 162 Not all TEEs are the same, however, and different vendors may have 163 different implementations of TEEs with different security properties, 164 different features, and different control mechanisms to operate on 165 TAs. Some vendors may themselves market multiple different TEEs with 166 different properties attuned to different markets. A device vendor 167 may integrate one or more TEEs into their devices depending on market 168 needs. 170 To simplify the life of TA developers interacting with TAs in a TEE, 171 an interoperable protocol for managing TAs running in different TEEs 172 of various devices is needed. This software update protocol needs to 173 make sure that compatible trusted and untrusted components (if any) 174 of an application are installed on the correct device. In this TEE 175 ecosystem, there often arises a need for an external trusted party to 176 verify the identity, claims, and rights of TA developers, devices, 177 and their TEEs. This trusted third party is the Trusted Application 178 Manager (TAM). 180 The Trusted Execution Environment Provisioning (TEEP) protocol 181 addresses the following problems: 183 - An installer of an Untrusted Application that depends on a given 184 TA wants to request installation of that TA in the device's TEE so 185 that the Untrusted Application can complete, but the TEE needs to 186 verify whether such a TA is actually authorized to run in the TEE 187 and consume potentially scarce TEE resources. 189 - A TA developer providing a TA whose code itself is considered 190 confidential wants to determine security-relevant information of a 191 device before allowing their TA to be provisioned to the TEE 192 within the device. An example is the verification of the type of 193 TEE included in a device and that it is capable of providing the 194 security protections required. 196 - A TEE in a device wants to determine whether an entity that wants 197 to manage a TA in the device is authorized to manage TAs in the 198 TEE, and what TAs the entity is permitted to manage. 200 - A Device Administrator wants to determine if a TA exists (is 201 installed) on a device (in the TEE), and if not, install the TA in 202 the TEE. 204 - A Device Administrator wants to check whether a TA in a device's 205 TEE is the most up-to-date version, and if not, update the TA in 206 the TEE. 208 - A Device Administrator wants to remove a TA from a device's TEE if 209 the TA developer is no longer maintaining that TA, when the TA has 210 been revoked or is not used for other reasons anymore (e.g., due 211 to an expired subscription). 213 - A TA developer wants to define the relationship between 214 cooperating TAs under the TA developer's control, and specify 215 whether the TAs can communicate, share data, and/or share key 216 material. 218 2. Terminology 220 The following terms are used: 222 - Device: A physical piece of hardware that hosts one or more TEEs, 223 often along with an REE. 225 - Device Administrator: An entity that is responsible for 226 administration of a device, which could be the Device Owner. A 227 Device Administrator has privileges on the device to install and 228 remove Untrusted Applications and TAs, approve or reject Trust 229 Anchors, and approve or reject TA developers, among possibly other 230 privileges on the device. A Device Administrator can manage the 231 list of allowed TAMs by modifying the list of Trust Anchors on the 232 device. Although a Device Administrator may have privileges and 233 device-specific controls to locally administer a device, the 234 Device Administrator may choose to remotely administer a device 235 through a TAM. 237 - Device Owner: A device is always owned by someone. In some cases, 238 it is common for the (primary) device user to also own the device, 239 making the device user/owner also the Device Administrator. In 240 enterprise environments it is more common for the enterprise to 241 own the device, and any device user has no or limited 242 administration rights. In this case, the enterprise appoints a 243 Device Administrator that is not the device owner. 245 - Device User: A human being that uses a device. Many devices have 246 a single device user. Some devices have a primary device user 247 with other human beings as secondary device users (e.g., parent 248 allowing children to use their tablet or laptop). Other devices 249 are not used by a human being and hence have no device user. 250 Relates to Device Owner and Device Administrator. 252 - Raw Public Key: The raw public key only consists of the 253 SubjectPublicKeyInfo structure of a PKIX certificate that carries 254 the parameters necessary to describe the public key. Other 255 serialization formats that do not rely on ASN.1 may also be used. 257 - Rich Execution Environment (REE): An environment that is provided 258 and governed by a typical OS (e.g., Linux, Windows, Android, iOS), 259 potentially in conjunction with other supporting operating systems 260 and hypervisors; it is outside of any TEE. This environment and 261 applications running on it are considered untrusted (or more 262 precisely, less trusted than a TEE). 264 - Trust Anchor: As defined in [RFC6024] and 265 [I-D.ietf-suit-manifest], "A trust anchor represents an 266 authoritative entity via a public key and associated data. The 267 public key is used to verify digital signatures, and the 268 associated data is used to constrain the types of information for 269 which the trust anchor is authoritative." The Trust Anchor may be 270 a certificate or it may be a raw public key along with additional 271 data if necessary such as its public key algorithm and parameters. 273 - Trust Anchor Store: As defined in [RFC6024], "A trust anchor store 274 is a set of one or more trust anchors stored in a device. A 275 device may have more than one trust anchor store, each of which 276 may be used by one or more applications." As noted in 277 [I-D.ietf-suit-manifest], a Trust Anchor Store must resist 278 modification against unauthorized insertion, deletion, and 279 modification. 281 - Trusted Application (TA): An application (or, in some 282 implementations, an application component) that runs in a TEE. 284 - Trusted Application (TA) Developer: An entity that develops one or 285 more TAs. 287 - Trusted Application (TA) Signer: An entity that signs a TA with a 288 key that a TEE will trust. The signer might or might not be the 289 same entity as the TA Developer. For example, a TA might be 290 signed (or re-signed) by a Device Administrator if the TEE will 291 only trust the Device Administrator. A TA might also be 292 encrypted, if the code is considered confidential. 294 - Trusted Application Manager (TAM): An entity that manages Trusted 295 Applications (TAs) running in TEEs of various devices. 297 - Trusted Execution Environment (TEE): An execution environment that 298 enforces that only authorized code can execute within the TEE, and 299 data used by that code cannot be read or tampered with by code 300 outside the TEE. A TEE also generally has a device unique 301 credential that cannot be cloned. There are multiple technologies 302 that can be used to implement a TEE, and the level of security 303 achieved varies accordingly. In addition, TEEs typically use an 304 isolation mechanism between Trusted Applications to ensure that 305 one TA cannot read, modify or delete the data and code of another 306 TA. 308 - Untrusted Application: An application running in an REE. An 309 Untrusted Application might depend on one or more TAs. 311 3. Use Cases 313 3.1. Payment 315 A payment application in a mobile device requires high security and 316 trust in the hosting device. Payments initiated from a mobile device 317 can use a Trusted Application to provide strong identification and 318 proof of transaction. 320 For a mobile payment application, some biometric identification 321 information could also be stored in a TEE. The mobile payment 322 application can use such information for unlocking the device and for 323 local identification of the user. 325 A trusted user interface (UI) may be used in a mobile device to 326 prevent malicious software from stealing sensitive user input data. 327 Such an implementation often relies on a TEE for providing access to 328 peripherals, such as PIN input or a trusted display, so that the REE 329 cannot observe or tamper with the user input or output. 331 3.2. Authentication 333 For better security of authentication, a device may store its keys 334 and cryptographic libraries inside a TEE limiting access to 335 cryptographic functions via a well-defined interface and thereby 336 reducing access to keying material. 338 3.3. Internet of Things 340 The Internet of Things (IoT) has been posing threats to critical 341 infrastructure because of weak security in devices. It is desirable 342 that IoT devices can prevent malware from manipulating actuators 343 (e.g., unlocking a door), or stealing or modifying sensitive data, 344 such as authentication credentials in the device. A TEE can be the 345 best way to implement such IoT security functions. 347 3.4. Confidential Cloud Computing 349 A tenant can store sensitive data in a TEE in a cloud computing 350 server such that only the tenant can access the data, preventing the 351 cloud hosting provider from accessing the data. A tenant can run TAs 352 inside a server TEE for secure operation and enhanced data security. 353 This provides benefits not only to tenants with better data security 354 but also to cloud hosting providers for reduced liability and 355 increased cloud adoption. 357 4. Architecture 359 4.1. System Components 361 Figure 1 shows the main components in a typical device with an REE. 362 Full descriptions of components not previously defined are provided 363 below. Interactions of all components are further explained in the 364 following paragraphs. 366 +-------------------------------------------+ 367 | Device | 368 | +--------+ | TA Developer 369 | +-------------+ | |-----------+ | 370 | | TEE-1 | | TEEP |---------+ | | 371 | | +--------+ | +----| Broker | | | | +--------+ | 372 | | | TEEP | | | | |<---+ | | +->| |<-+ 373 | | | Agent |<----+ | | | | | +-| TAM-1 | 374 | | +--------+ | | |<-+ | | +->| | |<-+ 375 | | | +--------+ | | | | +--------+ | 376 | | +---+ +---+ | | | | | TAM-2 | | 377 | +-->|TA1| |TA2| | +-------+ | | | +--------+ | 378 | | | | | | |<---------| App-2 |--+ | | | 379 | | | +---+ +---+ | +-------+ | | | Device Administrator 380 | | +-------------+ | App-1 | | | | 381 | | | | | | | 382 | +--------------------| |---+ | | 383 | | |--------+ | 384 | +-------+ | 385 +-------------------------------------------+ 387 Figure 1: Notional Architecture of TEEP 389 - TA Signers and Device Administrators utilize the services of a TAM 390 to manage TAs on devices. TA Signers do not directly interact 391 with devices. Device Administators may elect to use a TAM for 392 remote administration of TAs instead of managing each device 393 directly. 395 - Trusted Application Manager (TAM): A TAM is responsible for 396 performing lifecycle management activity on TAs on behalf of TA 397 Signers and Device Administrators. This includes installation and 398 deletion of TAs, and may include, for example, over-the-air 399 updates to keep TAs up-to-date and clean up when a version should 400 be removed. TAMs may provide services that make it easier for TA 401 Signers or Device Administators to use the TAM's service to manage 402 multiple devices, although that is not required of a TAM. 404 The TAM performs its management of TAs on the device through 405 interactions with a device's TEEP Broker, which relays messages 406 between a TAM and a TEEP Agent running inside the TEE. TEEP 407 authentication is performed between a TAM and a TEEP Agent. 409 As shown in Figure 1, the TAM cannot directly contact a TEEP 410 Agent, but must wait for the TEEP Broker to contact the TAM 411 requesting a particular service. This architecture is intentional 412 in order to accommodate network and application firewalls that 413 normally protect user and enterprise devices from arbitrary 414 connections from external network entities. 416 A TAM may be publicly available for use by many TA Signers, or a 417 TAM may be private, and accessible by only one or a limited number 418 of TA Signers. It is expected that many manufacturers and network 419 carriers will run their own private TAM. 421 A TA Signer or Device Administrator chooses a particular TAM based 422 on whether the TAM is trusted by a device or set of devices. The 423 TAM is trusted by a device if the TAM's public key is, or chains 424 up to, an authorized Trust Anchor in the device. A TA Signer or 425 Device Administrator may run their own TAM, but the devices they 426 wish to manage must include this TAM's public key/certificate 427 [RFC5280], or a certificate it chains up to, in the Trust Anchor 428 Store. 430 A TA Signer or Device Administrator is free to utilize multiple 431 TAMs. This may be required for managing TAs on multiple different 432 types of devices from different manufacturers, or mobile devices 433 on different network carriers, since the Trust Anchor Store on 434 these different devices may contain different TAMs. A Device 435 Administrator may be able to add their own TAM's public key or 436 certificate to the Trust Anchor Store on all their devices, 437 overcoming this limitation. 439 Any entity is free to operate a TAM. For a TAM to be successful, 440 it must have its public key or certificate installed in a device's 441 Trust Anchor Store. A TAM may set up a relationship with device 442 manufacturers or network carriers to have them install the TAM's 443 keys in their device's Trust Anchor Store. Alternatively, a TAM 444 may publish its certificate and allow Device Administrators to 445 install the TAM's certificate in their devices as an after-market- 446 action. 448 - TEEP Broker: A TEEP Broker is an application component running in 449 a Rich Execution Environment (REE) that enables the message 450 protocol exchange between a TAM and a TEE in a device. A TEEP 451 Broker does not process messages on behalf of a TEE, but merely is 452 responsible for relaying messages from the TAM to the TEE, and for 453 returning the TEE's responses to the TAM. In devices with no REE 454 (e.g., a microcontroller where all code runs in an environment 455 that meets the definition of a Trusted Execution Environment in 456 Section 2), the TEEP Broker would be absent and instead the TEEP 457 protocol transport would be implemented inside the TEE itself. 459 - TEEP Agent: The TEEP Agent is a processing module running inside a 460 TEE that receives TAM requests (typically relayed via a TEEP 461 Broker that runs in an REE). A TEEP Agent in the TEE may parse 462 requests or forward requests to other processing modules in a TEE, 463 which is up to a TEE provider's implementation. A response 464 message corresponding to a TAM request is sent back to the TAM, 465 again typically relayed via a TEEP Broker. 467 - Certification Authority (CA): A CA is an entity that issues 468 digital certificates (especially X.509 certificates) and vouches 469 for the binding between the data items in a certificate [RFC4949]. 470 Certificates are then used for authenticating a device, a TAM, or 471 a TA Signer, as discussed in Section 5. The CAs do not need to be 472 the same; different CAs can be chosen by each TAM, and different 473 device CAs can be used by different device manufacturers. 475 4.2. Multiple TEEs in a Device 477 Some devices might implement multiple TEEs. In these cases, there 478 might be one shared TEEP Broker that interacts with all the TEEs in 479 the device. However, some TEEs (for example, SGX [SGX]) present 480 themselves as separate containers within memory without a controlling 481 manager within the TEE. As such, there might be multiple TEEP 482 Brokers in the REE, where each TEEP Broker communicates with one or 483 more TEEs associated with it. 485 It is up to the REE and the Untrusted Applications how they select 486 the correct TEEP Broker. Verification that the correct TA has been 487 reached then becomes a matter of properly verifying TA attestations, 488 which are unforgeable. 490 The multiple TEEP Broker approach is shown in the diagram below. For 491 brevity, TEEP Broker 2 is shown interacting with only one TAM and 492 Untrusted Application and only one TEE, but no such limitations are 493 intended to be implied in the architecture. 495 +-------------------------------------------+ 496 | Device | 497 | | TA Signer 498 | +-------------+ | | 499 | | TEE-1 | | | 500 | | +-------+ | +--------+ | +--------+ | 501 | | | TEEP | | | TEEP |------------->| |<-+ 502 | | | Agent |<----------| Broker | | | | TA 503 | | | 1 | | | 1 |---------+ | | 504 | | +-------+ | | | | | | | 505 | | | | |<---+ | | | | 506 | | +---+ +---+ | | | | | | +-| TAM-1 |Policy 507 | | |TA1| |TA2| | | |<-+ | | +->| | |<-+ 508 | +-->| | | |<---+ +--------+ | | | | +--------+ | 509 | | | +---+ +---+ | | | | | | TAM-2 | | 510 | | | | | +-------+ | | | +--------+ | 511 | | +-------------+ +-----| App-2 |--+ | | ^ | 512 | | +-------+ | | | | Device 513 | +--------------------| App-1 | | | | | Administrator 514 | +------| | | | | | 515 | +-----------|-+ | |---+ | | | 516 | | TEE-2 | | | |--------+ | | 517 | | +------+ | | | |------+ | | 518 | | | TEEP | | | +-------+ | | | 519 | | | Agent|<-----+ | | | 520 | | | 2 | | | | | | | 521 | | +------+ | | | | | | 522 | | | | | | | | 523 | | +---+ | | | | | | 524 | | |TA3|<----+ | | +----------+ | | | 525 | | | | | | | TEEP |<--+ | | 526 | | +---+ | +--| Broker | | | 527 | | | | 2 |----------------+ 528 | +-------------+ +----------+ | 529 | | 530 +-------------------------------------------+ 532 Figure 2: Notional Architecture of TEEP with multiple TEEs 534 In the diagram above, TEEP Broker 1 controls interactions with the 535 TAs in TEE-1, and TEEP Broker 2 controls interactions with the TAs in 536 TEE-2. This presents some challenges for a TAM in completely 537 managing the device, since a TAM may not interact with all the TEEP 538 Brokers on a particular platform. In addition, since TEEs may be 539 physically separated, with wholly different resources, there may be 540 no need for TEEP Brokers to share information on installed TAs or 541 resource usage. 543 4.3. Multiple TAMs and Relationship to TAs 545 As shown in Figure 2, a TEEP Broker provides communication between 546 one or more TEEP Agents and one or more TAMs. The selection of which 547 TAM to communicate with might be made with or without input from an 548 Untrusted Application, but is ultimately the decision of a TEEP 549 Agent. 551 A TEEP Agent is assumed to be able to determine, for any given TA, 552 whether that TA is installed (or minimally, is running) in a TEE with 553 which the TEEP Agent is associated. 555 Each TA is digitally signed, protecting its integrity, and linking 556 the TA back to the TA Signer. The TA Signer is often the TA 557 Developer, but in some cases might be another party such as a Device 558 Administrator or other party to whom the code has been licensed (in 559 which case the same code might be signed by multiple licensees and 560 distributed as if it were different TAs). 562 A TA Signer selects one or more TAMs and communicates the TA(s) to 563 the TAM. For example, the TA Signer might choose TAMs based upon the 564 markets into which the TAM can provide access. There may be TAMs 565 that provide services to specific types of devices, or device 566 operating systems, or specific geographical regions or network 567 carriers. A TA Signer may be motivated to utilize multiple TAMs in 568 order to maximize market penetration and availability on multiple 569 types of devices. This means that the same TA will often be 570 available through multiple TAMs. 572 When the developer of an Untrusted Application that depends on a TA 573 publishes the Untrusted Application to an app store or other app 574 repository, the developer optionally binds the Untrusted Application 575 with a manifest that identifies what TAMs can be contacted for the 576 TA. In some situations, a TA may only be available via a single TAM 577 - this is likely the case for enterprise applications or TA Signers 578 serving a closed community. For broad public apps, there will likely 579 be multiple TAMs in the manifest - one servicing one brand of mobile 580 device and another servicing a different manufacturer, etc. Because 581 different devices and different manufacturers trust different TAMs, 582 the manifest can include multiple TAMs that support the required TA. 584 When a TEEP Broker receives a request (see the RequestTA API in 585 Section 6.2.1) from an Untrusted Application to install a TA, a list 586 of TAM URIs may be provided for that TA, and the request is passed to 587 the TEEP Agent. If the TEEP Agent decides that the TA needs to be 588 installed, the TEEP Agent selects a single TAM URI that is consistent 589 with the list of trusted TAMs provisioned in the TEEP Agent, invokes 590 the HTTP transport for TEEP to connect to the TAM URI, and begins a 591 TEEP protocol exchange. When the TEEP Agent subsequently receives 592 the TA to install and the TA's manifest indicates dependencies on any 593 other trusted components, each dependency can include a list of TAM 594 URIs for the relevant dependency. If such dependencies exist that 595 are prerequisites to install the TA, then the TEEP Agent recursively 596 follows the same procedure for each dependency that needs to be 597 installed or updated, including selecting a TAM URI that is 598 consistent with the list of trusted TAMs provisioned on the device, 599 and beginning a TEEP exchange. If multiple TAM URIs are considered 600 trusted, only one needs to be contacted and they can be attempted in 601 some order until one responds. 603 Separate from the Untrusted Application's manifest, this framework 604 relies on the use of the manifest format in [I-D.ietf-suit-manifest] 605 for expressing how to install a TA, as well as any dependencies on 606 other TEE components and versions. That is, dependencies from TAs on 607 other TEE components can be expressed in a SUIT manifest, including 608 dependencies on any other TAs, or trusted OS code (if any), or 609 trusted firmware. Installation steps can also be expressed in a SUIT 610 manifest. 612 For example, TEEs compliant with GlobalPlatform may have a notion of 613 a "security domain" (which is a grouping of one or more TAs installed 614 on a device, that can share information within such a group) that 615 must be created and into which one or more TAs can then be installed. 616 It is thus up to the SUIT manifest to express a dependency on having 617 such a security domain existing or being created first, as 618 appropriate. 620 Updating a TA may cause compatibility issues with any Untrusted 621 Applications or other components that depend on the updated TA, just 622 like updating the OS or a shared library could impact an Untrusted 623 Application. Thus, an implementation needs to take into account such 624 issues. 626 4.4. Untrusted Apps, Trusted Apps, and Personalization Data 628 In TEEP, there is an explicit relationship and dependence between an 629 Untrusted Application in an REE and one or more TAs in a TEE, as 630 shown in Figure 2. For most purposes, an Untrusted Application that 631 uses one or more TAs in a TEE appears no different from any other 632 Untrusted Application in the REE. However, the way the Untrusted 633 Application and its corresponding TAs are packaged, delivered, and 634 installed on the device can vary. The variations depend on whether 635 the Untrusted Application and TA are bundled together or are provided 636 separately, and this has implications to the management of the TAs in 637 a TEE. In addition to the Untrusted Application and TA(s), the TA(s) 638 and/or TEE may require some additional data to personalize the TA to 639 the device or a user. This personalization data may depend on the 640 type of TEE, a particular TEE instance, the TA, and even the user of 641 the device; an example of personalization data might be a secret 642 symmetric key used by the TA to communicate with some service. 643 Implementations must support encryption of personalization data to 644 preserve the confidentiality of potentially sensitive data contained 645 within it and support integrity protection of the personalization 646 data. Other than the requirement to support confidentiality and 647 integrity protection, the TEEP architecture places no limitations or 648 requirements on the personalization data. 650 There are three possible cases for bundling of an Untrusted 651 Application, TA(s), and personalization data: 653 1. The Untrusted Application, TA(s), and personalization data are 654 all bundled together in a single package by a TA Signer and 655 either provided to the TEEP Broker through the TAM, or provided 656 separately (with encrypted personalization data), with key 657 material needed to decrypt and install the personalization data 658 and TA provided by a TAM. 660 2. The Untrusted Application and the TA(s) are bundled together in a 661 single package, which a TAM or a publicly accessible app store 662 maintains, and the personalization data is separately provided by 663 the TA Signer's TAM. 665 3. All components are independent. The Untrusted Application is 666 installed through some independent or device-specific mechanism, 667 and the TAM provides the TA and personalization data from the TA 668 Signer. Delivery of the TA and personalization data may be 669 combined or separate. 671 The TEEP protocol treats each TA, any dependencies the TA has, and 672 personalization data as separate components with separate 673 installation steps that are expressed in SUIT manifests, and a SUIT 674 manifest might contain or reference multiple binaries (see 675 [I-D.ietf-suit-manifest] for more details). The TEEP Agent is 676 responsible for handling any installation steps that need to be 677 performed inside the TEE, such as decryption of private TA binaries 678 or personalization data. 680 In order to better understand these cases, it is helpful to review 681 actual implementations of TEEs and their application delivery 682 mechanisms. 684 4.4.1. Example: Application Delivery Mechanisms in Intel SGX 686 In Intel Software Guard Extensions (SGX), the Untrusted Application 687 and TA are typically bundled into the same package (Case 2). The TA 688 exists in the package as a shared library (.so or .dll). The 689 Untrusted Application loads the TA into an SGX enclave when the 690 Untrusted Application needs the TA. This organization makes it easy 691 to maintain compatibility between the Untrusted Application and the 692 TA, since they are updated together. It is entirely possible to 693 create an Untrusted Application that loads an external TA into an SGX 694 enclave, and use that TA (Case 3). In this case, the Untrusted 695 Application would require a reference to an external file or download 696 such a file dynamically, place the contents of the file into memory, 697 and load that as a TA. Obviously, such file or downloaded content 698 must be properly formatted and signed for it to be accepted by the 699 SGX TEE. In SGX, for Case 2 and Case 3, the personalization data is 700 normally loaded into the SGX enclave (the TA) after the TA has 701 started. Although Case 1 is possible with SGX, there are no 702 instances of this known to be in use at this time, since such a 703 construction would require a special installation program and SGX TA 704 to receive the encrypted binary, decrypt it, separate it into the 705 three different elements, and then install all three. This 706 installation is complex because the Untrusted Application decrypted 707 inside the TEE must be passed out of the TEE to an installer in the 708 REE which would install the Untrusted Application; this assumes that 709 the Untrusted Application package includes the TA code also, since 710 otherwise there is a significant problem in getting the SGX enclave 711 code (the TA) from the TEE, through the installer, and into the 712 Untrusted Application in a trusted fashion. Finally, the 713 personalization data would need to be sent out of the TEE (encrypted 714 in an SGX enclave-to-enclave manner) to the REE's installation app, 715 which would pass this data to the installed Untrusted Application, 716 which would in turn send this data to the SGX enclave (TA). This 717 complexity is due to the fact that each SGX enclave is separate and 718 does not have direct communication to other SGX enclaves. 720 4.4.2. Example: Application Delivery Mechanisms in Arm TrustZone 722 In Arm TrustZone [TrustZone] for A-class devices, the Untrusted 723 Application and TA may or may not be bundled together. This differs 724 from SGX since in TrustZone the TA lifetime is not inherently tied to 725 a specific Untrused Application process lifetime as occurs in SGX. A 726 TA is loaded by a trusted OS running in the TEE such as a 727 GlobalPlatform compliant TEE, where the trusted OS is separate from 728 the OS in the REE. Thus Cases 2 and 3 are equally applicable. In 729 addition, it is possible for TAs to communicate with each other 730 without involving any Untrusted Application, and so the complexity of 731 Case 1 is lower than in the SGX example. Thus, Case 1 is possible as 732 well, though still more complex than Cases 2 and 3. 734 4.5. Entity Relations 736 This architecture leverages asymmetric cryptography to authenticate a 737 device to a TAM. Additionally, a TEEP Agent in a device 738 authenticates a TAM. The provisioning of Trust Anchors to a device 739 may be different from one use case to the other. A Device 740 Administrator may want to have the capability to control what TAs are 741 allowed. A device manufacturer enables verification by one or more 742 TAMs and by TA Signers; it may embed a list of default Trust Anchors 743 into the TEEP Agent and TEE for TAM trust verification and TA 744 signature verification. 746 (App Developers) (App Store) (TAM) (Device with TEE) (CAs) 747 | | | | | 748 | | | (Embedded TEE cert) <--| 749 | | | | | 750 | <--- Get an app cert -----------------------------------| 751 | | | | | 752 | | | <-- Get a TAM cert ---------| 753 | | | | | 754 1. Build two apps: | | | | 755 | | | | 756 (a) Untrusted | | | | 757 App - 2a. Supply --> | --- 3. Install ------> | | 758 | | | | 759 (b) TA -- 2b. Supply ----------> | 4. Messaging-->| | 760 | | | | 762 Figure 3: Example Developer Experience 764 Figure 3 shows an example where the same developer builds and signs 765 two applications: (a) an Untrusted Application; (b) a TA that 766 provides some security functions to be run inside a TEE. This 767 example assumes that the developer, the TEE, and the TAM have 768 previously been provisioned with certificates. 770 At step 1, the developer authors the two applications. 772 At step 2, the developer uploads the Untrusted Application (2a) to an 773 Application Store. In this example, the developer is also the TA 774 Signer, and so generates a signed TA. The developer can then either 775 bundle the signed TA with the Untrusted Application, or the developer 776 can provide the signed TA to a TAM that will be managing the TA in 777 various devices. 779 At step 3, a user will go to an Application Store to download the 780 Untrusted Application (where the arrow indicates the direction of 781 data transfer). 783 At step 4, since the Untrusted Application depends on the TA, 784 installing the Untrusted Application will trigger TA installation by 785 initiating communication with a TAM. The TEEP Agent will interact 786 with TAM via a TEEP Broker that faciliates communications between a 787 TAM and the TEEP Agent in TEE. 789 Some TA installation implementations might ask for a user's consent. 790 In other implementations, a Device Administrator might choose what 791 Untrusted Applications and related TAs to be installed. A user 792 consent flow is out of scope of the TEEP architecture. 794 The main components consist of a set of standard messages created by 795 a TAM to deliver TA management commands to a device, and device 796 attestation and response messages created by a TEE that responds to a 797 TAM's message. 799 It should be noted that network communication capability is generally 800 not available in TAs in today's TEE-powered devices. Consequently, 801 Trusted Applications generally rely on broker in the REE to provide 802 access to network functionality in the REE. A broker does not need 803 to know the actual content of messages to facilitate such access. 805 Similarly, since the TEEP Agent runs inside a TEE, the TEEP Agent 806 generally relies on a TEEP Broker in the REE to provide network 807 access, and relay TAM requests to the TEEP Agent and relay the 808 responses back to the TAM. 810 5. Keys and Certificate Types 812 This architecture leverages the following credentials, which allow 813 delivering end-to-end security between a TAM and a TEEP Agent. 815 Figure 4 summarizes the relationships between various keys and where 816 they are stored. Each public/private key identifies a TA Signer, 817 TAM, or TEE, and gets a certificate that chains up to some trust 818 anchor. A list of trusted certificates is then used to check a 819 presented certificate against. 821 Different CAs can be used for different types of certificates. TEEP 822 messages are always signed, where the signer key is the message 823 originator's private key, such as that of a TAM or a TEE. In 824 addition to the keys shown in Figure 4, there may be additional keys 825 used for attestation. Refer to the RATS Architecture 826 [I-D.ietf-rats-architecture] for more discussion. 828 Cardinality & Location of 829 Location of Private Key Trust Anchor 830 Purpose Private Key Signs Store 831 ------------------ ----------- ------------- ------------- 832 Authenticating TEE 1 per TEE TEEP responses TAM 834 Authenticating TAM 1 per TAM TEEP requests TEEP Agent 836 Code Signing 1 per TA TA binary TEE 837 Signer 839 Figure 4: Signature Keys 841 Note that personalization data is not included in the table above. 842 The use of personalization data is dependent on how TAs are used and 843 what their security requirements are. 845 TEEP requests from a TAM to a TEEP Agent are signed with the TAM 846 private key (for authentication and integrity protection). 847 Personalization data and TA binaries can be encrypted with a key that 848 is established with a content encryption key established with the TEE 849 public key (to provide confidentiality). Conversely, TEEP responses 850 from a TEEP Agent to a TAM can be signed with the TEE private key. 852 The TEE key pair and certificate are thus used for authenticating the 853 TEE to a remote TAM, and for sending private data to the TEE. Often, 854 the key pair is burned into the TEE by the TEE manufacturer and the 855 key pair and its certificate are valid for the expected lifetime of 856 the TEE. A TAM provider is responsible for configuring the TAM's 857 Trust Anchor Store with the manufacturer certificates or CAs that are 858 used to sign TEE keys. This is discussed further in Section 5.3 859 below. 861 The TAM key pair and certificate are used for authenticating a TAM to 862 a remote TEE, and for sending private data to the TAM. A TAM 863 provider is responsible for acquiring a certificate from a CA that is 864 trusted by the TEEs it manages. This is discussed further in 865 Section 5.1 below. 867 The TA Signer key pair and certificate are used to sign TAs that the 868 TEE will consider authorized to execute. TEEs must be configured 869 with the certificates or keys that it considers authorized to sign 870 TAs that it will execute. This is discussed further in Section 5.2 871 below. 873 5.1. Trust Anchors in a TEEP Agent 875 A TEEP Agent's Trust Anchor Store contains a list of Trust Anchors, 876 which are CA certificates that sign various TAM certificates. The 877 list is typically preloaded at manufacturing time, and can be updated 878 using the TEEP protocol if the TEE has some form of "Trust Anchor 879 Manager TA" that has Trust Anchors in its configuration data. Thus, 880 Trust Anchors can be updated similar to updating the configuration 881 data for any other TA. 883 When Trust Anchor update is carried out, it is imperative that any 884 update must maintain integrity where only an authentic Trust Anchor 885 list from a device manufacturer or a Device Administrator is 886 accepted. Details are out of scope of the architecture and can be 887 addressed in a protocol document. 889 Before a TAM can begin operation in the marketplace to support a 890 device with a particular TEE, it must obtain a TAM certificate from a 891 CA or the raw public key of a TAM that is listed in the Trust Anchor 892 Store of the TEEP Agent. 894 5.2. Trust Anchors in a TEE 896 A TEE determines whether TA binaries are allowed to execute by 897 verifying whether their signature can be verified using 898 certificate(s) or raw public key(s) in the TEE's Trust Anchor Store. 899 The list is typically preloaded at manufacturing time, and can be 900 updated using the TEEP protocol if the TEE has some form of "Trust 901 Anchor Manager TA" that has Trust Anchors in its configuration data. 902 Thus, Trust Anchors can be updated similar to updating the 903 configuration data for any other TA, as discussed in Section 5.1. 905 5.3. Trust Anchors in a TAM 907 The Trust Anchor Store in a TAM consists of a list of Trust Anchors, 908 which are certificates that sign various device TEE certificates. A 909 TAM will accept a device for TA management if the TEE in the device 910 uses a TEE certificate that is chained to a certificate or raw public 911 key that the TAM trusts, is contained in an allow list, is not found 912 on a block list, and/or fulfills any other policy criteria. 914 5.4. Scalability 916 This architecture uses a PKI (including self-signed certificates). 917 Trust Anchors exist on the devices to enable the TEE to authenticate 918 TAMs and TA Signers, and TAMs use Trust Anchors to authenticate TEEs. 919 When a PKI is used, many intermediate CA certificates can chain to a 920 root certificate, each of which can issue many certificates. This 921 makes the protocol highly scalable. New factories that produce TEEs 922 can join the ecosystem. In this case, such a factory can get an 923 intermediate CA certificate from one of the existing roots without 924 requiring that TAMs are updated with information about the new device 925 factory. Likewise, new TAMs can join the ecosystem, providing they 926 are issued a TAM certificate that chains to an existing root whereby 927 existing TEEs will be allowed to be personalized by the TAM without 928 requiring changes to the TEE itself. This enables the ecosystem to 929 scale, and avoids the need for centralized databases of all TEEs 930 produced or all TAMs that exist or all TA Signers that exist. 932 5.5. Message Security 934 Messages created by a TAM are used to deliver TA management commands 935 to a device, and device attestation and messages created by the 936 device TEE to respond to TAM messages. 938 These messages are signed end-to-end between a TEEP Agent and a TAM. 939 Confidentiality is provided by encrypting sensitive payloads (such as 940 personalization data and attestation evidence), rather than 941 encrypting the messages themselves. Using encrypted payloads is 942 important to ensure that only the targeted device TEE or TAM is able 943 to decrypt and view the actual content. 945 6. TEEP Broker 947 A TEE and TAs often do not have the capability to directly 948 communicate outside of the hosting device. For example, 949 GlobalPlatform [GPTEE] specifies one such architecture. This calls 950 for a software module in the REE world to handle network 951 communication with a TAM. 953 A TEEP Broker is an application component running in the REE of the 954 device or an SDK that facilitates communication between a TAM and a 955 TEE. It also provides interfaces for Untrusted Applications to query 956 and trigger TA installation that the application needs to use. 958 An Untrusted Application might communicate with a TEEP Broker at 959 runtime to trigger TA installation itself, or an Untrusted 960 Application might simply have a metadata file that describes the TAs 961 it depends on and the associated TAM(s) for each TA, and an REE 962 Application Installer can inspect this application metadata file and 963 invoke the TEEP Broker to trigger TA installation on behalf of the 964 Untrusted Application without requiring the Untrusted Application to 965 run first. 967 6.1. Role of the TEEP Broker 969 A TEEP Broker abstracts the message exchanges with a TEE in a device. 970 The input data is originated from a TAM or the first initialization 971 call to trigger a TA installation. 973 The Broker doesn't need to parse a message content received from a 974 TAM that should be processed by a TEE (see the ProcessTeepMessage API 975 in Section 6.2.1). When a device has more than one TEE, one TEEP 976 Broker per TEE could be present in the REE. A TEEP Broker interacts 977 with a TEEP Agent inside a TEE. 979 A TAM message may indicate the target TEE where a TA should be 980 installed. A compliant TEEP protocol should include a target TEE 981 identifier for a TEEP Broker when multiple TEEs are present. 983 The Broker relays the response messages generated from a TEEP Agent 984 in a TEE to the TAM. 986 The Broker only needs to return a (transport) error message if the 987 TEE is not reachable for some reason. Other errors are represented 988 as response messages returned from the TEE which will then be passed 989 to the TAM. 991 6.2. TEEP Broker Implementation Consideration 993 TEEP Broker implementers should consider methods of distribution, 994 scope and concurrency on devices and runtime options. Several non- 995 exhaustive options are discussed below. 997 6.2.1. TEEP Broker APIs 999 The following conceptual APIs exist from a TEEP Broker to a TEEP 1000 Agent: 1002 1. RequestTA: A notification from an REE application (e.g., an 1003 installer, or an Untrusted Application) that it depends on a 1004 given TA, which may or may not already be installed in the TEE. 1006 2. ProcessTeepMessage: A message arriving from the network, to be 1007 delivered to the TEEP Agent for processing. 1009 3. RequestPolicyCheck: A hint (e.g., based on a timer) that the TEEP 1010 Agent may wish to contact the TAM for any changes, without the 1011 device itself needing any particular change. 1013 4. ProcessError: A notification that the TEEP Broker could not 1014 deliver an outbound TEEP message to a TAM. 1016 For comparison, similar APIs may exist on the TAM side, where a 1017 Broker may or may not exist, depending on whether the TAM uses a TEE 1018 or not: 1020 1. ProcessConnect: A notification that an incoming TEEP session is 1021 being requested by a TEEP Agent. 1023 2. ProcessTeepMessage: A message arriving from the network, to be 1024 delivered to the TAM for processing. 1026 For further discussion on these APIs, see 1027 [I-D.ietf-teep-otrp-over-http]. 1029 6.2.2. TEEP Broker Distribution 1031 The Broker installation is commonly carried out at OEM time. A user 1032 can dynamically download and install a Broker on-demand. 1034 7. Attestation 1036 Attestation is the process through which one entity (an Attester) 1037 presents "evidence", in the form of a series of claims, to another 1038 entity (a Verifier), and provides sufficient proof that the claims 1039 are true. Different Verifiers may require different degrees of 1040 confidence in attestation proofs and not all attestations are 1041 acceptable to every verifier. A third entity (a Relying Party) can 1042 then use "attestation results", in the form of another series of 1043 claims, from a Verifier to make authorization decisions. (See 1044 [I-D.ietf-rats-architecture] for more discussion.) 1046 In TEEP, as depicted in Figure 5, the primary purpose of an 1047 attestation is to allow a device (the Attester) to prove to a TAM 1048 (the Relying Party) that a TEE in the device has particular 1049 properties, was built by a particular manufacturer, and/or is 1050 executing a particular TA. Other claims are possible; TEEP does not 1051 limit the claims that may appear in evidence or attestation results, 1052 but defines a minimal set of attestation result claims required for 1053 TEEP to operate properly. Extensions to these claims are possible. 1054 Other standards or groups may define the format and semantics of 1055 extended claims. 1057 +----------------+ 1058 | Device | +----------+ 1059 | +------------+ | Evidence | TAM | Evidence +----------+ 1060 | | TEE |------------->| (Relying |-------------->| Verifier | 1061 | | (Attester) | | | Party) |<--------------| | 1062 | +------------+ | +----------+ Attestation +----------+ 1063 +----------------+ Result 1065 Figure 5: TEEP Attestation Roles 1067 As of the writing of this specification, device and TEE attestations 1068 have not been standardized across the market. Different devices, 1069 manufacturers, and TEEs support different attestation protocols. In 1070 order for TEEP to be inclusive, it is agnostic to the format of 1071 evidence, allowing proprietary or standardized formats to be used 1072 between a TEE and a verifier (which may or may not be colocated in 1073 the TAM), as long as the format supports encryption of any 1074 information that is considered sensitive. 1076 However, it should be recognized that not all Verifiers may be able 1077 to process all proprietary forms of attestation evidence. Similarly, 1078 the TEEP protocol is agnostic as to the format of attestation 1079 results, and the protocol (if any) used between the TAM and a 1080 verifier, as long as they convey at least the required set of claims 1081 in some format. Note that the respective attestation algorithms are 1082 not defined in the TEEP protocol itself; see 1083 [I-D.ietf-rats-architecture] and [I-D.ietf-teep-protocol] for more 1084 discussion. 1086 There are a number of considerations that need to be considered when 1087 appraising evidence provided by a TEE, including: 1089 - What security measures a manufacturer takes when provisioning keys 1090 into devices/TEEs; 1092 - What hardware and software components have access to the 1093 attestation keys of the TEE; 1095 - The source or local verification of claims within an attestation 1096 prior to a TEE signing a set of claims; 1098 - The level of protection afforded to attestation keys against 1099 exfiltration, modification, and side channel attacks; 1101 - The limitations of use applied to TEE attestation keys; 1103 - The processes in place to discover or detect TEE breaches; and 1104 - The revocation and recovery process of TEE attestation keys. 1106 Some TAMs may require additional claims in order to properly 1107 authorize a device or TEE. The specific format for these additional 1108 claims are outside the scope of this specification, but the TEEP 1109 protocol allows these additional claims to be included in the 1110 attestation messages. 1112 For more discussion of the attestation and appraisal process, see the 1113 RATS Architecture [I-D.ietf-rats-architecture]. 1115 7.1. Information Required in TEEP Claims 1117 - Device Identifying Information: TEEP attestations may need to 1118 uniquely identify a device to the TAM. Unique device 1119 identification allows the TAM to provide services to the device, 1120 such as managing installed TAs, and providing subscriptions to 1121 services, and locating device-specific keying material to 1122 communicate with or authenticate the device. In some use cases it 1123 may be sufficient to identify only the class of the device. The 1124 security and privacy requirements regarding device identification 1125 will vary with the type of TA provisioned to the TEE. 1127 - TEE Identifying Information: The type of TEE that generated this 1128 attestation must be identified, including version identification 1129 information such as the hardware, firmware, and software version 1130 of the TEE, as applicable by the TEE type. TEE manufacturer 1131 information for the TEE is required in order to disambiguate the 1132 same TEE type created by different manufacturers and address 1133 considerations around manufacturer provisioning, keying and 1134 support for the TEE. 1136 - Freshness Proof: A claim that includes freshness information must 1137 be included, such as a nonce or timestamp. 1139 - Requested Components: A list of zero or more components (TAs or 1140 other dependencies needed by a TEE) that are requested by some 1141 depending app, but which are not currently installed in the TEE. 1142 The claims also need to specify for each component, whether the TA 1143 binary is needed, or whether the TA binary is already available 1144 and only permission to install is needed. 1146 8. Algorithm and Attestation Agility 1148 RFC 7696 [RFC7696] outlines the requirements to migrate from one 1149 mandatory-to-implement cryptographic algorithm suite to another over 1150 time. This feature is also known as crypto agility. Protocol 1151 evolution is greatly simplified when crypto agility is considered 1152 during the design of the protocol. In the case of the TEEP protocol 1153 the diverse range of use cases, from trusted app updates for smart 1154 phones and tablets to updates of code on higher-end IoT devices, 1155 creates the need for different mandatory-to-implement algorithms 1156 already from the start. 1158 Crypto agility in TEEP concerns the use of symmetric as well as 1159 asymmetric algorithms. In the context of TEEP, symmetric algorithms 1160 are used for encryption of TA binaries and personalization data 1161 whereas the asymmetric algorithms are mostly used for signing 1162 messages. 1164 In addition to the use of cryptographic algorithms in TEEP, there is 1165 also the need to make use of different attestation technologies. A 1166 device must provide techniques to inform a TAM about the attestation 1167 technology it supports. For many deployment cases it is more likely 1168 for the TAM to support one or more attestation techniques whereas the 1169 device may only support one. 1171 9. Security Considerations 1173 9.1. Broker Trust Model 1175 The architecture enables the TAM to communicate, via a TEEP Broker, 1176 with the device's TEE to manage TAs. Since the TEEP Broker runs in a 1177 potentially vulnerable REE, the TEEP Broker could, however, be (or be 1178 infected by) malware. As such, all TAM messages are signed and 1179 sensitive data is encrypted such that the TEEP Broker cannot modify 1180 or capture sensitive data, but the TEEP Broker can still conduct DoS 1181 attacks as discussed in Section 9.3. 1183 A TEEP Agent in a TEE is responsible for protecting against potential 1184 attacks from a compromised TEEP Broker or rogue malware in the REE. 1185 A rogue TEEP Broker might send corrupted data to the TEEP Agent, or 1186 launch a DoS attack by sending a flood of TEEP protocol requests. 1187 The TEEP Agent validates the signature of each TEEP protocol request 1188 and checks the signing certificate against its Trust Anchors. To 1189 mitigate DoS attacks, it might also add some protection scheme such 1190 as a threshold on repeated requests or number of TAs that can be 1191 installed. 1193 9.2. Data Protection 1195 It is the responsibility of the TAM to protect data on its servers. 1196 Similarly, it is the responsibility of the TEE implementation to 1197 provides protection of data against integrity and confidentiality 1198 attacks from outside the TEE. TEEs that provide isolation among TAs 1199 within the TEE are likewise responsible for protecting TA data 1200 against the REE and other TAs. For example, this can be used to 1201 protect one user's or tenant's data from compromise by another user/ 1202 tenant, even if the attacker has TAs. 1204 The protocol between TEEP Agents and TAMs similarly is responsible 1205 for securely providing integrity and confidentiality protection 1206 against adversaries between them. Since the transport protocol under 1207 the TEEP protocol might be implemented outside a TEE, as discussed in 1208 Section 6, it cannot be relied upon for sufficient protection. The 1209 TEEP protocol provides integrity protection, but confidentiality must 1210 be provided by payload security, i.e., using encrypted TA binaries 1211 and encrypted attestation information. See [I-D.ietf-teep-protocol] 1212 for more discussion. 1214 9.3. Compromised REE 1216 It is possible that the REE of a device is compromised. If the REE 1217 is compromised, several DoS attacks may be launched. The compromised 1218 REE may terminate the TEEP Broker such that TEEP transactions cannot 1219 reach the TEE, or might drop or delay messages between a TAM and a 1220 TEEP Agent. However, while a DoS attack cannot be prevented, the REE 1221 cannot access anything in the TEE if it is implemented correctly. 1222 Some TEEs may have some watchdog scheme to observe REE state and 1223 mitigate DoS attacks against it but most TEEs don't have such a 1224 capability. 1226 In some other scenarios, the compromised REE may ask a TEEP Broker to 1227 make repeated requests to a TEEP Agent in a TEE to install or 1228 uninstall a TA. A TA installation or uninstallation request 1229 constructed by the TEEP Broker or REE will be rejected by the TEEP 1230 Agent because the request won't have the correct signature from a TAM 1231 to pass the request signature validation. 1233 This can become a DoS attack by exhausting resources in a TEE with 1234 repeated requests. In general, a DoS attack threat exists when the 1235 REE is compromised, and a DoS attack can happen to other resources. 1236 The TEEP architecture doesn't change this. 1238 A compromised REE might also request initiating the full flow of 1239 installation of TAs that are not necessary. It may also repeat a 1240 prior legitimate TA installation request. A TEEP Agent 1241 implementation is responsible for ensuring that it can recognize and 1242 decline such repeated requests. It is also responsible for 1243 protecting the resource usage allocated for TA management. 1245 9.4. Compromised CA 1247 A root CA for TAM certificates might get compromised or its 1248 certificate might expire, or a Trust Anchor other than a root CA 1249 certificate may also expire or be compromised. TEEs are responsible 1250 for validating the entire TAM certificate chain, including the TAM 1251 certificate and any intermediate certificates up to the root 1252 certificate. Such validation includes checking for certificate 1253 revocation. 1255 If a TAM certificate chain validation fails, the TAM might be 1256 rejected by a TEEP Agent. To address this, some certificate chain 1257 update mechanism is expected from TAM operators, so that the TAM can 1258 get a new certificate chain that can be validated by a TEEP Agent. 1259 In addition, the Trust Anchor in the TEEP Agent's Trust Anchor Store 1260 may need to be updated. To address this, some TEE Trust Anchor 1261 update mechanism is expected from device OEMs. 1263 Similarly, a root CA for TEE certificates might get compromised or 1264 its certificate might expire, or a Trust Anchor other than a root CA 1265 certificate may also expire or be compromised. TAMs are responsible 1266 for validating the entire TEE certificate chain, including the TEE 1267 certificate and any intermediate certificates up to the root 1268 certificate. Such validation includes checking for certificate 1269 revocation. 1271 If a TEE certificate chain validation fails, the TEE might be 1272 rejected by a TAM, subject to the TAM's policy. To address this, 1273 some certificate chain update mechanism is expected from device OEMs, 1274 so that the TEE can get a new certificate chain that can be validated 1275 by a TAM. In addition, the Trust Anchor in the TAM's Trust Anchor 1276 Store may need to be updated. 1278 9.5. Compromised TAM 1280 Device TEEs are responsible for validating the supplied TAM 1281 certificates to determine that the TAM is trustworthy. 1283 9.6. Malicious TA Removal 1285 It is possible that a rogue developer distributes a malicious 1286 Untrusted Application and intends to get a malicious TA installed. 1287 Such a TA might be able to escape from malware detection by the REE, 1288 or access trusted resources within the TEE (but could not access 1289 other TEEs, or access other TA's if the TEE provides isolation 1290 between TAs). 1292 It is the responsibility of the TAM to not install malicious TAs in 1293 the first place. The TEEP architecture allows a TEEP Agent to decide 1294 which TAMs it trusts via Trust Anchors, and delegates the TA 1295 authenticity check to the TAMs it trusts. 1297 It may happen that a TA was previously considered trustworthy but is 1298 later found to be buggy or compromised. In this case, the TAM can 1299 initiate the removal of the TA by notifying devices to remove the TA 1300 (and potentially the REE or Device Owner to remove any Untrusted 1301 Application that depend on the TA). If the TAM does not currently 1302 have a connection to the TEEP Agent on a device, such a notification 1303 would occur the next time connectivity does exist. That is, to 1304 recover, the TEEP Agent must be able to reach out to the TAM, for 1305 example whenever the RequestPolicyCheck API (Section 6.2.1) is 1306 invoked by a timer or other event. 1308 Furthermore the policy in the Verifier in an attestation process can 1309 be updated so that any evidence that includes the malicious TA would 1310 result in an attestation failure. There is, however, a time window 1311 during which a malicious TA might be able to operate successfully, 1312 which is the validity time of the previous attestation result. For 1313 example, if the Verifier in Figure 5 is updated to treat a previously 1314 valid TA as no longer trustworthy, any attestation result it 1315 previously generated saying that the TA is valid will continue to be 1316 used until the attestation result expires. As such, the TAM's 1317 Verifier should take into account the acceptable time window when 1318 generating attestation results. See [I-D.ietf-rats-architecture] for 1319 further discussion. 1321 9.7. Certificate Expiry and Renewal 1323 TEE device certificates are expected to be long lived, longer than 1324 the lifetime of a device. A TAM certificate usually has a moderate 1325 lifetime of 2 to 5 years. A TAM should get renewed or rekeyed 1326 certificates. The root CA certificates for a TAM, which are embedded 1327 into the Trust Anchor Store in a device, should have long lifetimes 1328 that don't require device Trust Anchor updates. On the other hand, 1329 it is imperative that OEMs or device providers plan for support of 1330 Trust Anchor update in their shipped devices. 1332 For those cases where TEE devices are given certificates for which no 1333 good expiration date can be assigned the recommendations in 1334 Section 4.1.2.5 of [RFC5280] are applicable. 1336 9.8. Keeping Secrets from the TAM 1338 In some scenarios, it is desirable to protect the TA binary or 1339 configuration from being disclosed to the TAM that distributes them. 1340 In such a scenario, the files can be encrypted end-to-end between a 1341 TA Signer and a TEE. However, there must be some means of 1342 provisioning the decryption key into the TEE and/or some means of the 1343 TA Signer securely learning a public key of the TEE that it can use 1344 to encrypt. One way to do this is for the TA Signer to run its own 1345 TAM so that it can distribute the decryption key via the TEEP 1346 protocol, and the key file can be a dependency in the manifest of the 1347 encrypted TA. Thus, the TEEP Agent would look at the TA manifest, 1348 determine there is a dependency with a TAM URI of the TA Signer's 1349 TAM. The Agent would then install the dependency, and then continue 1350 with the TA installation steps, including decrypting the TA binary 1351 with the relevant key. 1353 10. IANA Considerations 1355 This document does not require actions by IANA. 1357 11. Contributors 1359 - Andrew Atyeo, Intercede (andrew.atyeo@intercede.com) 1361 - Liu Dapeng, Alibaba Group (maxpassion@gmail.com) 1363 12. Acknowledgements 1365 We would like to thank Nick Cook, Minho Yoo, Brian Witten, Tyler Kim, 1366 Alin Mutu, Juergen Schoenwaelder, Nicolae Paladi, Sorin Faibish, Ned 1367 Smith, Russ Housley, Jeremy O'Donoghue, and Anders Rundgren for their 1368 feedback. 1370 13. Informative References 1372 [GPTEE] GlobalPlatform, "GlobalPlatform Device Technology: TEE 1373 System Architecture, v1.1", GlobalPlatform GPD_SPE_009, 1374 January 2017, . 1377 [I-D.ietf-rats-architecture] 1378 Birkholz, H., Thaler, D., Richardson, M., Smith, N., and 1379 W. Pan, "Remote Attestation Procedures Architecture", 1380 draft-ietf-rats-architecture-05 (work in progress), July 1381 2020. 1383 [I-D.ietf-suit-manifest] 1384 Moran, B., Tschofenig, H., Birkholz, H., and K. Zandberg, 1385 "A Concise Binary Object Representation (CBOR)-based 1386 Serialization Format for the Software Updates for Internet 1387 of Things (SUIT) Manifest", draft-ietf-suit-manifest-08 1388 (work in progress), July 2020. 1390 [I-D.ietf-teep-otrp-over-http] 1391 Thaler, D., "HTTP Transport for Trusted Execution 1392 Environment Provisioning: Agent-to- TAM Communication", 1393 draft-ietf-teep-otrp-over-http-06 (work in progress), 1394 April 2020. 1396 [I-D.ietf-teep-protocol] 1397 Tschofenig, H., Pei, M., Wheeler, D., Thaler, D., and A. 1398 Tsukamoto, "Trusted Execution Environment Provisioning 1399 (TEEP) Protocol", draft-ietf-teep-protocol-02 (work in 1400 progress), April 2020. 1402 [RFC4949] Shirey, R., "Internet Security Glossary, Version 2", 1403 FYI 36, RFC 4949, DOI 10.17487/RFC4949, August 2007, 1404 . 1406 [RFC5280] Cooper, D., Santesson, S., Farrell, S., Boeyen, S., 1407 Housley, R., and W. Polk, "Internet X.509 Public Key 1408 Infrastructure Certificate and Certificate Revocation List 1409 (CRL) Profile", RFC 5280, DOI 10.17487/RFC5280, May 2008, 1410 . 1412 [RFC6024] Reddy, R. and C. Wallace, "Trust Anchor Management 1413 Requirements", RFC 6024, DOI 10.17487/RFC6024, October 1414 2010, . 1416 [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm 1417 Agility and Selecting Mandatory-to-Implement Algorithms", 1418 BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, 1419 . 1421 [SGX] Intel, "Intel(R) Software Guard Extensions (Intel (R) 1422 SGX)", n.d., . 1426 [TrustZone] 1427 Arm, "Arm TrustZone Technology", n.d., 1428 . 1431 Authors' Addresses 1433 Mingliang Pei 1434 Broadcom 1436 EMail: mingliang.pei@broadcom.com 1438 Hannes Tschofenig 1439 Arm Limited 1441 EMail: hannes.tschofenig@arm.com 1443 Dave Thaler 1444 Microsoft 1446 EMail: dthaler@microsoft.com 1448 David Wheeler 1449 Intel 1451 EMail: david.m.wheeler@intel.com