idnits 2.17.1 draft-ietf-teep-architecture-04.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 (December 06, 2019) is 1604 days in the past. Is this intentional? Checking references for intended status: Informational ---------------------------------------------------------------------------- == Outdated reference: A later version (-25) exists of draft-ietf-suit-manifest-02 == Outdated reference: A later version (-15) exists of draft-ietf-teep-otrp-over-http-03 Summary: 0 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 TEEP M. Pei 3 Internet-Draft Symantec 4 Intended status: Informational H. Tschofenig 5 Expires: June 8, 2020 Arm Limited 6 D. Wheeler 7 Intel 8 A. Atyeo 9 Intercede 10 L. Dapeng 11 Alibaba Group 12 December 06, 2019 14 Trusted Execution Environment Provisioning (TEEP) Architecture 15 draft-ietf-teep-architecture-04 17 Abstract 19 A Trusted Execution Environment (TEE) is an environment that enforces 20 that only authorized code can execute with that environment, and that 21 any data used by such code cannot be read or tampered with by any 22 code outside that environment. This architecture document motivates 23 the design and standardization of a protocol for managing the 24 lifecycle of trusted applications running inside a TEE. 26 Status of This Memo 28 This Internet-Draft is submitted in full conformance with the 29 provisions of BCP 78 and BCP 79. 31 Internet-Drafts are working documents of the Internet Engineering 32 Task Force (IETF). Note that other groups may also distribute 33 working documents as Internet-Drafts. The list of current Internet- 34 Drafts is at http://datatracker.ietf.org/drafts/current/. 36 Internet-Drafts are draft documents valid for a maximum of six months 37 and may be updated, replaced, or obsoleted by other documents at any 38 time. It is inappropriate to use Internet-Drafts as reference 39 material or to cite them other than as "work in progress." 41 This Internet-Draft will expire on June 8, 2020. 43 Copyright Notice 45 Copyright (c) 2019 IETF Trust and the persons identified as the 46 document authors. All rights reserved. 48 This document is subject to BCP 78 and the IETF Trust's Legal 49 Provisions Relating to IETF Documents 50 (http://trustee.ietf.org/license-info) in effect on the date of 51 publication of this document. Please review these documents 52 carefully, as they describe your rights and restrictions with respect 53 to this document. Code Components extracted from this document must 54 include Simplified BSD License text as described in Section 4.e of 55 the Trust Legal Provisions and are provided without warranty as 56 described in the Simplified BSD License. 58 This document may contain material from IETF Documents or IETF 59 Contributions published or made publicly available before November 60 10, 2008. The person(s) controlling the copyright in some of this 61 material may not have granted the IETF Trust the right to allow 62 modifications of such material outside the IETF Standards Process. 63 Without obtaining an adequate license from the person(s) controlling 64 the copyright in such materials, this document may not be modified 65 outside the IETF Standards Process, and derivative works of it may 66 not be created outside the IETF Standards Process, except to format 67 it for publication as an RFC or to translate it into languages other 68 than English. 70 Table of Contents 72 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 73 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 5 74 3. Use Cases . . . . . . . . . . . . . . . . . . . . . . . . . . 7 75 3.1. Payment . . . . . . . . . . . . . . . . . . . . . . . . . 7 76 3.2. Authentication . . . . . . . . . . . . . . . . . . . . . 7 77 3.3. Internet of Things . . . . . . . . . . . . . . . . . . . 7 78 3.4. Confidential Cloud Computing . . . . . . . . . . . . . . 8 79 4. Architecture . . . . . . . . . . . . . . . . . . . . . . . . 8 80 4.1. System Components . . . . . . . . . . . . . . . . . . . . 8 81 4.2. Different Renditions of TEEP Architecture . . . . . . . . 10 82 4.3. Multiple TAMs and Relationship to TAs . . . . . . . . . . 12 83 4.4. Untrusted Apps, Trusted Apps, and Personalization Data . 13 84 4.5. Examples of Application Delivery Mechanisms in Existing 85 TEEs . . . . . . . . . . . . . . . . . . . . . . . . . . 14 86 4.6. Entity Relations . . . . . . . . . . . . . . . . . . . . 15 87 5. Keys and Certificate Types . . . . . . . . . . . . . . . . . 17 88 5.1. Trust Anchors in TEE . . . . . . . . . . . . . . . . . . 18 89 5.2. Trust Anchors in TAM . . . . . . . . . . . . . . . . . . 18 90 5.3. Scalability . . . . . . . . . . . . . . . . . . . . . . . 18 91 5.4. Message Security . . . . . . . . . . . . . . . . . . . . 19 92 6. TEEP Broker . . . . . . . . . . . . . . . . . . . . . . . . . 19 93 6.1. Role of the TEEP Broker . . . . . . . . . . . . . . . . . 20 94 6.2. TEEP Broker Implementation Consideration . . . . . . . . 20 95 6.2.1. TEEP Broker APIs . . . . . . . . . . . . . . . . . . 20 96 6.2.2. TEEP Broker Distribution . . . . . . . . . . . . . . 21 97 6.2.3. Number of TEEP Brokers . . . . . . . . . . . . . . . 21 98 7. Attestation . . . . . . . . . . . . . . . . . . . . . . . . . 21 99 7.1. Information Required in TEEP Claims . . . . . . . . . . . 23 100 8. Algorithm and Attestation Agility . . . . . . . . . . . . . . 24 101 9. Security Considerations . . . . . . . . . . . . . . . . . . . 24 102 9.1. TA Trust Check at TEE . . . . . . . . . . . . . . . . . . 24 103 9.2. One TA Multiple SP Case . . . . . . . . . . . . . . . . . 25 104 9.3. Broker Trust Model . . . . . . . . . . . . . . . . . . . 25 105 9.4. Data Protection at TAM and TEE . . . . . . . . . . . . . 25 106 9.5. Compromised CA . . . . . . . . . . . . . . . . . . . . . 25 107 9.6. Compromised TAM . . . . . . . . . . . . . . . . . . . . . 25 108 9.7. Certificate Renewal . . . . . . . . . . . . . . . . . . . 26 109 9.8. Keeping Secrets from the TAM . . . . . . . . . . . . . . 26 110 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 111 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 112 12. Informative References . . . . . . . . . . . . . . . . . . . 26 113 Appendix A. History . . . . . . . . . . . . . . . . . . . . . . 28 114 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28 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 increase 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 only authorized code can execute with that environment, and that any 135 data used by such code cannot be read or tampered with by any code 136 outside that environment, including a commodity operating system (if 137 present). 139 This separation reduces the possibility of a successful attack on 140 application components and the data contained inside the TEE. 141 Typically, application components are chosen to execute inside a TEE 142 because those application components perform security sensitive 143 operations or operate on sensitive data. An application component 144 running inside a TEE is referred to as a Trusted Application (TA), 145 while an application running outside any TEE is referred to as an 146 Untrusted Application (UA). 148 The TEE typically uses hardware to enforce protections on the TA and 149 its data, but also presents a more limited set of services to 150 applications inside the TEE than is normally available to Untrusted 151 Applications. 153 But not all TEEs are the same, and different vendors may have 154 different implementations of TEEs with different security properties, 155 different features, and different control mechanisms to operate on 156 TAs. Some vendors may themselves market multiple different TEEs with 157 different properties attuned to different markets. A device vendor 158 may integrate one or more TEEs into their devices depending on market 159 needs. 161 To simplify the life of developers and service providers interacting 162 with TAs in a TEE, an interoperable protocol for managing TAs running 163 in different TEEs of various devices is needed. In this TEE 164 ecosystem, there often arises a need for an external trusted party to 165 verify the identity, claims, and rights of Service Providers (SP), 166 devices, and their TEEs. This trusted third party is the Trusted 167 Application Manager (TAM). 169 The Trusted Execution Provisioning (TEEP) protocol addresses the 170 following problems: 172 - A Service Provider (SP) intending to provide services through a TA 173 to users of a device needs to determine security-relevant 174 information of a device before provisioning their TA to the TEE 175 within the device. An example is the verification of the type of 176 TEE included in a device. 178 - A TEE in a device needs to determine whether a Service Provider 179 (SP) that wants to manage a TA in the device is authorized to 180 manage TAs in the TEE, and what TAs the SP is permitted to manage. 182 - The parties involved in the protocol must be able to attest that a 183 TEE is genuine and capable of providing the security protections 184 required by a particular TA. 186 - A Service Provider (SP) must be able to determine if a TA exists 187 (is installed) on a device (in the TEE), and if not, install the 188 TA in the TEE. 190 - A Service Provider (SP) must be able to check whether a TA in a 191 device's TEE is the most up-to-date version, and if not, update 192 the TA in the TEE. 194 - A Service Provider (SP) must be able to remove a TA in a device's 195 TEE if the SP is no longer offering such services or the services 196 are being revoked from a particular user (or device). For 197 example, if a subscription or contract for a particular service 198 has expired, or a payment by the user has not been completed or 199 has been rescinded. 201 - A Service Provider (SP) must be able to define the relationship 202 between cooperating TAs under the SP's control, and specify 203 whether the TAs can communicate, share data, and/or share key 204 material. 206 2. Terminology 208 The following terms are used: 210 - Untrusted Application: An application running in a Rich Execution 211 Environment, such as an Android, Windows, or iOS application. 213 - Trusted Application Manager (TAM): An entity that manages Trusted 214 Applications (TAs) running in different TEEs of various devices. 216 - Device: A physical piece of hardware that hosts one or more TEEs, 217 often along with a Rich Execution Environment. A Device contains 218 a default list of Trust Anchors that identify entities (e.g., 219 TAMs) that are trusted by the Device. This list is normally set 220 by the Device Manufacturer, and may be governed by the Device's 221 network carrier. The list of Trust Anchors is normally modifiable 222 by the Device's owner or Device Administrator. However the Device 223 manufacturer and network carrier may restrict some modifications, 224 for example, by not allowing the manufacturer or carrier's Trust 225 Anchor to be removed or disabled. 227 - Rich Execution Environment (REE): An environment that is provided 228 and governed by a typical OS (e.g., Linux, Windows, Android, iOS), 229 potentially in conjunction with other supporting operating systems 230 and hypervisors; it is outside of any TEE. This environment and 231 applications running on it are considered untrusted. 233 - Service Provider (SP): An entity that wishes to provide a service 234 on Devices that requires the use of one or more Trusted 235 Applications. A Service Provider requires the help of a TAM in 236 order to provision the Trusted Applications to remote devices. 238 - Device User: A human being that uses a device. Many devices have 239 a single device user. Some devices have a primary device user 240 with other human beings as secondary device users (e.g., parent 241 allowing children to use their tablet or laptop). Other devices 242 are not used by a human being and hence have no device user. 243 Relates to Device Owner and Device Administrator. 245 - Device Owner: A device is always owned by someone. In some cases, 246 it is common for the (primary) device user to also own the device, 247 making the device user/owner also the device administrator. In 248 enterprise environments it is more common for the enterprise to 249 own the device, and any device user has no or limited 250 administration rights. In this case, the enterprise appoints a 251 device administrator that is not the device owner. 253 - Device Administrator (DA): An entity that is responsible for 254 administration of a Device, which could be the device owner. A 255 Device Administrator has privileges on the Device to install and 256 remove applications and TAs, approve or reject Trust Anchors, and 257 approve or reject Service Providers, among possibly other 258 privileges on the Device. A Device Administrator can manage the 259 list of allowed TAMs by modifying the list of Trust Anchors on the 260 Device. Although a Device Administrator may have privileges and 261 Device-specific controls to locally administer a device, the 262 Device Administrator may choose to remotely administrate a device 263 through a TAM. 265 - Trust Anchor: As defined in [RFC6024] and 266 [I-D.ietf-suit-manifest], "A trust anchor represents an 267 authoritative entity via a public key and associated data. The 268 public key is used to verify digital signatures, and the 269 associated data is used to constrain the types of information for 270 which the trust anchor is authoritative." The Trust Anchor may be 271 a certificate or it may be a raw public key along with additional 272 data if necessary such as its public key algorithm and parameters. 274 - Trust Anchor Store: As defined in [RFC6024], "A trust anchor store 275 is a set of one or more trust anchors stored in a device. A 276 device may have more than one trust anchor store, each of which 277 may be used by one or more applications." As noted in 278 [I-D.ietf-suit-manifest], a trust anchor store must resist 279 modification against unauthorized insertion, deletion, and 280 modification. 282 - Trusted Application (TA): An application component that runs in a 283 TEE. 285 - Trusted Execution Environment (TEE): An execution environment that 286 enforces that only authorized code can execute within the TEE, and 287 data used by that code cannot be read or tampered with by code 288 outside the TEE. A TEE also generally has a device unique 289 credential that cannot be cloned. There are multiple technologies 290 that can be used to implement a TEE, and the level of security 291 achieved varies accordingly. In addition, TEEs typically use an 292 isolation mechanism between Trusted Applications to ensure that 293 one TA cannot read, modify or delete the data and code of another 294 TA. 296 3. Use Cases 298 3.1. Payment 300 A payment application in a mobile device requires high security and 301 trust about the hosting device. Payments initiated from a mobile 302 device can use a Trusted Application to provide strong identification 303 and proof of transaction. 305 For a mobile payment application, some biometric identification 306 information could also be stored in a TEE. The mobile payment 307 application can use such information for authentication. 309 A secure user interface (UI) may be used in a mobile device to 310 prevent malicious software from stealing sensitive user input data. 311 Such an application implementation often relies on a TEE for user 312 input protection. 314 3.2. Authentication 316 For better security of authentication, a device may store its 317 sensitive authentication keys inside a TEE, providing TEE-protected 318 security key strength and trusted code execution. 320 3.3. Internet of Things 322 The Internet of Things (IoT) has been posing threats to networks and 323 national infrastructures because of existing weak security in 324 devices. It is very desirable that IoT devices can prevent malware 325 from manipulating actuators (e.g., unlocking a door), or stealing or 326 modifying sensitive data such as authentication credentials in the 327 device. A TEE can be the best way to implement such IoT security 328 functions. 330 TEEs could be used to store variety of sensitive data for IoT 331 devices. For example, a TEE could be used in smart door locks to 332 store a user's biometric information for identification, and for 333 protecting access the locking mechanism. 335 3.4. Confidential Cloud Computing 337 A tenant can store sensitive data in a TEE in a cloud computing 338 server such that only the tenant can access the data, preventing the 339 cloud hosting provider from accessing the data. A tenant can run TAs 340 inside a server TEE for secure operation and enhanced data security. 341 This provides benefits not only to tenants with better data security 342 but also to cloud hosting provider for reduced liability and 343 increased cloud adoption. 345 4. Architecture 347 4.1. System Components 349 The following are the main components in the system. Full 350 descriptions of components not previously defined are provided below. 351 Interactions of all components are further explained in the following 352 paragraphs. 354 +-------------------------------------------+ 355 | Device | 356 | +--------+ | Service Provider 357 | +-------------+ | |----------+ | 358 | | TEE-1 | | TEEP |---------+| | 359 | | +--------+ | +----| Broker | | || +--------+ | 360 | | | TEEP | | | | |<---+ | |+-->| |<-+ 361 | | | Agent |<----+ | | | | | +-| TAM-1 | 362 | | +--------+ | | |<-+ | | +->| | |<-+ 363 | | | +--------+ | | | | +--------+ | 364 | | +---+ +---+ | | | | | TAM-2 | | 365 | +-->|TA1| |TA2| | +-------+ | | | +--------+ | 366 | | | | | | |<---------| App-2 |--+ | | | 367 | | | +---+ +---+ | +-------+ | | | Device Administrator 368 | | +-------------+ | App-1 | | | | 369 | | | | | | | 370 | +--------------------| |---+ | | 371 | | |--------+ | 372 | +-------+ | 373 +-------------------------------------------+ 375 Figure 1: Notional Architecture of TEEP 377 - Service Providers (SP) and Device Administrators (DA) utilize the 378 services of a TAM to manage TAs on Devices. SPs do not directly 379 interact with devices. DAs may elect to use a TAM for remote 380 administration of TAs instead of managing each device directly. 382 - Trusted Application Manager (TAM): A TAM is responsible for 383 performing lifecycle management activity on TA's on behalf of 384 Service Providers and Device Administrators. This includes 385 creation and deletion of TA's, and may include, for example, over- 386 the-air updates to keep an SP's TAs up-to-date and clean up when a 387 version should be removed. TAMs may provide services that make it 388 easier for SPs or DAs to use the TAM's service to manage multiple 389 devices, although that is not required of a TAM. 391 The TAM performs its management of TA's through an interaction 392 with a Device's TEEP Broker. As shown in Figure 1, the TAM cannot 393 directly contact a Device, but must wait for the TEEP Broker to 394 contact the TAM requesting a particular service. This 395 architecture is intentional in order to accommodate network and 396 application firewalls that normally protect user and enterprise 397 devices from arbitrary connections from external network entities. 399 A TAM may be publicly available for use by many SPs, or a TAM may 400 be private, and accessible by only one or a limited number of SPs. 401 It is expected that manufacturers and carriers will run their own 402 private TAM. Another example of a private TAM is a TAM running as 403 a Software-as-a-Service (SaaS) within an SP. 405 A SP or Device Administrator chooses a particular TAM based on 406 whether the TAM is trusted by a Device or set of Devices. The TAM 407 is trusted by a device if the TAM's public key is an authorized 408 Trust Anchor in the Device. A SP or Device Administrator may run 409 their own TAM, however the Devices they wish to manage must 410 include this TAM's pubic key in the Trust Anchor list. 412 A SP or Device Administrator is free to utilize multiple TAMs. 413 This may be required for a SP to manage multiple different types 414 of devices from different manufacturers, or devices on different 415 carriers, since the Trust Anchor list on these different devices 416 may contain different TAMs. A Device Administrator may be able to 417 add their own TAM's public key or certificate to the Trust Anchor 418 list on all their devices, overcoming this limitation. 420 Any entity is free to operate a TAM. For a TAM to be successful, 421 it must have its public key or certificate installed in Devices 422 Trust Anchor list. A TAM may set up a relationship with device 423 manufacturers or carriers to have them install the TAM's keys in 424 their device's Trust Anchor list. Alternatively, a TAM may 425 publish its certificate and allow Device Administrators to install 426 the TAM's certificate in their devices as an after-market-action. 428 - TEEP Broker: The TEEP Broker is an application component running 429 in a Rich Execution Environment (REE) that enables the message 430 protocol exchange between a TAM and a TEE in a device. The TEEP 431 Broker does not process messages on behalf of a TEE, but merely is 432 responsible for relaying messages from the TAM to the TEE, and for 433 returning the TEE's responses to the TAM. 435 - TEEP Agent: the TEEP Agent is a processing module running inside a 436 TEE that receives TAM requests that are relayed via a TEEP Broker 437 that runs in an REE. A TEEP Agent in the TEE may parse requests 438 or forward requests to other processing modules in a TEE, which is 439 up to a TEE provider's implementation. A response message 440 corresponding to a TAM request is sent by a TEEP Agent back to a 441 TEEP Broker. 443 - Certification Authority (CA): Certificate-based credentials used 444 for authenticating a device, a TAM and an SP. A device embeds a 445 list of root certificates (Trust Anchors), from trusted CAs that a 446 TAM will be validated against. A TAM will remotely attest a 447 device by checking whether a device comes with a certificate from 448 a CA that the TAM trusts. The CAs do not need to be the same; 449 different CAs can be chosen by each TAM, and different device CAs 450 can be used by different device manufacturers. 452 4.2. Different Renditions of TEEP Architecture 454 There is nothing prohibiting a device from implementing multiple 455 TEEs. In addition, some TEEs (for example, SGX) present themselves 456 as separate containers within memory without a controlling manager 457 within the TEE. In these cases, the Rich Execution Environment hosts 458 multiple TEEP brokers, where each Broker manages a particular TEE or 459 set of TEEs. Enumeration and access to the appropriate TEEP Broker 460 is up to the Rich Execution Environment and the Untrusted 461 Applications. Verification that the correct TA has been reached then 462 becomes a matter of properly verifying TA attestations, which are 463 unforgeable. The multiple TEE approach is shown in the diagram 464 below. For brevity, TEEP Broker 2 is shown interacting with only one 465 TAM and UA, but no such limitation is intended to be implied in the 466 architecture. 468 +-------------------------------------------+ 469 | Device | 470 | +--------+ | Service Provider 471 | | |----------+ | 472 | +-------------+ | TEEP |---------+| | 473 | | TEE-1 | +---| Broker | | || +--------+ | 474 | | | | | 1 |<---+ | |+-->| |<-+ 475 | | +-------+ | | | | | | | | | 476 | | | TEEP | | | | | | | | | | 477 | | | Agent |<------+ | | | | | | | 478 | | | 1 | | | | | | | | | 479 | | +-------+ | | | | | | | | 480 | | | | | | | | | | 481 | | +---+ +---+ | | | | | | +-| TAM-1 | 482 | | |TA1| |TA2| | | |<-+ | | +->| | |<-+ 483 | +-->| | | |<---+ +--------+ | | | | +--------+ | 484 | | | +---+ +---+ | | | | | | TAM-2 | | 485 | | | | | +-------+ | | | +--------+ | 486 | | +-------------+ +-----| App-2 |--+ | | ^ | 487 | | +-------+ | | | | Device 488 | +--------------------| App-1 | | | | | Administrator 489 | +------| | | | | | 490 | +-----------|-+ | |---+ | | | 491 | | TEE-2 | | | |--------+ | | 492 | | +------+ | | | |------+ | | 493 | | | TEEP | | | +-------+ | | | 494 | | | Agent|<-----+ | | | 495 | | | 2 | | | | | | | 496 | | +------+ | | | | | | 497 | | | | | | | | 498 | | +---+ | | | | | | 499 | | |TA3|<----+ | | +----------+ | | | 500 | | | | | | | TEEP |<--+ | | 501 | | +---+ | +--| Broker |----------------+ 502 | | | | 2 | | 503 | +-------------+ +----------+ | 504 | | 505 +-------------------------------------------+ 507 Figure 2: Notional Architecture of TEEP with multiple TEEs 509 In the diagram above, TEEP Broker 1 controls interactions with the 510 TA's in TEE-1, and TEEP Broker 2 controls interactions with the TA's 511 in TEE-2. This presents some challenges for a TAM in completely 512 managing the device, since a TAM may not interact with all the TEEP 513 Brokers on a particular platform. In addition, since TEE's may be 514 physically separated, with wholly different resources, there may be 515 no need for TEEP Brokers to share information on installed TAs or 516 resource usage. However, the architecture guarantees that the TAM 517 will receive all the relevant information from the TEEP Broker to 518 which it communicates. 520 4.3. Multiple TAMs and Relationship to TAs 522 As shown in Figure 2, the TEEP Broker provides connections from the 523 TEE and the Untrusted Application to one or more TAMs. The selection 524 of which TAM to communicate with is dependent on information from the 525 Untrusted Application and is directly related to the TA. 527 When a SP offers a service which requires a TA, the SP associates 528 that service with a specific TA. The TA itself is digitally signed, 529 protecting its integrity, but the signature also links the TA back to 530 the signer. The signer is usually the SP, but in some cases may be 531 another party that the SP trusts. The SP selects one or more TAMs 532 through which to offer their service, and communicates the 533 information of the service and the specific Untrusted Applications 534 and TAs to the TAM. 536 The SP chooses TAMs based upon the markets into which the TAM can 537 provide access. There may be TAMs that provide services to specific 538 types of mobile devices, or mobile device operating systems, or 539 specific geographical regions or network carriers. A SP may be 540 motivated to utilize multiple TAMs for its service in order to 541 maximize market penetration and availability on multiple types of 542 devices. This likely means that the same service will be available 543 through multiple TAMs. 545 When the SP publishes the Untrusted Application to an app store or 546 other app repositories, the SP binds the Untrusted Application with a 547 manifest that identifies what TAMs can be contacted for the TA. In 548 some situations, an SP may use only a single TAM - this is likely the 549 case for enterprise applications or SPs serving a closed community. 550 For broad public apps, there will likely be multiple TAMs in the 551 manifest - one servicing one brand of mobile device and another 552 servicing a different manufacturer, etc. Because different devices 553 and different manufacturers trust different TAMs, the manifest will 554 include different TAMs that support this SP's Untrusted Application 555 and TA. Multiple TAMs allow the SP to provide their service and this 556 app (and TA) to multiple different devices. 558 When a TEEP Broker receives a request from an Untrusted Application 559 to install a TA, a list of TAM URIs may be provided for that TA, and 560 the request is passed to the TEEP Agent. If the TEEP Agent decides 561 that the TA needs to be installed, the TEEP Agent selects a single 562 TAM URI that is consistent with the list of trusted TAMs provisioned 563 on the device invokes the HTTP transport for TEEP to connect to the 564 TAM URI and begins a TEEP protocol exchange. When the TEEP Agent 565 subsequently receives the TA to install and the TA's manifest 566 indicates dependencies on any other trusted components, each 567 dependency can include a list of TAM URIs for the relevant 568 dependency. If such dependencies exist that are prerequisites to 569 install the TA, then the TEEP Agent recursively follows the same 570 procedure for each dependency that needs to be installed or updated, 571 including selecting a TAM URI that is consistent with the list of 572 trusted TAMs provisioned on the device, and beginning a TEEP 573 exchange. If multiple TAM URIs are considered trusted, only one 574 needs to be contacted and they can be attempted in some order until 575 one responds. 577 Separate from the Untrusted Application's manifest, this framework 578 relies on the use of the manifest format in [I-D.ietf-suit-manifest] 579 for expressing how to install the TA as well as dependencies on other 580 TEE components and versions. That is, dependencies from TAs on other 581 TEE components can be expressed in a SUIT manifest, including 582 dependencies on any other TAs, or trusted OS code (if any), or 583 trusted firmware. Installation steps can also be expressed in a SUIT 584 manifest. 586 For example, TEE's compliant with Global Platform may have a notion 587 of a "security domain" (which is a grouping of one or more TAs 588 installed on a device, that can share information within such a 589 group) that must be created and into which one or more TAs can then 590 be installed. It is thus up to the SUIT manifest to express a 591 dependency on having such a security domain existing or being created 592 first, as appropriate. 594 Updating a TA may cause compatibility issues with any Untrusted 595 Applications or other components that depend on the updated TA, just 596 like updating the OS or a shared library could impact an Untrusted 597 Application. Thus, an implementation needs to take into account such 598 issues. 600 4.4. Untrusted Apps, Trusted Apps, and Personalization Data 602 In TEEP, there is an explicit relationship and dependence between the 603 Untrusted Application in the REE and one or more TAs in the TEE, as 604 shown in Figure 2. For most purposes, an Untrusted Application that 605 uses one or more TA's in a TEE appears no different from any other 606 Untrusted Application in the REE. However, the way the Untrusted 607 Application and its corresponding TA's are packaged, delivered, and 608 installed on the device can vary. The variations depend on whether 609 the Untrusted Application and TA are bundled together or are provided 610 separately, and this has implications to the management of the TAs in 611 the TEE. In addition to the Untrusted Application and TA, the TA 612 and/or TEE may require some additional data to personalize the TA to 613 the service provider or the device or a user. This personalization 614 data is dependent on the TEE, the TA and the SP; an example of 615 personalization data might be username and password of an account 616 with the SP, or a secret symmetric key used by the TA to communicate 617 with the SP. The personalization data must be encrypted to preserve 618 the confidentiality of potentially sensitive data contained within 619 it. Other than this requirement to support confidentiality, TEEP 620 place no limitations or requirements on the personalization data. 622 There are three possible cases for bundling of the Untrusted 623 Application, TA, and personalization data: 625 1. The Untrusted Application, TA, and personalization data are all 626 bundled together in a single package by the SP and provided to 627 the TEEP Broker through the TAM. 629 2. The Untrusted Application and the TA are bundled together in a 630 single package, which a TAM or a publicly accessible app store 631 maintains, and the personalization data is separately provided by 632 the SP's TAM. 634 3. All components are independent. The Untrusted Application is 635 installed through some independent or device-specific mechanism, 636 and the TAM provides the TA and personalization data from the SP. 637 Delivery of the TA and personalization data may be combined or 638 separate. 640 The TEEP protocol treats the TA, any dependencies the TA has, and 641 personalization data as separate components with separate 642 installation steps that are expressed in SUIT manifests, and a SUIT 643 manifest might contain or reference multiple binaries (see {{I- 644 D.ietf-suit-manifest} for more details). The TEEP Agent is 645 responsible for handling any installation steps that need to be 646 performed inside the TEE, such as decryption of private TA bianries 647 or personalization data. 649 4.5. Examples of Application Delivery Mechanisms in Existing TEEs 651 In order to better understand these cases, it is helpful to review 652 actual implementations of TEEs and their application delivery 653 mechanisms. 655 In Intel Software Guard Extensions (SGX), the Untrusted Application 656 and TA are typically bundled into the same package (Case 2). The TA 657 exists in the package as a shared library (.so or .dll). The 658 Untrusted Application loads the TA into an SGX enclave when the 659 Untrusted Application needs the TA. This organization makes it easy 660 to maintain compatibility between the Untrusted Application and the 661 TA, since they are updated together. It is entirely possible to 662 create an Untrusted Application that loads an external TA into an SGX 663 enclave and use that TA (Case 3). In this case, the Untrusted 664 Application would require a reference to an external file or download 665 such a file dynamically, place the contents of the file into memory, 666 and load that as a TA. Obviously, such file or downloaded content 667 must be properly formatted and signed for it to be accepted by the 668 SGX TEE. In SGX, for Case 2 and Case 3, the personalization data is 669 normally loaded into the SGX enclave (the TA) after the TA has 670 started. Although Case 1 is possible with SGX, there are no 671 instances of this known to be in use at this time, since such a 672 construction would require a special installation program and SGX TA 673 to receive the encrypted binary, decrypt it, separate it into the 674 three different elements, and then install all three. This 675 installation is complex, because the Untrusted Application decrypted 676 inside the TEE must be passed out of the TEE to an installer in the 677 REE which would install the Untrusted Application; this assumes that 678 the Untrusted Application package includes the TA code also, since 679 otherwise there is a significant problem in getting the SGX enclave 680 code (the TA) from the TEE, through the installer and into the 681 Untrusted Application in a trusted fashion. Finally, the 682 personalization data would need to be sent out of the TEE (encrypted 683 in an SGX encalve-to-enclave manner) to the REE's installation app, 684 which would pass this data to the installed Untrusted Application, 685 which would in turn send this data to the SGX enclave (TA). This 686 complexity is due to the fact that each SGX enclave is separate and 687 does not have direct communication to other SGX enclaves. 689 In ARM TrustZone based environments, the Untrusted Application and TA 690 may or may not be bundled together. This differs from SGX since in 691 TrustZone the TA lifetime is not inherently tied to a specific 692 Untrused Application process lifetime as occurs in SGX. A TA is 693 loaded by a trusted OS running in the TEE, where the trusted OS is 694 separate from the OS in the REE. Thus Cases 2 and 3 are equally 695 applicable. In addition, it is possible for TAs to communicate with 696 each other without involving the Untrusted Application, and so the 697 complexity of Case 1 is lower than in the SGX example, and so Case 1 698 is possible as well though still more complex than Cases 2 and 3. 700 4.6. Entity Relations 702 This architecture leverages asymmetric cryptography to authenticate a 703 device to a TAM. Additionally, a TEE in a device authenticates a TAM 704 and TA signer. The provisioning of Trust Anchors to a device may be 705 different from one use case to the other. A device administrator may 706 want to have the capability to control what TAs are allowed. A 707 device manufacturer enables verification of the TA signers and TAM 708 providers; it may embed a list of default Trust Anchors that the 709 signer of an allowed TA's signer certificate should chain to. A 710 device administrator may choose to accept a subset of the allowed TAs 711 via consent or action of downloading. 713 (App Developer) (App Store) (TAM) (Device with TEE) (CAs) 714 | | 715 | --> (Embedded TEE cert) <-- 716 | | 717 | <------------------------------ Get an app cert ----- | 718 | | <-- Get a TAM cert ------ | 719 | 720 1. Build two apps: 721 Untrusted Application 722 TA 723 | 724 | 725 Untrusted Application -- 2a. --> | ----- 3. Install -------> | 726 TA ----------------- 2b. Supply ------> | 4. Messaging-->| 727 | | | | 729 Figure 3: Developer Experience 731 Figure 3 shows an application developer building two applications: 1) 732 an Untrusted Application; 2) a TA that provides some security 733 functions to be run inside a TEE. At step 2, the application 734 developer uploads the Untrusted Application (2a) to an Application 735 Store. The Untrusted Application may optionally bundle the TA 736 binary. Meanwhile, the application developer may provide its TA to a 737 TAM provider that will be managing the TA in various devices. 3. A 738 user will go to an Application Store to download the Untrusted 739 Application. The Untrusted Application will trigger TA installation 740 by initiating communication with a TAM. This is the step 4. The 741 Untrusted Application will get messages from TAM, and interacts with 742 device TEE via an Agent. 744 The main components consist of a set of standard messages created by 745 a TAM to deliver TA management commands to a device, and device 746 attestation and response messages created by a TEE that responds to a 747 TAM's message. 749 It should be noted that network communication capability is generally 750 not available in TAs in today's TEE-powered devices. Trusted 751 Applications need to rely on a broker in the REE to interact with a 752 TEE for network message exchanges. Consequently, a TAM generally 753 communicates with an Untrusted Application about how it gets messages 754 that originate from a TEE inside a device. Similarly, a TA or TEE 755 generally gets messages from a TAM via a TEEP Broker in this protocol 756 architecture, not directly from the network. 758 It is imperative to have an interoperable protocol to communicate 759 with different TAMs and different TEEs in different devices. This is 760 the role of the Broker, which is a software component that bridges 761 communication between a TAM and a TEE. Furthermore the Broker 762 communicates with a Agent inside a TEE that is responsible to process 763 TAM requests. The Broker in REE does not need to know the actual 764 content of messages except for the TEE routing information. 766 5. Keys and Certificate Types 768 This architecture leverages the following credentials, which allow 769 delivering end-to-end security between a TAM and a TEEP Agent, 770 without relying on any transport security. 772 Figure 4 summarizes the relationships between various keys and where 773 they are stored. Each public/private key identifies an SP, TAM, or 774 TEE, and gets a certificate that chains up to some CA. A list of 775 trusted certificates is then used to check a presented certificate 776 against. 778 Different CAs can be used for different types of certificates. TEEP 779 messages are always signed, where the signer key is the message 780 originator's private key such as that of a TAM, or a TEE's private 781 key. In addition to the keys shown in Figure 4, there may be 782 additional keys used for attestation. Refer to the RATS Architecture 783 for more discussion. 785 Cardinality & Location of 786 Location of Private Key Corresponding 787 Purpose Private Key Signs CA Certs 788 ------------------ ----------- ------------- ------------- 789 Authenticating TEE 1 per TEE TEEP responses TAM 791 Authenticating TAM 1 per TAM TEEP requests TEEP Agent 793 Code Signing 1 per SP TA binary TEE 795 Figure 4: Keys 797 The TEE key pair and certificate are used for authenticating the TEE 798 to a remote TAM. Often, the key pair is burned into the TEE by the 799 TEE manufacturer and the key pair and its certificate are valid for 800 the expected lifetime of the TEE. A TAM provider is responsible for 801 configuring its TAM with the manufacturer certificates or CAs that 802 are used to sign TEE keys. 804 The TAM key pair and certificate are used for authenticating a TAM to 805 a remote TEE. A TAM provider is responsible for acquiring a 806 certificate from a CA that is trusted by the TEEs it manages. 808 The SP key pair and certificate are used to sign TAs that the TEE 809 will consider authorized to execute. TEEs must be configured with 810 the CAs that it considers authorized to sign TAs that it will 811 execute. 813 5.1. Trust Anchors in TEE 815 A TEEP Agent's Trust Anchor store contains a list of Trust Anchors, 816 which are CA certificates that sign various TAM certificates. The 817 list is typically preloaded at manufacturing time, and can be updated 818 using the TEEP protocol if the TEE has some form of "Trust Anchor 819 Manager TA" that has Trust Anchors in its configuration data. Thus, 820 Trust Anchors can be updated similar to updating the configuration 821 data for any other TA. 823 When Trust Anchor update is carried out, it is imperative that any 824 update must maintain integrity where only authentic Trust Anchor list 825 from a device manufacturer or a Device Administrator is accepted. 826 This calls for a complete lifecycle flow in authorizing who can make 827 Trust Anchor update and whether a given Trust Anchor list are non- 828 tampered from the original provider. The signing of a Trust Anchor 829 list for integrity check and update authorization methods are 830 desirable to be developed. This can be addressed outside of this 831 architecture document. 833 Before a TAM can begin operation in the marketplace to support a 834 device with a particular TEE, it must obtain a TAM certificate from a 835 CA that is listed in the Trust Anchor store of the TEE. 837 5.2. Trust Anchors in TAM 839 The Trust Anchor store in a TAM consists of a list of Trust Anchors, 840 which are CA certificates that sign various device TEE certificates. 841 A TAM will accept a device for TA management if the TEE in the device 842 uses a TEE certificate that is chained to a CA that the TAM trusts. 844 5.3. Scalability 846 This architecture uses a PKI. Trust Anchors exist on the devices to 847 enable the TEE to authenticate TAMs, and TAMs use Trust Anchors to 848 authenticate TEEs. Since a PKI is used, many intermediate CA 849 certificates can chain to a root certificate, each of which can issue 850 many certificates. This makes the protocol highly scalable. New 851 factories that produce TEEs can join the ecosystem. In this case, 852 such a factory can get an intermediate CA certificate from one of the 853 existing roots without requiring that TAMs are updated with 854 information about the new device factory. Likewise, new TAMs can 855 join the ecosystem, providing they are issued a TAM certificate that 856 chains to an existing root whereby existing TEEs will be allowed to 857 be personalized by the TAM without requiring changes to the TEE 858 itself. This enables the ecosystem to scale, and avoids the need for 859 centralized databases of all TEEs produced or all TAMs that exist. 861 5.4. Message Security 863 Messages created by a TAM are used to deliver TA management commands 864 to a device, and device attestation and messages created by the 865 device TEE to respond to TAM messages. 867 These messages are signed end-to-end between a TEEP Agent and a TAM, 868 and are typically encrypted such that only the targeted device TEE or 869 TAM is able to decrypt and view the actual content. 871 6. TEEP Broker 873 A TEE and TAs often do not have the capability to directly 874 communicate outside of the hosting device. For example, 875 GlobalPlatform [GPTEE] specifies one such architecture. This calls 876 for a software module in the REE world to handle network 877 communication with a TAM. 879 A TEEP Broker is an application component running in the REE of the 880 device or an SDK that facilitates communication between a TAM and a 881 TEE. It also provides interfaces for Untrusted Applications to query 882 and trigger TA installation that the application needs to use. 884 An Untrusted Application might communicate with the TEEP Broker at 885 runtime to trigger TA installation itself. Or an Untrusted 886 Application might simply have a metadata file that describes the TAs 887 it depends on and the associated TAM(s) for each TA, and an REE 888 Application Installer can inspect this application metadata file and 889 invoke the TEEP Broker to trigger TA installation on behalf of the 890 Untrusted Application without requiring the Untrusted Application to 891 run first. 893 6.1. Role of the TEEP Broker 895 A TEEP Broker abstracts the message exchanges with a TEE in a device. 896 The input data is originated from a TAM or the first initialization 897 call to trigger a TA installation. 899 The Broker doesn't need to parse a message content received from a 900 TAM that should be processed by a TEE. When a device has more than 901 one TEE, one TEEP Broker per TEE could be present in REE. A TEEP 902 Broker interacts with a TEEP Agent inside a TEE. 904 A TAM message may indicate the target TEE where a TA should be 905 installed. A compliant TEEP protocol should include a target TEE 906 identifier for a TEEP Broker when multiple TEEs are present. 908 The Broker relays the response messages generated from a TEEP Agent 909 in a TEE to the TAM. The Broker is not expected to handle any 910 network connection with an application or TAM. 912 The Broker only needs to return an error message if the TEE is not 913 reachable for some reason. Other errors are represented as response 914 messages returned from the TEE which will then be passed to the TAM. 916 6.2. TEEP Broker Implementation Consideration 918 A Provider should consider methods of distribution, scope and 919 concurrency on devices and runtime options when implementing a TEEP 920 Broker. Several non-exhaustive options are discussed below. 921 Providers are encouraged to take advantage of the latest 922 communication and platform capabilities to offer the best user 923 experience. 925 6.2.1. TEEP Broker APIs 927 The following conceptual APIs exist from a TEEP Broker to a TEEP 928 Agent: 930 1. RequestTA: A notification from an REE application (e.g., an 931 installer, or a normal application) that it depends on a given 932 TA, which may or may not already be installed in the TEE. 934 2. ProcessTeepMessage: A message arriving from the network, to be 935 delivered to the TEEP Agent for processing. 937 3. RequestPolicyCheck: A hint (e.g., based on a timer) that the TEEP 938 Agent may wish to contact the TAM for any changes, without the 939 device itself needing any particular change. 941 4. ProcessError: A notification that the TEEP Broker could not 942 deliver an outbound TEEP message to a TAM. 944 For comparison, similar APIs may exist on the TAM side, where a 945 Broker may or may not exist (depending on whether the TAM uses a TEE 946 or not): 948 1. ProcessConnect: A notification that an incoming TEEP session is 949 being requested by a TEEP Agent. 951 2. ProcessTeepMessage: A message arriving from the network, to be 952 delivered to the TAM for processing. 954 For further discussion on these APIs, see 955 [I-D.ietf-teep-otrp-over-http]. 957 6.2.2. TEEP Broker Distribution 959 The Broker installation is commonly carried out at OEM time. A user 960 can dynamically download and install a Broker on-demand. 962 6.2.3. Number of TEEP Brokers 964 There should be generally only one shared TEEP Broker in a device. 965 The device's TEE vendor will most probably supply one Broker. When 966 multiple TEEs are present in a device, one TEEP Broker per TEE may be 967 used. 969 When only one Broker is used per device, the Broker provider is 970 responsible to allow multiple TAMs and TEE providers to achieve 971 interoperability. With a standard Broker interface, each TAM can 972 implement its own SDK for its SP Untrusted Applications to work with 973 this Broker. 975 Multiple independent Broker providers can be used as long as they 976 have standard interface to an Untrusted Application or TAM SDK. Only 977 one Broker is generally expected in a device. 979 7. Attestation 981 Attestation is the process through which one entity (an Attester) 982 presents "evidence", in the form of a series of claims, to another 983 entity (a Verifier), and provides sufficient proof that the claims 984 are true. Different verifiers may have different standards for 985 attestation proofs and not all attestations are acceptable to every 986 verifier. A third entity (a Relying Party) can then use "attestation 987 results", in the form of another series of claims, from a Verifier to 988 make authorization decisions. 990 In TEEP, as depicted in Figure 5, the primary purpose of an 991 attestation is to allow a device (the Attester) to prove to TAMs (the 992 Relying Parties) that a TEE in the device has particular properties, 993 was built by a particular manufacturer, or is executing a particular 994 TA. Other claims are possible; TEEP does not limit the claims that 995 may appear in evidence or attestation results, but defines a minimal 996 set of attestation result claims required for TEEP to operate 997 properly. Extensions to these claims are possible. Other standards 998 or groups may define the format and semantics of extended claims. 1000 +----------------+ 1001 | Device | +----------+ 1002 | +------------+ | Evidence | TAM | Evidence +----------+ 1003 | | TEE |------------->| (Relying |-------------->| Verifier | 1004 | | (Attester) | | | Party) |<--------------| | 1005 | +------------+ | +----------+ Attestation +----------+ 1006 +----------------+ Result 1008 Figure 5: TEEP Attestation Roles 1010 As of the writing of this specification, device and TEE attestations 1011 have not been standardized across the market. Different devices, 1012 manufacturers, and TEEs support different attestation algorithms and 1013 mechanisms. In order for TEEP to be inclusive, it is agnostic to the 1014 format of evidence, allowing proprietary or standardized formats to 1015 be used between a TEE and a verifier (which may or may not be 1016 colocated in the TAM). However, it should be recognized that not all 1017 verifiers may be able to process all proprietary forms of attestation 1018 evidence. Similarly, the TEEP protocol is agnostic as to the format 1019 of attestation results, and the protocol (if any) used between the 1020 TAM and a verifier, as long as they convey at least the required set 1021 of claims in some format. 1023 The assumptions which may apply to an attestation have to do with the 1024 quality of the attestation and the quality and security provided by 1025 the TEE, the device, the manufacturer, or others involved in the 1026 device or TEE ecosystem. Some of the assumptions that might apply to 1027 an attestations include (this may not be a comprehensive list): 1029 - Assumptions regarding the security measures a manufacturer takes 1030 when provisioning keys into devices/TEEs; 1032 - Assumptions regarding what hardware and software components have 1033 access to the Attestation keys of the TEE; 1035 - Assumptions related to the source or local verification of claims 1036 within an attestation prior to a TEE signing a set of claims; 1038 - Assumptions regarding the level of protection afforded to 1039 attestation keys against exfiltration, modification, and side 1040 channel attacks; 1042 - Assumptions regarding the limitations of use applied to TEE 1043 Attestation keys; 1045 - Assumptions regarding the processes in place to discover or detect 1046 TEE breeches; and 1048 - Assumptions regarding the revocation and recovery process of TEE 1049 attestation keys. 1051 TAMs must be comfortable with the assumptions that are inherently 1052 part of any attestation result they accept. Alternatively, any TAM 1053 may choose not to accept an attestation result generated using 1054 evidence from a particular manufacturer or device's TEE based on the 1055 inherent assumptions. The choice and policy decisions are left up to 1056 the particular TAM. 1058 Some TAMs may require additional claims in order to properly 1059 authorize a device or TEE. These additional claims may help clear up 1060 any assumptions for which the TAM wants to alleviate. The specific 1061 format for these additional claims are outside the scope of this 1062 specification, but the TEEP protocol allows these additional claims 1063 to be included in the attestation messages. 1065 7.1. Information Required in TEEP Claims 1067 - Device Identifying Info: TEEP attestations must uniquely identify 1068 a device to the TAM and SP. This identifier allows the TAM to 1069 provide services unique to the device, such as managing installed 1070 TAs, and providing subscriptions to services, and locating device- 1071 specific keying material to communicate with or authenticate the 1072 device. Additionally, device manufacturer information must be 1073 provided to provide better universal uniqueness qualities without 1074 requiring globally unique identifiers for all devices. 1076 - TEE Identifying info: The type of TEE that generated this 1077 attestation must be identified. Standard TEE types are identified 1078 by an IANA number, but also must include version identification 1079 information such as the hardware, firmware, and software version 1080 of the TEE, as applicable by the TEE type. TEE manufacturer 1081 information for the TEE is required in order to disambiguate the 1082 same TEE type created by different manufacturers and resolve 1083 potential assumptions around manufacturer provisioning, keying and 1084 support for the TEE. 1086 - Liveness Proof: A claim that includes liveness information must be 1087 included, such as a nonce or timestamp. 1089 - Requested Components: A list of zero or more components (TAs or 1090 other dependencies needed by a TEE) that are requested by some 1091 depending app, but which are not currently installed in the TEE. 1093 8. Algorithm and Attestation Agility 1095 RFC 7696 [RFC7696] outlines the requirements to migrate from one 1096 mandatory-to-implement algorithm suite to another over time. This 1097 feature is also known as crypto agility. Protocol evolution is 1098 greatly simplified when crypto agility is already considered during 1099 the design of the protocol. In the case of the Trusted Execution 1100 Provisioning (TEEP) Protocol the diverse range of use cases, from 1101 trusted app updates for smart phones and tablets to updates of code 1102 on higher-end IoT devices, creates the need for different mandatory- 1103 to-implement algorithms already from the start. 1105 Crypto agility in TEEP concerns the use of symmetric as well as 1106 asymmetric algorithms. Symmetric algorithms are used for encryption 1107 of content whereas the asymmetric algorithms are mostly used for 1108 signing messages. 1110 In addition to the use of cryptographic algorithms in TEEP there is 1111 also the need to make use of different attestation technologies. A 1112 Device must provide techniques to inform a TAM about the attestation 1113 technology it supports. For many deployment cases it is more likely 1114 for the TAM to support one or more attestation techniques whereas the 1115 Device may only support one. 1117 9. Security Considerations 1119 9.1. TA Trust Check at TEE 1121 A TA binary is signed by a TA signer certificate. This TA signing 1122 certificate/private key belongs to the SP, and may be self-signed 1123 (i.e., it need not participate in a trust hierarchy). It is the 1124 responsibility of the TAM to only allow verified TAs from trusted SPs 1125 into the system. Delivery of that TA to the TEE is then the 1126 responsibility of the TEE, using the security mechanisms provided by 1127 the protocol. 1129 We allow a way for an Untrusted Application to check the 1130 trustworthiness of a TA. A TEEP Broker has a function to allow an 1131 application to query the information about a TA. 1133 An Untrusted Application may perform verification of the TA by 1134 verifying the signature of the TA. An application can do additional 1135 trust checks on the certificate returned for this TA. It might trust 1136 the TAM, or require additional SP signer trust chaining. 1138 9.2. One TA Multiple SP Case 1140 A TA for multiple SPs must have a different identifier per SP. They 1141 should appear as different TAs when they are installed in the same 1142 device. 1144 9.3. Broker Trust Model 1146 A TEEP Broker could be malware in the vulnerable REE. An Untrusted 1147 Application will connect its TAM provider for required TA 1148 installation. It gets command messages from the TAM, and passes the 1149 message to the Broker. 1151 The architecture enables the TAM to communicate with the device's TEE 1152 to manage TAs. All TAM messages are signed and sensitive data is 1153 encrypted such that the TEEP Broker cannot modify or capture 1154 sensitive data. 1156 9.4. Data Protection at TAM and TEE 1158 The TEE implementation provides protection of data on the device. It 1159 is the responsibility of the TAM to protect data on its servers. 1161 9.5. Compromised CA 1163 A root CA for TAM certificates might get compromised. Some TEE Trust 1164 Anchor update mechanism is expected from device OEMs. TEEs are 1165 responsible for validating certificate revocation about a TAM 1166 certificate chain. 1168 If the root CA of some TEE device certificates is compromised, these 1169 devices might be rejected by a TAM, which is a decision of the TAM 1170 implementation and policy choice. TAMs are responsible for 1171 validating any intermediate CA for TEE device certificates. 1173 9.6. Compromised TAM 1175 Device TEEs are responsible for validating the supplied TAM 1176 certificates to determine that the TAM is trustworthy. 1178 9.7. Certificate Renewal 1180 TEE device certificates are expected to be long lived, longer than 1181 the lifetime of a device. A TAM certificate usually has a moderate 1182 lifetime of 2 to 5 years. A TAM should get renewed or rekeyed 1183 certificates. The root CA certificates for a TAM, which are embedded 1184 into the Trust Anchor store in a device, should have long lifetimes 1185 that don't require device Trust Anchor update. On the other hand, it 1186 is imperative that OEMs or device providers plan for support of Trust 1187 Anchor update in their shipped devices. 1189 9.8. Keeping Secrets from the TAM 1191 In some scenarios, it is desirable to protect the TA binary or 1192 configuration from being disclosed to the TAM that distributes them. 1193 In such a scenario, the files can be encrypted end-to-end between an 1194 SP and a TEE. However, there must be some means of provisioning the 1195 decryption key into the TEE and/or some means of the SP securely 1196 learning a public key of the TEE that it can use to encrypt. One way 1197 to do this is for the SP to run its own TAM, merely to distribute the 1198 decryption key via the TEEP protocol, and the key file can be a 1199 dependency in the manifest of the encrypted TA. Thus, the TEEP Agent 1200 would look at the TA manifest, determine there is a dependency with a 1201 TAM URI of the SP's TAM. The Agent would then install the 1202 dependency, and then continue with the TA installation steps, 1203 including decrypting the TA binary with the relevant key. 1205 10. IANA Considerations 1207 This document does not require actions by IANA. 1209 11. Acknowledgements 1211 Some content of this document is based on text in a previous OTrP 1212 protocol document [I-D.ietf-teep-opentrustprotocol]. We thank the 1213 former co-authors Nick Cook and Minho Yoo for the initial document 1214 content, and contributors Brian Witten, Tyler Kim, and Alin Mutu. 1216 12. Informative References 1218 [GPTEE] Global Platform, "GlobalPlatform Device Technology: TEE 1219 System Architecture, v1.1", Global Platform GPD_SPE_009, 1220 January 2017, . 1223 [I-D.ietf-suit-manifest] 1224 Moran, B., Tschofenig, H., and H. Birkholz, "A Concise 1225 Binary Object Representation (CBOR)-based Serialization 1226 Format for the Software Updates for Internet of Things 1227 (SUIT) Manifest", draft-ietf-suit-manifest-02 (work in 1228 progress), November 2019. 1230 [I-D.ietf-teep-opentrustprotocol] 1231 Pei, M., Atyeo, A., Cook, N., Yoo, M., and H. Tschofenig, 1232 "The Open Trust Protocol (OTrP)", draft-ietf-teep- 1233 opentrustprotocol-03 (work in progress), May 2019. 1235 [I-D.ietf-teep-otrp-over-http] 1236 Thaler, D., "HTTP Transport for Trusted Execution 1237 Environment Provisioning: Agent-to- TAM Communication", 1238 draft-ietf-teep-otrp-over-http-03 (work in progress), 1239 November 2019. 1241 [RFC6024] Reddy, R. and C. Wallace, "Trust Anchor Management 1242 Requirements", RFC 6024, DOI 10.17487/RFC6024, October 1243 2010, . 1245 [RFC7696] Housley, R., "Guidelines for Cryptographic Algorithm 1246 Agility and Selecting Mandatory-to-Implement Algorithms", 1247 BCP 201, RFC 7696, DOI 10.17487/RFC7696, November 2015, 1248 . 1250 Appendix A. History 1252 RFC EDITOR: PLEASE REMOVE THIS SECTION 1254 IETF Drafts 1256 draft-00: - Initial working group document 1258 Authors' Addresses 1260 Mingliang Pei 1261 Symantec 1263 EMail: mingliang_pei@symantec.com 1265 Hannes Tschofenig 1266 Arm Limited 1268 EMail: hannes.tschofenig@arm.com 1270 David Wheeler 1271 Intel 1273 EMail: david.m.wheeler@intel.com 1275 Andrew Atyeo 1276 Intercede 1278 EMail: andrew.atyeo@intercede.com 1280 Liu Dapeng 1281 Alibaba Group 1283 EMail: maxpassion@gmail.com