Change:
There are lots of changes here. I did stage this as separate commits to some extent, so feel free to cherry-pick. There is one maybe-technical change here. It wasn't clear about the precedence between handshake and authenticator request for extensions. I've chosen to be clear about this and say that if the authenticator request exists, then it is the only thing that matters. That's 8c0b166. I can drop that from the CL and do that separately if you prefer.
Thanks for the comments. The technical clarification you made is the correct one, the request supersedes the handshake for extension choices if present.

Discussion:
This message does not include the TLS record layer and is therefore not encrypted with a handshake key. <del> This message is used to define the parameters in a request for an authenticator. </del> <ins> The CertificateRequest is used to define the parameters in a request for an authenticator.  The definition for TLS 1.3 is: </ins> An opaque string which identifies the certificate request and which will be echoed in the authenticator message.  The

but different parameters.  These messages do not include the TLS record layer and are therefore not encrypted with a handshake key. <ins> 4.1. </ins> Each authenticator is computed using a Handshake Context and Finished MAC Key derived from the TLS session.  These values are derived using an exporter as described in RFC5705 (for TLS 1.2) or TLS13 (for TLS

computed with the extended master secret RFC7627 to avoid key synchronization attacks. <del> The certificate to be used for authentication and any supporting certificates in the chain.  This structure is defined in TLS13, Section 4.4.2. </del> <ins> 4.2. An authenticator is formed from the concatenation of TLS 1.3 TLS13 Certificate, CertificateVerify, and Finished messages. If an authenticator request is present, the extensions used to guide the construction of these messages are taken from the authenticator request.  If there is no authenticator request, the extensions are chosen from the TLS handshake.  That is, the extensions received in a ClientHello (for servers), ServerHello (for clients in TLS 1.2), or EncryptedExtensions (for clients in TLS 1.3). 4.2.1. The certificate to be used for authentication and any supporting certificates in the chain.  This structure is defined in TLS13, Section 4.4.2. </ins> The certificate message contains an opaque string called certificate_request_context, which is extracted from the authenticator request if present.  If no authenticator request is provided, it is zero-length. <del> This message is used to provide explicit proof that an endpoint possesses the private key corresponding to its certificate. </del> <ins> The certificates chosen in the Certificate message MUST conform to the requirements of a Certificate message in the negotiated version of TLS.  In particular, the certificate MUST be valid for the a signature algorithm indicated by the peer in a "signature_algorithms" extension, as described in Section 4.2.3 of TLS13 and Sections 7.4.2 and 7.4.6 of RFC5246. In addition to "signature_algorithms", the "server_name" RFC6066, "certificate_authorities" (Section 4.2.4. of TLS13), or "oid_filters" (Section 4.2.5. of TLS13) extensions are used to guide certificate selection.  These extensions are taken from the authenticator request if present, or the TLS handshake if not. Alternative certificate formats such as RFC7250 Raw Public Keys are not supported in this version of the specification. If an authenticator request was provided, the Certificate message MUST contain only extensions present in the authenticator request. Otherwise, the Certificate message MUST contain only extensions present in the TLS handshake. 4.2.2. This message is used to provide explicit proof that an endpoint possesses the private key corresponding to its certificate.  The definition for TLS 1.3 is: </ins> The algorithm field specifies the signature algorithm used (see Section 4.2.3 of TLS13 for the definition of this field).  The <del> signature is a digital signature using that algorithm.  The signature scheme MUST be a valid signature scheme for TLS 1.3.  This excludes all RSASSA-PKCS1-v1_5 algorithms and ECDSA algorithms that are not supported in TLS 1.3.  If an authenticator request is present, the signature algorithm MUST be chosen from one of the signature schemes in the authenticator request.  Otherwise, the signature algorithm used should be chosen from the "signature_algorithms" extension of the ClientHello used in the connection handshake. </del> <ins> signature is a digital signature using that algorithm. The signature scheme MUST be a valid signature scheme for TLS 1.3. This excludes all RSASSA-PKCS1-v1_5 algorithms and combinations of ECDSA and hash algorithms that are not supported in TLS 1.3. If an authenticator request is present, the signature algorithm MUST be chosen from one of the signature schemes in the authenticator request.  Otherwise, the signature algorithm used should be chosen from the "signature_algorithms" extension sent by the peer in the TLS handshake. </ins> The signature is computed using the over the concatenation of:

A single 0 byte which serves as the separator <del> If the authenticator request is present, the value "Hash(Handshake Context || authenticator request || Certificate)" </del> <ins> The hashed authenticator transcript </ins> <del> If an authenticator request is not present, the value "Hash(Handshake Context || Certificate)" </del> <ins> The authenticator transcript is the hash of the concatenated Handshake Context, authenticator request (if present), and Certificate message: </ins> <del> where Hash is the hash function for the handshake. </del> <ins> "Hash(Handshake Context || authenticator request || Certificate) " </ins> <del> A HMAC over the value Hash(Handshake Context || Certificate || CertificateVerify) if an authenticator is present, or Hash(Handshake Context || authenticator request || Certificate || CertificateVerify) where Hash is the hash function for the handshake, and the HMAC is computed using the hash function from the handshake and the Finished MAC Key as a key. </del> <ins> Where Hash is the hash function negotiated by TLS.  If the authenticator request is not present, it is omitted from this construction (that is, it is zero length). </ins> <del> The certificates chosen in the Certificate message MUST conform to the requirements of a Certificate message in the version of TLS negotiated.  If an authenticator request is present, the signature algorithms used to choose the algorithm are taken from the "signature_algorithms" in the from the authenticator.  If there is no authenticator request, the signature algorithms are chosen from the "signature_algorithms" extension from the ClientHello used in the connection.  This is described in Section 4.2.3 of TLS13 and Sections 7.4.2 and 7.4.6 of RFC5246.  Alternative certificate formats such as RFC7250 Raw Public Keys are not supported.  The "server_name" RFC6066, "certificate_authorities" (Section 4.2.4. of TLS13), or "oid_filters" (Section 4.2.5. of TLS13) extensions are used to guide certificate selection, with the extensions provided in the authenticator request taking precedence over the extensions provided in the connection handshake. </del> <ins> 4.2.3. </ins> <del> If an authenticator request was provided, the Certificate message MUST contain only extensions present in the authenticator request. Otherwise, the Certificate message MUST contain only extensions present in the ClientHello. </del> <ins> A HMAC HMAC over the hashed authenticator transcript, which is the concatenated Handshake Context, authenticator request, Certificate, and CertificateVerify: "Hash(Handshake Context || authenticator request || Certificate || CertificateVerify) " The HMAC is computed using the same hash function using the Finished MAC Key as a key. 4.2.4. An endpoint constructs an authenticator by concatenating serializing the Certificate, CertificateVerify, and Finished as TLS handshake messages and concatenating the octets: </ins> <del> The authenticator message is the concatenation of messages: Certificate || CertificateVerify || Finished </del> <ins> "Certificate || CertificateVerify || Finished " </ins> A given authenticator can be validated by checking the validity of the CertificateVerify message given the authenticator request (if

provide application programming interfaces by which clients and servers may request and verify exported authenticator messages. <del> Notwithstanding the success cases described below, all APIs MUST fail if: </del> <ins> Notwithstanding the success conditions described below, all APIs MUST fail if: </ins> the connection uses a TLS version of 1.1 or earlier, or the connection is TLS 1.2 and the extended master secret RFC7627 was not used <del> Given an established connection, the application SHOULD be able to call the following APIs: </del> <ins> The following sections describes APIs that are considered necessary to implement exported authenticators.  These are informative only. </ins> <del> "request", which takes as input: </del> <ins> 5.1. The "request" API takes as input: </ins> certificate_request_context (from 0 to 255 bytes)

It returns an authenticator request, which is a sequence of octets that includes a CertificateRequest message. <del> "get context", which takes as input </del> <ins> 5.2. The "get context" API takes as input: </ins> authenticator It returns the certificate_request_context. <del> "authenticate", which takes as input: </del> <ins> 5.3. The "authenticate" takes as input: </ins> a set of certificate chains and associated extensions (OCSP, SCT, etc.)

an optional authenticator request <del> It returns the exported authenticator as output.  It is RECOMMENDED that the logic for selecting the certificates and extensions to include in the exporter is implemented in the TLS library. Implementing this in the TLS library lets the implementer take advantage of existing extension and certificate selection logic. </del> <ins> It returns the exported authenticator as a sequence of octets.  It is RECOMMENDED that the logic for selecting the certificates and extensions to include in the exporter is implemented in the TLS library.  Implementing this in the TLS library lets the implementer take advantage of existing extension and certificate selection logic. </ins> It is also possible to implement this API outside of the TLS library using TLS exporters.  This may be preferable in cases where the application does not have access to a TLS library with these APIs or when TLS is handled independently of the application layer protocol. <del> "validate", which takes as input: * an optional authenticator request * an authenticator </del> <ins> 5.4. The "validate" API takes as input: an optional authenticator request an authenticator </ins> It returns the certificate chain and extensions.