Internet-Draft | Attestation in TLS/DTLS | August 2022 |
Tschofenig, et al. | Expires 27 February 2023 | [Page] |
Various attestation technologies have been developed and formats have been standardized. Examples include the Entity Attestation Token (EAT) and Trusted Platform Modules (TPMs). Once attestation information has been produced on a device it needs to be communicated to a relying party. This information exchange may happen at different layers in the protocol stack.¶
This specification provides a generic way of passing attestation information in the TLS handshake.¶
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 27 February 2023.¶
Copyright (c) 2022 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 Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
This document may contain material from IETF Documents or IETF Contributions published or made publicly available before November 10, 2008. The person(s) controlling the copyright in some of this material may not have granted the IETF Trust the right to allow modifications of such material outside the IETF Standards Process. Without obtaining an adequate license from the person(s) controlling the copyright in such materials, this document may not be modified outside the IETF Standards Process, and derivative works of it may not be created outside the IETF Standards Process, except to format it for publication as an RFC or to translate it into languages other than English.¶
Attestation is the process by which an entity produces evidence about itself that another party can use to evaluate the trustworthiness of that entity. One format of encoding evidence is standardized with the Entity Attestation Token (EAT) [I-D.ietf-rats-eat] but there are other formats, such as attestation produced by Trusted Platform Modules (TPMs) [TPM1.2] [TPM2.0].¶
This specification defines how to convey attestation information in the TLS handshake with different encodings being supported. This specification standardizes two attestation formats - EAT and TPM-based attestation.¶
Note: This initial version of the specification focuses on EAT-based attestation. Future versions will also define TPM-based attestation.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].¶
The following terms are used in this document:¶
The Remote Attestation Procedures (RATS) architecture [I-D.ietf-rats-architecture] defines two types of interaction models for attestation, namely the passport model and the background-check model. The subsections below explain the difference in their interactions.¶
To simplify the description in this section we focus on the use case where the client is the attester and the server is the relying party. Hence, only the client_attestation_type extension is discussed. The verifier is not shown in the diagrams. The described mechanism allows the roles to be reversed.¶
As typical with new features in TLS, the client indicates support for the new extension in the ClientHello. The client_attestation_type extension lists the supported attestation formats. The server, if it supports the extension and one of the attestation formats, it confirms the use of the feature.¶
Note: The newly introduced extension also allows nonces to be exchanged. Those nonces are used for guaranteeing freshness of the generated attestation tokens.¶
When the attestation extension is successfully negotiated, the content of the Certificate message is replaced with attestation information described in this document.¶
A peer has to demonstrate possession of the private key via the CertificateVerify message. While attestation information is signed by the attester, it typically does not contain a public key (for example via a proof-of-possession key claim [RFC8747]).¶
The attestation service on a device, which creates the attestation information, is unaware of the TLS exchange and the attestation service does not directly sign externally provided data, as it would be required to compute the CertificateVerify message.¶
Hence, the following steps happen:¶
The client generates the TIK, which are referred here as skT and pkT, for example using the following API call:¶
key_id = GenerateKeyPair(alg_id)¶
The private key would be created and stored by the crypto hardware supported by the device (rather than the TLS client in software).¶
Next, the attestation service needs to be triggered to create a Platform Attestation Token (PAT) and the Key Attestation Token (KAT). The Key Attestation Token (KAT) includes a claim containing the public key of the TIK (pkT). The KAT is then signed with the Key Attestation Key (KAK).¶
To ensure freshness of the PAT and the KAT a nonce is provided by the relying party / verifier. Here is the symbolic API call to request a KAT and a PAT, which are concatinated together as the CAB.¶
cab = createCAB(key_id, nonce)¶
Once the Certificate message containing the CAB has been sent, the CertificateVerify has to be created and it requires access to the private key. The signature operation uses the private key of the TIK (skT).¶
The recipient of the Certificate and the CertificateVerify messages first extracts the PAT and the KAT from the Certificate message. The PAT and the KAT need to be conveyed to the verification service, whereby the following checks are made:¶
Once all these steps are completed, the verifier produces the attestation result and includes (if needed) the TIK public key.¶
In the subsections we will look at how the two message pattern fit align with the TLS exchange.¶
The passport model is described in Section 5.1 of [I-D.ietf-rats-architecture]. A key feature of this model is that the attester interacts with the verification service before initiating the TLS exchange. It sends evidence to the verification service, which then returns the attestation result (including the TIK public key).¶
The example exchange in Figure 1 shows how a client provides attestation to the server by utilizing EAT tokens [I-D.ietf-rats-eat]. With the ClientHello the TLS client needs to indicate that it supports the EAT-based attestation format. The TLS server acknowledges support for this attestation type in the EncryptedExtensions message.¶
In the Certificate message the TLS client transmits the attestation result to the TLS server, in form a CAB (i.e. a concatinated PAT and KAT).¶
The TLS client then creates the CertificateVerify message by asking the crypto service to sign the TLS handshake message transcript with the TIK private key. The TLS server then verifies this message by utilizing the TIK public key.¶
The background check model is described in Section 5.2 of [I-D.ietf-rats-architecture].¶
The message exchange of the background check model differs from the passport model because the TLS server needs to provide a nonce in the ServerHello to the TLS client so that the attestation service can feed the nonce into the generation of the PAT. The TLS server, when receiving the CAB, will have to contact the verification service.¶
This document defines a new extension to carry the attestation types. The extension is conceptually similiar to the 'server_certificate_type' and the 'server_certificate_type' defined by [RFC7250].¶
The Certificate payload is used as a container, as shown in Figure 4. The shown Certificate structure is an adaptation of [RFC8446].¶
To simplify parsing of an EAT-based attestation payload, the PAT and the KAT are typed.¶
This specification extends the ClientHello and the EncryptedExtensions messages, according to [RFC8446].¶
The high-level message exchange in Figure 5 shows the client_attestation_type and server_attestation_type extensions added to the ClientHello and the EncryptedExtensions messages.¶
In order to indicate the support of attestation types, clients include the client_attestation_type and/or the server_attestation_type extensions in the ClientHello.¶
The client_attestation_type extension in the ClientHello indicates the attestation types the client is able to provide to the server, when requested using a CertificateRequest message.¶
The server_attestation_type extension in the ClientHello indicates the types of attestation types the client is able to process when provided by the server in a subsequent Certificate payload.¶
The client_attestation_type and server_attestation_type extensions sent in the ClientHello each carry a list of supported attestation types, sorted by client preference. When the client supports only one attestation type, it is a list containing a single element.¶
The TLS client MUST omit attestation types from the client_attestation_type extension in the ClientHello if it is not equipped with the corresponding attestation functionality, or if it is not configured to use it with the given TLS server. If the client has no attestation types to send in the ClientHello it MUST omit the client_attestation_type extension in the ClientHello.¶
The TLS client MUST omit attestation types from the server_attestation_type extension in the ClientHello if it is not equipped with the attestation verification functionality. If the client has no attestation types to send in the ClientHello it MUST omit the entire server_attestation_type extension from the ClientHello.¶
If the server receives a ClientHello that contains the client_attestation_type extension and/or the server_attestation_type extension, then three outcomes are possible:¶
The client_attestation_type extension in the ClientHello indicates the attestation types the client is able to provide to the server, when requested using a certificate_request message. If the TLS server wants to request a certificate from the client (via the certificate_request message), it MUST include the client_attestation_type extension in the EncryptedExtensions. This client_attestation_type extension in the EncryptedExtensions then indicates the content the client is requested to provide in a subsequent Certificate payload. The value conveyed in the client_attestation_type extension MUST be selected from one of the values provided in the client_attestation_type extension sent in the client hello. The server MUST also include a certificate_request payload in the EncryptedExtensions message.¶
If the server does not send a certificate_request payload (for example, because client authentication happens at the application layer or no client authentication is required) or none of the attestation types supported by the client (as indicated in the client_attestation_type extension in the ClientHello) match the server-supported attestation types, then the client_attestation_type payload in the ServerHello MUST be omitted.¶
The server_attestation_type extension in the ClientHello indicates the types of attestation types the client is able to process when provided by the server in a subsequent Certificate message. With the server_attestation_type extension in the EncryptedExtensions, the TLS server indicates the attestation type carried in the Certificate payload. Note that only a single value is permitted in the server_attestation_type extension when carried in the EncryptedExtensions message.¶
The Trusted Platform Module (TPM) [TPM2.0] is one type of hardware RoT. TPMs offer the ability to produce both key and platform attestation tokens.¶
Platform Configuration Registers (PCRs) represent the core mechanism in TPMs for measuring and conveying information about the platform state via remote attestation. While specifications exist for assigning individual PCRs to specific software components, the choice of which combination of PCRs to include for any attestation procedure (and which hashing algorithm to use) is left to the parties involved. The agreement over and the configuration of the PCR selection falls outside the scope of this specification and is thus expected to occur out-of-band.¶
The attestation evidence is produced through the TPM2_Quote operation. The evidence along with all other relevant metadata is transmitted in a format derived from the [WebAuthn] Attestation Statements. This format and the workflows around it are defined below.¶
The TPM Platform Attestation Statement is a modified version of the TPM Attestation Statement Format, which covers key attestation tokens.¶
x5c: A certificate for the PAK, followed by its certificate chain. The contents of the array SHOULD follow the same requirements as the x5chain header parameter defined in Section 2 of [I-D.ietf-cose-x509], with the sole difference that a CBOR array is also used when only pakCert is present.¶
Generate a signature using the operation specified in Part 3, Section 18.4 of [TPM2.0], using the PAK as the signing key, the out-of-band agreed-upon PCR selection. Freshness of the attestation is given by the nonce provided by the relying party. The nonce is included as qualified data to the TPM2_Quote operation, concatenated with an identifier of the platform being attested, as shown below:¶
_extraData_ = _platformUuid_ || _relyingPartyNonce_¶
The platform identifier is a 16-bytes long UUID, with the remaining data representing the nonce. The UUID is intended to help the verifier link the platform with its expected reference values.¶
Set the attestInfo field to the quoted PCR selection produced by the operation, and sig to the signature generated above.¶
The inputs to the verification procedure are as follows:¶
The steps for verifying the attestation:¶
Verify that attestInfo is valid:¶
Attesting to the provenance and properties of a key is possible through a TPM if the key resides on the TPM. The TPM 2.0 key attestation mechanism used in this specification is TPM2_Certify. The workflow for generating the evidence and assessing them, as well as the format used to transport them, follows closely the TPM Attestation Statement defined in Section 8.3 of [WebAuthn], with one modification:¶
The WebAuthn specification [WebAuthn] uses the term AIK to refer to the signing key. In this specification we use the term KAK instead. The credential (i.e., attested) key is in our case the TIK.¶
TBD: Create new registry for attestation types.¶
RFC EDITOR: PLEASE REMOVE THE THIS SECTION¶
The discussion list for the IETF TLS working group is located at the e-mail address tls@ietf.org. Information on the group and information on how to subscribe to the list is at https://www1.ietf.org/mailman/listinfo/tls¶
Archives of the list can be found at: https://www.ietf.org/mail-archive/web/tls/current/index.html¶