| TEEP | M. Pei |
| Internet-Draft | Symantec |
| Intended status: Standards Track | H. Tschofenig |
| Expires: May 7, 2020 | Arm Ltd. |
| D. Wheeler | |
| Intel | |
| November 4, 2019 |
Trusted Execution Environment Provisioning (TEEP) Protocol
draft-tschofenig-teep-protocol-00
This document specifies a protocol that installs, updates, and deletes Trusted Applications (TAs) in a device with a Trusted Execution Environment (TEE). Due to its function it is called "Trusted Execution Environment Provisioning (TEEP) Protocol", which provides interoperability for mantaining the lifecycle of TAs.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 7, 2020.
Copyright (c) 2019 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
The Trusted Execution Environment (TEE) concept has been designed to separate a regular operating system, also referred as a Rich Execution Environment (REE), from security-sensitive applications. In an TEE ecosystem, different device vendors may use different operating systems in the REE and may use different types of TEEs. When application providers or device administrators use Trusted Application Managers (TAMs) to install, update, and delete Trusted Applications (TAs) on a wide range of devices with potentially different TEEs then an interoperability need arises.
This document specifies the protocol for communicating between a TAM and a TEEP Agent, involving a TEEP Broker.
The Trusted Execution Environment Provisioning (TEEP) architecture document [I-D.ietf-teep-architecture] has set to provide a design guidance for such an interoperable protocol and introduces the necessary terminology. Note that the term Trusted Application may include more than code; it may also include configuration data and keys needed by the TA to operate correctly.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].
This specification re-uses the terminology defined in [I-D.ietf-teep-architecture].
The TEEP protocol consists of a couple of messages exchanged between a TAM and a TEEP Agent via a TEEP Broker. The messages are encoded either in JSON or CBOR and designed to provide end-to-end security. TEEP protocol messages are signed and/or encrypted by the endpoints, i.e., the TAM and the TEEP Agent, but trusted applications may as well be encrypted and signed by the service provider. The TEEP protocol not only re-use JSON and CBOR but also the respective security wrappers, namely JOSE (JWS [RFC7515] and JWE [RFC7516], to be more specific) and COSE [RFC8152]. Furthermore, for attestation the Entity Attestation Token (EAT) [I-D.ietf-rats-eat] and for software updates the SUIT manifest format [I-D.ietf-suit-manifest] is re-used.
This specification defines six messages.
+------------+ +-------------+
| TAM | |TEEP Agent |
+------------+ +-------------+
QueryRequest ------->
QueryResponse
<------- or
Error
A TAM queries a device's current state with a QueryRequest message. A TEEP Agent will, after authenticating and authorizing the request, report attestation information, list all TAs, and provide information about supported algorithms and extensions in a QueryResponse message. An error message is returned if the request could not be processed. A TAM will process the QueryResponse message and determine whether subsequent message exchanges to install, update, or delete trusted applications shall be initiated.
+------------+ +-------------+
| TAM | |TEEP Agent |
+------------+ +-------------+
TrustedAppInstall ---->
Success
<---- or
Error
With the TrustedAppInstall message a TAM can instruct a TEEP Agent to install a TA. The TEEP Agent will process the message, determine whether the TAM is authorized and whether the TA has been signed by an authorized SP. In addition to the binary, the TAM may also provide personalization data. If the TrustedAppInstall message was processed successfully then a Success message is returned to the TAM, an Error message otherwise.
+------------+ +-------------+
| TAM | |TEEP Agent |
+------------+ +-------------+
TrustedAppDelete ---->
Success
<---- or
Error
With the TrustedAppDelete message a TAM can instruct a TEEP Agent to delete one or multiple TA(s). A Success message is returned when the operation has been completed successfully, and an Error message otherwise.
Outer_Wrapper = {
msg-authenc-wrapper => bstr .cbor
Msg_AuthEnc_Wrapper / nil,
teep-message => (QueryRequest /
QueryResponse /
TrustedAppInstall /
TrustedAppDelete /
Error /
Success ),
}
msg-authenc-wrapper = 1
teep-message = 2
Msg_AuthEnc_Wrapper = [ * (COSE_Mac_Tagged /
COSE_Sign_Tagged /
COSE_Mac0_Tagged /
COSE_Sign1_Tagged)]
For a CBOR-based encoding the following security wrapper is used (described in CDDL format [I-D.ietf-cbor-cddl]).
A future version of this specification will also describe the security wrapper for JSON (in CDDL format).
suite = int
version = int
data_items = (
attestation: 1,
ta: 2,
ext: 3
)
QueryRequest = (
TYPE : int,
TOKEN : bstr,
REQUEST : [+data_items],
? CIPHER_SUITE : [+suite],
? NONCE : bstr,
? VERSION : [+version],
? OCSP_DATA : bstr,
* $$extensions
)
A QueryRequest message is signed by the TAM and has the following fields:
ta_id = (
Vendor_ID = bstr,
Class_ID = bstr,
Device_ID = bstr,
* $$extensions
)
ext_info = int
QueryResponse = (
TYPE : int,
TOKEN : bstr,
? SELECTED_CIPHER_SUITE : suite,
? SELECTED_VERSION : version,
? EAT : bstr,
? TA_LIST : [+ta_id],
? EXT_LIST : [+ext_info],
* $$extensions
)
The QueryResponse message is signed and encrypted by the TEEP Agent and returned to the TAM. It has the following fields:
TrustedAppInstall = (
TYPE : int,
TOKEN : bstr,
? TA : [+SUIT_Outer_Wrapper],
* $$extensions
)
The TrustedAppInstall message is MACed and encrypted by the TAM and has the following fields:
TrustedAppDelete = (
TYPE : int,
TOKEN : bstr,
? TA_LIST : [+ta_id],
* $$extensions
)
The TrustedAppDelete message is MACed and encrypted by the TAM and has the following fields:
Success = (
TYPE : int,
TOKEN : bstr,
? MSG : tstr,
* $$extensions
)
The Success message is MACed and encrypted by the TEEP Agent and has the following fields:
Error = (
TYPE : int,
TOKEN : bstr,
ERR_CODE : int,
? ERR_MSG : tstr,
? CIPHER_SUITE : [+suite],
? VERSION : [+version],
* $$extensions
)
If possible, the Error message is MACed and encrypted by the TEEP Agent. Unprotected Error messages MUST be handled with care by the TAM due to possible downgrading attacks. It has the following fields:
This specification defines the following initial error messages. Additional error code can be registered with IANA.
This section summarizes the security considerations discussed in this specification:
There are two IANA requests: a media type and list of error codes.
IANA is requested to assign a media type for application/otrpv2+json.
IANA is requested to assign a media type for application/teep+cbor.
IANA is also requested to create a new registry for the error codes defined in Section 4.
Registration requests are evaluated after a three-week review period on the teep-reg-review@ietf.org mailing list, on the advice of one or more Designated Experts [RFC8126]. However, to allow for the allocation of values prior to publication, the Designated Experts may approve registration once they are satisfied that such a specification will be published.
Registration requests sent to the mailing list for review should use an appropriate subject (e.g., "Request to register an error code: example"). Registration requests that are undetermined for a period longer than 21 days can be brought to the IESG's attention (using the iesg@ietf.org mailing list) for resolution.
Criteria that should be applied by the Designated Experts includes determining whether the proposed registration duplicates existing functionality, whether it is likely to be of general applicability or whether it is useful only for a single extension, and whether the registration description is clear.
IANA must only accept registry updates from the Designated Experts and should direct all requests for registration to the review mailing list.
| [I-D.ietf-rats-eat] | Mandyam, G., Lundblade, L., Ballesteros, M. and J. O'Donoghue, "The Entity Attestation Token (EAT)", Internet-Draft draft-ietf-rats-eat-01, July 2019. |
| [I-D.ietf-suit-manifest] | Moran, B., Tschofenig, H. and H. Birkholz, "SUIT CBOR manifest serialisation format", Internet-Draft draft-ietf-suit-manifest-01, October 2019. |
| [RFC2119] | Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997. |
| [RFC3629] | Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, DOI 10.17487/RFC3629, November 2003. |
| [RFC4648] | Josefsson, S., "The Base16, Base32, and Base64 Data Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006. |
| [RFC5198] | Klensin, J. and M. Padlipsky, "Unicode Format for Network Interchange", RFC 5198, DOI 10.17487/RFC5198, March 2008. |
| [RFC7049] | Bormann, C. and P. Hoffman, "Concise Binary Object Representation (CBOR)", RFC 7049, DOI 10.17487/RFC7049, October 2013. |
| [RFC7159] | Bray, T., "The JavaScript Object Notation (JSON) Data Interchange Format", RFC 7159, DOI 10.17487/RFC7159, March 2014. |
| [RFC7515] | Jones, M., Bradley, J. and N. Sakimura, "JSON Web Signature (JWS)", RFC 7515, DOI 10.17487/RFC7515, May 2015. |
| [RFC7516] | Jones, M. and J. Hildebrand, "JSON Web Encryption (JWE)", RFC 7516, DOI 10.17487/RFC7516, May 2015. |
| [RFC7517] | Jones, M., "JSON Web Key (JWK)", RFC 7517, DOI 10.17487/RFC7517, May 2015. |
| [RFC7518] | Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, DOI 10.17487/RFC7518, May 2015. |
| [RFC8152] | Schaad, J., "CBOR Object Signing and Encryption (COSE)", RFC 8152, DOI 10.17487/RFC8152, July 2017. |
| [I-D.ietf-cbor-cddl] | Birkholz, H., Vigano, C. and C. Bormann, "Concise data definition language (CDDL): a notational convention to express CBOR and JSON data structures", Internet-Draft draft-ietf-cbor-cddl-08, March 2019. |
| [I-D.ietf-teep-architecture] | Pei, M., Tschofenig, H., Wheeler, D., Atyeo, A. and D. Liu, "Trusted Execution Environment Provisioning (TEEP) Architecture", Internet-Draft draft-ietf-teep-architecture-03, July 2019. |
| [I-D.ietf-teep-opentrustprotocol] | Pei, M., Atyeo, A., Cook, N., Yoo, M. and H. Tschofenig, "The Open Trust Protocol (OTrP)", Internet-Draft draft-ietf-teep-opentrustprotocol-03, May 2019. |
| [RFC8126] | Cotton, M., Leiba, B. and T. Narten, "Guidelines for Writing an IANA Considerations Section in RFCs", BCP 26, RFC 8126, DOI 10.17487/RFC8126, June 2017. |
This work is based on the initial version of OTrP [I-D.ietf-teep-opentrustprotocol] and hence credits go to those who have contributed to it.
We would like to thank the following individuals for their contributions to an earlier version of this specification.
- Brian Witten
Symantec
brian_witten@symantec.com
- Tyler Kim
Solacia
tylerkim@iotrust.kr
- Nick Cook
Arm Ltd.
nicholas.cook@arm.com
- Minho Yoo
IoTrust
minho.yoo@iotrust.kr