<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc2629 version 1.0.30 -->

<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
]>

<?rfc rfcedstyle="yes"?>
<?rfc toc="yes"?>
<?rfc tocindent="yes"?>
<?rfc sortrefs="yes"?>
<?rfc symrefs="yes"?>
<?rfc strict="yes"?>
<?rfc comments="yes"?>
<?rfc inline="yes"?>
<?rfc text-list-symbols="-o*+"?>
<?rfc docmapping="yes"?>

<rfc ipr="pre5378Trust200902" docName="draft-ietf-tls-tls13-14" category="std" obsoletes="5077, 5246, 5746" updates="4492, 6066, 6961">

  <front>
    <title abbrev="TLS">The Transport Layer Security (TLS) Protocol Version 1.3</title>

    <author initials="E." surname="Rescorla" fullname="Eric Rescorla">
      <organization>RTFM, Inc.</organization>
      <address>
        <email>ekr@rtfm.com</email>
      </address>
    </author>

    <date year="2016" month="July" day="11"/>

    <area>General</area>
    
    <keyword>Internet-Draft</keyword>

    <abstract>


<t>This document specifies version 1.3 of the Transport Layer Security
(TLS) protocol.  TLS allows client/server applications to
communicate over the Internet in a way that is designed to prevent eavesdropping,
tampering, and message forgery.</t>



    </abstract>


  </front>

  <middle>


<section anchor="introduction" title="Introduction">

<t>DISCLAIMER: This is a WIP draft of TLS 1.3 and has not yet seen significant security analysis.</t>

<t>RFC EDITOR: PLEASE REMOVE THE FOLLOWING PARAGRAPH
The source for this draft is maintained in GitHub. Suggested changes
should be submitted as pull requests at
https://github.com/tlswg/tls13-spec. Instructions are on that page as
well. Editorial changes can be managed in GitHub, but any substantive
change should be discussed on the TLS mailing list.</t>

<t>The primary goal of TLS is to provide a secure channel
between two communicating peers. Specifically, the channel should
provide the following properties.</t>

<t><list style="symbols">
  <t>Authentication: The server side of the channel is always
authenticated; the client side is optionally
authenticated. Authentication can happen via asymmetric cryptography
(e.g., RSA <xref target="RSA"/>, ECDSA <xref target="ECDSA"/>) or a pre-shared symmetric key.</t>
  <t>Confidentiality: Data sent over the channel is not visible to
attackers.</t>
  <t>Integrity: Data sent over the channel cannot be modified by attackers.</t>
</list></t>

<t>These properties should be true even in the face of an attacker who has complete
control of the network, as described in <xref target="RFC3552"/>.
See <xref target="security-analysis"/> for a more complete statement of the relevant security
properties.</t>

<t>TLS consists of two primary components:</t>

<t><list style="symbols">
  <t>A handshake protocol (<xref target="handshake-protocol"/>) which authenticates the communicating parties,
negotiates cryptographic modes and parameters, and establishes
shared keying material. The handshake protocol is designed to
resist tampering; an active attacker should not be able to force
the peers to negotiate different parameters than they would
if the connection were not under attack.</t>
  <t>A record protocol (<xref target="record-protocol"/>) which uses the parameters established by the
handshake protocol to protect traffic between the communicating
peers. The record protocol divides traffic up into a series of
records, each of which is independently protected using the
traffic keys.</t>
</list></t>

<t>TLS is application protocol independent; higher-level protocols can
layer on top of TLS transparently. The TLS standard, however, does not
specify how protocols add security with TLS; the decisions on how to
initiate TLS handshaking and how to interpret the authentication
certificates exchanged are left to the judgment of the designers and
implementors of protocols that run on top of TLS.</t>

<t>This document defines TLS version 1.3. While TLS 1.3 is not directly
compatible with previous versions, all versions of TLS incorporate a
versioning mechanism which allows clients and servers to interoperably
negotiate a common version if one is supported.</t>

<section anchor="conventions-and-terminology" title="Conventions and Terminology">

<t>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 <xref target="RFC2119"/>.</t>

<t>The following terms are used:</t>

<t>client: The endpoint initiating the TLS connection.</t>

<t>connection: A transport-layer connection between two endpoints.</t>

<t>endpoint: Either the client or server of the connection.</t>

<t>handshake: An initial negotiation between client and server that establishes the parameters of their transactions.</t>

<t>peer: An endpoint. When discussing a particular endpoint, “peer” refers to the endpoint that is remote to the primary subject of discussion.</t>

<t>receiver: An endpoint that is receiving records.</t>

<t>sender: An endpoint that is transmitting records.</t>

<t>session: An association between a client and a server resulting from a handshake.</t>

<t>server: The endpoint which did not initiate the TLS connection.</t>

</section>
<section anchor="major-differences-from-tls-12" title="Major Differences from TLS 1.2">

<t>draft-14</t>

<t><list style="symbols">
  <t>Allow cookies to be longer (*)</t>
  <t>Remove the “context” from EarlyDataIndication as it was undefined
and nobody used it (*)</t>
  <t>Remove 0-RTT EncryptedExtensions and replace the ticket_age extension
with an obfuscated version. Also necessitates a change to
NewSessionTicket (*).</t>
  <t>Move the downgrade sentinel to the end of ServerHello.Random
to accomodate tlsdate (*).</t>
  <t>Define ecdsa_sha1 (*).</t>
  <t>Allow resumption even after fatal alerts. This matches current
practice.</t>
  <t>Remove non-closure warning alerts. Require treating unknown alerts as
fatal.</t>
  <t>Make the rules for accepting 0-RTT less restrictive.</t>
  <t>Clarify 0-RTT backward-compatibility rules.</t>
  <t>Clarify how 0-RTT and PSK identities interact.</t>
  <t>Add a section describing the data limits for each cipher.</t>
  <t>Major editorial restructuring.</t>
  <t>Replace the Security Analysis section with a WIP draft.</t>
</list></t>

<t>(*) indicates changes to the wire protocol which may require implementations
    to update.</t>

<t>draft-13</t>

<t><list style="symbols">
  <t>Allow server to send SupportedGroups.</t>
  <t>Remove 0-RTT client authentication</t>
  <t>Remove (EC)DHE 0-RTT.</t>
  <t>Flesh out 0-RTT PSK mode and shrink EarlyDataIndication</t>
  <t>Turn PSK-resumption response into an index to save room</t>
  <t>Move CertificateStatus to an extension</t>
  <t>Extra fields in NewSessionTicket.</t>
  <t>Restructure key schedule and add a resumption_context value.</t>
  <t>Require DH public keys and secrets to be zero-padded to the size
of the group.</t>
  <t>Remove the redundant length fields in KeyShareEntry.</t>
  <t>Define a cookie field for HRR.</t>
</list></t>

<t>draft-12</t>

<t><list style="symbols">
  <t>Provide a list of the PSK cipher suites.</t>
  <t>Remove the ability for the ServerHello to have no extensions
(this aligns the syntax with the text).</t>
  <t>Clarify that the server can send application data after its first
flight (0.5 RTT data)</t>
  <t>Revise signature algorithm negotiation to group hash, signature
algorithm, and curve together. This is backwards compatible.</t>
  <t>Make ticket lifetime mandatory and limit it to a week.</t>
  <t>Make the purpose strings lower-case. This matches how people
are implementing for interop.</t>
  <t>Define exporters.</t>
  <t>Editorial cleanup</t>
</list></t>

<t>draft-11</t>

<t><list style="symbols">
  <t>Port the CFRG curves &amp; signatures work from RFC4492bis.</t>
  <t>Remove sequence number and version from additional_data, which
is now empty.</t>
  <t>Reorder values in HkdfLabel.</t>
  <t>Add support for version anti-downgrade mechanism.</t>
  <t>Update IANA considerations section and relax some of the policies.</t>
  <t>Unify authentication modes. Add post-handshake client authentication.</t>
  <t>Remove early_handshake content type. Terminate 0-RTT data with
an alert.</t>
  <t>Reset sequence number upon key change (as proposed by Fournet et al.)</t>
</list></t>

<t>draft-10</t>

<t><list style="symbols">
  <t>Remove ClientCertificateTypes field from CertificateRequest
and add extensions.</t>
  <t>Merge client and server key shares into a single extension.</t>
</list></t>

<t>draft-09</t>

<t><list style="symbols">
  <t>Change to RSA-PSS signatures for handshake messages.</t>
  <t>Remove support for DSA.</t>
  <t>Update key schedule per suggestions by Hugo, Hoeteck, and Bjoern Tackmann.</t>
  <t>Add support for per-record padding.</t>
  <t>Switch to encrypted record ContentType.</t>
  <t>Change HKDF labeling to include protocol version and value lengths.</t>
  <t>Shift the final decision to abort a handshake due to incompatible
certificates to the client rather than having servers abort early.</t>
  <t>Deprecate SHA-1 with signatures.</t>
  <t>Add MTI algorithms.</t>
</list></t>

<t>draft-08</t>

<t><list style="symbols">
  <t>Remove support for weak and lesser used named curves.</t>
  <t>Remove support for MD5 and SHA-224 hashes with signatures.</t>
  <t>Update lists of available AEAD cipher suites and error alerts.</t>
  <t>Reduce maximum permitted record expansion for AEAD from 2048 to 256 octets.</t>
  <t>Require digital signatures even when a previous configuration is used.</t>
  <t>Merge EarlyDataIndication and KnownConfiguration.</t>
  <t>Change code point for server_configuration to avoid collision with
server_hello_done.</t>
  <t>Relax certificate_list ordering requirement to match current practice.</t>
</list></t>

<t>draft-07</t>

<t><list style="symbols">
  <t>Integration of semi-ephemeral DH proposal.</t>
  <t>Add initial 0-RTT support.</t>
  <t>Remove resumption and replace with PSK + tickets.</t>
  <t>Move ClientKeyShare into an extension.</t>
  <t>Move to HKDF.</t>
</list></t>

<t>draft-06</t>

<t><list style="symbols">
  <t>Prohibit RC4 negotiation for backwards compatibility.</t>
  <t>Freeze &amp; deprecate record layer version field.</t>
  <t>Update format of signatures with context.</t>
  <t>Remove explicit IV.</t>
</list></t>

<t>draft-05</t>

<t><list style="symbols">
  <t>Prohibit SSL negotiation for backwards compatibility.</t>
  <t>Fix which MS is used for exporters.</t>
</list></t>

<t>draft-04</t>

<t><list style="symbols">
  <t>Modify key computations to include session hash.</t>
  <t>Remove ChangeCipherSpec.</t>
  <t>Renumber the new handshake messages to be somewhat more
consistent with existing convention and to remove a duplicate
registration.</t>
  <t>Remove renegotiation.</t>
  <t>Remove point format negotiation.</t>
</list></t>

<t>draft-03</t>

<t><list style="symbols">
  <t>Remove GMT time.</t>
  <t>Merge in support for ECC from RFC 4492 but without explicit
curves.</t>
  <t>Remove the unnecessary length field from the AD input to AEAD
ciphers.</t>
  <t>Rename {Client,Server}KeyExchange to {Client,Server}KeyShare.</t>
  <t>Add an explicit HelloRetryRequest to reject the client’s.</t>
</list></t>

<t>draft-02</t>

<t><list style="symbols">
  <t>Increment version number.</t>
  <t>Rework handshake to provide 1-RTT mode.</t>
  <t>Remove custom DHE groups.</t>
  <t>Remove support for compression.</t>
  <t>Remove support for static RSA and DH key exchange.</t>
  <t>Remove support for non-AEAD ciphers.</t>
</list></t>

</section>
</section>
<section anchor="protocol-overview" title="Protocol Overview">

<t>The cryptographic parameters of the session state are produced by the
TLS handshake protocol. When a TLS client and server first start
communicating, they agree on a protocol version, select cryptographic
algorithms, optionally authenticate each other, and establish shared
secret keying material. Once the handshake is complete, the peers
use the established keys to protect application layer traffic.</t>

<t>TLS supports three basic key exchange modes:</t>

<t><list style="symbols">
  <t>Diffie-Hellman (of both the finite field and elliptic curve
varieties).</t>
  <t>A pre-shared symmetric key (PSK)</t>
  <t>A combination of a symmetric key and Diffie-Hellman</t>
</list></t>

<t>Which mode is used depends on the negotiated cipher suite. Conceptually,
the handshake establishes three secrets which are used to derive all the
keys.</t>

<t><xref target="tls-full"/> below shows the basic full TLS handshake:</t>

<figure title="Message flow for full TLS Handshake" anchor="tls-full"><artwork><![CDATA[
       Client                                               Server

Key  ^ ClientHello
Exch | + key_share*
     v + pre_shared_key*         -------->
                                                       ServerHello  ^ Key
                                                      + key_share*  | Exch
                                                 + pre_shared_key*  v
                                             {EncryptedExtensions}  ^  Server
                                             {CertificateRequest*}  v  Params
                                                    {Certificate*}  ^
                                              {CertificateVerify*}  | Auth
                                                        {Finished}  v
                                 <--------     [Application Data*]
     ^ {Certificate*}
Auth | {CertificateVerify*}
     v {Finished}                -------->
       [Application Data]        <------->      [Application Data]

              +  Indicates extensions sent in the
                 previously noted message.

              *  Indicates optional or situation-dependent
                 messages that are not always sent.

              {} Indicates messages protected using keys
                 derived from handshake_traffic_secret.

              [] Indicates messages protected using keys
                 derived from traffic_secret_N
]]></artwork></figure>

<t>The handshake can be thought of as having three phases, indicated
in the diagram above.</t>

<t><list style="symbols">
  <t>Key Exchange: Establish shared keying material and select the
 cryptographic parameters. Everything after this phase is
 encrypted.</t>
  <t>Server Parameters: Establish other handshake parameters.
 (whether the client is authenticated, application layer protocol support, etc.)</t>
  <t>Authentication: Authenticate the server (and optionally the client)
 and provide key confirmation and handshake integrity.</t>
</list></t>

<t>In the Key Exchange phase, the client sends the ClientHello
(<xref target="client-hello"/>) message, which contains a random nonce
(ClientHello.random), its offered protocol version, cipher suite, and
extensions, and in general either one or more Diffie-Hellman key shares (in the
“key_share” extension <xref target="key-share"/>), one or more pre-shared key labels (in the
“pre_shared_key” extension <xref target="pre-shared-key-extension"/>), or both.</t>

<t>The server processes the ClientHello and determines the appropriate
cryptographic parameters for the connection. It then responds with its
own ServerHello which indicates the negotiated connection
parameters. [<xref target="server-hello"/>].  The combination of the ClientHello
and the ServerHello determines the shared keys. If either a pure
(EC)DHE or (EC)DHE-PSK cipher suite is in use, then the ServerHello
will contain a “key_share” extension with the server’s ephemeral
Diffie-Hellman share which MUST be in the same group as one of the
client’s shares. If a pure PSK or an (EC)DHE-PSK cipher suite is
negotiated, then the ServerHello will contain a “pre_shared_key”
extension indicating which of the client’s offered PSKs was selected.</t>

<t>The server then sends two messages to establish the Server Parameters:</t>

<t><list style="hanging">
  <t hangText='EncryptedExtensions.'>
  responses to any extensions which are not required in order to
determine the cryptographic parameters. [<xref target="encrypted-extensions"/>]</t>
  <t hangText='CertificateRequest.'>
  if certificate-based client authentication is desired, the
desired parameters for that certificate. This message will
be omitted if client authentication is not desired.</t>
</list></t>

<t>Finally, the client and server exchange Authentication messages. TLS
uses the same set of messages every time that authentication is needed.
Specifically:</t>

<t><list style="hanging">
  <t hangText='Certificate.'>
  the certificate of the endpoint. This message is omitted if the
server is not authenticating with a certificate (i.e.,
with PSK or (EC)DHE-PSK cipher suites). Note that if raw public keys
<xref target="RFC7250"/> or the cached information extension
<xref target="I-D.ietf-tls-cached-info"/> are in use, then this message
will not contain a certificate but rather some other value
corresponding to the server’s long-term key.
[<xref target="certificate"/>]</t>
  <t hangText='CertificateVerify.'>
  a signature over the entire handshake using the public key
in the Certificate message. This message is omitted if the
server is not authenticating via a certificate (i.e.,
with PSK or (EC)DHE-PSK cipher suites). [<xref target="certificate-verify"/>]</t>
  <t hangText='Finished.'>
  a MAC (Message Authentication Code) over the entire handshake.
This message provides key confirmation, binds the endpoint’s identity
to the exchanged keys, and in PSK mode
also authenticates the handshake. [<xref target="finished"/>]</t>
</list></t>

<t>Upon receiving the server’s messages, the client responds with its Authentication
messages, namely Certificate and CertificateVerify (if requested), and Finished.</t>

<t>At this point, the handshake is complete, and the client and server may exchange
application layer data. Application data MUST NOT be sent prior to sending the
Finished message. Note that while the server may send application data
prior to receiving the client’s Authentication messages, any data sent at
that point is, of course, being sent to an unauthenticated peer.</t>

<section anchor="incorrect-dhe-share" title="Incorrect DHE Share">

<t>If the client has not provided a sufficient “key_share” extension (e.g. it
includes only DHE or ECDHE groups unacceptable or unsupported by the
server), the server corrects the mismatch with a HelloRetryRequest and
the client will need to restart the handshake with an appropriate
“key_share” extension, as shown in Figure 2.
If no common cryptographic parameters can be negotiated,
the server will send a “handshake_failure” or “insufficient_security”
fatal alert (see <xref target="alert-protocol"/>).</t>

<figure title="Message flow for a full handshake with mismatched parameters" anchor="tls-restart"><artwork><![CDATA[
         Client                                               Server

         ClientHello
           + key_share             -------->
                                   <--------       HelloRetryRequest

         ClientHello
           + key_share             -------->
                                                         ServerHello
                                                         + key_share
                                               {EncryptedExtensions}
                                               {CertificateRequest*}
                                                      {Certificate*}
                                                {CertificateVerify*}
                                                          {Finished}
                                   <--------     [Application Data*]
         {Certificate*}
         {CertificateVerify*}
         {Finished}                -------->
         [Application Data]        <------->     [Application Data]
]]></artwork></figure>

<t>Note: The handshake transcript includes the initial
ClientHello/HelloRetryRequest exchange; it is not reset with the new
ClientHello.</t>

<t>TLS also allows several optimized variants of the basic handshake, as
described in the following sections.</t>

</section>
<section anchor="resumption-and-psk" title="Resumption and Pre-Shared Key (PSK)">

<t>Although TLS PSKs can be established out of band,
PSKs can also be established in a previous session and
then reused (“session resumption”). Once a handshake has completed, the server can
send the client a PSK identity which corresponds to a key derived from
the initial handshake (See <xref target="NewSessionTicket"/>). The client
can then use that PSK identity in future handshakes to negotiate use
of the PSK. If the server accepts it, then the security context of the
new connection is tied to the original connection. In TLS 1.2 and
below, this functionality was provided by “session IDs” and
“session tickets” <xref target="RFC5077"/>. Both mechanisms are obsoleted in TLS
1.3.</t>

<t>PSK cipher suites can either use PSK in combination with
an (EC)DHE exchange in order to provide forward secrecy in combination
with shared keys, or can use PSKs alone, at the cost of losing forward
secrecy.</t>

<t><xref target="tls-resumption-psk"/> shows a pair of handshakes in which the first establishes
a PSK and the second uses it:</t>

<figure title="Message flow for resumption and PSK" anchor="tls-resumption-psk"><artwork><![CDATA[
       Client                                               Server

Initial Handshake:
       ClientHello
        + key_share              -------->
                                                       ServerHello
                                                       + key_share
                                             {EncryptedExtensions}
                                             {CertificateRequest*}
                                                    {Certificate*}
                                              {CertificateVerify*}
                                                        {Finished}
                                 <--------     [Application Data*]
       {Certificate*}
       {CertificateVerify*}
       {Finished}                -------->
                                 <--------      [NewSessionTicket]
       [Application Data]        <------->      [Application Data]


Subsequent Handshake:
       ClientHello
         + pre_shared_key
         + key_share*            -------->
                                                       ServerHello
                                                  + pre_shared_key
                                                      + key_share*
                                             {EncryptedExtensions}
                                                        {Finished}
                                 <--------     [Application Data*]
       {Finished}                -------->
       [Application Data]        <------->      [Application Data]
]]></artwork></figure>

<t>As the server is authenticating via a PSK, it does not send a
Certificate or a CertificateVerify. When a client offers resumption
via PSK it SHOULD also supply a “key_share” extension to the server as well
to allow the server to decline resumption and fall back to a full handshake, if needed.
A “key_share” extension MUST also be sent if the client is attempting to
negotiate an (EC)DHE-PSK cipher suite.</t>

</section>
<section anchor="zero-rtt-data" title="Zero-RTT Data">

<t>When resuming via a PSK with an appropriate ticket (i.e., one with
the “allow_early_data” flag), clients can also send data on their first
flight (“early data”). This data is encrypted solely under keys
derived using the first offered PSK as the static secret.  As shown in
<xref target="tls-0-rtt"/>, the Zero-RTT data is just added to the 1-RTT handshake
in the first flight. The rest of the handshake uses the same messages.</t>

<figure title="Message flow for a zero round trip handshake" anchor="tls-0-rtt"><artwork><![CDATA[
         Client                                               Server

         ClientHello
           + early_data
           + pre_shared_key
           + key_share*
         (Finished)
         (Application Data*)
         (end_of_early_data)       -------->
                                                         ServerHello
                                                        + early_data
                                                    + pre_shared_key
                                                        + key_share*
                                               {EncryptedExtensions}
                                               {CertificateRequest*}
                                                          {Finished}
                                   <--------     [Application Data*]
         {Certificate*}
         {CertificateVerify*}
         {Finished}                -------->

         [Application Data]        <------->      [Application Data]

               *  Indicates optional or situation-dependent
                  messages that are not always sent.

               () Indicates messages protected using keys
                  derived from early_traffic_secret.

               {} Indicates messages protected using keys
                  derived from handshake_traffic_secret.

               [] Indicates messages protected using keys
                  derived from traffic_secret_N
]]></artwork></figure>

<t>[[OPEN ISSUE: Should it be possible to combine 0-RTT with the
server authenticating via a signature
https://github.com/tlswg/tls13-spec/issues/443]]</t>

<t>IMPORTANT NOTE: The security properties for 0-RTT data (regardless of
the cipher suite) are weaker than those for other kinds of TLS data.
Specifically:</t>

<t><list style="numbers">
  <t>This data is not forward secret, because it is encrypted solely
with the PSK.</t>
  <t>There are no guarantees of non-replay between connections.
Unless the server takes special measures outside those provided by TLS,
the server has no guarantee that the same
0-RTT data was not transmitted on multiple 0-RTT connections
(See <xref target="replay-time"/> for more details).
This is especially relevant if the data is authenticated either
with TLS client authentication or inside the application layer
protocol. However, 0-RTT data cannot be duplicated within a connection (i.e., the server
will not process the same data twice for the same connection) and
an attacker will not be able to make 0-RTT data appear to be
1-RTT data (because it is protected with different keys.)</t>
</list></t>

<t>The remainder of this document provides a detailed description of TLS.</t>

</section>
</section>
<section anchor="presentation-language" title="Presentation Language">

<t>This document deals with the formatting of data in an external representation.
The following very basic and somewhat casually defined presentation syntax will
be used. The syntax draws from several sources in its structure. Although it
resembles the programming language “C” in its syntax and XDR <xref target="RFC4506"/> in
both its syntax and intent, it would be risky to draw too many parallels. The
purpose of this presentation language is to document TLS only; it has no
general application beyond that particular goal.</t>

<section anchor="basic-block-size" title="Basic Block Size">

<t>The representation of all data items is explicitly specified. The basic data
block size is one byte (i.e., 8 bits). Multiple byte data items are
concatenations of bytes, from left to right, from top to bottom. From the byte
stream, a multi-byte item (a numeric in the example) is formed (using C
notation) by:</t>

<figure><artwork><![CDATA[
   value = (byte[0] << 8*(n-1)) | (byte[1] << 8*(n-2)) |
           ... | byte[n-1];
]]></artwork></figure>

<t>This byte ordering for multi-byte values is the commonplace network byte order
or big-endian format.</t>

</section>
<section anchor="miscellaneous" title="Miscellaneous">

<t>Comments begin with “/*” and end with “*/”.</t>

<t>Optional components are denoted by enclosing them in “[[ ]]” double
brackets.</t>

<t>Single-byte entities containing uninterpreted data are of type
opaque.</t>

</section>
<section anchor="vectors" title="Vectors">

<t>A vector (single-dimensioned array) is a stream of homogeneous data elements.
The size of the vector may be specified at documentation time or left
unspecified until runtime. In either case, the length declares the number of
bytes, not the number of elements, in the vector. The syntax for specifying a
new type, T’, that is a fixed- length vector of type T is</t>

<figure><artwork><![CDATA[
   T T'[n];
]]></artwork></figure>

<t>Here, T’ occupies n bytes in the data stream, where n is a multiple of the size
of T.  The length of the vector is not included in the encoded stream.</t>

<t>In the following example, Datum is defined to be three consecutive bytes that
the protocol does not interpret, while Data is three consecutive Datum,
consuming a total of nine bytes.</t>

<figure><artwork><![CDATA[
   opaque Datum[3];      /* three uninterpreted bytes */
   Datum Data[9];        /* 3 consecutive 3 byte vectors */
]]></artwork></figure>

<t>Variable-length vectors are defined by specifying a subrange of legal lengths,
inclusively, using the notation &lt;floor..ceiling&gt;. When these are encoded, the
actual length precedes the vector’s contents in the byte stream. The length
will be in the form of a number consuming as many bytes as required to hold the
vector’s specified maximum (ceiling) length. A variable-length vector with an
actual length field of zero is referred to as an empty vector.</t>

<figure><artwork><![CDATA[
   T T'<floor..ceiling>;
]]></artwork></figure>

<t>In the following example, mandatory is a vector that must contain between 300
and 400 bytes of type opaque. It can never be empty. The actual length field
consumes two bytes, a uint16, which is sufficient to represent the value 400
(see <xref target="numbers"/>). On the other hand, longer can represent up to 800 bytes of
data, or 400 uint16 elements, and it may be empty. Its encoding will include a
two-byte actual length field prepended to the vector. The length of an encoded
vector must be an even multiple of the length of a single element (for example,
a 17-byte vector of uint16 would be illegal).</t>

<figure><artwork><![CDATA[
   opaque mandatory<300..400>;
         /* length field is 2 bytes, cannot be empty */
   uint16 longer<0..800>;
         /* zero to 400 16-bit unsigned integers */
]]></artwork></figure>

</section>
<section anchor="numbers" title="Numbers">

<t>The basic numeric data type is an unsigned byte (uint8). All larger numeric
data types are formed from fixed-length series of bytes concatenated as
described in <xref target="basic-block-size"/> and are also unsigned. The following numeric
types are predefined.</t>

<figure><artwork><![CDATA[
   uint8 uint16[2];
   uint8 uint24[3];
   uint8 uint32[4];
   uint8 uint64[8];
]]></artwork></figure>

<t>All values, here and elsewhere in the specification, are stored in network byte
(big-endian) order; the uint32 represented by the hex bytes 01 02 03 04 is
equivalent to the decimal value 16909060.</t>

<t>Note that in some cases (e.g., DH parameters) it is necessary to represent
integers as opaque vectors. In such cases, they are represented as unsigned
integers (i.e., additional leading zero octets are not used even if the most
significant bit is set).</t>

</section>
<section anchor="enumerateds" title="Enumerateds">

<t>An additional sparse data type is available called enum. A field of type enum
can only assume the values declared in the definition. Each definition is a
different type. Only enumerateds of the same type may be assigned or compared.
Every element of an enumerated must be assigned a value, as demonstrated in the
following example. Since the elements of the enumerated are not ordered, they
can be assigned any unique value, in any order.</t>

<figure><artwork><![CDATA[
   enum { e1(v1), e2(v2), ... , en(vn) [[, (n)]] } Te;
]]></artwork></figure>

<t>An enumerated occupies as much space in the byte stream as would its maximal
defined ordinal value. The following definition would cause one byte to be used
to carry fields of type Color.</t>

<figure><artwork><![CDATA[
   enum { red(3), blue(5), white(7) } Color;
]]></artwork></figure>

<t>One may optionally specify a value without its associated tag to force the
width definition without defining a superfluous element.</t>

<t>In the following example, Taste will consume two bytes in the data stream but
can only assume the values 1, 2, or 4.</t>

<figure><artwork><![CDATA[
   enum { sweet(1), sour(2), bitter(4), (32000) } Taste;
]]></artwork></figure>

<t>The names of the elements of an enumeration are scoped within the defined type.
In the first example, a fully qualified reference to the second element of the
enumeration would be Color.blue. Such qualification is not required if the
target of the assignment is well specified.</t>

<figure><artwork><![CDATA[
   Color color = Color.blue;     /* overspecified, legal */
   Color color = blue;           /* correct, type implicit */
]]></artwork></figure>

<t>For enumerateds that are never converted to external representation, the
numerical information may be omitted.</t>

<figure><artwork><![CDATA[
   enum { low, medium, high } Amount;
]]></artwork></figure>

</section>
<section anchor="constructed-types" title="Constructed Types">

<t>Structure types may be constructed from primitive types for convenience. Each
specification declares a new, unique type. The syntax for definition is much
like that of C.</t>

<figure><artwork><![CDATA[
   struct {
       T1 f1;
       T2 f2;
       ...
       Tn fn;
   } [[T]];
]]></artwork></figure>

<t>The fields within a structure may be qualified using the type’s name, with a
syntax much like that available for enumerateds. For example, T.f2 refers to
the second field of the previous declaration. Structure definitions may be
embedded.</t>

<section anchor="variants" title="Variants">

<t>Defined structures may have variants based on some knowledge that is available
within the environment. The selector must be an enumerated type that defines
the possible variants the structure defines. There must be a case arm for every
element of the enumeration declared in the select. Case arms have limited
fall-through: if two case arms follow in immediate succession with no fields in
between, then they both contain the same fields. Thus, in the example below,
“orange” and “banana” both contain V2. Note that this is a new piece of syntax
in TLS 1.2.</t>

<t>The body of the variant structure may be given a label for reference. The
mechanism by which the variant is selected at runtime is not prescribed by the
presentation language.</t>

<figure><artwork><![CDATA[
   struct {
       T1 f1;
       T2 f2;
       ....
       Tn fn;
        select (E) {
            case e1: Te1;
            case e2: Te2;
            case e3: case e4: Te3;
            ....
            case en: Ten;
        } [[fv]];
   } [[Tv]];
]]></artwork></figure>

<t>For example:</t>

<figure><artwork><![CDATA[
   enum { apple, orange, banana } VariantTag;

   struct {
       uint16 number;
       opaque string<0..10>; /* variable length */
   } V1;

   struct {
       uint32 number;
       opaque string[10];    /* fixed length */
   } V2;

   struct {
       select (VariantTag) { /* value of selector is implicit */
           case apple:
             V1;   /* VariantBody, tag = apple */
           case orange:
           case banana:
             V2;   /* VariantBody, tag = orange or banana */
       } variant_body;       /* optional label on variant */
   } VariantRecord;
]]></artwork></figure>

</section>
</section>
<section anchor="constants" title="Constants">

<t>Typed constants can be defined for purposes of specification by declaring a
symbol of the desired type and assigning values to it.</t>

<t>Under-specified types (opaque, variable-length vectors, and structures that
contain opaque) cannot be assigned values. No fields of a multi-element
structure or vector may be elided.</t>

<t>For example:</t>

<figure><artwork><![CDATA[
   struct {
       uint8 f1;
       uint8 f2;
   } Example1;

   Example1 ex1 = {1, 4};  /* assigns f1 = 1, f2 = 4 */
]]></artwork></figure>

</section>
</section>
<section anchor="handshake-protocol" title="Handshake Protocol">

<t>The handshake protocol is used to negotiate the secure attributes
of a session. Handshake messages are supplied to the TLS record layer, where
they are encapsulated within one or more TLSPlaintext or TLSCiphertext structures, which are
processed and transmitted as specified by the current active session state.</t>

<figure><artwork><![CDATA[
   enum {
       client_hello(1),
       server_hello(2),
       new_session_ticket(4),
       hello_retry_request(6),
       encrypted_extensions(8),
       certificate(11),
       certificate_request(13),
       certificate_verify(15),
       finished(20),
       key_update(24),
       (255)
   } HandshakeType;

   struct {
       HandshakeType msg_type;    /* handshake type */
       uint24 length;             /* bytes in message */
       select (HandshakeType) {
           case client_hello:          ClientHello;
           case server_hello:          ServerHello;
           case hello_retry_request:   HelloRetryRequest;
           case encrypted_extensions:  EncryptedExtensions;
           case certificate_request:   CertificateRequest;
           case certificate:           Certificate;
           case certificate_verify:    CertificateVerify;
           case finished:              Finished;
           case new_session_ticket:    NewSessionTicket;
           case key_update:            KeyUpdate;
       } body;
   } Handshake;
]]></artwork></figure>

<t>Protocol messages MUST be sent in the order defined below (and
shown in the diagrams in <xref target="protocol-overview"/>).
Sending handshake messages in an unexpected order
results in an “unexpected_message” fatal error. Unneeded handshake
messages are omitted, however.</t>

<t>New handshake message types are assigned by IANA as described in
<xref target="iana-considerations"/>.</t>

<section anchor="key-exchange-messages" title="Key Exchange Messages">

<t>The key exchange messages are used to exchange security capabilities
between the client and server and to establish the traffic keys used to protect
the handshake and data.</t>

<section anchor="client-hello" title="Client Hello">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>When a client first connects to a server, it is required to send the
ClientHello as its first message. The client will also send a
ClientHello when the server has responded to its ClientHello with a
ServerHello that selects cryptographic parameters that don’t match the
client’s “key_share” extension. In that case, the client MUST send the same
ClientHello (without modification) except:</t>
</list></t>

<t><list style="symbols">
  <t>Including a new KeyShareEntry as the lowest priority share
(i.e., appended to the list of shares in the “key_share” extension).</t>
  <t>Removing the EarlyDataIndication <xref target="early-data-indication"/> extension
if one was present. Early data is not permitted after HelloRetryRequest.</t>
</list></t>

<t>If a server receives a ClientHello at any other time, it MUST send
a fatal “unexpected_message” alert and close the connection.</t>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   struct {
       uint8 major;
       uint8 minor;
   } ProtocolVersion;

   struct {
       opaque random_bytes[32];
   } Random;

   uint8 CipherSuite[2];    /* Cryptographic suite selector */

   struct {
       ProtocolVersion client_version = { 3, 4 };    /* TLS v1.3 */
       Random random;
       opaque legacy_session_id<0..32>;
       CipherSuite cipher_suites<2..2^16-2>;
       opaque legacy_compression_methods<1..2^8-1>;
       Extension extensions<0..2^16-1>;
   } ClientHello;
]]></artwork></figure>

<t>TLS allows extensions to follow the compression_methods field in an extensions
block. The presence of extensions can be detected by determining whether there
are bytes following the compression_methods at the end of the ClientHello. Note
that this method of detecting optional data differs from the normal TLS method
of having a variable-length field, but it is used for compatibility with TLS
before extensions were defined.
As of TLS 1.3, all clients and servers will send at least
one extension (at least “key_share” or “pre_shared_key”).</t>

<t><list style="hanging">
  <t hangText='client_version'>
  The latest (highest valued) version of the TLS protocol offered by the
client. This SHOULD be the same as the latest version supported. For this
version of the specification, the version will be { 3, 4 }. (See
<xref target="backward-compatibility"/> for details about backward compatibility.)</t>
  <t hangText='random'>
  32 bytes generated by a secure random number generator.
See <xref target="implementation-notes"/> for additional information.</t>
  <t hangText='legacy_session_id'>
  Versions of TLS before TLS 1.3 supported a session resumption
feature which has been merged with Pre-Shared Keys in this version
(see <xref target="resumption-and-psk"/>).
This field MUST be ignored by a server negotiating TLS 1.3 and
SHOULD be set as a zero length vector (i.e., a single zero byte
length field) by clients which do not have a cached session ID
set by a pre-TLS 1.3 server.</t>
  <t hangText='cipher_suites'>
  This is a list of the cryptographic options supported by the client,
with the client’s first preference first.  Each cipher suite defines
a key exchange algorithm, a record protection algorithm (including
secret key length) and a hash to be used with HKDF. The server will
select a cipher suite or, if no acceptable choices are presented,
return a “handshake_failure” alert and close the connection. If the
list contains cipher suites the server does not recognize, support,
or wish to use, the server MUST ignore those cipher suites, and
process the remaining ones as usual.  Values are defined in
<xref target="cipher-suites"/>.</t>
  <t hangText='legacy_compression_methods'>
  Versions of TLS before 1.3 supported compression with the list of
supported compression methods being sent in this field. For every TLS 1.3
ClientHello, this vector MUST contain exactly one byte set to
zero, which corresponds to the “null” compression method in
prior versions of TLS. If a TLS 1.3 ClientHello is
received with any other value in this field, the server MUST
generate a fatal “illegal_parameter” alert. Note that TLS 1.3
servers might receive TLS 1.2 or prior ClientHellos which contain
other compression methods and MUST follow the procedures for
the appropriate prior version of TLS.</t>
  <t hangText='extensions'>
  Clients request extended functionality from servers by sending
data in the extensions field.  The actual “Extension” format is
defined in <xref target="hello-extensions"/>.</t>
</list></t>

<t>In the event that a client requests additional functionality using
extensions, and this functionality is not supplied by the server, the
client MAY abort the handshake. Note that TLS 1.3 ClientHello messages
MUST always contain extensions, and a TLS 1.3 server MUST respond to
any TLS 1.3 ClientHello without extensions with a fatal “decode_error”
alert. TLS 1.3 servers may receive TLS 1.2 ClientHello messages
without extensions. If negotiating TLS 1.2, a server MUST check that
the amount of data in the message precisely matches one of these
formats; if not, then it MUST send a fatal “decode_error” alert.</t>

<t>After sending the ClientHello message, the client waits for a ServerHello
or HelloRetryRequest message.</t>

</section>
<section anchor="server-hello" title="Server Hello">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>The server will send this message in response to a ClientHello message when
it was able to find an acceptable set of algorithms and the client’s
“key_share” extension was acceptable. If the client proposed groups are not
acceptable by the server, it will respond with a “handshake_failure” fatal alert.</t>
</list></t>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   struct {
       ProtocolVersion server_version;
       Random random;
       CipherSuite cipher_suite;
       Extension extensions<0..2^16-1>;
   } ServerHello;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='server_version'>
  This field contains the version of TLS negotiated for this session.  Servers
MUST select the lower of the highest supported server version and the version
offered by the client in the ClientHello.  In particular, servers MUST accept
ClientHello messages with versions higher than those supported and negotiate
the highest mutually supported version.  For this version of the
specification, the version is { 3, 4 }.  (See <xref target="backward-compatibility"/> for
details about backward compatibility.)</t>
  <t hangText='random'>
  This structure is generated by the server and MUST be
generated independently of the ClientHello.random.</t>
  <t hangText='cipher_suite'>
  The single cipher suite selected by the server from the list in
ClientHello.cipher_suites.  For resumed sessions, this field is
the value from the state of the session being resumed.
[[TODO: interaction with PSK.]]</t>
  <t hangText='extensions'>
  A list of extensions.  Note that only extensions offered by the
client can appear in the server’s list. In TLS 1.3, as opposed to
previous versions of TLS, the server’s extensions are split between
the ServerHello and the EncryptedExtensions <xref target="encrypted-extensions"/>
message. The ServerHello MUST only include extensions which are
required to establish the cryptographic context. Currently the only
such extensions are “key_share”, “pre_shared_key”, and “early_data”.
Clients MUST check the ServerHello for the presence of any forbidden
extensions and if any are found MUST terminate the handshake with a
“illegal_parameter” alert. In prior versions of TLS, the extensions
field could be omitted entirely if not needed, similar to
ClientHello. As of TLS 1.3, all clients and servers will send at
least one extension (at least “key_share” or “pre_shared_key”).</t>
</list></t>

<t>TLS 1.3 has a downgrade protection mechanism embedded in the server’s
random value.
TLS 1.3 server implementations which respond to a ClientHello with a
client_version indicating TLS 1.2 or below MUST set the last eight
bytes of their Random value to the bytes:</t>

<figure><artwork><![CDATA[
  44 4F 57 4E 47 52 44 01
]]></artwork></figure>

<t>TLS 1.2 server implementations which respond to a ClientHello with a
client_version indicating TLS 1.1 or below SHOULD set the last eight
bytes of their Random value to the bytes:</t>

<figure><artwork><![CDATA[
  44 4F 57 4E 47 52 44 00
]]></artwork></figure>

<t>TLS 1.3 clients receiving a TLS 1.2 or below ServerHello MUST check
that the last eight octets are not equal to either of these values. TLS
1.2 clients SHOULD also perform this check if the ServerHello
indicates TLS 1.1 or below. If a match is found, the client MUST abort
the handshake with a fatal “illegal_parameter” alert. This mechanism
provides limited protection against downgrade attacks over and above
that provided by the Finished exchange: because the ServerKeyExchange
includes a signature over both random values, it is not possible for
an active attacker to modify the randoms without detection as long as
ephemeral ciphers are used. It does not provide downgrade protection
when static RSA is used.</t>

<t>Note: This is an update to TLS 1.2 so in practice many TLS 1.2 clients
and servers will not behave as specified above.</t>

</section>
<section anchor="hello-retry-request" title="Hello Retry Request">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>Servers send this message in response to a ClientHello
message if they were able to find an acceptable set of algorithms and
groups that are mutually supported, but
the client’s KeyShare did not contain an acceptable
offer. If it cannot find such a match, it will respond with a
fatal “handshake_failure” alert.</t>
</list></t>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   struct {
       ProtocolVersion server_version;
       CipherSuite cipher_suite;
       NamedGroup selected_group;
       Extension extensions<0..2^16-1>;
   } HelloRetryRequest;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='selected_group'>
  The mutually supported group the server intends to negotiate and
is requesting a retried ClientHello/KeyShare for.</t>
</list></t>

<t>The server_version, cipher_suite, and extensions fields have the
same meanings as their corresponding values in the ServerHello.
[[NOTE: cipher_suite may disappear. https://github.com/tlswg/tls13-spec/issues/528]]
The
server SHOULD send only the extensions necessary for the client to
generate a correct ClientHello pair (currently no such extensions
exist). As with ServerHello, a
HelloRetryRequest MUST NOT contain any extensions that were not first
offered by the client in its ClientHello.</t>

<t>Upon receipt of a HelloRetryRequest, the client MUST first verify that
the selected_group field corresponds to a group which was provided
in the “supported_groups” extension in the original ClientHello.  It
MUST then verify that the selected_group field does not correspond
to a group which was provided in the “key_share” extension in the
original ClientHello. If either of these checks fails, then the client
MUST abort the handshake with a fatal “handshake_failure”
alert. Clients SHOULD also abort with “handshake_failure” in response
to any second HelloRetryRequest which was sent in the same connection
(i.e., where the ClientHello was itself in response to a
HelloRetryRequest).</t>

<t>Otherwise, the client MUST send a ClientHello with an updated KeyShare
extension to the server. The client MUST append a new KeyShareEntry
for the group indicated in the selected_group field to the groups
in its original KeyShare.</t>

<t>Upon re-sending the ClientHello and receiving the
server’s ServerHello/KeyShare, the client MUST verify that
the selected CipherSuite and NamedGroup match that supplied in
the HelloRetryRequest. If either of these values differ, the client
MUST abort the connection with a fatal “handshake_failure” alert.</t>

</section>
</section>
<section anchor="hello-extensions" title="Hello Extensions">

<t>The extension format is:</t>

<figure><artwork><![CDATA[
   struct {
       ExtensionType extension_type;
       opaque extension_data<0..2^16-1>;
   } Extension;

   enum {
       supported_groups(10),
       signature_algorithms(13),
       key_share(40),
       pre_shared_key(41),
       early_data(42),
       cookie(44),
       (65535)
   } ExtensionType;
]]></artwork></figure>

<t>Here:</t>

<t><list style="symbols">
  <t>“extension_type” identifies the particular extension type.</t>
  <t>“extension_data” contains information specific to the particular
  extension type.</t>
</list></t>

<t>The initial set of extensions is defined in <xref target="RFC6066"/>.
The list of extension types is maintained by IANA as described in
<xref target="iana-considerations"/>.</t>

<t>An extension type MUST NOT appear in the ServerHello or HelloRetryRequest
unless the same extension type appeared in the corresponding ClientHello.
If a client receives an extension type in ServerHello or HelloRetryRequest
that it did not request in the associated ClientHello, it MUST abort the
handshake with an “unsupported_extension” fatal alert.</t>

<t>Nonetheless, “server-oriented” extensions may be provided within
this framework. Such an extension (say, of type x) would require the client to
first send an extension of type x in a ClientHello with empty extension_data to
indicate that it supports the extension type. In this case, the client is
offering the capability to understand the extension type, and the server is
taking the client up on its offer.</t>

<t>When multiple extensions of different types are present in the ClientHello or
ServerHello messages, the extensions MAY appear in any order. There MUST NOT be
more than one extension of the same type.</t>

<t>Finally, note that extensions can be sent both when starting a new session and
when in resumption-PSK mode. A client that requests session
resumption does not in general know whether the server will accept this
request, and therefore it SHOULD send the same extensions as it would send
normally.</t>

<t>In general, the specification of each extension type needs to describe the
effect of the extension both during full handshake and session resumption. Most
current TLS extensions are relevant only when a session is initiated: when an
older session is resumed, the server does not process these extensions in
ClientHello, and does not include them in ServerHello. However, some
extensions may specify different behavior during session resumption.
[[TODO: update this and the previous paragraph to cover PSK-based resumption.]]</t>

<t>There are subtle (and not so subtle) interactions that may occur in this
protocol between new features and existing features which may result in a
significant reduction in overall security. The following considerations should
be taken into account when designing new extensions:</t>

<t><list style="symbols">
  <t>Some cases where a server does not agree to an extension are error
conditions, and some are simply refusals to support particular features. In
general, error alerts should be used for the former, and a field in the
server extension response for the latter.</t>
  <t>Extensions should, as far as possible, be designed to prevent any attack that
forces use (or non-use) of a particular feature by manipulation of handshake
messages. This principle should be followed regardless of whether the feature
is believed to cause a security problem.
Often the fact that the extension fields are included in the inputs to the
Finished message hashes will be sufficient, but extreme care is needed when
the extension changes the meaning of messages sent in the handshake phase.
Designers and implementors should be aware of the fact that until the
handshake has been authenticated, active attackers can modify messages and
insert, remove, or replace extensions.</t>
</list></t>

<section anchor="cookie" title="Cookie">

<figure><artwork><![CDATA[
   struct {
       opaque cookie<0..2^16-1>;
   } Cookie;
]]></artwork></figure>

<t>Cookies serve two primary purposes:</t>

<t><list style="symbols">
  <t>Allowing the server to force the client to demonstrate reachability
at their apparent network address (thus providing a measure of DoS
protection). This is primarily useful for non-connection-oriented
transports (see <xref target="RFC6347"/> for an example of this).</t>
  <t>Allowing the server to offload state to the client, thus allowing it to send
a HelloRetryRequest without storing any state. The server does this by
pickling that post-ClientHello hash state into the cookie (protected
with some suitable integrity algorithm).</t>
</list></t>

<t>When sending a HelloRetryRequest, the server MAY provide a “cookie” extension to the
client (this is an exception to the usual rule that the only extensions that
may be sent are those that appear in the ClientHello). When sending the
new ClientHello, the client MUST echo the value of the extension.
Clients MUST NOT use cookies in subsequent connections.</t>

</section>
<section anchor="signature-algorithms" title="Signature Algorithms">

<t>The client uses the “signature_algorithms” extension to indicate to the server
which signature algorithms may be used in digital signatures.</t>

<t>Clients which offer one or more cipher suites which use certificate authentication
(i.e., any non-PSK cipher suite) MUST send the “signature_algorithms” extension.
If this extension is not provided and no alternative cipher suite is available,
the server MUST close the connection with a fatal “missing_extension” alert.
(see <xref target="mti-extensions"/>)</t>

<t>The “extension_data” field of this extension contains a
“supported_signature_algorithms” value:</t>

<figure><artwork><![CDATA[
   enum {
       /* RSASSA-PKCS1-v1_5 algorithms */
       rsa_pkcs1_sha1 (0x0201),
       rsa_pkcs1_sha256 (0x0401),
       rsa_pkcs1_sha384 (0x0501),
       rsa_pkcs1_sha512 (0x0601),

       /* ECDSA algorithms */
       ecdsa_secp256r1_sha256 (0x0403),
       ecdsa_secp384r1_sha384 (0x0503),
       ecdsa_secp521r1_sha512 (0x0603),

       /* RSASSA-PSS algorithms */
       rsa_pss_sha256 (0x0700),
       rsa_pss_sha384 (0x0701),
       rsa_pss_sha512 (0x0702),

       /* EdDSA algorithms */
       ed25519 (0x0703),
       ed448 (0x0704),

       /* Reserved Code Points */
       private_use (0xFE00..0xFFFF),
       (0xFFFF)
   } SignatureScheme;

   SignatureScheme supported_signature_algorithms<2..2^16-2>;
]]></artwork></figure>

<t>Note: This enum is named “SignatureScheme” because there is already
a “SignatureAlgorithm” type in TLS 1.2, which this replaces.
We use the term “signature algorithm” throughout the text.</t>

<t>Each SignatureScheme value lists a single signature algorithm that the
client is willing to verify. The values are indicated in descending order
of preference. Note that a signature algorithm takes as input an
arbitrary-length message, rather than a digest. Algorithms which
traditionally act on a digest should be defined in TLS to first
hash the input with a specified hash function and then proceed as usual.
The code point groups listed above have the following meanings:</t>

<t><list style="hanging">
  <t hangText='RSASSA-PKCS1-v1_5 algorithms'>
  Indicates a signature algorithm using RSASSA-PKCS1-v1_5 <xref target="RFC3447"/>
with the corresponding hash algorithm as defined in <xref target="SHS"/>. These values
refer solely to signatures which appear in certificates (see
<xref target="server-certificate-selection"/>) and are not defined for use in signed
TLS handshake messages.</t>
  <t hangText='ECDSA algorithms'>
  Indicates a signature algorithm using ECDSA <xref target="ECDSA"/>, the corresponding
curve as defined in ANSI X9.62 <xref target="X962"/> and FIPS 186-4 <xref target="DSS"/>, and the
corresponding hash algorithm as defined in <xref target="SHS"/>. The signature is
represented as a DER-encoded <xref target="X690"/> ECDSA-Sig-Value structure.</t>
  <t hangText='RSASSA-PSS algorithms'>
  Indicates a signature algorithm using RSASSA-PSS <xref target="RFC3447"/> with
MGF1. The digest used in the mask generation function and the digest
being signed are both the corresponding hash algorithm as defined in
<xref target="SHS"/>. When used in signed TLS handshake messages, the length of
the salt MUST be equal to the length of the digest output.</t>
  <t hangText='EdDSA algorithms'>
  Indicates a signature algorithm using EdDSA as defined in
<xref target="I-D.irtf-cfrg-eddsa"/> or its successors. Note that these correspond to
the “PureEdDSA” algorithms and not the “prehash” variants.</t>
</list></t>

<t>The semantics of this extension are somewhat complicated because the cipher
suite adds additional constraints on signature algorithms.
<xref target="server-certificate-selection"/> describes the appropriate rules.</t>

<t>rsa_pkcs1_sha1, dsa_sha1, and ecdsa_sha1 SHOULD NOT be offered. Clients
offering these values for backwards compatibility MUST list them as the lowest
priority (listed after all other algorithms in the
supported_signature_algorithms vector). TLS 1.3 servers MUST NOT offer a SHA-1
signed certificate unless no valid certificate chain can be produced without it
(see <xref target="server-certificate-selection"/>).</t>

<t>The signatures on certificates that are self-signed or certificates that are
trust anchors are not validated since they begin a certification path (see
<xref target="RFC5280"/>, Section 3.2).  A certificate that begins a certification
path MAY use a signature algorithm that is not advertised as being supported
in the “signature_algorithms” extension.</t>

<t>Note that TLS 1.2 defines this extension differently. TLS 1.3 implementations
willing to negotiate TLS 1.2 MUST behave in accordance with the requirements of
<xref target="RFC5246"/> when negotiating that version. In particular:</t>

<t><list style="symbols">
  <t>TLS 1.2 ClientHellos may omit this extension.</t>
  <t>In TLS 1.2, the extension contained hash/signature pairs. The pairs are
encoded in two octets, so SignatureScheme values have been allocated to
align with TLS 1.2’s encoding. Some legacy pairs are left unallocated. These
algorithms are deprecated as of TLS 1.3. They MUST NOT be offered or
negotiated by any implementation. In particular, MD5 <xref target="SLOTH"/> and SHA-224
MUST NOT be used.</t>
  <t>ecdsa_secp256r1_sha256, etc., align with TLS 1.2’s ECDSA hash/signature pairs.
However, the old semantics did not constrain the signing curve.</t>
</list></t>

</section>
<section anchor="negotiated-groups" title="Negotiated Groups">

<t>When sent by the client, the “supported_groups” extension indicates
the named groups which the client supports for key exchange, ordered
from most preferred to least preferred.</t>

<t>Note: In versions of TLS prior to TLS 1.3, this extension was named
“elliptic_curves” and only contained elliptic curve groups. See <xref target="RFC4492"/> and
<xref target="I-D.ietf-tls-negotiated-ff-dhe"/>. This extension was also used to negotiate
ECDSA curves. Signature algorithms are now negotiated independently (see
<xref target="signature-algorithms"/>).</t>

<t>Clients which offer one or more (EC)DHE cipher suites MUST send at least one
supported NamedGroup value and servers MUST NOT negotiate any of these
cipher suites unless a supported value was provided.
If this extension is not provided and no alternative cipher suite is available,
the server MUST close the connection with a fatal “missing_extension” alert.
(see <xref target="mti-extensions"/>)
If the extension is provided, but no compatible group is offered, the
server MUST NOT negotiate a cipher suite of the relevant type. For
instance, if a client supplies only ECDHE groups, the server MUST NOT
negotiate finite field Diffie-Hellman. If no acceptable group can be
selected across all cipher suites, then the server MUST generate a
fatal “handshake_failure” alert.</t>

<t>The “extension_data” field of this extension contains a
“NamedGroupList” value:</t>

<figure><artwork><![CDATA[
   enum {
       /* Elliptic Curve Groups (ECDHE) */
       secp256r1 (23), secp384r1 (24), secp521r1 (25),
       x25519 (29), x448 (30),

       /* Finite Field Groups (DHE) */
       ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258),
       ffdhe6144 (259), ffdhe8192 (260),

       /* Reserved Code Points */
       ffdhe_private_use (0x01FC..0x01FF),
       ecdhe_private_use (0xFE00..0xFEFF),
       (0xFFFF)
   } NamedGroup;

   struct {
       NamedGroup named_group_list<1..2^16-1>;
   } NamedGroupList;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='Elliptic Curve Groups (ECDHE)'>
  Indicates support of the corresponding named curve.
Note that some curves are also recommended in ANSI
X9.62 <xref target="X962"/> and FIPS 186-4 <xref target="DSS"/>. Others are recommended
in <xref target="RFC7748"/>.
Values 0xFE00 through 0xFEFF are reserved for private use.</t>
  <t hangText='Finite Field Groups (DHE)'>
  Indicates support of the corresponding finite field
group, defined in <xref target="I-D.ietf-tls-negotiated-ff-dhe"/>.
Values 0x01FC through 0x01FF are reserved for private use.</t>
</list></t>

<t>Items in named_group_list are ordered according to the client’s
preferences (most preferred choice first).</t>

<t>As of TLS 1.3, servers are permitted to send the “supported_groups”
extension to the client.  If the server has a group it prefers to the
ones in the “key_share” extension but is still willing to accept the
ClientHello, it SHOULD send “supported_groups” to update the client’s
view of its preferences.  Clients MUST NOT act upon any information
found in “supported_groups” prior to successful completion of the
handshake, but MAY use the information learned from a successfully
completed handshake to change what groups they offer to a server in
subsequent connections.</t>

</section>
<section anchor="key-share" title="Key Share">

<t>The “key_share” extension contains the endpoint’s cryptographic parameters
for non-PSK key establishment methods (currently DHE or ECDHE).</t>

<t>Clients which offer one or more (EC)DHE cipher suites MUST send this
extension and SHOULD send at least one supported KeyShareEntry value.
Servers MUST NOT negotiate any of these cipher suites unless a supported
value was provided.
If this extension is not provided in a ServerHello or ClientHello,
and the peer is offering (EC)DHE cipher suites, then the endpoint MUST close
the connection with a fatal “missing_extension” alert.
(see <xref target="mti-extensions"/>)
Clients MAY send an empty client_shares vector in order to request
group selection from the server at the cost of an additional round trip.
(see <xref target="hello-retry-request"/>)</t>

<figure><artwork><![CDATA[
   struct {
       NamedGroup group;
       opaque key_exchange<1..2^16-1>;
   } KeyShareEntry;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='group'>
  The named group for the key being exchanged.
Finite Field Diffie-Hellman <xref target="DH"/> parameters are described in
<xref target="ffdhe-param"/>; Elliptic Curve Diffie-Hellman parameters are
described in <xref target="ecdhe-param"/>.</t>
  <t hangText='key_exchange'>
  Key exchange information.  The contents of this field are
determined by the specified group and its corresponding
definition.  Endpoints MUST NOT send empty or otherwise
invalid key_exchange values for any reason.</t>
</list></t>

<t>The “extension_data” field of this extension contains a
“KeyShare” value:</t>

<figure><artwork><![CDATA[
   struct {
       select (role) {
           case client:
               KeyShareEntry client_shares<0..2^16-1>;

           case server:
               KeyShareEntry server_share;
       }
   } KeyShare;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='client_shares'>
  A list of offered KeyShareEntry values in descending order of client preference.
This vector MAY be empty if the client is requesting a HelloRetryRequest.
The ordering of values here SHOULD match that of the ordering of offered support
in the “supported_groups” extension.</t>
  <t hangText='server_share'>
  A single KeyShareEntry value for the negotiated cipher suite.</t>
</list></t>

<t>Clients offer an arbitrary number of KeyShareEntry values, each
representing a single set of key exchange parameters. For instance, a
client might offer shares for several elliptic curves or multiple
FFDHE groups.  The key_exchange values for each KeyShareEntry MUST by
generated independently.  Clients MUST NOT offer multiple
KeyShareEntry values for the same group.  Clients and MUST NOT offer
any KeyShareEntry values for groups not listed in the client’s
“supported_groups” extension.</t>

<t>Servers offer exactly one KeyShareEntry value, which corresponds to
the key exchange used for the negotiated cipher suite.  Servers MUST
NOT offer a KeyShareEntry value for a group not offered by the client
in its corresponding KeyShare or “supported_groups” extension.</t>

<t>Implementations MAY check for violations of these rules and
and MAY abort the connection with a fatal “illegal_parameter” alert
if one is violated.</t>

<t>If the server selects an (EC)DHE cipher suite and no mutually
supported group is available between the two endpoints’ KeyShare
offers, yet there is a mutually supported group that can be found via
the “supported_groups” extension, then the server MUST reply with a
HelloRetryRequest.  If there is no mutually supported group at all,
the server MUST NOT negotiate an (EC)DHE cipher suite.</t>

<t>[[TODO: Recommendation about what the client offers.
Presumably which integer DH groups and which curves.]]</t>

<section anchor="ffdhe-param" title="Diffie-Hellman Parameters">

<t>Diffie-Hellman <xref target="DH"/> parameters for both clients and servers are encoded in
the opaque key_exchange field of a KeyShareEntry in a KeyShare structure.
The opaque value contains the
Diffie-Hellman public value (Y = g^X mod p),
encoded as a big-endian integer, padded with zeros to the size of p in
bytes.</t>

<t>Note: For a given Diffie-Hellman group, the padding results in all public keys
having the same length.</t>

<t>Peers SHOULD validate each other’s public key Y by ensuring that 1 &lt; Y
&lt; p-1. This check ensures that the remote peer is properly behaved and
isn’t forcing the local system into a small subgroup.</t>

</section>
<section anchor="ecdhe-param" title="ECDHE Parameters">

<t>ECDHE parameters for both clients and servers are encoded in the
the opaque key_exchange field of a KeyShareEntry in a KeyShare structure.</t>

<t>For secp256r1, secp384r1 and secp521r1, the contents are the byte string
representation of an elliptic curve public value following the conversion
routine in Section 4.3.6 of ANSI X9.62 <xref target="X962"/>.</t>

<t>Although X9.62 supports multiple point formats, any given curve
MUST specify only a single point format. All curves currently
specified in this document MUST only be used with the uncompressed
point format (the format for all ECDH functions is considered
uncompressed).</t>

<t>For x25519 and x448, the contents are the byte string inputs and outputs of the
corresponding functions defined in <xref target="RFC7748"/>, 32 bytes for x25519 and 56
bytes for x448.</t>

<t>Note: Versions of TLS prior to 1.3 permitted point negotiation;
TLS 1.3 removes this feature in favor of a single point format
for each curve.</t>

</section>
</section>
<section anchor="pre-shared-key-extension" title="Pre-Shared Key Extension">

<t>The “pre_shared_key” extension is used to indicate the identity of the
pre-shared key to be used with a given handshake in association
with a PSK or (EC)DHE-PSK cipher suite (see <xref target="RFC4279"/> for background).</t>

<t>Clients which offer one or more PSK cipher suites
MUST send at least one supported psk_identity value and
servers MUST NOT negotiate any of these cipher suites unless a supported
value was provided.
If this extension is not provided and no alternative cipher suite is available,
the server MUST close the connection with a fatal “missing_extension” alert.
(see <xref target="mti-extensions"/>)</t>

<t>The “extension_data” field of this extension contains a
“PreSharedKeyExtension” value:</t>

<figure><artwork><![CDATA[
   opaque psk_identity<0..2^16-1>;

   struct {
       select (Role) {
           case client:
               psk_identity identities<2..2^16-1>;

           case server:
               uint16 selected_identity;
       }
   } PreSharedKeyExtension;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='identities'>
  A list of the identities (labels for keys) that the client is willing
to negotiate with the server. If sent alongside the “early_data”
extension (see <xref target="early-data-indication"/>), the first identity is the
one used for 0-RTT data.</t>
  <t hangText='selected_identity'>
  The server’s chosen identity expressed as a (0-based) index into
the identies in the client’s list.</t>
</list></t>

<t>If no suitable identity is provided, the server MUST NOT negotiate
a PSK cipher suite and MAY respond with an “unknown_psk_identity”
alert message. Sending this alert is OPTIONAL; servers MAY instead
choose to send a “decrypt_error” alert to merely indicate an
invalid PSK identity or instead negotiate use of a non-PSK cipher
suite, if available.</t>

<t>If the server selects a PSK cipher suite, it MUST send a
“pre_shared_key” extension with the identity that it selected.
The client MUST verify that the server’s selected_identity
is within the range supplied by the client. If the server supplies an
“early_data” extension, the client MUST verify that the server selected the
first offered identity. If any other value is returned, the client MUST
generate a fatal “unknown_psk_identity” alert and close the connection.</t>

<t>Note that although 0-RTT data is encrypted with the first PSK identity, the
server MAY fall back to 1-RTT and select a different PSK identity if multiple
identities are offered.</t>

</section>
<section anchor="early-data-indication" title="Early Data Indication">

<t>When PSK resumption is used, the client can send application data
in its first flight of messages. If the client opts to do so, it MUST
supply an “early_data” extension as well as the “pre_shared_key”
extension.</t>

<t>The “extension_data” field of this extension contains an
“EarlyDataIndication” value:</t>

<figure><artwork><![CDATA[
   struct {
       select (Role) {
           case client:
               uint32 obfuscated_ticket_age;

           case server:
              struct {};
       }
   } EarlyDataIndication;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='obfuscated_ticket_age'>
  The time since the client learned about the server configuration that it is
using, in milliseconds.  This value is added modulo 2^32 to with the
“ticket_age_add” value that was included with the ticket, see
<xref target="NewSessionTicket"/>.  This addition prevents passive observers from
correlating sessions unless tickets are reused.  Note: because ticket
lifetimes are restricted to a week, 32 bits is enough to represent any
plausible age, even in milliseconds.</t>
</list></t>

<t>A server MUST validate that the ticket_age is within a small
tolerance of the time since the ticket was issued (see <xref target="replay-time"/>).</t>

<t>The parameters for the 0-RTT data (symmetric cipher suite,
ALPN, etc.) are the same as those which were negotiated in the connection
which established the PSK.  The PSK used to encrypt the early data
MUST be the first PSK listed in the client’s “pre_shared_key” extension.</t>

<t>0-RTT messages sent in the first flight have the same content types
as their corresponding messages sent in other flights (handshake,
application_data, and alert respectively) but are protected under
different keys. After all the 0-RTT application data messages (if
any) have been sent, an “end_of_early_data” alert of type
“warning” is sent to indicate the end of the flight.
0-RTT MUST always be followed by an “end_of_early_data” alert.</t>

<t>A server which receives an “early_data” extension
can behave in one of two ways:</t>

<t><list style="symbols">
  <t>Ignore the extension and return no response. This indicates that the
server has ignored any early data and an ordinary 1-RTT handshake is
required.</t>
  <t>Return an empty extension, indicating that it intends to
process the early data. It is not possible for the server
to accept only a subset of the early data messages.</t>
</list></t>

<t>In order to accept early data, the server server MUST have accepted a
PSK cipher suite and selected the the first key offered in the
client’s “pre_shared_key” extension. In addition, it MUST verify that
the following values are consistent with those negotiated in the
connection during which the ticket was established.</t>

<t><list style="symbols">
  <t>The TLS version number, symmetric ciphersuite, and the hash for HKDF.</t>
  <t>The selected ALPN <xref target="RFC7443"/> value, if any.</t>
  <t>The server_name <xref target="RFC6066"/> value provided by the client,
if any.</t>
</list></t>

<t>Future extensions MUST define their interaction with 0-RTT.</t>

<t>If any of these checks fail, the server MUST NOT respond
with the extension and must discard all the remaining first
flight data (thus falling back to 1-RTT). If the client attempts
a 0-RTT handshake but the server rejects it, it will generally
not have the 0-RTT record protection keys and must instead
trial decrypt each record with the 1-RTT handshake keys
until it finds one that decrypts properly, and then pick up
the handshake from that point.</t>

<t>If the server chooses to accept the “early_data” extension,
then it MUST comply with the same error handling requirements
specified for all records when processing early data records.
Specifically, decryption failure of any 0-RTT record following
an accepted “early_data” extension MUST produce a fatal
“bad_record_mac” alert as per <xref target="record-payload-protection"/>.</t>

<t>If the server rejects the “early_data” extension, the client
application MAY opt to retransmit the data once the handshake has
been completed. TLS stacks SHOULD not do this automatically and
client applications MUST take care that the negotiated parameters
are consistent with those it expected. For example, if the
ALPN value has changed, it is likely unsafe to retransmit the
original application layer data.</t>

<section anchor="processing-order" title="Processing Order">

<t>Clients are permitted to “stream” 0-RTT data until they
receive the server’s Finished, only then sending the “end_of_early_data”
alert. In order to avoid deadlock, when accepting “early_data”,
servers MUST process the client’s Finished and then immediately
send the ServerHello, rather than waiting for the client’s
“end_of_early_data” alert.</t>

</section>
<section anchor="replay-time" title="Replay Properties">

<t>As noted in <xref target="zero-rtt-data"/>, TLS provides a limited mechanism for
replay protection for data sent by the client in the first flight.</t>

<t>The “obfuscated_ticket_age” parameter in the client’s “early_data” extension SHOULD be used by
servers to limit the time over which the first flight might be
replayed.  A server can store the time at which it sends a session
ticket to the client, or encode the time in the ticket.  Then, each
time it receives an “early_data” extension, it can subtract the base value and
check to see if the value used by the client matches its expectations.</t>

<t>The ticket age (the value with “ticket_age_add” subtracted) provided by the
client will be shorter than the
actual time elapsed on the server by a single round trip time.  This
difference is comprised of the delay in sending the NewSessionTicket
message to the client, plus the time taken to send the ClientHello to
the server.  For this reason, a server SHOULD measure the round trip
time prior to sending the NewSessionTicket message and account for
that in the value it saves.</t>

<t>To properly validate the ticket age, a server needs to save at least two items:</t>

<t><list style="symbols">
  <t>The time that the server generated the session ticket and the estimated round
trip time can be added together to form a baseline time.</t>
  <t>The “ticket_age_add” parameter from the NewSessionTicket is needed to recover
the ticket age from the “obfuscated_ticket_age” parameter.</t>
</list></t>

<t>There are several potential sources of error that make an exact
measurement of time difficult.  Variations in client and server clocks
are likely to be minimal, outside of gross time corrections.  Network
propagation delays are most likely causes of a mismatch in legitimate
values for elapsed time.  Both the NewSessionTicket and ClientHello
messages might be retransmitted and therefore delayed, which might be
hidden by TCP.</t>

<t>A small allowance for errors in clocks and variations in measurements
is advisable.  However, any allowance also increases the opportunity
for replay.  In this case, it is better to reject early data than to
risk greater exposure to replay attacks.</t>

</section>
</section>
<section anchor="ocsp-status-extensions" title="OCSP Status Extensions">

<t><xref target="RFC6066"/> and <xref target="RFC6961"/> provide extensions to negotiate the server
sending OCSP responses to the client. In TLS 1.2 and below, the
server sends an empty extension to indicate negotiation of this
extension and the OCSP information is carried in a CertificateStatus
message. In TLS 1.3, the server’s OCSP information is
carried in an extension in EncryptedExtensions. Specifically:
The body of the “status_request” or “status_request_v2” extension
from the server MUST be a CertificateStatus structure as defined
in <xref target="RFC6066"/> and <xref target="RFC6961"/> respectively.</t>

<t>Note: This means that the certificate status appears prior to the
certificates it applies to. This is slightly anomalous but matches
the existing behavior for SignedCertificateTimestamps <xref target="RFC6962"/>,
and is more easily extensible in the handshake state machine.</t>

</section>
<section anchor="encrypted-extensions" title="Encrypted Extensions">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>In all handshakes, the server MUST send the
EncryptedExtensions message immediately after the
ServerHello message. This is the first message that is encrypted
under keys derived from handshake_traffic_secret.</t>
</list></t>

<t>Meaning of this message:</t>

<t><list style='empty'>
  <t>The EncryptedExtensions message contains any extensions
which should be protected, i.e., any which are not needed to
establish the cryptographic context.</t>
</list></t>

<t>The same extension types MUST NOT appear in both the ServerHello and
EncryptedExtensions.  If the same extension appears in both locations,
the client MUST rely only on the value in the EncryptedExtensions
block.  All server-sent extensions other than those explicitly listed
in <xref target="server-hello"/> or designated in the IANA registry MUST only
appear in EncryptedExtensions. Extensions which are designated to
appear in ServerHello MUST NOT appear in EncryptedExtensions. Clients
MUST check EncryptedExtensions for the presence of any forbidden
extensions and if any are found MUST terminate the handshake with an
“illegal_parameter” alert.</t>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   struct {
       Extension extensions<0..2^16-1>;
   } EncryptedExtensions;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='extensions'>
  A list of extensions.</t>
</list></t>

</section>
<section anchor="certificate-request" title="Certificate Request">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>A non-anonymous server can optionally request a certificate from the client,
if appropriate for the selected cipher suite. This message, if sent, will
follow EncryptedExtensions.</t>
</list></t>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   opaque DistinguishedName<1..2^16-1>;

   struct {
       opaque certificate_extension_oid<1..2^8-1>;
       opaque certificate_extension_values<0..2^16-1>;
   } CertificateExtension;

   struct {
       opaque certificate_request_context<0..2^8-1>;
       SignatureScheme
         supported_signature_algorithms<2..2^16-2>;
       DistinguishedName certificate_authorities<0..2^16-1>;
       CertificateExtension certificate_extensions<0..2^16-1>;
   } CertificateRequest;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='certificate_request_context'>
  An opaque string which identifies the certificate request and
which will be echoed in the client’s Certificate message. The
certificate_request_context MUST be unique within the scope
of this connection (thus preventing replay of client
CertificateVerify messages).</t>
  <t hangText='supported_signature_algorithms'>
  A list of the signature algorithms that the server is
able to verify, listed in descending order of preference. Any
certificates provided by the client MUST be signed using a
signature algorithm found in supported_signature_algorithms.</t>
  <t hangText='certificate_authorities'>
  A list of the distinguished names <xref target="X501"/> of acceptable
certificate_authorities, represented in DER-encoded <xref target="X690"/> format.  These
distinguished names may specify a desired distinguished name for a
root CA or for a subordinate CA; thus, this message can be used to
describe known roots as well as a desired authorization space.  If
the certificate_authorities list is empty, then the client MAY
send any certificate that meets the rest of the selection criteria
in the CertificateRequest, unless there is some external arrangement
to the contrary.</t>
  <t hangText='certificate_extensions'>
  A list of certificate extension OIDs <xref target="RFC5280"/> with their allowed
values, represented in DER-encoded <xref target="X690"/> format. Some certificate
extension OIDs allow multiple values (e.g. Extended Key Usage).
If the server has included a non-empty certificate_extensions list,
the client certificate MUST contain all of the specified extension
OIDs that the client recognizes. For each extension OID recognized
by the client, all of the specified values MUST be present in the
client certificate (but the certificate MAY have other values as
well). However, the client MUST ignore and skip any unrecognized
certificate extension OIDs. If the client has ignored some of the
required certificate extension OIDs, and supplied a certificate
that does not satisfy the request, the server MAY at its discretion
either continue the session without client authentication, or
terminate the session with a fatal unsupported_certificate alert.

PKIX RFCs define a variety of certificate extension OIDs and their
corresponding value types. Depending on the type, matching
certificate extension values are not necessarily bitwise-equal. It
is expected that TLS implementations will rely on their PKI
libraries to perform certificate selection using certificate
extension OIDs.
This document defines matching rules for two standard certificate
extensions defined in <xref target="RFC5280"/>:
      <list style="symbols">
        <t>The Key Usage extension in a certificate matches the request when
all key usage bits asserted in the request are also asserted in the
Key Usage certificate extension.</t>
        <t>The Extended Key Usage extension in a certificate matches the
request when all key purpose OIDs present in the request are also
found in the Extended Key Usage certificate extension. The special
anyExtendedKeyUsage OID MUST NOT be used in the request.</t>
      </list>

Separate specifications may define matching rules for other certificate
extensions.</t>
</list></t>

<t>Note: It is a fatal “handshake_failure” alert for an anonymous server to request
client authentication.</t>

</section>
</section>
<section anchor="authentication-messages" title="Authentication Messages">

<t>As discussed in <xref target="protocol-overview"/>, TLS uses a common
set of messages for authentication, key confirmation, and handshake
integrity: Certificate, CertificateVerify, and Finished. These
messages are always sent as the last messages in their handshake
flight. The Certificate and CertificateVerify messages are only
sent under certain circumstances, as defined below. The Finished
message is always sent as part of the Authentication block.</t>

<t>The computations for the Authentication messages all uniformly
take the following inputs:</t>

<t><list style="symbols">
  <t>The certificate and signing key to be used.</t>
  <t>A Handshake Context based on the hash of the handshake messages</t>
  <t>A base key to be used to compute a MAC key.</t>
</list></t>

<t>Based on these inputs, the messages then contain:</t>

<t><list style="hanging">
  <t hangText='Certificate'>
  The certificate to be used for authentication and any
supporting certificates in the chain. Note that certificate-based
client authentication is not available in the 0-RTT case.</t>
  <t hangText='CertificateVerify'>
  A signature over the value Hash(Handshake Context + Certificate) + Hash(resumption_context)
See <xref target="NewSessionTicket"/> for the definition of resumption_context.</t>
  <t hangText='Finished'>
  A MAC over the value Hash(Handshake Context + Certificate + CertificateVerify) +
Hash(resumption_context) using  a MAC key derived from the base key.</t>
</list></t>

<t>Because the CertificateVerify signs the Handshake Context +
Certificate and the Finished MACs the Handshake Context + Certificate
+ CertificateVerify, this is mostly equivalent to keeping a running hash
of the handshake messages (exactly so in the pure 1-RTT cases). Note,
however, that subsequent post-handshake authentications do not include
each other, just the messages through the end of the main handshake.</t>

<t>The following table defines the Handshake Context and MAC Base Key
for each scenario:</t>

<texttable>
      <ttcol align='left'>Mode</ttcol>
      <ttcol align='left'>Handshake Context</ttcol>
      <ttcol align='left'>Base Key</ttcol>
      <c>0-RTT</c>
      <c>ClientHello</c>
      <c>early_traffic_secret</c>
      <c>1-RTT (Server)</c>
      <c>ClientHello … later of EncryptedExtensions/CertificateRequest</c>
      <c>handshake_traffic_secret</c>
      <c>1-RTT (Client)</c>
      <c>ClientHello … ServerFinished</c>
      <c>handshake_traffic_secret</c>
      <c>Post-Handshake</c>
      <c>ClientHello … ClientFinished + CertificateRequest</c>
      <c>traffic_secret_0</c>
</texttable>

<t>Note: The Handshake Context for the last three rows does not include any 0-RTT
  handshake messages, regardless of whether 0-RTT is used.</t>

<section anchor="certificate" title="Certificate">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>The server MUST send a Certificate message whenever the agreed-upon
key exchange method uses certificates for authentication (this
includes all key exchange methods defined in this document except PSK).</t>
</list></t>

<t><list style='empty'>
  <t>The client MUST send a Certificate message if and only if server has
requested client authentication via a CertificateRequest message
(<xref target="certificate-request"/>). If the server requests client authentication
but no suitable certificate is available, the client
MUST send a Certificate message containing no certificates (i.e., with
the “certificate_list” field having length 0).</t>
</list></t>

<t>Meaning of this message:</t>

<t><list style='empty'>
  <t>This message conveys the endpoint’s certificate chain to the peer.</t>
</list></t>

<t><list style='empty'>
  <t>The certificate MUST be appropriate for the negotiated cipher suite’s
authentication algorithm and any negotiated extensions.</t>
</list></t>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   opaque ASN1Cert<1..2^24-1>;

   struct {
       opaque certificate_request_context<0..2^8-1>;
       ASN1Cert certificate_list<0..2^24-1>;
   } Certificate;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='certificate_request_context'>
  If this message is in response to a CertificateRequest, the
value of certificate_request_context in that message. Otherwise,
in the case of server authentication this field SHALL be zero length.</t>
  <t hangText='certificate_list'>
  This is a sequence (chain) of certificates. The sender’s
certificate MUST come first in the list. Each following
certificate SHOULD directly certify one preceding it. Because
certificate validation requires that trust anchors be distributed
independently, a certificate that specifies a
trust anchor MAY be omitted from the chain, provided that
supported peers are known to possess any omitted certificates.</t>
</list></t>

<t>Note: Prior to TLS 1.3, “certificate_list” ordering required each certificate
to certify the one immediately preceding it,
however some implementations allowed some flexibility. Servers sometimes send
both a current and deprecated intermediate for transitional purposes, and others
are simply configured incorrectly, but these cases can nonetheless be validated
properly. For maximum compatibility, all implementations SHOULD be prepared to
handle potentially extraneous certificates and arbitrary orderings from any TLS
version, with the exception of the end-entity certificate which MUST be first.</t>

<t>The server’s certificate list MUST always be non-empty. A client will
send an empty certificate list if it does not have an appropriate
certificate to send in response to the server’s authentication
request.</t>

<section anchor="server-certificate-selection" title="Server Certificate Selection">

<t>The following rules apply to the certificates sent by the server:</t>

<t><list style="symbols">
  <t>The certificate type MUST be X.509v3 <xref target="RFC5280"/>, unless explicitly negotiated
otherwise (e.g., <xref target="RFC5081"/>).</t>
  <t>The server’s end-entity certificate’s public key (and associated
restrictions) MUST be compatible with the selected authentication
algorithm (currently RSA or ECDSA).</t>
  <t>The certificate MUST allow the key to be used for signing (i.e., the
digitalSignature bit MUST be set if the Key Usage extension is present) with
a signature scheme indicated in the client’s “signature_algorithms” extension.</t>
  <t>The “server_name” and “trusted_ca_keys” extensions <xref target="RFC6066"/> are used to
guide certificate selection. As servers MAY require the presence of the “server_name”
extension, clients SHOULD send this extension, when applicable.</t>
</list></t>

<t>All certificates provided by the server MUST be signed by a
signature algorithm that appears in the “signature_algorithms”
extension provided by the client, if they are able to provide such
a chain (see <xref target="signature-algorithms"/>).
Certificates that are self-signed
or certificates that are expected to be trust anchors are not validated as
part of the chain and therefore MAY be signed with any algorithm.</t>

<t>If the server cannot produce a certificate chain that is signed only via the
indicated supported algorithms, then it SHOULD continue the handshake by sending
the client a certificate chain of its choice that may include algorithms
that are not known to be supported by the client. This fallback chain MAY
use the deprecated SHA-1 hash algorithm only if the “signature_algorithms”
extension provided by the client permits it.
If the client cannot construct an acceptable chain using the provided
certificates and decides to abort the handshake, then it MUST send an
“unsupported_certificate” alert message and close the connection.</t>

<t>If the server has multiple certificates, it chooses one of them based on the
above-mentioned criteria (in addition to other criteria, such as transport
layer endpoint, local configuration and preferences).</t>

<t>As cipher suites that specify new key exchange methods are specified for the
TLS protocol, they will imply the certificate format and the required encoded
keying information.</t>

</section>
<section anchor="client-certificate-selection" title="Client Certificate Selection">

<t>The following rules apply to certificates sent by the client:</t>

<t>In particular:</t>

<t><list style="symbols">
  <t>The certificate type MUST be X.509v3 <xref target="RFC5280"/>, unless explicitly negotiated
otherwise (e.g., <xref target="RFC5081"/>).</t>
  <t>If the certificate_authorities list in the certificate request
message was non-empty, one of the certificates in the certificate
chain SHOULD be issued by one of the listed CAs.</t>
  <t>The certificates MUST be signed using an acceptable signature
algorithm, as described in <xref target="certificate-request"/>.  Note that this
relaxes the constraints on certificate-signing algorithms found in
prior versions of TLS.</t>
  <t>If the certificate_extensions list in the certificate request message
was non-empty, the end-entity certificate MUST match the extension OIDs
recognized by the client, as described in <xref target="certificate-request"/>.</t>
</list></t>

<t>Note that, as with the server certificate, there are certificates that use
algorithm combinations that cannot be currently used with TLS.</t>

</section>
<section anchor="receiving-a-certificate-message" title="Receiving a Certificate Message">

<t>In general, detailed certificate validation procedures are out of scope for
TLS (see <xref target="RFC5280"/>). This section provides TLS-specific requirements.</t>

<t>If the server supplies an empty Certificate message, the client MUST terminate
the handshake with a fatal “decode_error” alert.</t>

<t>If the client does not send any certificates,
the server MAY at its discretion either continue the handshake without client
authentication, or respond with a fatal “handshake_failure” alert. Also, if some
aspect of the certificate chain was unacceptable (e.g., it was not signed by a
known, trusted CA), the server MAY at its discretion either continue the
handshake (considering the client unauthenticated) or send a fatal alert.</t>

<t>Any endpoint receiving any certificate signed using any signature algorithm
using an MD5 hash MUST send a “bad_certificate” alert message and close
the connection. SHA-1 is deprecated and therefore NOT RECOMMENDED.
All endpoints are RECOMMENDED to transition to SHA-256 or better as soon
as possible to maintain interoperability with implementations
currently in the process of phasing out SHA-1 support.</t>

<t>Note that a certificate containing a key for one signature algorithm
MAY be signed using a different signature algorithm (for instance,
an RSA key signed with an ECDSA key).</t>

<t>Endpoints that reject certification paths due to use of a deprecated
hash MUST send a fatal “bad_certificate” alert message before closing
the connection.</t>

</section>
</section>
<section anchor="certificate-verify" title="Certificate Verify">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>This message is used to provide explicit proof that an endpoint
possesses the private key corresponding to its certificate
and also provides integrity for the handshake up
to this point. Servers MUST send this message when using
a cipher suite which is authenticated via a certificate.
Clients MUST send this
message whenever authenticating via a Certificate (i.e., when
the Certificate message is non-empty). When sent, this message MUST appear immediately
after the Certificate Message and immediately prior to the Finished
message.</t>
</list></t>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   struct {
        SignatureScheme algorithm;
        opaque signature<0..2^16-1>;
   } CertificateVerify;
]]></artwork></figure>

<t>The algorithm field specifies the signature algorithm used (see
<xref target="signature-algorithms"/> for the definition of this field). The
signature is a digital signature using that algorithm that covers the
hash output described in <xref target="authentication-messages"/> namely:</t>

<figure><artwork><![CDATA[
   Hash(Handshake Context + Certificate) + Hash(resumption_context)
]]></artwork></figure>

<t>In TLS 1.3, the digital signature process takes as input:</t>

<t><list style="symbols">
  <t>A signing key</t>
  <t>A context string</t>
  <t>The actual content to be signed</t>
</list></t>

<t>The digital signature is then computed using the signing key over
the concatenation of:</t>

<t><list style="symbols">
  <t>64 bytes of octet 32</t>
  <t>The context string</t>
  <t>A single 0 byte which servers as the separator</t>
  <t>The content to be signed</t>
</list></t>

<t>This structure is intended to prevent an attack on previous versions
of previous versions of TLS in which the ServerKeyExchange format meant that
attackers could obtain a signature of a message with a chosen, 32-byte
prefix. The initial 64 byte pad clears that prefix.</t>

<t>The context string for a server signature is
“TLS 1.3, server CertificateVerify”
and for a client signature is “TLS 1.3, client
CertificateVerify”.</t>

<t>For example, if Hash(Handshake Context + Certificate) was 32 bytes
of 01 and Hash(resumption_context) was 32 bytes of 02 (these lengths
would make sense for SHA-256, the input to the final signing process
for a server CertificateVerify would be:</t>

<figure><artwork><![CDATA[
   2020202020202020202020202020202020202020202020202020202020202020
   2020202020202020202020202020202020202020202020202020202020202020
   544c5320312e332c207365727665722043657274696669636174655665726966
   79
   00
   0101010101010101010101010101010101010101010101010101010101010101
   0202020202020202020202020202020202020202020202020202020202020202
]]></artwork></figure>

<t>If sent by a server, the signature algorithm MUST be one offered in the
client’s “signature_algorithms” extension unless no valid certificate chain can be
produced without unsupported algorithms (see <xref target="signature-algorithms"/>). Note that
there is a possibility for inconsistencies here. For instance, the client might
offer an ECDHE_ECDSA cipher suite but omit any ECDSA and EdDSA values from its
“signature_algorithms” extension. In order to negotiate correctly, the server
MUST check any candidate cipher suites against the “signature_algorithms”
extension before selecting them. This is somewhat inelegant but is a compromise
designed to minimize changes to the original cipher suite design.</t>

<t>If sent by a client, the signature algorithm used in the
signature MUST be one of those present in the
supported_signature_algorithms field of the CertificateRequest
message.</t>

<t>In addition, the signature algorithm MUST be compatible with the key
in the sender’s end-entity certificate. RSA signatures MUST use an
RSASSA-PSS algorithm, regardless of whether RSASSA-PKCS1-v1_5 algorithms
appear in “signature_algorithms”. SHA-1 MUST NOT be used in any signatures in
CertificateVerify. All SHA-1 signature algorithms in this specification are
defined solely for use in legacy certificates, and are not valid for
CertificateVerify signatures.</t>

<t>Note: When used with non-certificate-based handshakes (e.g., PSK), the
client’s signature does not cover the server’s certificate directly,
although it does cover the server’s Finished message, which
transitively includes the server’s certificate when the PSK derives
from a certificate-authenticated handshake.  <xref target="PSK-FINISHED"/>
describes a concrete attack on this mode if the Finished is omitted
from the signature. It is unsafe to use certificate-based client
authentication when the client might potentially share the same
PSK/key-id pair with two different endpoints. In order to ensure
this, implementations MUST NOT mix certificate-based client
authentication with pure PSK modes (i.e., those where the
PSK was not derived from a previous non-PSK handshake).</t>

</section>
<section anchor="finished" title="Finished">

<t>When this message will be sent:</t>

<t><list style='empty'>
  <t>The Finished message is the final message in the authentication
block. It is essential for providing authentication of the handshake
and of the computed keys.</t>
</list></t>

<t>Meaning of this message:</t>

<t><list style='empty'>
  <t>Recipients of Finished messages MUST verify that the contents are
correct. Once a side has sent its Finished message and received and
validated the Finished message from its peer, it may begin to send and
receive application data over the connection.</t>
</list></t>

<t>The key used to compute the finished message is computed from the
Base key defined in <xref target="authentication-messages"/> using HKDF (see
<xref target="key-schedule"/>). Specifically:</t>

<figure><artwork><![CDATA[
client_finished_key =
    HKDF-Expand-Label(BaseKey, "client finished", "", Hash.Length)

server_finished_key =
    HKDF-Expand-Label(BaseKey, "server finished", "", Hash.Length)
]]></artwork></figure>

<t>Structure of this message:</t>

<figure><artwork><![CDATA[
   struct {
       opaque verify_data[Hash.length];
   } Finished;
]]></artwork></figure>

<t>The verify_data value is computed as follows:</t>

<figure><artwork><![CDATA[
   verify_data =
       HMAC(finished_key, Hash(
                               Handshake Context +
                               Certificate* +
                               CertificateVerify*
                          ) +
                          Hash(resumption_context)
       )

   * Only included if present.
]]></artwork></figure>

<t>Where HMAC <xref target="RFC2104"/> uses the Hash algorithm for the handshake.
As noted above, the HMAC input can generally be implemented by a running
hash, i.e., just the handshake hash at this point.</t>

<t>In previous versions of TLS, the verify_data was always 12 octets long. In
the current version of TLS, it is the size of the HMAC output for the
Hash used for the handshake.</t>

<t>Note: Alerts and any other record types are not handshake messages
and are not included in the hash computations.</t>

</section>
</section>
<section anchor="post-handshake-messages" title="Post-Handshake Messages">

<t>TLS also allows other messages to be sent after the main handshake.
These messages use a handshake content type and are encrypted under the application
traffic key.</t>

<section anchor="NewSessionTicket" title="New Session Ticket Message">

<t>At any time after the server has received the client Finished message, it MAY send
a NewSessionTicket message. This message creates a pre-shared key
(PSK) binding between the ticket value and the following two values derived
from the resumption master secret:</t>

<figure><artwork><![CDATA[
   resumption_psk = HKDF-Expand-Label(
                        resumption_secret,
                        "resumption psk", "", Hash.Length)

   resumption_context = HKDF-Expand-Label(
                            resumption_secret,
                            "resumption context", "", Hash.Length)
]]></artwork></figure>

<t>The client MAY use this PSK for future handshakes by including
the ticket value in the “pre_shared_key” extension in its ClientHello
(<xref target="pre-shared-key-extension"/>) and supplying a suitable PSK cipher
suite. Servers may send multiple tickets on a single connection, for
instance after post-handshake authentication. For handshakes that
do not use a resumption_psk, the resumption_context is a string of
Hash.Length zeroes.</t>

<figure><artwork><![CDATA[
 enum { (65535) } TicketExtensionType;

 struct {
     TicketExtensionType extension_type;
     opaque extension_data<1..2^16-1>;
 } TicketExtension;

 enum {
   allow_early_data(1),
   allow_dhe_resumption(2),
   allow_psk_resumption(4)
 } TicketFlags;

 struct {
     uint32 ticket_lifetime;
     uint32 flags;
     uint32 ticket_age_add;
     TicketExtension extensions<2..2^16-2>;
     opaque ticket<0..2^16-1>;
 } NewSessionTicket;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='flags'>
  A 32-bit value indicating the ways in which this ticket may
be used (as a bitwise OR of the flags values).</t>
  <t hangText='ticket_lifetime'>
  Indicates the lifetime in seconds as a 32-bit unsigned integer in
network byte order from the time of ticket issuance.
Servers MUST NOT use any value more than 604800 seconds (7 days).
The value of zero indicates that the ticket should be discarded
immediately. Clients MUST NOT cache session tickets for longer than
7 days, regardless of the ticket_lifetime. It MAY delete the ticket
earlier based on local policy. A server MAY treat a ticket as valid
for a shorter period of time than what is stated in the
ticket_lifetime.</t>
  <t hangText='ticket_age_add'>
  A randomly generated 32-bit value that is used to obscure the age of the ticket that the
client includes in the “early_data” extension.  The actual ticket age is
added to this value modulo 2^32 to obtain the value that is transmitted by
the client.</t>
  <t hangText='ticket_extensions'>
  A placeholder for extensions in the ticket. Clients MUST ignore
unrecognized extensions.</t>
  <t hangText='ticket'>
  The value of the ticket to be used as the PSK identifier.
The ticket itself is an opaque label. It MAY either be a database
lookup key or a self-encrypted and self-authenticated value. Section
4 of <xref target="RFC5077"/> describes a recommended ticket construction mechanism.</t>
</list></t>

<t>The meanings of the flags are as follows:</t>

<t><list style="hanging">
  <t hangText='allow_early_data'>
  When resuming with this ticket, the client MAY send data in its
first flight (early data) encrypted under a key derived from
this PSK.</t>
  <t hangText='allow_dhe_resumption'>
  This ticket MAY be used with (EC)DHE-PSK cipher
suite.</t>
  <t hangText='allow_psk_resumption'>
  This ticket MAY be used with a pure PSK cipher
suite.</t>
</list></t>

<t>In all cases, the PSK or (EC)DHE-PSK cipher suites that the client
offers/uses MUST have the same symmetric parameters (cipher/hash) as
the cipher suite negotiated for this connection. If no flags are set
that the client recognizes, it MUST ignore the ticket.</t>

</section>
<section anchor="post-handshake-authentication" title="Post-Handshake Authentication">

<t>The server is permitted to request client authentication at any time
after the handshake has completed by sending a CertificateRequest
message. The client SHOULD respond with the appropriate Authentication
messages. If the client chooses to authenticate, it MUST send
Certificate, CertificateVerify, and Finished. If it declines, it
MUST send a Certificate message containing no certificates followed by Finished.</t>

<t>Note: Because client authentication may require prompting the user,
servers MUST be prepared for some delay, including receiving an
arbitrary number of other messages between sending the
CertificateRequest and receiving a response. In addition, clients which receive multiple
CertificateRequests in close succession MAY respond to them in a
different order than they were received (the
certificate_request_context value allows the server to disambiguate
the responses).</t>

</section>
<section anchor="key-update" title="Key and IV Update">

<figure><artwork><![CDATA[
 struct {} KeyUpdate;
]]></artwork></figure>

<t>The KeyUpdate handshake message is used to indicate that the sender is
updating its sending cryptographic keys. This message can be sent by
the server after sending its first flight and the client after sending
its second flight. Implementations that receive a KeyUpdate message
prior to receiving a Finished message as part of the 1-RTT handshake
MUST generate a fatal “unexpected_message” alert.  After sending a
KeyUpdate message, the sender SHALL send all its traffic using the
next generation of keys, computed as described in
<xref target="updating-traffic-keys"/>. Upon receiving a KeyUpdate, the receiver
MUST update their receiving keys and if they have not already updated
their sending state up to or past the then current receiving
generation MUST send their own KeyUpdate prior to sending any other
messages.  This mechanism allows either side to force an update to the
entire connection. Note that implementations may receive an arbitrary
number of messages between sending a KeyUpdate and receiving the
peer’s KeyUpdate because those messages may already be in flight.</t>

<t>Note that if implementations independently send their own
KeyUpdates and they cross in flight, this only results in an
update of one generation; when each side receives the other
side’s update it just updates its receive keys and notes that
the generations match and thus no send update is needed.</t>

<t>Note that the side which sends its KeyUpdate first needs to retain
its receive traffic keys (though not the traffic secret) for the previous
generation of keys until it receives the KeyUpdate from the other
side.</t>

<t>Both sender and receiver MUST encrypt their KeyUpdate
messages with the old keys. Additionally, both sides MUST enforce that
a KeyUpdate with the old key is received before accepting any messages
encrypted with the new key. Failure to do so may allow message truncation
attacks.</t>

</section>
</section>
</section>
<section anchor="record-protocol" title="Record Protocol">

<t>The TLS record protocol takes messages to be transmitted, fragments
the data into manageable blocks, protects the records, and transmits
the result. Received data is decrypted and verified, reassembled, and
then delivered to higher-level clients.</t>

<t>TLS records are typed, which allows multiple higher level protocols to
be multiplexed over the same record layer. This document specifies
three content types: handshake, application data, and alert.
Implementations MUST NOT send record types not defined in this
document unless negotiated by some extension. If a TLS implementation
receives an unexpected record type, it MUST send an
“unexpected_message” alert.  New record content type values are
assigned by IANA in the TLS Content Type Registry as described in
<xref target="iana-considerations"/>.</t>

<t>Application data messages are carried by the record layer and are
fragmented and encrypted as described below. The messages are treated
as transparent data to the record layer.</t>

<section anchor="record-layer" title="Record Layer">

<t>The TLS record layer receives uninterpreted data from higher layers in
non-empty blocks of arbitrary size.</t>

<t>The record layer fragments information blocks into TLSPlaintext records
carrying data in chunks of 2^14 bytes or less. Message boundaries are
not preserved in the record layer (i.e., multiple messages of the same
ContentType MAY be coalesced into a single TLSPlaintext record, or a single
message MAY be fragmented across several records).
Alert messages (<xref target="alert-protocol"/>) MUST NOT be fragmented across records.</t>

<figure><artwork><![CDATA[
   enum {
       alert(21),
       handshake(22),
       application_data(23)
       (255)
   } ContentType;

   struct {
       ContentType type;
       ProtocolVersion record_version = { 3, 1 };    /* TLS v1.x */
       uint16 length;
       opaque fragment[TLSPlaintext.length];
   } TLSPlaintext;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='type'>
  The higher-level protocol used to process the enclosed fragment.</t>
  <t hangText='record_version'>
  The protocol version the current record is compatible with.
This value MUST be set to { 3, 1 } for all records.
This field is deprecated and MUST be ignored for all purposes.</t>
  <t hangText='length'>
  The length (in bytes) of the following TLSPlaintext.fragment. The
length MUST NOT exceed 2^14.</t>
  <t hangText='fragment'>
  The data being transmitted. This value transparent and treated as an
independent block to be dealt with by the higher-level protocol
specified by the type field.</t>
</list></t>

<t>This document describes TLS Version 1.3, which uses the version { 3, 4 }.
The version value 3.4 is historical, deriving from the use of { 3, 1 }
for TLS 1.0 and { 3, 0 } for SSL 3.0. In order to maximize backwards
compatibility, the record layer version identifies as simply TLS 1.0.
Endpoints supporting other versions negotiate the version to use
by following the procedure and requirements in <xref target="backward-compatibility"/>.</t>

<t>Implementations MUST NOT send zero-length fragments of Handshake or
Alert types, even if those fragments contain padding. Zero-length
fragments of Application data MAY be sent as they are potentially
useful as a traffic analysis countermeasure.</t>

<t>When record protection has not yet been engaged, TLSPlaintext
structures are written directly onto the wire. Once record protection
has started, TLSPlaintext records are protected and sent as
described in the following section.</t>

</section>
<section anchor="record-payload-protection" title="Record Payload Protection">

<t>The record protection functions translate a TLSPlaintext structure into a
TLSCiphertext. The deprotection functions reverse the process. In TLS 1.3
as opposed to previous versions of TLS, all ciphers are modeled as
“Authenticated Encryption with Additional Data” (AEAD) <xref target="RFC5116"/>.
AEAD functions provide a unified encryption and authentication
operation which turns plaintext into authenticated ciphertext and
back again. Each encrypted record consists of a plaintext header followed
by an encrypted body, which itself contains a type and optional padding.</t>

<figure><artwork><![CDATA[
   struct {
      opaque content[TLSPlaintext.length];
      ContentType type;
      uint8 zeros[length_of_padding];
   } TLSInnerPlaintext;

   struct {
       ContentType opaque_type = application_data(23); /* see fragment.type */
       ProtocolVersion record_version = { 3, 1 };    /* TLS v1.x */
       uint16 length;
       opaque encrypted_record[length];
   } TLSCiphertext;
]]></artwork></figure>

<t><list style="hanging">
  <t hangText='content'>
  The cleartext of TLSPlaintext.fragment.</t>
  <t hangText='type'>
  The content type of the record.</t>
  <t hangText='zeros'>
  An arbitrary-length run of zero-valued bytes may
appear in the cleartext after the type field.  This provides an
opportunity for senders to pad any TLS record by a chosen amount as
long as the total stays within record size limits.  See
<xref target="record-padding"/> for more details.</t>
  <t hangText='opaque_type'>
  The outer opaque_type field of a TLSCiphertext record is always set to the
value 23 (application_data) for outward compatibility with
middleboxes accustomed to parsing previous versions of TLS.  The
actual content type of the record is found in fragment.type after
decryption.</t>
  <t hangText='record_version'>
  The record_version field is identical to TLSPlaintext.record_version and is always { 3, 1 }.
Note that the handshake protocol including the ClientHello and ServerHello messages authenticates
the protocol version, so this value is redundant.</t>
  <t hangText='length'>
  The length (in bytes) of the following TLSCiphertext.fragment, which
is the sum of the lengths of the content and the padding, plus one
for the inner content type. The length MUST NOT exceed 2^14 + 256.
An endpoint that receives a record that exceeds this length MUST
generate a fatal “record_overflow” alert.</t>
  <t hangText='encrypted_record'>
  The AEAD encrypted form of the serialized TLSInnerPlaintext structure.</t>
</list></t>

<t>AEAD ciphers take as input a single key, a nonce, a plaintext, and “additional
data” to be included in the authentication check, as described in Section 2.1
of <xref target="RFC5116"/>. The key is either the client_write_key or the server_write_key,
the nonce is derived from the sequence number (see <xref target="nonce"/>) and the
client_write_iv or server_write_iv, and the additional data input is empty
(zero length).  Derivation of traffic keys is defined in <xref target="traffic-key-calculation"/>.</t>

<t>The plaintext is the concatenation of TLSPlaintext.fragment,
TLSPlaintext.type, and any padding bytes (zeros).</t>

<t>The AEAD output consists of the ciphertext output by the AEAD
encryption operation. The length of the plaintext is greater than
TLSPlaintext.length due to the inclusion of TLSPlaintext.type and
however much padding is supplied by the sender.  The length of the
AEAD output will generally be larger than the plaintext, but by an
amount that varies with the AEAD cipher. Since the ciphers might
incorporate padding, the amount of overhead could vary with different
lengths of plaintext. Symbolically,</t>

<figure><artwork><![CDATA[
   AEADEncrypted =
       AEAD-Encrypt(write_key, nonce, plaintext of fragment)
]]></artwork></figure>

<t>In order to decrypt and verify, the cipher takes as input the key,
nonce, and the AEADEncrypted value. The output is either the plaintext
or an error indicating that the decryption failed. There is no
separate integrity check. That is:</t>

<figure><artwork><![CDATA[
   plaintext of fragment =
       AEAD-Decrypt(write_key, nonce, AEADEncrypted)
]]></artwork></figure>

<t>If the decryption fails, a fatal “bad_record_mac” alert MUST be generated.</t>

<t>An AEAD cipher MUST NOT produce an expansion of greater than 255
bytes.  An endpoint that receives a record from its peer with
TLSCipherText.length larger than 2^14 + 256 octets MUST generate a
fatal “record_overflow” alert.  This limit is derived from the maximum
TLSPlaintext length of 2^14 octets + 1 octet for ContentType + the
maximum AEAD expansion of 255 octets.</t>

</section>
<section anchor="nonce" title="Per-Record Nonce">

<t>A 64-bit sequence number is maintained separately for reading and writing
records.  Each sequence number is set to zero at the beginning of a connection
and whenever the key is changed.</t>

<t>The sequence number is incremented after reading or writing each record.
The first record transmitted under a particular set of traffic keys
record key MUST use sequence number 0.</t>

<t>Sequence numbers do not wrap.  If a TLS implementation would need to
wrap a sequence number, it MUST either rekey (<xref target="key-update"/>) or
terminate the connection.</t>

<t>The length of the per-record nonce (iv_length) is set to max(8 bytes,
N_MIN) for the AEAD algorithm (see <xref target="RFC5116"/> Section 4). An AEAD
algorithm where N_MAX is less than 8 bytes MUST NOT be used with TLS.
The per-record nonce for the AEAD construction is formed as follows:</t>

<t><list style="numbers">
  <t>The 64-bit record sequence number is padded to the left with zeroes
to iv_length.</t>
  <t>The padded sequence number is XORed with the static client_write_iv
or server_write_iv, depending on the role.</t>
</list></t>

<t>The resulting quantity (of length iv_length) is used as the per-record
nonce.</t>

<t>Note: This is a different construction from that in TLS 1.2, which
specified a partially explicit nonce.</t>

</section>
<section anchor="record-padding" title="Record Padding">

<t>All encrypted TLS records can be padded to inflate the size of the
TLSCipherText.  This allows the sender to hide the size of the
traffic from an observer.</t>

<t>When generating a TLSCiphertext record, implementations MAY choose to
pad.  An unpadded record is just a record with a padding length of
zero.  Padding is a string of zero-valued bytes appended
to the ContentType field before encryption.  Implementations MUST set
the padding octets to all zeros before encrypting.</t>

<t>Application Data records may contain a zero-length fragment.content if
the sender desires.  This permits generation of plausibly-sized cover
traffic in contexts where the presence or absence of activity may be
sensitive.  Implementations MUST NOT send Handshake or Alert records
that have a zero-length fragment.content.</t>

<t>The padding sent is automatically verified by the record protection
mechanism: Upon successful decryption of a TLSCiphertext.fragment,
the receiving implementation scans the field from the end toward the
beginning until it finds a non-zero octet. This non-zero octet is the
content type of the message.
This padding scheme was selected because it allows padding of any encrypted
TLS record by an arbitrary size (from zero up to TLS record size
limits) without introducing new content types.  The design also
enforces all-zero padding octets, which allows for quick detection of
padding errors.</t>

<t>Implementations MUST limit their scanning to the cleartext returned
from the AEAD decryption.  If a receiving implementation does not find
a non-zero octet in the cleartext, it should treat the record as
having an unexpected ContentType, sending an “unexpected_message”
alert.</t>

<t>The presence of padding does not change the overall record size
limitations – the full fragment plaintext may not exceed 2^14 octets.</t>

<t>Selecting a padding policy that suggests when and how much to pad is a
complex topic, and is beyond the scope of this specification. If the
application layer protocol atop TLS has its own padding padding, it may be
preferable to pad application_data TLS records within the application
layer.  Padding for encrypted handshake and alert TLS records must
still be handled at the TLS layer, though.  Later documents may define
padding selection algorithms, or define a padding policy request
mechanism through TLS extensions or some other means.</t>

</section>
<section anchor="limits-on-key-usage" title="Limits on Key Usage">

<t>There are cryptographic limits on the amount of plaintext which can be
safely encrypted under a given set of keys.  <xref target="AEAD-LIMITS"/> provides
an analysis of these limits under the assumption that the underlying
primitive (AES or ChaCha20) has no weaknesses. Implementations SHOULD
do a key update <xref target="key-update"/> prior to reaching these limits.</t>

<t>For AES-GCM, up to 2^24.5 full-size records may be encrypted on a
given connection while keeping a safety margin of approximately
2^-57 for Authenticated Encryption (AE) security. For
ChaCha20/Poly1305, the record sequence number will wrap before the
safety limit is reached.</t>

</section>
</section>
<section anchor="alert-protocol" title="Alert Protocol">

<t>One of the content types supported by the TLS record layer is the
alert type.  Like other messages, alert messages are encrypted as
specified by the current connection state.</t>

<t>Alert messages convey the severity of the message (warning or fatal)
and a description of the alert. Warning-level messages are used to
indicate orderly closure of the connection (see <xref target="closure-alerts"/>).
Upon receiving a warning-level alert, the TLS implementation SHOULD
indicate end-of-data to the application and, if appropriate for
the alert type, send a closure alert in response.</t>

<t>Fatal-level messages are used to indicate abortive closure of the
connection (See <xref target="error-alerts"/>). Upon receiving a fatal-level alert,
the TLS implementation SHOULD indicate an error to the application and
MUST NOT allow any further data to be sent or received on the
connection.  Servers and clients MUST forget keys and secrets
associated with a failed connection. Stateful implementations of
session tickets (as in many clients) SHOULD discard tickets associated
with failed connections.</t>

<t>All the alerts listed in <xref target="error-alerts"/> MUST be sent as fatal and
MUST be treated as fatal regardless of the AlertLevel in the
message. Unknown alert types MUST be treated as fatal.</t>

<figure><artwork><![CDATA[
   enum { warning(1), fatal(2), (255) } AlertLevel;

   enum {
       close_notify(0),
       end_of_early_data(1),
       unexpected_message(10),
       bad_record_mac(20),
       record_overflow(22),
       handshake_failure(40),
       bad_certificate(42),
       unsupported_certificate(43),
       certificate_revoked(44),
       certificate_expired(45),
       certificate_unknown(46),
       illegal_parameter(47),
       unknown_ca(48),
       access_denied(49),
       decode_error(50),
       decrypt_error(51),
       protocol_version(70),
       insufficient_security(71),
       internal_error(80),
       inappropriate_fallback(86),
       user_canceled(90),
       missing_extension(109),
       unsupported_extension(110),
       certificate_unobtainable(111),
       unrecognized_name(112),
       bad_certificate_status_response(113),
       bad_certificate_hash_value(114),
       unknown_psk_identity(115),
       (255)
   } AlertDescription;

   struct {
       AlertLevel level;
       AlertDescription description;
   } Alert;
]]></artwork></figure>

<section anchor="closure-alerts" title="Closure Alerts">

<t>The client and the server must share knowledge that the connection is ending in
order to avoid a truncation attack. Failure to properly close a connection does
not prohibit a session from being resumed.</t>

<t><list style="hanging">
  <t hangText='close_notify'>
  This alert notifies the recipient that the sender will not send
any more messages on this connection. Any data received after a
closure MUST be ignored.</t>
  <t hangText='end_of_early_data'>
  This alert is sent by the client to indicate that all 0-RTT
application_data messages have been transmitted (or none will
be sent at all) and that this is the end of the flight. This
alert MUST be at the warning level. Servers MUST NOT send this
alert and clients receiving it MUST terminate the connection
with an “unexpected_message” alert.</t>
  <t hangText='user_canceled'>
  This alert notifies the recipient that the sender is canceling the
handshake for some reason unrelated to a protocol failure. If a user
cancels an operation after the handshake is complete, just closing the
connection by sending a “close_notify” is more appropriate. This alert
SHOULD be followed by a “close_notify”. This alert is generally a warning.</t>
</list></t>

<t>Either party MAY initiate a close by sending a “close_notify” alert. Any data
received after a closure alert is ignored. If a transport-level close is
received prior to a “close_notify”, the receiver cannot know that all the
data that was sent has been received.</t>

<t>Each party MUST send a “close_notify” alert before closing the write side
of the connection, unless some other fatal alert has been transmitted. The
other party MUST respond with a “close_notify” alert of its own and close down
the connection immediately, discarding any pending writes. The initiator of the
close need not wait for the responding “close_notify” alert before closing the
read side of the connection.</t>

<t>If the application protocol using TLS provides that any data may be carried
over the underlying transport after the TLS connection is closed, the TLS
implementation must receive the responding “close_notify” alert before indicating
to the application layer that the TLS connection has ended. If the application
protocol will not transfer any additional data, but will only close the
underlying transport connection, then the implementation MAY choose to close
the transport without waiting for the responding “close_notify”. No part of this
standard should be taken to dictate the manner in which a usage profile for TLS
manages its data transport, including when connections are opened or closed.</t>

<t>Note: It is assumed that closing a connection reliably delivers pending data
before destroying the transport.</t>

</section>
<section anchor="error-alerts" title="Error Alerts">

<t>Error handling in the TLS Handshake Protocol is very simple. When an
error is detected, the detecting party sends a message to its
peer. Upon transmission or receipt of a fatal alert message, both
parties immediately close the connection.  Whenever an implementation
encounters a condition which is defined as a fatal alert, it MUST send
the appropriate alert prior to closing the connection. All alerts defined
in this section below, as well as all unknown alerts are universally
considered fatal as of TLS 1.3 (see <xref target="alert-protocol"/>).</t>

<t>The following error alerts are defined:</t>

<t><list style="hanging">
  <t hangText='unexpected_message'>
  An inappropriate message was received. This alert should never be
observed in communication between proper implementations.</t>
  <t hangText='bad_record_mac'>
  This alert is returned if a record is received which cannot be
deprotected. Because AEAD algorithms combine decryption and
verification, this alert is used for all deprotection failures.
This alert should never be observed in communication between
proper implementations, except when messages were corrupted
in the network.</t>
  <t hangText='record_overflow'>
  A TLSCiphertext record was received that had a length more than
2^14 + 256 bytes, or a record decrypted to a TLSPlaintext record
with more than 2^14 bytes.
This alert should never be observed in communication between
proper implementations, except when messages were corrupted
in the network.</t>
  <t hangText='handshake_failure'>
  Reception of a “handshake_failure” alert message indicates that the
sender was unable to negotiate an acceptable set of security
parameters given the options available.</t>
  <t hangText='bad_certificate'>
  A certificate was corrupt, contained signatures that did not
verify correctly, etc.</t>
  <t hangText='unsupported_certificate'>
  A certificate was of an unsupported type.</t>
  <t hangText='certificate_revoked'>
  A certificate was revoked by its signer.</t>
  <t hangText='certificate_expired'>
  A certificate has expired or is not currently valid.</t>
  <t hangText='certificate_unknown'>
  Some other (unspecified) issue arose in processing the
certificate, rendering it unacceptable.</t>
  <t hangText='illegal_parameter'>
  A field in the handshake was out of range or inconsistent with
other fields.</t>
  <t hangText='unknown_ca'>
  A valid certificate chain or partial chain was received, but the
certificate was not accepted because the CA certificate could not
be located or couldn’t be matched with a known, trusted CA.</t>
  <t hangText='access_denied'>
  A valid certificate or PSK was received, but when access control was
applied, the sender decided not to proceed with negotiation.</t>
  <t hangText='decode_error'>
  A message could not be decoded because some field was out of the
specified range or the length of the message was incorrect.
This alert should never be observed in communication between
proper implementations, except when messages were corrupted
in the network.</t>
  <t hangText='decrypt_error'>
  A handshake cryptographic operation failed, including being unable
to correctly verify a signature or validate a Finished message.</t>
  <t hangText='protocol_version'>
  The protocol version the peer has attempted to negotiate is
recognized but not supported. (see <xref target="backward-compatibility"/>)</t>
  <t hangText='insufficient_security'>
  Returned instead of “handshake_failure” when a negotiation has
failed specifically because the server requires ciphers more
secure than those supported by the client.</t>
  <t hangText='internal_error'>
  An internal error unrelated to the peer or the correctness of the
protocol (such as a memory allocation failure) makes it impossible
to continue.</t>
  <t hangText='inappropriate_fallback'>
  Sent by a server in response to an invalid connection retry attempt
from a client. (see [RFC7507])</t>
  <t hangText='missing_extension'>
  Sent by endpoints that receive a hello message not containing an
extension that is mandatory to send for the offered TLS version.
[[TODO: IANA Considerations.]]</t>
  <t hangText='unsupported_extension'>
  Sent by endpoints receiving any hello message containing an extension
known to be prohibited for inclusion in the given hello message, including
any extensions in a ServerHello not first offered in the corresponding
ClientHello.</t>
  <t hangText='certificate_unobtainable'>
  Sent by servers when unable to obtain a certificate from a URL
provided by the client via the “client_certificate_url” extension
<xref target="RFC6066"></xref>.</t>
  <t hangText='unrecognized_name'>
  Sent by servers when no server exists identified by the name
provided by the client via the “server_name” extension
<xref target="RFC6066"></xref>.</t>
  <t hangText='bad_certificate_status_response'>
  Sent by clients when an invalid or unacceptable OCSP response is
provided by the server via the “status_request” extension
<xref target="RFC6066"></xref>. This alert is always fatal.</t>
  <t hangText='bad_certificate_hash_value'>
  Sent by servers when a retrieved object does not have the correct hash
provided by the client via the “client_certificate_url” extension
<xref target="RFC6066"></xref>.</t>
  <t hangText='unknown_psk_identity'>
  Sent by servers when a PSK cipher suite is selected but no
 acceptable PSK identity is provided by the client. Sending this alert
 is OPTIONAL; servers MAY instead choose to send a “decrypt_error”
 alert to merely indicate an invalid PSK identity.</t>
</list></t>

<t>New Alert values are assigned by IANA as described in <xref target="iana-considerations"/>.</t>

</section>
</section>
<section anchor="cryptographic-computations" title="Cryptographic Computations">

<t>In order to begin connection protection, the TLS Record Protocol
requires specification of a suite of algorithms, a master secret, and
the client and server random values. The authentication, key
exchange, and record protection algorithms are determined by the
cipher_suite selected by the server and revealed in the ServerHello
message. The random values are exchanged in the hello messages. All
that remains is to calculate the key schedule.</t>

<section anchor="key-schedule" title="Key Schedule">

<t>The TLS handshake establishes one or more input secrets which
are combined to create the actual working keying material, as detailed
below.
The key derivation process makes use of the HKDF-Extract and HKDF-Expand
functions as defined for HKDF <xref target="RFC5869"/>, as well as the functions
defined below:</t>

<figure><artwork><![CDATA[
    HKDF-Expand-Label(Secret, Label, HashValue, Length) =
         HKDF-Expand(Secret, HkdfLabel, Length)

    Where HkdfLabel is specified as:

    struct HkdfLabel
    {
      uint16 length = Length;
      opaque label<9..255> = "TLS 1.3, " + Label;
      opaque hash_value<0..255> = HashValue;
    };

    Derive-Secret(Secret, Label, Messages) =
         HKDF-Expand-Label(Secret, Label,
                           Hash(Messages) +
                           Hash(resumption_context), Hash.Length)
]]></artwork></figure>

<t>The Hash function and the HKDF hash are the cipher suite hash function.
Hash.Length is its output length.</t>

<t>Given a set of n InputSecrets, the final “master secret” is computed
by iteratively invoking HKDF-Extract with InputSecret_1, InputSecret_2,
etc.  The initial secret is simply a string of zeroes as long as the size
of the Hash that is the basis for the HKDF. Concretely, for the
present version of TLS 1.3, secrets are added in the following order:</t>

<t><list style="symbols">
  <t>PSK</t>
  <t>(EC)DHE shared secret</t>
</list></t>

<t>This produces a full key derivation schedule shown in the diagram below.
In this diagram, the following formatting conventions apply:</t>

<t><list style="symbols">
  <t>HKDF-Extract is drawn as taking the Salt argument from the top and the IKM argument
from the left.</t>
  <t>Derive-Secret’s Secret argument is indicated by the arrow coming in
from the left. For instance, the Early Secret is the Secret for
generating the early_traffic-secret.</t>
</list></t>

<figure><artwork><![CDATA[
                 0
                 |
                 v
   PSK ->  HKDF-Extract
                 |
                 v
           Early Secret ---> Derive-Secret(., "early traffic secret",
                 |                         ClientHello)
                 |                         = early_traffic_secret
                 v
(EC)DHE -> HKDF-Extract
                 |
                 v
              Handshake
               Secret -----> Derive-Secret(., "handshake traffic secret",
                 |                         ClientHello + ServerHello)
                 |                         = handshake_traffic_secret
                 v
      0 -> HKDF-Extract
                 |
                 v
            Master Secret
                 |
                 +---------> Derive-Secret(., "application traffic secret",
                 |                         ClientHello...Server Finished)
                 |                         = traffic_secret_0
                 |
                 +---------> Derive-Secret(., "exporter master secret",
                 |                         ClientHello...Client Finished)
                 |                         = exporter_secret
                 |
                 +---------> Derive-Secret(., "resumption master secret",
                                           ClientHello...Client Finished)
                                           = resumption_secret
]]></artwork></figure>

<t>The general pattern here is that the secrets shown down the left side
of the diagram are just raw entropy without context, whereas the
secrets down the right side include handshake context and therefore
can be used to derive working keys without additional context.
Note that the different
calls to Derive-Secret may take different Messages arguments,
even with the same secret. In a 0-RTT exchange, Derive-Secret is
called with four distinct transcripts; in a 1-RTT only exchange
with three distinct transcripts.</t>

<t>If a given secret is not available, then the 0-value consisting of
a string of Hash.length zeroes is used.  Note that this does not mean skipping
rounds, so if PSK is not in use Early Secret will still be
HKDF-Extract(0, 0).</t>

</section>
<section anchor="updating-traffic-keys" title="Updating Traffic Keys and IVs">

<t>Once the handshake is complete, it is possible for either side to
update its sending traffic keys using the KeyUpdate handshake message
defined in <xref target="key-update"/>.  The next generation of traffic keys is computed by
generating traffic_secret_N+1 from traffic_secret_N as described in
this section then re-deriving the traffic keys as described in
<xref target="traffic-key-calculation"/>.</t>

<t>The next-generation traffic_secret is computed as:</t>

<figure><artwork><![CDATA[
    traffic_secret_N+1 = HKDF-Expand-Label(
                             traffic_secret_N,
                             "application traffic secret", "", Hash.Length)
]]></artwork></figure>

<t>Once traffic_secret_N+1 and its associated traffic keys have been computed,
implementations SHOULD delete traffic_secret_N. Once the directional
keys are no longer needed, they SHOULD be deleted as well.</t>

</section>
<section anchor="traffic-key-calculation" title="Traffic Key Calculation">

<t>The traffic keying material is generated from the following input values:</t>

<t><list style="symbols">
  <t>A secret value</t>
  <t>A phase value indicating the phase of the protocol the keys are
being generated for</t>
  <t>A purpose value indicating the specific value being generated</t>
  <t>The length of the key</t>
</list></t>

<t>The keying material is computed using:</t>

<figure><artwork><![CDATA[
   key = HKDF-Expand-Label(Secret,
                           phase + ", " + purpose,
                           "",
                           key_length)
]]></artwork></figure>

<t>The following table describes the inputs to the key calculation for
each class of traffic keys:</t>

<texttable>
      <ttcol align='left'>Record Type</ttcol>
      <ttcol align='left'>Secret</ttcol>
      <ttcol align='left'>Phase</ttcol>
      <c>0-RTT Handshake</c>
      <c>early_traffic_secret</c>
      <c>“early handshake key expansion”</c>
      <c>0-RTT Application</c>
      <c>early_traffic_secret</c>
      <c>“early application data key expansion”</c>
      <c>Handshake</c>
      <c>handshake_traffic_secret</c>
      <c>“handshake key expansion”</c>
      <c>Application Data</c>
      <c>traffic_secret_N</c>
      <c>“application data key expansion”</c>
</texttable>

<t>The following table indicates the purpose values for each type of key:</t>

<texttable>
      <ttcol align='left'>Key Type</ttcol>
      <ttcol align='left'>Purpose</ttcol>
      <c>client_write_key</c>
      <c>“client write key”</c>
      <c>server_write_key</c>
      <c>“server write key”</c>
      <c>client_write_iv</c>
      <c>“client write iv”</c>
      <c>server_write_iv</c>
      <c>“server write iv”</c>
</texttable>

<t>All the traffic keying material is recomputed whenever the
underlying Secret changes (e.g., when changing from the handshake to
application data keys or upon a key update).</t>

<section anchor="diffie-hellman" title="Diffie-Hellman">

<t>A conventional Diffie-Hellman computation is performed. The negotiated key (Z)
is converted to byte string by encoding in big-endian, padded with zeros up to
the size of the prime. This byte string is used as the shared secret, and is
used in the key schedule as specified above.</t>

<t>Note that this construction differs from previous versions of TLS which remove
leading zeros.</t>

</section>
<section anchor="elliptic-curve-diffie-hellman" title="Elliptic Curve Diffie-Hellman">

<t>For secp256r1, secp384r1 and secp521r1, ECDH calculations (including parameter
and key generation as well as the shared secret calculation) are
performed according to <xref target="IEEE1363"/> using the ECKAS-DH1 scheme with the identity
map as key derivation function (KDF), so that the shared secret is the
x-coordinate of the ECDH shared secret elliptic curve point represented
as an octet string.  Note that this octet string (Z in IEEE 1363 terminology)
as output by FE2OSP, the Field Element to Octet String Conversion
Primitive, has constant length for any given field; leading zeros
found in this octet string MUST NOT be truncated.</t>

<t>(Note that this use of the identity KDF is a technicality.  The
complete picture is that ECDH is employed with a non-trivial KDF
because TLS does not directly use this secret for anything
other than for computing other secrets.)</t>

<t>ECDH functions are used as follows:</t>

<t><list style="symbols">
  <t>The public key to put into the KeyShareEntry.key_exchange structure is the
result of applying the ECDH function to the secret key of appropriate length
(into scalar input) and the standard public basepoint (into u-coordinate point
input).</t>
  <t>The ECDH shared secret is the result of applying ECDH function to the secret
key (into scalar input) and the peer’s public key (into u-coordinate point
input). The output is used raw, with no processing.</t>
</list></t>

<t>For X25519 and X448, see <xref target="RFC7748"/>.</t>

</section>
<section anchor="exporters" title="Exporters">

<t><xref target="RFC5705"/> defines keying material exporters for TLS in terms of
the TLS PRF. This document replaces the PRF with HKDF, thus requiring
a new construction. The exporter interface remains the same, however
the value is computed as:</t>

<figure><artwork><![CDATA[
HKDF-Expand-Label(exporter_secret,
                  label, context_value, key_length)
]]></artwork></figure>

</section>
</section>
</section>
<section anchor="compliance-requirements" title="Compliance Requirements">

<section anchor="mti-cipher-suites" title="MTI Cipher Suites">

<t>In the absence of an application profile standard specifying otherwise, a
TLS-compliant application MUST implement the following cipher suites:</t>

<figure><artwork><![CDATA[
    TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256
    TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
]]></artwork></figure>

<t>These cipher suites MUST support both digital signatures and key exchange
with secp256r1 (NIST P-256) and SHOULD support key exchange with X25519
<xref target="RFC7748"/>.</t>

<t>A TLS-compliant application SHOULD implement the following cipher suites:</t>

<figure><artwork><![CDATA[
    TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
    TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256
    TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
    TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256
]]></artwork></figure>

</section>
<section anchor="mti-extensions" title="MTI Extensions">

<t>In the absence of an application profile standard specifying otherwise, a
TLS-compliant application MUST implement the following TLS extensions:</t>

<t><list style="symbols">
  <t>Signature Algorithms (“signature_algorithms”; <xref target="signature-algorithms"/>)</t>
  <t>Negotiated Groups (“supported_groups”; <xref target="negotiated-groups"/>)</t>
  <t>Key Share (“key_share”; <xref target="key-share"/>)</t>
  <t>Pre-Shared Key (“pre_shared_key”; <xref target="pre-shared-key-extension"/>)</t>
  <t>Server Name Indication (“server_name”; Section 3 of <xref target="RFC6066"/>)</t>
  <t>Cookie (“cookie”; <xref target="cookie"/>)</t>
</list></t>

<t>All implementations MUST send and use these extensions when offering
applicable cipher suites:</t>

<t><list style="symbols">
  <t>“signature_algorithms” is REQUIRED for certificate authenticated cipher suites.</t>
  <t>“supported_groups” and “key_share” are REQUIRED for DHE or ECDHE cipher suites.</t>
  <t>“pre_shared_key” is REQUIRED for PSK cipher suites.</t>
  <t>“cookie” is REQUIRED for all cipher suites.</t>
</list></t>

<t>When negotiating use of applicable cipher suites, endpoints MUST abort the
connection with a “missing_extension” alert if the required extension was
not provided. Any endpoint that receives any invalid combination of cipher
suites and extensions MAY abort the connection with a “missing_extension”
alert, regardless of negotiated parameters.</t>

<t>Additionally, all implementations MUST support use of the “server_name”
extension with applications capable of using it.
Servers MAY require clients to send a valid “server_name” extension.
Servers requiring this extension SHOULD respond to a ClientHello
lacking a “server_name” extension with a fatal “missing_extension” alert.</t>

<t>Servers MUST NOT send the “signature_algorithms” extension; if a client
receives this extension it MUST respond with a fatal “unsupported_extension” alert
and close the connection.</t>

</section>
</section>
<section anchor="security-considerations" title="Security Considerations">

<t>Security issues are discussed throughout this memo, especially in Appendices B,
C, and D.</t>

</section>
<section anchor="iana-considerations" title="IANA Considerations">

<t>This document uses several registries that were originally created in
<xref target="RFC4346"/>. IANA has updated these to reference this document. The registries
and their allocation policies are below:</t>

<t><list style="symbols">
  <t>TLS Cipher Suite Registry: Values with the first byte in the range
0-254 (decimal) are assigned via Specification Required <xref target="RFC2434"/>.
Values with the first byte 255 (decimal) are reserved for Private
Use <xref target="RFC2434"/>. IANA [SHALL add/has added] a “Recommended” column
to the cipher suite registry. All cipher suites listed in
<xref target="cipher-suites"/> are marked as “Yes”. All other cipher suites are
marked as “No”. IANA [SHALL add/has added] add a note to this column
reading:  <list style='empty'>
      <t>Cipher suites marked as “Yes” are those allocated via
  Standards Track RFCs. Cipher suites marked as “No” are not;
  cipher suites marked “No” range from “good” to “bad” from a
  cryptographic standpoint.</t>
    </list></t>
  <t>TLS ContentType Registry: Future values are allocated via
  Standards Action <xref target="RFC2434"/>.</t>
  <t>TLS Alert Registry: Future values are allocated via Standards
  Action <xref target="RFC2434"/>.</t>
  <t>TLS HandshakeType Registry: Future values are allocated via
  Standards Action <xref target="RFC2434"/>. IANA [SHALL update/has updated] this registry
  to rename item 4 from “NewSessionTicket” to “new_session_ticket”.</t>
</list></t>

<t>This document also uses a registry originally created in <xref target="RFC4366"/>. IANA has
updated it to reference this document. The registry and its allocation policy
is listed below:</t>

<t><list style="symbols">
  <t>TLS ExtensionType Registry: Values with the first byte in the range
 0-254 (decimal) are assigned via Specification Required <xref target="RFC2434"/>.
 Values with the first byte 255 (decimal) are reserved for Private
 Use <xref target="RFC2434"/>. IANA [SHALL update/has updated]
 this registry to include the “key_share”, “pre_shared_key”, and
 “early_data” extensions as defined in this document.  <vspace blankLines='1'/>
IANA [shall update/has updated] this registry to include a “TLS
 1.3” column with the following four values: “Client”, indicating
 that the server shall not send them. “Clear”, indicating
 that they shall be in the ServerHello. “Encrypted”, indicating that
 they shall be in the EncryptedExtensions block, and “No” indicating
 that they are not used in TLS 1.3. This column [shall be/has been]
 initially populated with the values in this document.
 IANA [shall update/has updated] this registry to add a
 “Recommended” column. IANA [shall/has] initially populated this
 column with the values in the table below. This table has been generated
 by marking Standards Track RFCs as “Yes” and all others as
 “No”.</t>
</list></t>

<texttable>
      <ttcol align='left'>Extension</ttcol>
      <ttcol align='right'>Recommended</ttcol>
      <ttcol align='right'>TLS 1.3</ttcol>
      <c>server_name <xref target="RFC6066"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>max_fragment_length <xref target="RFC6066"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>client_certificate_url <xref target="RFC6066"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>trusted_ca_keys <xref target="RFC6066"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>truncated_hmac <xref target="RFC6066"></xref></c>
      <c>Yes</c>
      <c>No</c>
      <c>status_request <xref target="RFC6066"></xref></c>
      <c>Yes</c>
      <c>No</c>
      <c>user_mapping <xref target="RFC4681"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>client_authz <xref target="RFC5878"></xref></c>
      <c>No</c>
      <c>Encrypted</c>
      <c>server_authz <xref target="RFC5878"></xref></c>
      <c>No</c>
      <c>Encrypted</c>
      <c>cert_type <xref target="RFC6091"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>supported_groups [RFC-ietf-tls-negotiated-ff-dhe]</c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>ec_point_formats <xref target="RFC4492"></xref></c>
      <c>Yes</c>
      <c>No</c>
      <c>srp <xref target="RFC5054"></xref></c>
      <c>No</c>
      <c>No</c>
      <c>signature_algorithms <xref target="RFC5246"></xref></c>
      <c>Yes</c>
      <c>Client</c>
      <c>use_srtp <xref target="RFC5764"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>heartbeat <xref target="RFC6520"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>application_layer_protocol_negotiation <xref target="RFC7301"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>status_request_v2 <xref target="RFC6961"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>signed_certificate_timestamp <xref target="RFC6962"></xref></c>
      <c>No</c>
      <c>Encrypted</c>
      <c>client_certificate_type <xref target="RFC7250"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>server_certificate_type <xref target="RFC7250"></xref></c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>padding <xref target="RFC7685"></xref></c>
      <c>Yes</c>
      <c>Client</c>
      <c>encrypt_then_mac <xref target="RFC7366"></xref></c>
      <c>Yes</c>
      <c>No</c>
      <c>extended_master_secret <xref target="RFC7627"></xref></c>
      <c>Yes</c>
      <c>No</c>
      <c>SessionTicket TLS <xref target="RFC4507"></xref></c>
      <c>Yes</c>
      <c>No</c>
      <c>renegotiation_info <xref target="RFC5746"></xref></c>
      <c>Yes</c>
      <c>No</c>
      <c>key_share [[this document]]</c>
      <c>Yes</c>
      <c>Clear</c>
      <c>pre_shared_key [[this document]]</c>
      <c>Yes</c>
      <c>Clear</c>
      <c>early_data [[this document]]</c>
      <c>Yes</c>
      <c>Encrypted</c>
      <c>cookie [[this document]]</c>
      <c>Yes</c>
      <c>Encrypted/HelloRetryRequest</c>
</texttable>

<t>In addition, this document defines two new registries to be maintained
by IANA</t>

<t><list style="symbols">
  <t>TLS SignatureScheme Registry: Values with the first byte in the range
  0-254 (decimal) are assigned via Specification Required <xref target="RFC2434"/>.
  Values with the first byte 255 (decimal) are reserved for Private
  Use <xref target="RFC2434"/>. This registry SHALL have a “Recommended” column.
  The registry [shall be/ has been] initially populated with the values described in
  <xref target="signature-algorithms"/>. The following values SHALL be marked as
  “Recommended”: ecdsa_secp256r1_sha256, ecdsa_secp384r1_sha384,
  rsa_pss_sha256, rsa_pss_sha384, rsa_pss_sha512, ed25519.</t>
</list></t>

</section>


  </middle>

  <back>

    <references title='Normative References'>





<reference  anchor='RFC2104' target='http://www.rfc-editor.org/info/rfc2104'>
<front>
<title>HMAC: Keyed-Hashing for Message Authentication</title>
<author initials='H.' surname='Krawczyk' fullname='H. Krawczyk'><organization /></author>
<author initials='M.' surname='Bellare' fullname='M. Bellare'><organization /></author>
<author initials='R.' surname='Canetti' fullname='R. Canetti'><organization /></author>
<date year='1997' month='February' />
<abstract><t>This document describes HMAC, a mechanism for message authentication using cryptographic hash functions. HMAC can be used with any iterative cryptographic hash function, e.g., MD5, SHA-1, in combination with a secret shared key.  The cryptographic strength of HMAC depends on the properties of the underlying hash function.  This memo provides information for the Internet community.  This memo does not specify an Internet standard of any kind</t></abstract>
</front>
<seriesInfo name='RFC' value='2104'/>
<seriesInfo name='DOI' value='10.17487/RFC2104'/>
</reference>



<reference  anchor='RFC2119' target='http://www.rfc-editor.org/info/rfc2119'>
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title>
<author initials='S.' surname='Bradner' fullname='S. Bradner'><organization /></author>
<date year='1997' month='March' />
<abstract><t>In many standards track documents several words are used to signify the requirements in the specification.  These words are often capitalized. This document defines these words as they should be interpreted in IETF documents.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='14'/>
<seriesInfo name='RFC' value='2119'/>
<seriesInfo name='DOI' value='10.17487/RFC2119'/>
</reference>



<reference  anchor='RFC2434' target='http://www.rfc-editor.org/info/rfc2434'>
<front>
<title>Guidelines for Writing an IANA Considerations Section in RFCs</title>
<author initials='T.' surname='Narten' fullname='T. Narten'><organization /></author>
<author initials='H.' surname='Alvestrand' fullname='H. Alvestrand'><organization /></author>
<date year='1998' month='October' />
<abstract><t>This document discusses issues that should be considered in formulating a policy for assigning values to a name space and provides guidelines to document authors on the specific text that must be included in documents that place demands on the IANA.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='RFC' value='2434'/>
<seriesInfo name='DOI' value='10.17487/RFC2434'/>
</reference>



<reference  anchor='RFC3447' target='http://www.rfc-editor.org/info/rfc3447'>
<front>
<title>Public-Key Cryptography Standards (PKCS) #1: RSA Cryptography Specifications Version 2.1</title>
<author initials='J.' surname='Jonsson' fullname='J. Jonsson'><organization /></author>
<author initials='B.' surname='Kaliski' fullname='B. Kaliski'><organization /></author>
<date year='2003' month='February' />
<abstract><t>This memo represents a republication of PKCS #1 v2.1 from RSA Laboratories' Public-Key Cryptography Standards (PKCS) series, and change control is retained within the PKCS process.  The body of this document is taken directly from the PKCS #1 v2.1 document, with certain corrections made during the publication process.  This memo provides information for the Internet community.</t></abstract>
</front>
<seriesInfo name='RFC' value='3447'/>
<seriesInfo name='DOI' value='10.17487/RFC3447'/>
</reference>



<reference  anchor='RFC5280' target='http://www.rfc-editor.org/info/rfc5280'>
<front>
<title>Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile</title>
<author initials='D.' surname='Cooper' fullname='D. Cooper'><organization /></author>
<author initials='S.' surname='Santesson' fullname='S. Santesson'><organization /></author>
<author initials='S.' surname='Farrell' fullname='S. Farrell'><organization /></author>
<author initials='S.' surname='Boeyen' fullname='S. Boeyen'><organization /></author>
<author initials='R.' surname='Housley' fullname='R. Housley'><organization /></author>
<author initials='W.' surname='Polk' fullname='W. Polk'><organization /></author>
<date year='2008' month='May' />
<abstract><t>This memo profiles the X.509 v3 certificate and X.509 v2 certificate revocation list (CRL) for use in the Internet.  An overview of this approach and model is provided as an introduction.  The X.509 v3 certificate format is described in detail, with additional information regarding the format and semantics of Internet name forms.  Standard certificate extensions are described and two Internet-specific extensions are defined.  A set of required certificate extensions is specified.  The X.509 v2 CRL format is described in detail along with standard and Internet-specific extensions.  An algorithm for X.509 certification path validation is described.  An ASN.1 module and examples are provided in the appendices.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5280'/>
<seriesInfo name='DOI' value='10.17487/RFC5280'/>
</reference>



<reference  anchor='RFC5288' target='http://www.rfc-editor.org/info/rfc5288'>
<front>
<title>AES Galois Counter Mode (GCM) Cipher Suites for TLS</title>
<author initials='J.' surname='Salowey' fullname='J. Salowey'><organization /></author>
<author initials='A.' surname='Choudhury' fullname='A. Choudhury'><organization /></author>
<author initials='D.' surname='McGrew' fullname='D. McGrew'><organization /></author>
<date year='2008' month='August' />
<abstract><t>This memo describes the use of the Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM) as a Transport Layer Security (TLS) authenticated encryption operation.  GCM provides both confidentiality and data origin authentication, can be efficiently implemented in hardware for speeds of 10 gigabits per second and above, and is also well-suited to software implementations.  This memo defines TLS cipher suites that use AES-GCM with RSA, DSA, and Diffie-Hellman-based key exchange mechanisms.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5288'/>
<seriesInfo name='DOI' value='10.17487/RFC5288'/>
</reference>



<reference  anchor='RFC5289' target='http://www.rfc-editor.org/info/rfc5289'>
<front>
<title>TLS Elliptic Curve Cipher Suites with SHA-256/384 and AES Galois Counter Mode (GCM)</title>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<date year='2008' month='August' />
<abstract><t>RFC 4492 describes elliptic curve cipher suites for Transport Layer Security (TLS).  However, all those cipher suites use HMAC-SHA-1 as their Message Authentication Code (MAC) algorithm.  This document describes sixteen new cipher suites for TLS that specify stronger MAC algorithms.  Eight use Hashed Message Authentication Code (HMAC) with SHA-256 or SHA-384, and eight use AES in Galois Counter Mode (GCM).   This memo provides information for the Internet community.</t></abstract>
</front>
<seriesInfo name='RFC' value='5289'/>
<seriesInfo name='DOI' value='10.17487/RFC5289'/>
</reference>



<reference  anchor='RFC5487' target='http://www.rfc-editor.org/info/rfc5487'>
<front>
<title>Pre-Shared Key Cipher Suites for TLS with SHA-256/384 and AES Galois Counter Mode</title>
<author initials='M.' surname='Badra' fullname='M. Badra'><organization /></author>
<date year='2009' month='March' />
<abstract><t>RFC 4279 and RFC 4785 describe pre-shared key cipher suites for Transport Layer Security (TLS).  However, all those cipher suites use SHA-1 in their Message Authentication Code (MAC) algorithm.  This document describes a set of pre-shared key cipher suites for TLS that uses stronger digest algorithms (i.e., SHA-256 or SHA-384) and another set that uses the Advanced Encryption Standard (AES) in Galois Counter Mode (GCM).  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5487'/>
<seriesInfo name='DOI' value='10.17487/RFC5487'/>
</reference>



<reference  anchor='RFC5869' target='http://www.rfc-editor.org/info/rfc5869'>
<front>
<title>HMAC-based Extract-and-Expand Key Derivation Function (HKDF)</title>
<author initials='H.' surname='Krawczyk' fullname='H. Krawczyk'><organization /></author>
<author initials='P.' surname='Eronen' fullname='P. Eronen'><organization /></author>
<date year='2010' month='May' />
<abstract><t>This document specifies a simple Hashed Message Authentication Code (HMAC)-based key derivation function (HKDF), which can be used as a building block in various protocols and applications.  The key derivation function (KDF) is intended to support a wide range of applications and requirements, and is conservative in its use of cryptographic hash functions.  This document is not an Internet  Standards Track specification; it is published for informational  purposes.</t></abstract>
</front>
<seriesInfo name='RFC' value='5869'/>
<seriesInfo name='DOI' value='10.17487/RFC5869'/>
</reference>



<reference  anchor='RFC6066' target='http://www.rfc-editor.org/info/rfc6066'>
<front>
<title>Transport Layer Security (TLS) Extensions: Extension Definitions</title>
<author initials='D.' surname='Eastlake 3rd' fullname='D. Eastlake 3rd'><organization /></author>
<date year='2011' month='January' />
<abstract><t>This document provides specifications for existing TLS extensions.  It is a companion document for RFC 5246, &quot;The Transport Layer Security (TLS) Protocol Version 1.2&quot;.  The extensions specified are server_name, max_fragment_length, client_certificate_url, trusted_ca_keys, truncated_hmac, and status_request.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6066'/>
<seriesInfo name='DOI' value='10.17487/RFC6066'/>
</reference>



<reference  anchor='RFC6209' target='http://www.rfc-editor.org/info/rfc6209'>
<front>
<title>Addition of the ARIA Cipher Suites to Transport Layer Security (TLS)</title>
<author initials='W.' surname='Kim' fullname='W. Kim'><organization /></author>
<author initials='J.' surname='Lee' fullname='J. Lee'><organization /></author>
<author initials='J.' surname='Park' fullname='J. Park'><organization /></author>
<author initials='D.' surname='Kwon' fullname='D. Kwon'><organization /></author>
<date year='2011' month='April' />
<abstract><t>This document specifies a set of cipher suites for the Transport Layer Security (TLS) protocol to support the ARIA encryption algorithm as a block cipher.  This document is not an Internet  Standards Track specification; it is published for informational  purposes.</t></abstract>
</front>
<seriesInfo name='RFC' value='6209'/>
<seriesInfo name='DOI' value='10.17487/RFC6209'/>
</reference>



<reference  anchor='RFC6367' target='http://www.rfc-editor.org/info/rfc6367'>
<front>
<title>Addition of the Camellia Cipher Suites to Transport Layer Security (TLS)</title>
<author initials='S.' surname='Kanno' fullname='S. Kanno'><organization /></author>
<author initials='M.' surname='Kanda' fullname='M. Kanda'><organization /></author>
<date year='2011' month='September' />
<abstract><t>This document specifies forty-two cipher suites for the Transport Security Layer (TLS) protocol to support the Camellia encryption algorithm as a block cipher.  This document is not an Internet  Standards Track specification; it is published for informational purposes.</t></abstract>
</front>
<seriesInfo name='RFC' value='6367'/>
<seriesInfo name='DOI' value='10.17487/RFC6367'/>
</reference>



<reference  anchor='RFC6655' target='http://www.rfc-editor.org/info/rfc6655'>
<front>
<title>AES-CCM Cipher Suites for Transport Layer Security (TLS)</title>
<author initials='D.' surname='McGrew' fullname='D. McGrew'><organization /></author>
<author initials='D.' surname='Bailey' fullname='D. Bailey'><organization /></author>
<date year='2012' month='July' />
<abstract><t>This memo describes the use of the Advanced Encryption Standard (AES) in the Counter with Cipher Block Chaining - Message Authentication Code (CBC-MAC) Mode (CCM) of operation within Transport Layer Security (TLS) and Datagram TLS (DTLS) to provide confidentiality and data origin authentication.  The AES-CCM algorithm is amenable to compact implementations, making it suitable for constrained environments.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6655'/>
<seriesInfo name='DOI' value='10.17487/RFC6655'/>
</reference>



<reference  anchor='RFC7251' target='http://www.rfc-editor.org/info/rfc7251'>
<front>
<title>AES-CCM Elliptic Curve Cryptography (ECC) Cipher Suites for TLS</title>
<author initials='D.' surname='McGrew' fullname='D. McGrew'><organization /></author>
<author initials='D.' surname='Bailey' fullname='D. Bailey'><organization /></author>
<author initials='M.' surname='Campagna' fullname='M. Campagna'><organization /></author>
<author initials='R.' surname='Dugal' fullname='R. Dugal'><organization /></author>
<date year='2014' month='June' />
<abstract><t>This memo describes the use of the Advanced Encryption Standard (AES) in the Counter and CBC-MAC Mode (CCM) of operation within Transport Layer Security (TLS) to provide confidentiality and data-origin authentication.  The AES-CCM algorithm is amenable to compact implementations, making it suitable for constrained environments, while at the same time providing a high level of security.  The cipher suites defined in this document use Elliptic Curve Cryptography (ECC) and are advantageous in networks with limited bandwidth.</t></abstract>
</front>
<seriesInfo name='RFC' value='7251'/>
<seriesInfo name='DOI' value='10.17487/RFC7251'/>
</reference>



<reference  anchor='RFC7748' target='http://www.rfc-editor.org/info/rfc7748'>
<front>
<title>Elliptic Curves for Security</title>
<author initials='A.' surname='Langley' fullname='A. Langley'><organization /></author>
<author initials='M.' surname='Hamburg' fullname='M. Hamburg'><organization /></author>
<author initials='S.' surname='Turner' fullname='S. Turner'><organization /></author>
<date year='2016' month='January' />
<abstract><t>This memo specifies two elliptic curves over prime fields that offer a high level of practical security in cryptographic applications, including Transport Layer Security (TLS).  These curves are intended to operate at the ~128-bit and ~224-bit security level, respectively, and are generated deterministically based on a list of required properties.</t></abstract>
</front>
<seriesInfo name='RFC' value='7748'/>
<seriesInfo name='DOI' value='10.17487/RFC7748'/>
</reference>



<reference  anchor='RFC7905' target='http://www.rfc-editor.org/info/rfc7905'>
<front>
<title>ChaCha20-Poly1305 Cipher Suites for Transport Layer Security (TLS)</title>
<author initials='A.' surname='Langley' fullname='A. Langley'><organization /></author>
<author initials='W.' surname='Chang' fullname='W. Chang'><organization /></author>
<author initials='N.' surname='Mavrogiannopoulos' fullname='N. Mavrogiannopoulos'><organization /></author>
<author initials='J.' surname='Strombergson' fullname='J. Strombergson'><organization /></author>
<author initials='S.' surname='Josefsson' fullname='S. Josefsson'><organization /></author>
<date year='2016' month='June' />
<abstract><t>This document describes the use of the ChaCha stream cipher and Poly1305 authenticator in the Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) protocols.</t><t>This document updates RFCs 5246 and 6347.</t></abstract>
</front>
<seriesInfo name='RFC' value='7905'/>
<seriesInfo name='DOI' value='10.17487/RFC7905'/>
</reference>



<reference anchor='I-D.mattsson-tls-ecdhe-psk-aead'>
<front>
<title>ECDHE_PSK with AES-GCM and AES-CCM Cipher Suites for Transport Layer Security (TLS)</title>

<author initials='J' surname='Mattsson' fullname='John Mattsson'>
    <organization />
</author>

<author initials='D' surname='Migault' fullname='Daniel Migault'>
    <organization />
</author>

<date month='April' day='18' year='2016' />

<abstract><t>This document defines several new cipher suites for the Transport Layer Security (TLS) protocol.  The cipher suites are all based on the Ephemeral Elliptic Curve Diffie-Hellman with Pre-Shared Key (ECDHE_PSK) key exchange together with the Authenticated Encryption with Associated Data (AEAD) algorithms AES-GCM and AES-CCM.  PSK provides light and efficient authentication, ECDHE provides perfect forward secrecy, and AES-GCM and AES-CCM provides encryption and integrity protection.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-mattsson-tls-ecdhe-psk-aead-05' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-mattsson-tls-ecdhe-psk-aead-05.txt' />
</reference>



<reference anchor='I-D.irtf-cfrg-eddsa'>
<front>
<title>Edwards-curve Digital Signature Algorithm (EdDSA)</title>

<author initials='S' surname='Josefsson' fullname='Simon Josefsson'>
    <organization />
</author>

<author initials='I' surname='Liusvaara' fullname='Ilari Liusvaara'>
    <organization />
</author>

<date month='March' day='21' year='2016' />

<abstract><t>The elliptic curve signature scheme Edwards-curve Digital Signature Algorithm (EdDSA) is described.  The algorithm is instantiated with recommended parameters for the edwards25519 and edwards448 curves. An example implementation and test vectors are provided.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-irtf-cfrg-eddsa-05' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-irtf-cfrg-eddsa-05.txt' />
</reference>


<reference anchor="AES" >
  <front>
    <title>Specification for the Advanced Encryption Standard (AES)</title>
    <author >
      <organization>National Institute of Standards and Technology</organization>
    </author>
    <date year="2001" month="November" day="26"/>
  </front>
  <seriesInfo name="NIST" value="FIPS 197"/>
</reference>
<reference anchor="SHS" >
  <front>
    <title>Secure Hash Standard</title>
    <author >
      <organization>National Institute of Standards and Technology, U.S. Department of Commerce</organization>
    </author>
    <date year="2012" month="March"/>
  </front>
  <seriesInfo name="NIST" value="FIPS PUB 180-4"/>
</reference>
<reference anchor="X690" >
  <front>
    <title>Information technology - ASN.1 encoding Rules: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished Encoding Rules (DER)</title>
    <author >
      <organization>ITU-T</organization>
    </author>
    <date year="2002"/>
  </front>
  <seriesInfo name="ISO/IEC" value="8825-1:2002"/>
</reference>
<reference anchor="X962" >
  <front>
    <title>Public Key Cryptography For The Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)</title>
    <author >
      <organization>ANSI</organization>
    </author>
    <date year="1998"/>
  </front>
  <seriesInfo name="ANSI" value="X9.62"/>
</reference>
<reference anchor="DH" >
  <front>
    <title>New Directions in Cryptography</title>
    <author initials="W." surname="Diffie">
      <organization></organization>
    </author>
    <author initials="M." surname="Hellman">
      <organization></organization>
    </author>
    <date year="1977" month="June"/>
  </front>
  <seriesInfo name="IEEE Transactions on Information Theory, V.IT-22 n.6" value=""/>
</reference>




<reference  anchor='RFC7443' target='http://www.rfc-editor.org/info/rfc7443'>
<front>
<title>Application-Layer Protocol Negotiation (ALPN) Labels for Session Traversal Utilities for NAT (STUN) Usages</title>
<author initials='P.' surname='Patil' fullname='P. Patil'><organization /></author>
<author initials='T.' surname='Reddy' fullname='T. Reddy'><organization /></author>
<author initials='G.' surname='Salgueiro' fullname='G. Salgueiro'><organization /></author>
<author initials='M.' surname='Petit-Huguenin' fullname='M. Petit-Huguenin'><organization /></author>
<date year='2015' month='January' />
<abstract><t>Application-Layer Protocol Negotiation (ALPN) labels for Session Traversal Utilities for NAT (STUN) usages, such as Traversal Using Relays around NAT (TURN) and NAT discovery, are defined in this document to allow an application layer to negotiate STUN usages within the Transport Layer Security (TLS) connection.  ALPN protocol identifiers defined in this document apply to both TLS and Datagram Transport Layer Security (DTLS).</t></abstract>
</front>
<seriesInfo name='RFC' value='7443'/>
<seriesInfo name='DOI' value='10.17487/RFC7443'/>
</reference>



<reference  anchor='RFC6961' target='http://www.rfc-editor.org/info/rfc6961'>
<front>
<title>The Transport Layer Security (TLS) Multiple Certificate Status Request Extension</title>
<author initials='Y.' surname='Pettersen' fullname='Y. Pettersen'><organization /></author>
<date year='2013' month='June' />
<abstract><t>This document defines the Transport Layer Security (TLS) Certificate Status Version 2 Extension to allow clients to specify and support several certificate status methods.  (The use of the Certificate Status extension is commonly referred to as &quot;OCSP stapling&quot;.)  Also defined is a new method based on the Online Certificate Status Protocol (OCSP) that servers can use to provide status information about not only the server's own certificate but also the status of intermediate certificates in the chain.</t></abstract>
</front>
<seriesInfo name='RFC' value='6961'/>
<seriesInfo name='DOI' value='10.17487/RFC6961'/>
</reference>



<reference  anchor='RFC5705' target='http://www.rfc-editor.org/info/rfc5705'>
<front>
<title>Keying Material Exporters for Transport Layer Security (TLS)</title>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<date year='2010' month='March' />
<abstract><t>A number of protocols wish to leverage Transport Layer Security (TLS) to perform key establishment but then use some of the keying material for their own purposes.  This document describes a general mechanism for allowing that.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5705'/>
<seriesInfo name='DOI' value='10.17487/RFC5705'/>
</reference>



<reference  anchor='RFC6979' target='http://www.rfc-editor.org/info/rfc6979'>
<front>
<title>Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA)</title>
<author initials='T.' surname='Pornin' fullname='T. Pornin'><organization /></author>
<date year='2013' month='August' />
<abstract><t>This document defines a deterministic digital signature generation procedure.  Such signatures are compatible with standard Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA) digital signatures and can be processed with unmodified verifiers, which need not be aware of the procedure described therein.  Deterministic signatures retain the cryptographic security features associated with digital signatures but can be more easily implemented in various environments, since they do not need access to a source of high-quality randomness.</t></abstract>
</front>
<seriesInfo name='RFC' value='6979'/>
<seriesInfo name='DOI' value='10.17487/RFC6979'/>
</reference>




    </references>

    <references title='Informative References'>





<reference  anchor='RFC0793' target='http://www.rfc-editor.org/info/rfc793'>
<front>
<title>Transmission Control Protocol</title>
<author initials='J.' surname='Postel' fullname='J. Postel'><organization /></author>
<date year='1981' month='September' />
</front>
<seriesInfo name='STD' value='7'/>
<seriesInfo name='RFC' value='793'/>
<seriesInfo name='DOI' value='10.17487/RFC0793'/>
</reference>



<reference  anchor='RFC1948' target='http://www.rfc-editor.org/info/rfc1948'>
<front>
<title>Defending Against Sequence Number Attacks</title>
<author initials='S.' surname='Bellovin' fullname='S. Bellovin'><organization /></author>
<date year='1996' month='May' />
<abstract><t>IP spoofing attacks based on sequence number spoofing have become a serious threat on the Internet (CERT Advisory CA-95:01).  While ubiquitous crypgraphic authentication is the right answer, we propose a simple modification to TCP implementations that should be a very substantial block to the current wave of attacks.  This memo provides information for the Internet community.  This memo does not specify an Internet standard of any kind.</t></abstract>
</front>
<seriesInfo name='RFC' value='1948'/>
<seriesInfo name='DOI' value='10.17487/RFC1948'/>
</reference>



<reference  anchor='RFC4086' target='http://www.rfc-editor.org/info/rfc4086'>
<front>
<title>Randomness Requirements for Security</title>
<author initials='D.' surname='Eastlake 3rd' fullname='D. Eastlake 3rd'><organization /></author>
<author initials='J.' surname='Schiller' fullname='J. Schiller'><organization /></author>
<author initials='S.' surname='Crocker' fullname='S. Crocker'><organization /></author>
<date year='2005' month='June' />
<abstract><t>Security systems are built on strong cryptographic algorithms that foil pattern analysis attempts.  However, the security of these systems is dependent on generating secret quantities for passwords, cryptographic keys, and similar quantities.  The use of pseudo-random processes to generate secret quantities can result in pseudo-security. A sophisticated attacker may find it easier to reproduce the environment that produced the secret quantities and to search the resulting small set of possibilities than to locate the quantities in the whole of the potential number space.</t><t>Choosing random quantities to foil a resourceful and motivated adversary is surprisingly difficult.  This document points out many pitfalls in using poor entropy sources or traditional pseudo-random number generation techniques for generating such quantities.  It recommends the use of truly random hardware techniques and shows that the existing hardware on many systems can be used for this purpose. It provides suggestions to ameliorate the problem when a hardware solution is not available, and it gives examples of how large such quantities need to be for some applications.  This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='106'/>
<seriesInfo name='RFC' value='4086'/>
<seriesInfo name='DOI' value='10.17487/RFC4086'/>
</reference>



<reference  anchor='RFC4279' target='http://www.rfc-editor.org/info/rfc4279'>
<front>
<title>Pre-Shared Key Ciphersuites for Transport Layer Security (TLS)</title>
<author initials='P.' surname='Eronen' fullname='P. Eronen' role='editor'><organization /></author>
<author initials='H.' surname='Tschofenig' fullname='H. Tschofenig' role='editor'><organization /></author>
<date year='2005' month='December' />
<abstract><t>This document specifies three sets of new ciphersuites for the Transport Layer Security (TLS) protocol to support authentication based on pre-shared keys (PSKs).  These pre-shared keys are symmetric keys, shared in advance among the communicating parties.  The first set of ciphersuites uses only symmetric key operations for authentication. The second set uses a Diffie-Hellman exchange authenticated with a pre-shared key, and the third set combines public key authentication of the server with pre-shared key authentication of the client.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4279'/>
<seriesInfo name='DOI' value='10.17487/RFC4279'/>
</reference>



<reference  anchor='RFC4302' target='http://www.rfc-editor.org/info/rfc4302'>
<front>
<title>IP Authentication Header</title>
<author initials='S.' surname='Kent' fullname='S. Kent'><organization /></author>
<date year='2005' month='December' />
<abstract><t>This document describes an updated version of the IP Authentication Header (AH), which is designed to provide authentication services in IPv4 and IPv6.  This document obsoletes RFC 2402 (November 1998).  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4302'/>
<seriesInfo name='DOI' value='10.17487/RFC4302'/>
</reference>



<reference  anchor='RFC4303' target='http://www.rfc-editor.org/info/rfc4303'>
<front>
<title>IP Encapsulating Security Payload (ESP)</title>
<author initials='S.' surname='Kent' fullname='S. Kent'><organization /></author>
<date year='2005' month='December' />
<abstract><t>This document describes an updated version of the Encapsulating Security Payload (ESP) protocol, which is designed to provide a mix of security services in IPv4 and IPv6.  ESP is used to provide confidentiality, data origin authentication, connectionless integrity, an anti-replay service (a form of partial sequence integrity), and limited traffic flow confidentiality.  This document obsoletes RFC 2406 (November 1998).  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4303'/>
<seriesInfo name='DOI' value='10.17487/RFC4303'/>
</reference>



<reference  anchor='RFC4346' target='http://www.rfc-editor.org/info/rfc4346'>
<front>
<title>The Transport Layer Security (TLS) Protocol Version 1.1</title>
<author initials='T.' surname='Dierks' fullname='T. Dierks'><organization /></author>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<date year='2006' month='April' />
<abstract><t>This document specifies Version 1.1 of the Transport Layer Security (TLS) protocol.  The TLS protocol provides communications security over the Internet.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4346'/>
<seriesInfo name='DOI' value='10.17487/RFC4346'/>
</reference>



<reference  anchor='RFC4366' target='http://www.rfc-editor.org/info/rfc4366'>
<front>
<title>Transport Layer Security (TLS) Extensions</title>
<author initials='S.' surname='Blake-Wilson' fullname='S. Blake-Wilson'><organization /></author>
<author initials='M.' surname='Nystrom' fullname='M. Nystrom'><organization /></author>
<author initials='D.' surname='Hopwood' fullname='D. Hopwood'><organization /></author>
<author initials='J.' surname='Mikkelsen' fullname='J. Mikkelsen'><organization /></author>
<author initials='T.' surname='Wright' fullname='T. Wright'><organization /></author>
<date year='2006' month='April' />
<abstract><t>This document describes extensions that may be used to add functionality to Transport Layer Security (TLS).  It provides both generic extension mechanisms for the TLS handshake client and server hellos, and specific extensions using these generic mechanisms.</t><t>The extensions may be used by TLS clients and servers.  The extensions are backwards compatible: communication is possible between TLS clients that support the extensions and TLS servers that do not support the extensions, and vice versa.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4366'/>
<seriesInfo name='DOI' value='10.17487/RFC4366'/>
</reference>



<reference  anchor='RFC4492' target='http://www.rfc-editor.org/info/rfc4492'>
<front>
<title>Elliptic Curve Cryptography (ECC) Cipher Suites for Transport Layer Security (TLS)</title>
<author initials='S.' surname='Blake-Wilson' fullname='S. Blake-Wilson'><organization /></author>
<author initials='N.' surname='Bolyard' fullname='N. Bolyard'><organization /></author>
<author initials='V.' surname='Gupta' fullname='V. Gupta'><organization /></author>
<author initials='C.' surname='Hawk' fullname='C. Hawk'><organization /></author>
<author initials='B.' surname='Moeller' fullname='B. Moeller'><organization /></author>
<date year='2006' month='May' />
<abstract><t>This document describes new key exchange algorithms based on Elliptic Curve Cryptography (ECC) for the Transport Layer Security (TLS) protocol.  In particular, it specifies the use of Elliptic Curve Diffie-Hellman (ECDH) key agreement in a TLS handshake and the use of Elliptic Curve Digital Signature Algorithm (ECDSA) as a new authentication mechanism.  This memo provides information for the Internet community.</t></abstract>
</front>
<seriesInfo name='RFC' value='4492'/>
<seriesInfo name='DOI' value='10.17487/RFC4492'/>
</reference>



<reference  anchor='RFC4506' target='http://www.rfc-editor.org/info/rfc4506'>
<front>
<title>XDR: External Data Representation Standard</title>
<author initials='M.' surname='Eisler' fullname='M. Eisler' role='editor'><organization /></author>
<date year='2006' month='May' />
<abstract><t>This document describes the External Data Representation Standard (XDR) protocol as it is currently deployed and accepted.  This document obsoletes RFC 1832.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='STD' value='67'/>
<seriesInfo name='RFC' value='4506'/>
<seriesInfo name='DOI' value='10.17487/RFC4506'/>
</reference>



<reference  anchor='RFC4507' target='http://www.rfc-editor.org/info/rfc4507'>
<front>
<title>Transport Layer Security (TLS) Session Resumption without Server-Side State</title>
<author initials='J.' surname='Salowey' fullname='J. Salowey'><organization /></author>
<author initials='H.' surname='Zhou' fullname='H. Zhou'><organization /></author>
<author initials='P.' surname='Eronen' fullname='P. Eronen'><organization /></author>
<author initials='H.' surname='Tschofenig' fullname='H. Tschofenig'><organization /></author>
<date year='2006' month='May' />
<abstract><t>This document describes a mechanism that enables the Transport Layer Security (TLS) server to resume sessions and avoid keeping \%per-client session state.  The TLS server encapsulates the session state into a ticket and forwards it to the client.  The client can subsequently resume a session using the obtained ticket.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4507'/>
<seriesInfo name='DOI' value='10.17487/RFC4507'/>
</reference>



<reference  anchor='RFC4681' target='http://www.rfc-editor.org/info/rfc4681'>
<front>
<title>TLS User Mapping Extension</title>
<author initials='S.' surname='Santesson' fullname='S. Santesson'><organization /></author>
<author initials='A.' surname='Medvinsky' fullname='A. Medvinsky'><organization /></author>
<author initials='J.' surname='Ball' fullname='J. Ball'><organization /></author>
<date year='2006' month='October' />
<abstract><t>This document specifies a TLS extension that enables clients to send generic user mapping hints in a supplemental data handshake message defined in RFC 4680.  One such mapping hint is defined in an informative section, the UpnDomainHint, which may be used by a server to locate a user in a directory database.  Other mapping hints may be defined in other documents in the future.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='4681'/>
<seriesInfo name='DOI' value='10.17487/RFC4681'/>
</reference>



<reference  anchor='RFC5054' target='http://www.rfc-editor.org/info/rfc5054'>
<front>
<title>Using the Secure Remote Password (SRP) Protocol for TLS Authentication</title>
<author initials='D.' surname='Taylor' fullname='D. Taylor'><organization /></author>
<author initials='T.' surname='Wu' fullname='T. Wu'><organization /></author>
<author initials='N.' surname='Mavrogiannopoulos' fullname='N. Mavrogiannopoulos'><organization /></author>
<author initials='T.' surname='Perrin' fullname='T. Perrin'><organization /></author>
<date year='2007' month='November' />
<abstract><t>This memo presents a technique for using the Secure Remote Password protocol as an authentication method for the Transport Layer Security protocol.  This memo provides information for the Internet community.</t></abstract>
</front>
<seriesInfo name='RFC' value='5054'/>
<seriesInfo name='DOI' value='10.17487/RFC5054'/>
</reference>



<reference  anchor='RFC5077' target='http://www.rfc-editor.org/info/rfc5077'>
<front>
<title>Transport Layer Security (TLS) Session Resumption without Server-Side State</title>
<author initials='J.' surname='Salowey' fullname='J. Salowey'><organization /></author>
<author initials='H.' surname='Zhou' fullname='H. Zhou'><organization /></author>
<author initials='P.' surname='Eronen' fullname='P. Eronen'><organization /></author>
<author initials='H.' surname='Tschofenig' fullname='H. Tschofenig'><organization /></author>
<date year='2008' month='January' />
<abstract><t>This document describes a mechanism that enables the Transport Layer Security (TLS) server to resume sessions and avoid keeping per-client session state.  The TLS server encapsulates the session state into a ticket and forwards it to the client.  The client can subsequently resume a session using the obtained ticket.  This document obsoletes RFC 4507.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5077'/>
<seriesInfo name='DOI' value='10.17487/RFC5077'/>
</reference>



<reference  anchor='RFC5081' target='http://www.rfc-editor.org/info/rfc5081'>
<front>
<title>Using OpenPGP Keys for Transport Layer Security (TLS) Authentication</title>
<author initials='N.' surname='Mavrogiannopoulos' fullname='N. Mavrogiannopoulos'><organization /></author>
<date year='2007' month='November' />
<abstract><t>This memo proposes extensions to the Transport Layer Security (TLS) protocol to support the OpenPGP key format.  The extensions discussed here include a certificate type negotiation mechanism, and the required modifications to the TLS Handshake Protocol.  This memo defines an Experimental Protocol for the Internet community.</t></abstract>
</front>
<seriesInfo name='RFC' value='5081'/>
<seriesInfo name='DOI' value='10.17487/RFC5081'/>
</reference>



<reference  anchor='RFC5116' target='http://www.rfc-editor.org/info/rfc5116'>
<front>
<title>An Interface and Algorithms for Authenticated Encryption</title>
<author initials='D.' surname='McGrew' fullname='D. McGrew'><organization /></author>
<date year='2008' month='January' />
<abstract><t>This document defines algorithms for Authenticated Encryption with Associated Data (AEAD), and defines a uniform interface and a registry for such algorithms.  The interface and registry can be used as an application-independent set of cryptoalgorithm suites.  This approach provides advantages in efficiency and security, and promotes the reuse of crypto implementations.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5116'/>
<seriesInfo name='DOI' value='10.17487/RFC5116'/>
</reference>



<reference  anchor='RFC5246' target='http://www.rfc-editor.org/info/rfc5246'>
<front>
<title>The Transport Layer Security (TLS) Protocol Version 1.2</title>
<author initials='T.' surname='Dierks' fullname='T. Dierks'><organization /></author>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<date year='2008' month='August' />
<abstract><t>This document specifies Version 1.2 of the Transport Layer Security (TLS) protocol.  The TLS protocol provides communications security over the Internet.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5246'/>
<seriesInfo name='DOI' value='10.17487/RFC5246'/>
</reference>



<reference  anchor='RFC5746' target='http://www.rfc-editor.org/info/rfc5746'>
<front>
<title>Transport Layer Security (TLS) Renegotiation Indication Extension</title>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<author initials='M.' surname='Ray' fullname='M. Ray'><organization /></author>
<author initials='S.' surname='Dispensa' fullname='S. Dispensa'><organization /></author>
<author initials='N.' surname='Oskov' fullname='N. Oskov'><organization /></author>
<date year='2010' month='February' />
<abstract><t>Secure Socket Layer (SSL) and Transport Layer Security (TLS) renegotiation are vulnerable to an attack in which the attacker forms a TLS connection with the target server, injects content of his choice, and then splices in a new TLS connection from a client.  The server treats the client's initial TLS handshake as a renegotiation and thus believes that the initial data transmitted by the attacker is from the same entity as the subsequent client data.  This specification defines a TLS extension to cryptographically tie renegotiations to the TLS connections they are being performed over, thus preventing this attack.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5746'/>
<seriesInfo name='DOI' value='10.17487/RFC5746'/>
</reference>



<reference  anchor='RFC5763' target='http://www.rfc-editor.org/info/rfc5763'>
<front>
<title>Framework for Establishing a Secure Real-time Transport Protocol (SRTP) Security Context Using Datagram Transport Layer Security (DTLS)</title>
<author initials='J.' surname='Fischl' fullname='J. Fischl'><organization /></author>
<author initials='H.' surname='Tschofenig' fullname='H. Tschofenig'><organization /></author>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<date year='2010' month='May' />
<abstract><t>This document specifies how to use the Session Initiation Protocol (SIP) to establish a Secure Real-time Transport Protocol (SRTP) security context using the Datagram Transport Layer Security (DTLS) protocol.  It describes a mechanism of transporting a fingerprint attribute in the Session Description Protocol (SDP) that identifies the key that will be presented during the DTLS handshake.  The key exchange travels along the media path as opposed to the signaling path.  The SIP Identity mechanism can be used to protect the integrity of the fingerprint attribute from modification by intermediate proxies.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5763'/>
<seriesInfo name='DOI' value='10.17487/RFC5763'/>
</reference>



<reference  anchor='RFC5764' target='http://www.rfc-editor.org/info/rfc5764'>
<front>
<title>Datagram Transport Layer Security (DTLS) Extension to Establish Keys for the Secure Real-time Transport Protocol (SRTP)</title>
<author initials='D.' surname='McGrew' fullname='D. McGrew'><organization /></author>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<date year='2010' month='May' />
<abstract><t>This document describes a Datagram Transport Layer Security (DTLS) extension to establish keys for Secure RTP (SRTP) and Secure RTP Control Protocol (SRTCP) flows.  DTLS keying happens on the media path, independent of any out-of-band signalling channel present. [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5764'/>
<seriesInfo name='DOI' value='10.17487/RFC5764'/>
</reference>



<reference  anchor='RFC5878' target='http://www.rfc-editor.org/info/rfc5878'>
<front>
<title>Transport Layer Security (TLS) Authorization Extensions</title>
<author initials='M.' surname='Brown' fullname='M. Brown'><organization /></author>
<author initials='R.' surname='Housley' fullname='R. Housley'><organization /></author>
<date year='2010' month='May' />
<abstract><t>This document specifies authorization extensions to the Transport Layer Security (TLS) Handshake Protocol.  Extensions are carried in the client and server hello messages to confirm that both parties support the desired authorization data types.  Then, if supported by both the client and the server, authorization information, such as attribute certificates (ACs) or Security Assertion Markup Language (SAML)  assertions, is exchanged in the supplemental data handshake message. This document defines an Experimental Protocol for the Internet community.</t></abstract>
</front>
<seriesInfo name='RFC' value='5878'/>
<seriesInfo name='DOI' value='10.17487/RFC5878'/>
</reference>



<reference  anchor='RFC5929' target='http://www.rfc-editor.org/info/rfc5929'>
<front>
<title>Channel Bindings for TLS</title>
<author initials='J.' surname='Altman' fullname='J. Altman'><organization /></author>
<author initials='N.' surname='Williams' fullname='N. Williams'><organization /></author>
<author initials='L.' surname='Zhu' fullname='L. Zhu'><organization /></author>
<date year='2010' month='July' />
<abstract><t>This document defines three channel binding types for Transport Layer Security (TLS), tls-unique, tls-server-end-point, and tls-unique-for-telnet, in accordance with RFC 5056 (On Channel Binding).</t><t>Note that based on implementation experience, this document changes the original definition of 'tls-unique' channel binding type in the channel binding type IANA registry.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='5929'/>
<seriesInfo name='DOI' value='10.17487/RFC5929'/>
</reference>



<reference  anchor='RFC6176' target='http://www.rfc-editor.org/info/rfc6176'>
<front>
<title>Prohibiting Secure Sockets Layer (SSL) Version 2.0</title>
<author initials='S.' surname='Turner' fullname='S. Turner'><organization /></author>
<author initials='T.' surname='Polk' fullname='T. Polk'><organization /></author>
<date year='2011' month='March' />
<abstract><t>This document requires that when Transport Layer Security (TLS) clients and servers establish connections, they never negotiate the use of  Secure Sockets Layer (SSL) version 2.0.  This document updates the  backward compatibility sections found in the Transport Layer Security (TLS). [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6176'/>
<seriesInfo name='DOI' value='10.17487/RFC6176'/>
</reference>



<reference  anchor='RFC6091' target='http://www.rfc-editor.org/info/rfc6091'>
<front>
<title>Using OpenPGP Keys for Transport Layer Security (TLS) Authentication</title>
<author initials='N.' surname='Mavrogiannopoulos' fullname='N. Mavrogiannopoulos'><organization /></author>
<author initials='D.' surname='Gillmor' fullname='D. Gillmor'><organization /></author>
<date year='2011' month='February' />
<abstract><t>This memo defines Transport Layer Security (TLS) extensions and associated semantics that allow clients and servers to negotiate the use of OpenPGP certificates for a TLS session, and specifies how to transport OpenPGP certificates via TLS.  It also defines the registry for non-X.509 certificate types.  This document is not an Internet  Standards Track specification; it is published for informational purposes.</t></abstract>
</front>
<seriesInfo name='RFC' value='6091'/>
<seriesInfo name='DOI' value='10.17487/RFC6091'/>
</reference>



<reference  anchor='RFC6520' target='http://www.rfc-editor.org/info/rfc6520'>
<front>
<title>Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) Heartbeat Extension</title>
<author initials='R.' surname='Seggelmann' fullname='R. Seggelmann'><organization /></author>
<author initials='M.' surname='Tuexen' fullname='M. Tuexen'><organization /></author>
<author initials='M.' surname='Williams' fullname='M. Williams'><organization /></author>
<date year='2012' month='February' />
<abstract><t>This document describes the Heartbeat Extension for the Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) protocols.</t><t>The Heartbeat Extension provides a new protocol for TLS/DTLS allowing the usage of keep-alive functionality without performing a renegotiation and a basis for path MTU (PMTU) discovery for DTLS.   [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6520'/>
<seriesInfo name='DOI' value='10.17487/RFC6520'/>
</reference>



<reference  anchor='RFC7301' target='http://www.rfc-editor.org/info/rfc7301'>
<front>
<title>Transport Layer Security (TLS) Application-Layer Protocol Negotiation Extension</title>
<author initials='S.' surname='Friedl' fullname='S. Friedl'><organization /></author>
<author initials='A.' surname='Popov' fullname='A. Popov'><organization /></author>
<author initials='A.' surname='Langley' fullname='A. Langley'><organization /></author>
<author initials='E.' surname='Stephan' fullname='E. Stephan'><organization /></author>
<date year='2014' month='July' />
<abstract><t>This document describes a Transport Layer Security (TLS) extension for application-layer protocol negotiation within the TLS handshake. For instances in which multiple application protocols are supported on the same TCP or UDP port, this extension allows the application layer to negotiate which protocol will be used within the TLS connection.</t></abstract>
</front>
<seriesInfo name='RFC' value='7301'/>
<seriesInfo name='DOI' value='10.17487/RFC7301'/>
</reference>



<reference  anchor='RFC7230' target='http://www.rfc-editor.org/info/rfc7230'>
<front>
<title>Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing</title>
<author initials='R.' surname='Fielding' fullname='R. Fielding' role='editor'><organization /></author>
<author initials='J.' surname='Reschke' fullname='J. Reschke' role='editor'><organization /></author>
<date year='2014' month='June' />
<abstract><t>The Hypertext Transfer Protocol (HTTP) is a stateless application-level protocol for distributed, collaborative, hypertext information systems.  This document provides an overview of HTTP architecture and its associated terminology, defines the &quot;http&quot; and &quot;https&quot; Uniform Resource Identifier (URI) schemes, defines the HTTP/1.1 message syntax and parsing requirements, and describes related security concerns for implementations.</t></abstract>
</front>
<seriesInfo name='RFC' value='7230'/>
<seriesInfo name='DOI' value='10.17487/RFC7230'/>
</reference>



<reference  anchor='RFC7250' target='http://www.rfc-editor.org/info/rfc7250'>
<front>
<title>Using Raw Public Keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
<author initials='P.' surname='Wouters' fullname='P. Wouters' role='editor'><organization /></author>
<author initials='H.' surname='Tschofenig' fullname='H. Tschofenig' role='editor'><organization /></author>
<author initials='J.' surname='Gilmore' fullname='J. Gilmore'><organization /></author>
<author initials='S.' surname='Weiler' fullname='S. Weiler'><organization /></author>
<author initials='T.' surname='Kivinen' fullname='T. Kivinen'><organization /></author>
<date year='2014' month='June' />
<abstract><t>This document specifies a new certificate type and two TLS extensions for exchanging raw public keys in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS).  The new certificate type allows raw public keys to be used for authentication.</t></abstract>
</front>
<seriesInfo name='RFC' value='7250'/>
<seriesInfo name='DOI' value='10.17487/RFC7250'/>
</reference>



<reference  anchor='RFC7366' target='http://www.rfc-editor.org/info/rfc7366'>
<front>
<title>Encrypt-then-MAC for Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS)</title>
<author initials='P.' surname='Gutmann' fullname='P. Gutmann'><organization /></author>
<date year='2014' month='September' />
<abstract><t>This document describes a means of negotiating the use of the encrypt-then-MAC security mechanism in place of the existing MAC-then-encrypt mechanism in Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS).  The MAC-then-encrypt mechanism has been the subject of a number of security vulnerabilities over a period of many years.</t></abstract>
</front>
<seriesInfo name='RFC' value='7366'/>
<seriesInfo name='DOI' value='10.17487/RFC7366'/>
</reference>



<reference  anchor='RFC7465' target='http://www.rfc-editor.org/info/rfc7465'>
<front>
<title>Prohibiting RC4 Cipher Suites</title>
<author initials='A.' surname='Popov' fullname='A. Popov'><organization /></author>
<date year='2015' month='February' />
<abstract><t>This document requires that Transport Layer Security (TLS) clients and servers never negotiate the use of RC4 cipher suites when they establish connections.  This applies to all TLS versions.  This document updates RFCs 5246, 4346, and 2246.</t></abstract>
</front>
<seriesInfo name='RFC' value='7465'/>
<seriesInfo name='DOI' value='10.17487/RFC7465'/>
</reference>



<reference  anchor='RFC7568' target='http://www.rfc-editor.org/info/rfc7568'>
<front>
<title>Deprecating Secure Sockets Layer Version 3.0</title>
<author initials='R.' surname='Barnes' fullname='R. Barnes'><organization /></author>
<author initials='M.' surname='Thomson' fullname='M. Thomson'><organization /></author>
<author initials='A.' surname='Pironti' fullname='A. Pironti'><organization /></author>
<author initials='A.' surname='Langley' fullname='A. Langley'><organization /></author>
<date year='2015' month='June' />
<abstract><t>The Secure Sockets Layer version 3.0 (SSLv3), as specified in RFC 6101, is not sufficiently secure.  This document requires that SSLv3 not be used.  The replacement versions, in particular, Transport Layer Security (TLS) 1.2 (RFC 5246), are considerably more secure and capable protocols.</t><t>This document updates the backward compatibility section of RFC 5246 and its predecessors to prohibit fallback to SSLv3.</t></abstract>
</front>
<seriesInfo name='RFC' value='7568'/>
<seriesInfo name='DOI' value='10.17487/RFC7568'/>
</reference>



<reference  anchor='RFC7627' target='http://www.rfc-editor.org/info/rfc7627'>
<front>
<title>Transport Layer Security (TLS) Session Hash and Extended Master Secret Extension</title>
<author initials='K.' surname='Bhargavan' fullname='K. Bhargavan' role='editor'><organization /></author>
<author initials='A.' surname='Delignat-Lavaud' fullname='A. Delignat-Lavaud'><organization /></author>
<author initials='A.' surname='Pironti' fullname='A. Pironti'><organization /></author>
<author initials='A.' surname='Langley' fullname='A. Langley'><organization /></author>
<author initials='M.' surname='Ray' fullname='M. Ray'><organization /></author>
<date year='2015' month='September' />
<abstract><t>The Transport Layer Security (TLS) master secret is not cryptographically bound to important session parameters such as the server certificate.  Consequently, it is possible for an active attacker to set up two sessions, one with a client and another with a server, such that the master secrets on the two sessions are the same.  Thereafter, any mechanism that relies on the master secret for authentication, including session resumption, becomes vulnerable to a man-in-the-middle attack, where the attacker can simply forward messages back and forth between the client and server.  This specification defines a TLS extension that contextually binds the master secret to a log of the full handshake that computes it, thus preventing such attacks.</t></abstract>
</front>
<seriesInfo name='RFC' value='7627'/>
<seriesInfo name='DOI' value='10.17487/RFC7627'/>
</reference>



<reference  anchor='RFC7685' target='http://www.rfc-editor.org/info/rfc7685'>
<front>
<title>A Transport Layer Security (TLS) ClientHello Padding Extension</title>
<author initials='A.' surname='Langley' fullname='A. Langley'><organization /></author>
<date year='2015' month='October' />
<abstract><t>This memo describes a Transport Layer Security (TLS) extension that can be used to pad ClientHello messages to a desired size.</t></abstract>
</front>
<seriesInfo name='RFC' value='7685'/>
<seriesInfo name='DOI' value='10.17487/RFC7685'/>
</reference>



<reference anchor='I-D.ietf-tls-negotiated-ff-dhe'>
<front>
<title>Negotiated Finite Field Diffie-Hellman Ephemeral Parameters for TLS</title>

<author initials='D' surname='Gillmor' fullname='Daniel Gillmor'>
    <organization />
</author>

<date month='June' day='1' year='2015' />

<abstract><t>Traditional finite-field-based Diffie-Hellman (DH) key exchange during the TLS handshake suffers from a number of security, interoperability, and efficiency shortcomings.  These shortcomings arise from lack of clarity about which DH group parameters TLS servers should offer and clients should accept.  This document offers a solution to these shortcomings for compatible peers by using a section of the TLS "EC Named Curve Registry" to establish common finite-field DH parameters with known structure and a mechanism for peers to negotiate support for these groups.  This draft updates TLS versions 1.0 [RFC2246], 1.1 [RFC4346], and 1.2 [RFC5246], as well as the TLS ECC extensions [RFC4492].</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-tls-negotiated-ff-dhe-10' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-tls-negotiated-ff-dhe-10.txt' />
</reference>


<reference anchor="DSS" >
  <front>
    <title>Digital Signature Standard, version 4</title>
    <author >
      <organization>National Institute of Standards and Technology, U.S. Department of Commerce</organization>
    </author>
    <date year="2013"/>
  </front>
  <seriesInfo name="NIST" value="FIPS PUB 186-4"/>
</reference>
<reference anchor="ECDSA" >
  <front>
    <title>Public Key Cryptography for the Financial Services Industry: The Elliptic Curve Digital Signature Algorithm (ECDSA)</title>
    <author >
      <organization>American National Standards Institute</organization>
    </author>
    <date year="2005" month="November"/>
  </front>
  <seriesInfo name="ANSI" value="ANS X9.62-2005"/>
</reference>
<reference anchor="FI06" target="https://www.ietf.org/mail-archive/web/openpgp/current/msg00999.html">
  <front>
    <title>Bleichenbacher's RSA signature forgery based on implementation error</title>
    <author initials="H." surname="Finney" fullname="Hal Finney">
      <organization></organization>
    </author>
    <date year="2006" month="August" day="27"/>
  </front>
</reference>
<reference anchor="GCM" >
  <front>
    <title>Recommendation for Block Cipher Modes of Operation: Galois/Counter Mode (GCM) and GMAC</title>
    <author initials="M." surname="Dworkin">
      <organization></organization>
    </author>
    <date year="2007" month="November"/>
  </front>
  <seriesInfo name="NIST" value="Special Publication 800-38D"/>
</reference>
<reference anchor="PKCS6" >
  <front>
    <title>PKCS #6: RSA Extended Certificate Syntax Standard, version 1.5</title>
    <author >
      <organization>RSA Laboratories</organization>
    </author>
    <date year="1993" month="November"/>
  </front>
</reference>
<reference anchor="PKCS7" >
  <front>
    <title>PKCS #7: RSA Cryptographic Message Syntax Standard, version 1.5</title>
    <author >
      <organization>RSA Laboratories</organization>
    </author>
    <date year="1993" month="November"/>
  </front>
</reference>
<reference anchor="RSA" >
  <front>
    <title>A Method for Obtaining Digital Signatures and Public-Key Cryptosystems</title>
    <author initials="R." surname="Rivest">
      <organization></organization>
    </author>
    <author initials="A." surname="Shamir">
      <organization></organization>
    </author>
    <author initials="L.M." surname="Adleman">
      <organization></organization>
    </author>
    <date year="1978" month="February"/>
  </front>
  <seriesInfo name="Communications of the ACM" value="v. 21, n. 2, pp. 120-126."/>
</reference>
<reference anchor="SSL2" >
  <front>
    <title>The SSL Protocol</title>
    <author initials="K." surname="Hickman" fullname="Kipp Hickman">
      <organization>Netscape Communications Corp.</organization>
    </author>
    <date year="1995" month="February" day="09"/>
  </front>
</reference>
<reference anchor="SSL3" >
  <front>
    <title>The SSL 3.0 Protocol</title>
    <author initials="A." surname="Freier">
      <organization>Netscape Communications Corp.</organization>
    </author>
    <author initials="P." surname="Karlton">
      <organization>Netscape Communications Corp.</organization>
    </author>
    <author initials="P." surname="Kocher">
      <organization>Netscape Communications Corp.</organization>
    </author>
    <date year="1996" month="November" day="18"/>
  </front>
</reference>
<reference anchor="TIMING" >
  <front>
    <title>Remote timing attacks are practical</title>
    <author initials="D." surname="Boneh">
      <organization></organization>
    </author>
    <author initials="D." surname="Brumley">
      <organization></organization>
    </author>
    <date year="2003"/>
  </front>
  <seriesInfo name="USENIX" value="Security Symposium"/>
</reference>
<reference anchor="X501" >
  <front>
    <title>Information Technology - Open Systems Interconnection - The Directory: Models</title>
    <author >
      <organization></organization>
    </author>
    <date year="1993"/>
  </front>
  <seriesInfo name="ITU-T" value="X.501"/>
</reference>
<reference anchor="IEEE1363" >
  <front>
    <title>Standard Specifications for Public Key Cryptography</title>
    <author >
      <organization>IEEE</organization>
    </author>
    <date year="2000"/>
  </front>
  <seriesInfo name="IEEE 1363" value=""/>
</reference>
<reference anchor="PSK-FINISHED" target="https://www.ietf.org/mail-archive/web/tls/current/msg18215.html">
  <front>
    <title>Revision 10: possible attack if client authentication is allowed during PSK</title>
    <author initials="C." surname="Cremers">
      <organization></organization>
    </author>
    <author initials="M." surname="Horvat">
      <organization></organization>
    </author>
    <author initials="T." surname="van der Merwe">
      <organization></organization>
    </author>
    <author initials="S." surname="Scott">
      <organization></organization>
    </author>
    <date year="2015"/>
  </front>
</reference>
<reference anchor="SLOTH" >
  <front>
    <title>Transcript Collision Attacks: Breaking Authentication in TLS, IKE, and SSH</title>
    <author initials="K." surname="Bhargavan">
      <organization></organization>
    </author>
    <author initials="G." surname="Leurent">
      <organization></organization>
    </author>
    <date year="2016"/>
  </front>
  <seriesInfo name="Network and Distributed System Security Symposium (NDSS 2016)" value=""/>
</reference>
<reference anchor="AEAD-LIMITS" target="http://www.isg.rhul.ac.uk/~kp/TLS-AEbounds.pdf">
  <front>
    <title>Limits on Authenticated Encryption Use in TLS</title>
    <author initials="A." surname="Luykx">
      <organization></organization>
    </author>
    <author initials="K." surname="Paterson">
      <organization></organization>
    </author>
    <date year="2016"/>
  </front>
</reference>
<reference anchor="CK01" >
  <front>
    <title>Analysis of Key-Exchange Protocols and Their Use for Building Secure Channels</title>
    <author initials="R." surname="Canetti">
      <organization></organization>
    </author>
    <author initials="H." surname="Krawczyk">
      <organization></organization>
    </author>
    <date year="2001"/>
  </front>
  <seriesInfo name="Proceedings of Eurocrypt 2001" value=""/>
</reference>
<reference anchor="BBFKZG16" >
  <front>
    <title>Downgrade Resilience in Key-Exchange Protocols</title>
    <author initials="K." surname="Bhargavan">
      <organization></organization>
    </author>
    <author initials="C." surname="Brzuska">
      <organization></organization>
    </author>
    <author initials="C." surname="Fournet">
      <organization></organization>
    </author>
    <author initials="M." surname="Kohlweiss">
      <organization></organization>
    </author>
    <author initials="S." surname="Zanella-Beguelin">
      <organization></organization>
    </author>
    <author initials="M." surname="Green">
      <organization></organization>
    </author>
    <date year="2016"/>
  </front>
  <seriesInfo name="Proceedings of IEEE Symposium on Security and Privacy (Oakland) 2016" value=""/>
</reference>
<reference anchor="DOW92" >
  <front>
    <title>“Authentication and authenticated key exchanges”</title>
    <author initials="W." surname="Diffie">
      <organization></organization>
    </author>
    <author initials="P." surname="van Oorschot">
      <organization></organization>
    </author>
    <author initials="M." surname="Wiener">
      <organization></organization>
    </author>
    <date year="n.d."/>
  </front>
  <seriesInfo name="Designs, Codes and Cryptography" value=""/>
</reference>
<reference anchor="SIGMA" >
  <front>
    <title>SIGMA: the 'SIGn-and-MAc' approach to authenticated Di e-Hellman and its use in the IKE protocols</title>
    <author initials="H." surname="Krawczyk">
      <organization></organization>
    </author>
    <date year="2003"/>
  </front>
  <seriesInfo name="Proceedings of CRYPTO 2003" value=""/>
</reference>
<reference anchor="CHSV16" >
  <front>
    <title>Automated Analysis and Verification of TLS 1.3: 0-RTT, Resumption and Delayed Authentication</title>
    <author initials="C." surname="Cremers">
      <organization></organization>
    </author>
    <author initials="M." surname="Horvat">
      <organization></organization>
    </author>
    <author initials="S." surname="Scott">
      <organization></organization>
    </author>
    <author initials="T." surname="van der Merwe">
      <organization></organization>
    </author>
    <date year="2016"/>
  </front>
  <seriesInfo name="Proceedings of IEEE Symposium on Security and Privacy (Oakland) 2016" value=""/>
</reference>
<reference anchor="FGSW16" >
  <front>
    <title>Key Confirmation in Key Exchange: A Formal Treatment and Implications for TLS 1.3</title>
    <author initials="M." surname="Fischlin">
      <organization></organization>
    </author>
    <author initials="F." surname="Guenther">
      <organization></organization>
    </author>
    <author initials="B." surname="Schmidt">
      <organization></organization>
    </author>
    <author initials="B." surname="Warinschi">
      <organization></organization>
    </author>
    <date year="2016"/>
  </front>
  <seriesInfo name="Proceedings of IEEE Symposium on Security and Privacy (Oakland) 2016" value=""/>
</reference>
<reference anchor="LXZFH16" >
  <front>
    <title>Multiple Handshakes Security of TLS 1.3 Candidates</title>
    <author initials="X." surname="Li">
      <organization></organization>
    </author>
    <author initials="J." surname="Xu">
      <organization></organization>
    </author>
    <author initials="D." surname="Feng">
      <organization></organization>
    </author>
    <author initials="Z." surname="Zhang">
      <organization></organization>
    </author>
    <author initials="H." surname="Hu">
      <organization></organization>
    </author>
    <date year="2016"/>
  </front>
  <seriesInfo name="Proceedings of IEEE Symposium on Security and Privacy (Oakland) 2016" value=""/>
</reference>




<reference  anchor='RFC3552' target='http://www.rfc-editor.org/info/rfc3552'>
<front>
<title>Guidelines for Writing RFC Text on Security Considerations</title>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<author initials='B.' surname='Korver' fullname='B. Korver'><organization /></author>
<date year='2003' month='July' />
<abstract><t>All RFCs are required to have a Security Considerations section. Historically, such sections have been relatively weak.  This document provides guidelines to RFC authors on how to write a good Security Considerations section.   This document specifies an Internet Best Current Practices for the Internet Community, and requests discussion and suggestions for improvements.</t></abstract>
</front>
<seriesInfo name='BCP' value='72'/>
<seriesInfo name='RFC' value='3552'/>
<seriesInfo name='DOI' value='10.17487/RFC3552'/>
</reference>



<reference anchor='I-D.ietf-tls-cached-info'>
<front>
<title>Transport Layer Security (TLS) Cached Information Extension</title>

<author initials='S' surname='Santesson' fullname='Stefan Santesson'>
    <organization />
</author>

<author initials='H' surname='Tschofenig' fullname='Hannes Tschofenig'>
    <organization />
</author>

<date month='May' day='11' year='2016' />

<abstract><t>Transport Layer Security (TLS) handshakes often include fairly static information, such as the server certificate and a list of trusted certification authorities (CAs).  This information can be of considerable size, particularly if the server certificate is bundled with a complete certificate chain (i.e., the certificates of intermediate CAs up to the root CA).  This document defines an extension that allows a TLS client to inform a server of cached information, allowing the server to omit already available information.</t></abstract>

</front>

<seriesInfo name='Internet-Draft' value='draft-ietf-tls-cached-info-23' />
<format type='TXT'
        target='http://www.ietf.org/internet-drafts/draft-ietf-tls-cached-info-23.txt' />
</reference>



<reference  anchor='RFC6347' target='http://www.rfc-editor.org/info/rfc6347'>
<front>
<title>Datagram Transport Layer Security Version 1.2</title>
<author initials='E.' surname='Rescorla' fullname='E. Rescorla'><organization /></author>
<author initials='N.' surname='Modadugu' fullname='N. Modadugu'><organization /></author>
<date year='2012' month='January' />
<abstract><t>This document specifies version 1.2 of the Datagram Transport Layer Security (DTLS) protocol.  The DTLS protocol provides communications privacy for datagram protocols.  The protocol allows client/server applications to communicate in a way that is designed to prevent eavesdropping, tampering, or message forgery.  The DTLS protocol is based on the Transport Layer Security (TLS) protocol and provides equivalent security guarantees.  Datagram semantics of the underlying transport are preserved by the DTLS protocol.  This document updates DTLS 1.0 to work with TLS version 1.2.  [STANDARDS-TRACK]</t></abstract>
</front>
<seriesInfo name='RFC' value='6347'/>
<seriesInfo name='DOI' value='10.17487/RFC6347'/>
</reference>



<reference  anchor='RFC6962' target='http://www.rfc-editor.org/info/rfc6962'>
<front>
<title>Certificate Transparency</title>
<author initials='B.' surname='Laurie' fullname='B. Laurie'><organization /></author>
<author initials='A.' surname='Langley' fullname='A. Langley'><organization /></author>
<author initials='E.' surname='Kasper' fullname='E. Kasper'><organization /></author>
<date year='2013' month='June' />
<abstract><t>This document describes an experimental protocol for publicly logging the existence of Transport Layer Security (TLS) certificates as they are issued or observed, in a manner that allows anyone to audit certificate authority (CA) activity and notice the issuance of suspect certificates as well as to audit the certificate logs themselves.  The intent is that eventually clients would refuse to honor certificates that do not appear in a log, effectively forcing CAs to add all issued certificates to the logs.</t><t>Logs are network services that implement the protocol operations for submissions and queries that are defined in this document.</t></abstract>
</front>
<seriesInfo name='RFC' value='6962'/>
<seriesInfo name='DOI' value='10.17487/RFC6962'/>
</reference>




    </references>


<section anchor="protocol-data-structures-and-constant-values" title="Protocol Data Structures and Constant Values">

<t>This section describes protocol types and constants. Values listed as
_RESERVED were used in previous versions of TLS and are listed here
for completeness. TLS 1.3 implementations MUST NOT send them but
might receive them from older TLS implementations.</t>

<section anchor="record-layer-1" title="Record Layer">

<figure><artwork><![CDATA[
   enum {
       invalid_RESERVED(0),
       change_cipher_spec_RESERVED(20),
       alert(21),
       handshake(22),
       application_data(23)
       (255)
   } ContentType;

   struct {
       ContentType type;
       ProtocolVersion record_version = { 3, 1 };    /* TLS v1.x */
       uint16 length;
       opaque fragment[TLSPlaintext.length];
   } TLSPlaintext;

   struct {
      opaque content[TLSPlaintext.length];
      ContentType type;
      uint8 zeros[length_of_padding];
   } TLSInnerPlaintext;

   struct {
       ContentType opaque_type = application_data(23); /* see fragment.type */
       ProtocolVersion record_version = { 3, 1 };    /* TLS v1.x */
       uint16 length;
       opaque encrypted_record[length];
   } TLSCiphertext;
]]></artwork></figure>

</section>
<section anchor="alert-messages" title="Alert Messages">

<figure><artwork><![CDATA[
   enum { warning(1), fatal(2), (255) } AlertLevel;

   enum {
       close_notify(0),
       end_of_early_data(1),
       unexpected_message(10),
       bad_record_mac(20),
       decryption_failed_RESERVED(21),
       record_overflow(22),
       decompression_failure_RESERVED(30),
       handshake_failure(40),
       no_certificate_RESERVED(41),
       bad_certificate(42),
       unsupported_certificate(43),
       certificate_revoked(44),
       certificate_expired(45),
       certificate_unknown(46),
       illegal_parameter(47),
       unknown_ca(48),
       access_denied(49),
       decode_error(50),
       decrypt_error(51),
       export_restriction_RESERVED(60),
       protocol_version(70),
       insufficient_security(71),
       internal_error(80),
       inappropriate_fallback(86),
       user_canceled(90),
       no_renegotiation_RESERVED(100),
       missing_extension(109),
       unsupported_extension(110),
       certificate_unobtainable(111),
       unrecognized_name(112),
       bad_certificate_status_response(113),
       bad_certificate_hash_value(114),
       unknown_psk_identity(115),
       (255)
   } AlertDescription;

   struct {
       AlertLevel level;
       AlertDescription description;
   } Alert;
]]></artwork></figure>

</section>
<section anchor="handshake-protocol-1" title="Handshake Protocol">

<figure><artwork><![CDATA[
   enum {
       hello_request_RESERVED(0),
       client_hello(1),
       server_hello(2),
       new_session_ticket(4),
       hello_retry_request(6),
       encrypted_extensions(8),
       certificate(11),
       server_key_exchange_RESERVED(12),
       certificate_request(13),
       server_hello_done_RESERVED(14),
       certificate_verify(15),
       client_key_exchange_RESERVED(16),
       finished(20),
       key_update(24),
       (255)
   } HandshakeType;

   struct {
       HandshakeType msg_type;    /* handshake type */
       uint24 length;             /* bytes in message */
       select (HandshakeType) {
           case client_hello:          ClientHello;
           case server_hello:          ServerHello;
           case hello_retry_request:   HelloRetryRequest;
           case encrypted_extensions:  EncryptedExtensions;
           case certificate_request:   CertificateRequest;
           case certificate:           Certificate;
           case certificate_verify:    CertificateVerify;
           case finished:              Finished;
           case new_session_ticket:    NewSessionTicket;
           case key_update:            KeyUpdate;
       } body;
   } Handshake;
]]></artwork></figure>

<section anchor="key-exchange-messages-1" title="Key Exchange Messages">

<figure><artwork><![CDATA[
   struct {
       uint8 major;
       uint8 minor;
   } ProtocolVersion;

   struct {
       opaque random_bytes[32];
   } Random;

   uint8 CipherSuite[2];    /* Cryptographic suite selector */

   struct {
       ProtocolVersion client_version = { 3, 4 };    /* TLS v1.3 */
       Random random;
       opaque legacy_session_id<0..32>;
       CipherSuite cipher_suites<2..2^16-2>;
       opaque legacy_compression_methods<1..2^8-1>;
       Extension extensions<0..2^16-1>;
   } ClientHello;

   struct {
       ProtocolVersion server_version;
       Random random;
       CipherSuite cipher_suite;
       Extension extensions<0..2^16-1>;
   } ServerHello;

   struct {
       ProtocolVersion server_version;
       CipherSuite cipher_suite;
       NamedGroup selected_group;
       Extension extensions<0..2^16-1>;
   } HelloRetryRequest;

   struct {
       ExtensionType extension_type;
       opaque extension_data<0..2^16-1>;
   } Extension;

   enum {
       supported_groups(10),
       signature_algorithms(13),
       key_share(40),
       pre_shared_key(41),
       early_data(42),
       cookie(44),
       (65535)
   } ExtensionType;

   struct {
       NamedGroup group;
       opaque key_exchange<1..2^16-1>;
   } KeyShareEntry;

   struct {
       select (role) {
           case client:
               KeyShareEntry client_shares<0..2^16-1>;

           case server:
               KeyShareEntry server_share;
       }
   } KeyShare;

   opaque psk_identity<0..2^16-1>;

   struct {
       select (Role) {
           case client:
               psk_identity identities<2..2^16-1>;

           case server:
               uint16 selected_identity;
       }
   } PreSharedKeyExtension;

   struct {
       select (Role) {
           case client:
               uint32 obfuscated_ticket_age;

           case server:
              struct {};
       }
   } EarlyDataIndication;
]]></artwork></figure>

<section anchor="cookie-extension" title="Cookie Extension">

<figure><artwork><![CDATA[
   struct {
       opaque cookie<0..2^16-1>;
   } Cookie;
]]></artwork></figure>

</section>
<section anchor="signature-algorithm-extension" title="Signature Algorithm Extension">

<figure><artwork><![CDATA[
   enum {
       /* RSASSA-PKCS1-v1_5 algorithms */
       rsa_pkcs1_sha1 (0x0201),
       rsa_pkcs1_sha256 (0x0401),
       rsa_pkcs1_sha384 (0x0501),
       rsa_pkcs1_sha512 (0x0601),

       /* ECDSA algorithms */
       ecdsa_secp256r1_sha256 (0x0403),
       ecdsa_secp384r1_sha384 (0x0503),
       ecdsa_secp521r1_sha512 (0x0603),

       /* RSASSA-PSS algorithms */
       rsa_pss_sha256 (0x0700),
       rsa_pss_sha384 (0x0701),
       rsa_pss_sha512 (0x0702),

       /* EdDSA algorithms */
       ed25519 (0x0703),
       ed448 (0x0704),

       /* Reserved Code Points */
       dsa_sha1_RESERVED (0x0202),
       dsa_sha256_RESERVED (0x0402),
       dsa_sha384_RESERVED (0x0502),
       dsa_sha512_RESERVED (0x0602),
       ecdsa_sha1_RESERVED (0x0203),
       obsolete_RESERVED (0x0000..0x0200),
       obsolete_RESERVED (0x0204..0x0400),
       obsolete_RESERVED (0x0404..0x0500),
       obsolete_RESERVED (0x0504..0x0600),
       obsolete_RESERVED (0x0604..0x06FF),
       private_use (0xFE00..0xFFFF),
       (0xFFFF)
   } SignatureScheme;

   SignatureScheme supported_signature_algorithms<2..2^16-2>;
]]></artwork></figure>

</section>
<section anchor="named-group-extension" title="Named Group Extension">

<figure><artwork><![CDATA[
   enum {
       /* Elliptic Curve Groups (ECDHE) */
       obsolete_RESERVED (1..22),
       secp256r1 (23), secp384r1 (24), secp521r1 (25),
       obsolete_RESERVED (26..28),
       x25519 (29), x448 (30),

       /* Finite Field Groups (DHE) */
       ffdhe2048 (256), ffdhe3072 (257), ffdhe4096 (258),
       ffdhe6144 (259), ffdhe8192 (260),

       /* Reserved Code Points */
       ffdhe_private_use (0x01FC..0x01FF),
       ecdhe_private_use (0xFE00..0xFEFF),
       obsolete_RESERVED (0xFF01..0xFF02),
       (0xFFFF)
   } NamedGroup;

   struct {
       NamedGroup named_group_list<1..2^16-1>;
   } NamedGroupList;
]]></artwork></figure>

<t>Values within “obsolete_RESERVED” ranges were used in previous versions
of TLS and MUST NOT be offered or negotiated by TLS 1.3 implementations.
The obsolete curves have various known/theoretical weaknesses or have
had very little usage, in some cases only due to unintentional
server configuration issues. They are no longer considered appropriate
for general use and should be assumed to be potentially unsafe. The set
of curves specified here is sufficient for interoperability with all
currently deployed and properly configured TLS implementations.</t>

</section>
<section anchor="deprecated-extensions" title="Deprecated Extensions">

<t>The following extensions are no longer applicable to TLS 1.3, although
TLS 1.3 clients MAY send them if they are willing to negotiate them
with prior versions of TLS. TLS 1.3 servers MUST ignore these
extensions if they are negotiating TLS 1.3:
truncated_hmac <xref target="RFC6066"/>,
srp <xref target="RFC5054"/>,
encrypt_then_mac <xref target="RFC7366"/>,
extended_master_secret <xref target="RFC7627"/>,
SessionTicket <xref target="RFC5077"/>,
and renegotiation_info <xref target="RFC5746"/>.</t>

</section>
</section>
<section anchor="server-parameters-messages" title="Server Parameters Messages">

<figure><artwork><![CDATA[
   struct {
       Extension extensions<0..2^16-1>;
   } EncryptedExtensions;

   opaque DistinguishedName<1..2^16-1>;

   struct {
       opaque certificate_extension_oid<1..2^8-1>;
       opaque certificate_extension_values<0..2^16-1>;
   } CertificateExtension;

   struct {
       opaque certificate_request_context<0..2^8-1>;
       SignatureScheme
         supported_signature_algorithms<2..2^16-2>;
       DistinguishedName certificate_authorities<0..2^16-1>;
       CertificateExtension certificate_extensions<0..2^16-1>;
   } CertificateRequest;
]]></artwork></figure>

</section>
<section anchor="authentication-messages-1" title="Authentication Messages">

<figure><artwork><![CDATA[
   opaque ASN1Cert<1..2^24-1>;

   struct {
       opaque certificate_request_context<0..2^8-1>;
       ASN1Cert certificate_list<0..2^24-1>;
   } Certificate;

   struct {
        SignatureScheme algorithm;
        opaque signature<0..2^16-1>;
   } CertificateVerify;

   struct {
       opaque verify_data[Hash.length];
   } Finished;
]]></artwork></figure>

</section>
<section anchor="ticket-establishment" title="Ticket Establishment">

<figure><artwork><![CDATA[
 enum { (65535) } TicketExtensionType;

 struct {
     TicketExtensionType extension_type;
     opaque extension_data<1..2^16-1>;
 } TicketExtension;

 enum {
   allow_early_data(1),
   allow_dhe_resumption(2),
   allow_psk_resumption(4)
 } TicketFlags;

 struct {
     uint32 ticket_lifetime;
     uint32 flags;
     uint32 ticket_age_add;
     TicketExtension extensions<2..2^16-2>;
     opaque ticket<0..2^16-1>;
 } NewSessionTicket;
]]></artwork></figure>

</section>
</section>
<section anchor="cipher-suites" title="Cipher Suites">

<t>A cipher suite defines a cipher specification supported in TLS and negotiated
via hello messages in the TLS handshake.
Cipher suite names follow a general naming convention composed of a series
of component algorithm names separated by underscores:</t>

<figure><artwork><![CDATA[
   CipherSuite TLS_KEA_AUTH_WITH_CIPHER_HASH = VALUE;
]]></artwork></figure>

<texttable>
      <ttcol align='left'>Component</ttcol>
      <ttcol align='left'>Contents</ttcol>
      <c>TLS</c>
      <c>The string “TLS”</c>
      <c>KEA</c>
      <c>The key exchange algorithm (e.g. ECDHE, DHE)</c>
      <c>AUTH</c>
      <c>The authentication algorithm (e.g. certificates, PSK)</c>
      <c>WITH</c>
      <c>The string “WITH”</c>
      <c>CIPHER</c>
      <c>The symmetric cipher used for record protection</c>
      <c>HASH</c>
      <c>The hash algorithm used with HKDF</c>
      <c>VALUE</c>
      <c>The two byte ID assigned for this cipher suite</c>
</texttable>

<t>The “CIPHER” component commonly has sub-components used to designate
the cipher name, bits, and mode, if applicable. For example, “AES_256_GCM”
represents 256-bit AES in the GCM mode of operation. Cipher suite names that
lack a “HASH” value that are defined for use with TLS 1.2 or later use the
SHA-256 hash algorithm by default.</t>

<t>The primary key exchange algorithm used in TLS is Ephemeral Diffie-Hellman
<xref target="DH"/>. The finite field based version is denoted “DHE” and the elliptic
curve based version is denoted “ECDHE”. Prior versions of TLS supported
non-ephemeral key exchanges, however these are not supported by TLS 1.3.</t>

<t>See the definitions of each cipher suite in its specification document for
the full details of each combination of algorithms that is specified.</t>

<t>The following is a list of standards track server-authenticated (and optionally
client-authenticated) cipher suites which are currently available in TLS 1.3:</t>

<texttable>
      <ttcol align='left'>Cipher Suite Name</ttcol>
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Specification</ttcol>
      <c>TLS_DHE_RSA_WITH_AES_128_GCM_SHA256</c>
      <c>{0x00,0x9E}</c>
      <c><xref target="RFC5288"></xref></c>
      <c>TLS_DHE_RSA_WITH_AES_256_GCM_SHA384</c>
      <c>{0x00,0x9F}</c>
      <c><xref target="RFC5288"></xref></c>
      <c>TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256</c>
      <c>{0xC0,0x2B}</c>
      <c><xref target="RFC5289"></xref></c>
      <c>TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384</c>
      <c>{0xC0,0x2C}</c>
      <c><xref target="RFC5289"></xref></c>
      <c>TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256</c>
      <c>{0xC0,0x2F}</c>
      <c><xref target="RFC5289"></xref></c>
      <c>TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384</c>
      <c>{0xC0,0x30}</c>
      <c><xref target="RFC5289"></xref></c>
      <c>TLS_DHE_RSA_WITH_AES_128_CCM</c>
      <c>{0xC0,0x9E}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_DHE_RSA_WITH_AES_256_CCM</c>
      <c>{0xC0,0x9F}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_DHE_RSA_WITH_AES_128_CCM_8</c>
      <c>{0xC0,0xA2}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_DHE_RSA_WITH_AES_256_CCM_8</c>
      <c>{0xC0,0xA3}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256</c>
      <c>{0xCC,0xA8}</c>
      <c><xref target="RFC7905"></xref></c>
      <c>TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256</c>
      <c>{0xCC,0xA9}</c>
      <c><xref target="RFC7905"></xref></c>
      <c>TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256</c>
      <c>{0xCC,0xAA}</c>
      <c><xref target="RFC7905"></xref></c>
</texttable>

<t>Note: The values listed for ChaCha/Poly are preliminary but are being
or will be used for interop testing and therefore are likely to be
assigned.</t>

<t>Note: ECDHE AES GCM was not yet standards track prior to the publication of
this specification. This document promotes the above-listed ciphers to
standards track.</t>

<t>The following is a list of standards track ephemeral pre-shared key cipher
suites which are currently available in TLS 1.3:</t>

<texttable>
      <ttcol align='left'>Cipher Suite Name</ttcol>
      <ttcol align='left'>Value</ttcol>
      <ttcol align='left'>Specification</ttcol>
      <c>TLS_DHE_PSK_WITH_AES_128_GCM_SHA256</c>
      <c>{0x00,0xAA}</c>
      <c><xref target="RFC5487"></xref></c>
      <c>TLS_DHE_PSK_WITH_AES_256_GCM_SHA384</c>
      <c>{0x00,0xAB}</c>
      <c><xref target="RFC5487"></xref></c>
      <c>TLS_DHE_PSK_WITH_AES_128_CCM</c>
      <c>{0xC0,0xA6}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_DHE_PSK_WITH_AES_256_CCM</c>
      <c>{0xC0,0xA7}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_PSK_DHE_WITH_AES_128_CCM_8</c>
      <c>{0xC0,0xAA}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_PSK_DHE_WITH_AES_256_CCM_8</c>
      <c>{0xC0,0xAB}</c>
      <c><xref target="RFC6655"></xref></c>
      <c>TLS_ECDHE_PSK_WITH_AES_128_GCM_SHA256</c>
      <c>{0xD0,0x01}</c>
      <c><xref target="I-D.mattsson-tls-ecdhe-psk-aead"></xref></c>
      <c>TLS_ECDHE_PSK_WITH_AES_256_GCM_SHA384</c>
      <c>{0xD0,0x02}</c>
      <c><xref target="I-D.mattsson-tls-ecdhe-psk-aead"></xref></c>
      <c>TLS_ECDHE_PSK_WITH_AES_128_CCM_8_SHA256</c>
      <c>{0xD0,0x03}</c>
      <c><xref target="I-D.mattsson-tls-ecdhe-psk-aead"></xref></c>
      <c>TLS_ECDHE_PSK_WITH_AES_128_CCM_SHA256</c>
      <c>{0xD0,0x04}</c>
      <c><xref target="I-D.mattsson-tls-ecdhe-psk-aead"></xref></c>
      <c>TLS_ECDHE_PSK_WITH_AES_256_CCM_SHA384</c>
      <c>{0xD0,0x05}</c>
      <c><xref target="I-D.mattsson-tls-ecdhe-psk-aead"></xref></c>
      <c>TLS_ECDHE_PSK_WITH_CHACHA20_POLY1305_SHA256</c>
      <c>{0xCC,0xAC}</c>
      <c><xref target="RFC7905"></xref></c>
      <c>TLS_DHE_PSK_WITH_CHACHA20_POLY1305_SHA256</c>
      <c>{0xCC,0xAD}</c>
      <c><xref target="RFC7905"></xref></c>
</texttable>

<t>Note: The values listed for ECDHE and ChaCha/Poly are preliminary but
are being or will be used for interop testing and therefore are likely to be
assigned.</t>

<t>Note: <xref target="RFC6655"></xref> is inconsistent with respect to the ordering of components
within PSK AES CCM cipher suite names. The names above are as defined.</t>

<t>All cipher suites in this section are specified for use with both TLS 1.2
and TLS 1.3, as well as the corresponding versions of DTLS.
(see <xref target="backward-compatibility"/>)</t>

<t>New cipher suite values are assigned by IANA as described in
<xref target="iana-considerations"/>.</t>

<section anchor="unauthenticated-operation" title="Unauthenticated Operation">

<t>Previous versions of TLS offered explicitly unauthenticated cipher suites
based on anonymous Diffie-Hellman. These cipher suites have been deprecated
in TLS 1.3. However, it is still possible to negotiate cipher suites
that do not provide verifiable server authentication by several methods,
including:</t>

<t><list style="symbols">
  <t>Raw public keys <xref target="RFC7250"/>.</t>
  <t>Using a public key contained in a certificate but without
validation of the certificate chain or any of its contents.</t>
</list></t>

<t>Either technique used alone is are vulnerable to man-in-the-middle attacks
and therefore unsafe for general use. However, it is also possible to
bind such connections to an external authentication mechanism via
out-of-band validation of the server’s public key, trust on first
use, or channel bindings <xref target="RFC5929"/>. [[NOTE: TLS 1.3 needs a new
channel binding definition that has not yet been defined.]]
If no such mechanism is used, then the connection has no protection
against active man-in-the-middle attack; applications MUST NOT use TLS
in such a way absent explicit configuration or a specific application
profile.</t>

</section>
</section>
</section>
<section anchor="implementation-notes" title="Implementation Notes">

<t>The TLS protocol cannot prevent many common security mistakes. This section
provides several recommendations to assist implementors.</t>

<section anchor="random-number-generation-and-seeding" title="Random Number Generation and Seeding">

<t>TLS requires a cryptographically secure pseudorandom number generator (PRNG).
Care must be taken in designing and seeding PRNGs. PRNGs based on secure hash
operations, most notably SHA-256, are acceptable, but cannot provide more
security than the size of the random number generator state.</t>

<t>To estimate the amount of seed material being produced, add the number of bits
of unpredictable information in each seed byte. For example, keystroke timing
values taken from a PC compatible 18.2 Hz timer provide 1 or 2 secure bits
each, even though the total size of the counter value is 16 bits or more.
Seeding a 128-bit PRNG would thus require approximately 100 such timer values.</t>

<t><xref target="RFC4086"/> provides guidance on the generation of random values.</t>

</section>
<section anchor="certificates-and-authentication" title="Certificates and Authentication">

<t>Implementations are responsible for verifying the integrity of certificates and
should generally support certificate revocation messages. Certificates should
always be verified to ensure proper signing by a trusted Certificate Authority
(CA). The selection and addition of trusted CAs should be done very carefully.
Users should be able to view information about the certificate and root CA.</t>

</section>
<section anchor="cipher-suite-support" title="Cipher Suite Support">

<t>TLS supports a range of key sizes and security levels, including some that
provide no or minimal security. A proper implementation will probably not
support many cipher suites. Applications SHOULD also enforce minimum and
maximum key sizes. For example, certification paths containing keys or
signatures weaker than 2048-bit RSA or 224-bit ECDSA are not appropriate
for secure applications.
See also <xref target="backwards-compatibility-security-restrictions"/>.</t>

</section>
<section anchor="implementation-pitfalls" title="Implementation Pitfalls">

<t>Implementation experience has shown that certain parts of earlier TLS
specifications are not easy to understand, and have been a source of
interoperability and security problems. Many of these areas have been clarified
in this document, but this appendix contains a short list of the most important
things that require special attention from implementors.</t>

<t>TLS protocol issues:</t>

<t><list style="symbols">
  <t>Do you correctly handle handshake messages that are fragmented to
  multiple TLS records (see <xref target="record-layer"/>)? Including corner cases
  like a ClientHello that is split to several small fragments? Do
  you fragment handshake messages that exceed the maximum fragment
  size? In particular, the certificate and certificate request
  handshake messages can be large enough to require fragmentation.</t>
  <t>Do you ignore the TLS record layer version number in all TLS
  records? (see <xref target="backward-compatibility"/>)</t>
  <t>Have you ensured that all support for SSL, RC4, EXPORT ciphers, and
  MD5 (via the “signature_algorithm” extension) is completely removed from
  all possible configurations that support TLS 1.3 or later, and that
  attempts to use these obsolete capabilities fail correctly?
  (see <xref target="backward-compatibility"/>)</t>
  <t>Do you handle TLS extensions in ClientHello correctly, including
  unknown extensions or omitting the extensions field completely?</t>
  <t>When the server has requested a client certificate, but no
  suitable certificate is available, do you correctly send an empty
  Certificate message, instead of omitting the whole message (see
  <xref target="client-certificate-selection"/>)?</t>
  <t>When processing the plaintext fragment produced by AEAD-Decrypt and
scanning from the end for the ContentType, do you avoid scanning
past the start of the cleartext in the event that the peer has sent
a malformed plaintext of all-zeros?</t>
  <t>When processing a ClientHello containing a version of { 3, 5 } or higher, do
you respond with the highest common version of TLS rather than requiring an
exact match? Have you ensured this continues to be true with arbitrarily
higher version numbers? (e.g. { 4, 0 }, { 9, 9 }, { 255, 255 })</t>
  <t>Do you properly ignore unrecognized cipher suites (<xref target="client-hello"/>),
hello extensions (<xref target="hello-extensions"/>), named groups (<xref target="negotiated-groups"/>),
and signature algorithms (<xref target="signature-algorithms"/>)?</t>
</list></t>

<t>Cryptographic details:</t>

<t><list style="symbols">
  <t>What countermeasures do you use to prevent timing attacks against
  RSA signing operations <xref target="TIMING"/>?</t>
  <t>When verifying RSA signatures, do you accept both NULL and missing parameters?
Do you verify that the RSA padding
doesn’t have additional data after the hash value? <xref target="FI06"/></t>
  <t>When using Diffie-Hellman key exchange, do you correctly preserve
  leading zero bytes in the negotiated key (see <xref target="diffie-hellman"/>)?</t>
  <t>Does your TLS client check that the Diffie-Hellman parameters sent
  by the server are acceptable, (see <xref target="ffdhe-param"/>)?</t>
  <t>Do you use a strong and, most importantly, properly seeded random number
generator (see <xref target="random-number-generation-and-seeding"/>) when generating Diffie-Hellman
private values, the ECDSA “k” parameter, and other security-critical values?
It is RECOMMENDED that implementations implement “deterministic ECDSA”
as specified in <xref target="RFC6979"/>.</t>
  <t>Do you zero-pad Diffie-Hellman public key values to the group size (see
<xref target="ffdhe-param"/>)?</t>
</list></t>

</section>
<section anchor="client-tracking-prevention" title="Client Tracking Prevention">

<t>Clients SHOULD NOT reuse a session ticket for multiple connections. Reuse
of a session ticket allows passive observers to correlate different connections.
Servers that issue session tickets SHOULD offer at least as many session tickets
as the number of connections that a client might use; for example, a web browser
using HTTP/1.1 <xref target="RFC7230"/> might open six connections to a server. Servers SHOULD
issue new session tickets with every connection. This ensures that clients are
always able to use a new session ticket when creating a new connection.</t>

</section>
</section>
<section anchor="backward-compatibility" title="Backward Compatibility">

<t>The TLS protocol provides a built-in mechanism for version negotiation between
endpoints potentially supporting different versions of TLS.</t>

<t>TLS 1.x and SSL 3.0 use compatible ClientHello messages. Servers can also handle
clients trying to use future versions of TLS as long as the ClientHello format
remains compatible and the client supports the highest protocol version available
in the server.</t>

<t>Prior versions of TLS used the record layer version number for various
purposes. (TLSPlaintext.record_version &amp; TLSCiphertext.record_version)
As of TLS 1.3, this field is deprecated and its value MUST be ignored by all
implementations. Version negotiation is performed using only the handshake versions.
(ClientHello.client_version &amp; ServerHello.server_version)
In order to maximize interoperability with older endpoints, implementations
that negotiate the use of TLS 1.0-1.2 SHOULD set the record layer
version number to the negotiated version for the ServerHello and all
records thereafter.</t>

<t>For maximum compatibility with previously non-standard behavior and misconfigured
deployments, all implementations SHOULD support validation of certification paths
based on the expectations in this document, even when handling prior TLS versions’
handshakes. (see <xref target="server-certificate-selection"/>)</t>

<t>TLS 1.2 and prior supported an “Extended Master Secret” <xref target="RFC7627"/> extension
which digested large parts of the handshake transcript into the master secret.
Because TLS 1.3 always hashes in the transcript up to the server CertificateVerify,
implementations which support both TLS 1.3 and earlier versions SHOULD
indicate the use of the Extended Master Secret extension in their APIs
whenever TLS 1.3 is used.</t>

<section anchor="negotiating-with-an-older-server" title="Negotiating with an older server">

<t>A TLS 1.3 client who wishes to negotiate with such older servers will send a
normal TLS 1.3 ClientHello containing { 3, 4 } (TLS 1.3) in
ClientHello.client_version. If the server does not support this version it
will respond with a ServerHello containing an older version number. If the
client agrees to use this version, the negotiation will proceed as appropriate
for the negotiated protocol. A client resuming a session SHOULD initiate the
connection using the version that was previously negotiated.</t>

<t>Note that 0-RTT data is not compatible with older servers.
See <xref target="zero-rtt-backwards-compatibility"/>.</t>

<t>If the version chosen by the server is not supported by the client (or not
acceptable), the client MUST send a “protocol_version” alert message and close
the connection.</t>

<t>If a TLS server receives a ClientHello containing a version number greater than
the highest version supported by the server, it MUST reply according to the
highest version supported by the server.</t>

<t>Some legacy server implementations are known to not implement the TLS
specification properly and might abort connections upon encountering
TLS extensions or versions which it is not aware of. Interoperability
with buggy servers is a complex topic beyond the scope of this document.
Multiple connection attempts may be required in order to negotiate
a backwards compatible connection, however this practice is vulnerable
to downgrade attacks and is NOT RECOMMENDED.</t>

</section>
<section anchor="negotiating-with-an-older-client" title="Negotiating with an older client">

<t>A TLS server can also receive a ClientHello containing a version number smaller
than the highest supported version. If the server wishes to negotiate with old
clients, it will proceed as appropriate for the highest version supported by
the server that is not greater than ClientHello.client_version. For example, if
the server supports TLS 1.0, 1.1, and 1.2, and client_version is TLS 1.0, the
server will proceed with a TLS 1.0 ServerHello. If the server only supports
versions greater than client_version, it MUST send a “protocol_version”
alert message and close the connection.</t>

<t>Note that earlier versions of TLS did not clearly specify the record layer
version number value in all cases (TLSPlaintext.record_version). Servers
will receive various TLS 1.x versions in this field, however its value
MUST always be ignored.</t>

</section>
<section anchor="zero-rtt-backwards-compatibility" title="Zero-RTT backwards compatibility">

<t>0-RTT data is not compatible with older servers. An older server will respond
to the ClientHello with an older ServerHello, but it will not correctly skip
the 0-RTT data and fail to complete the handshake. This can cause issues when
a client attempts to use 0-RTT, particularly against multi-server deployments. For
example, a deployment could deploy TLS 1.3 gradually with some servers
implementing TLS 1.3 and some implementing TLS 1.2, or a TLS 1.3 deployment
could be downgraded to TLS 1.2.</t>

<t>A client that attempts to send 0-RTT data MUST fail a connection if it receives
a ServerHello with TLS 1.2 or older.  A client that attempts to repair this
error SHOULD NOT send a TLS 1.2 ClientHello, but instead send a TLS 1.3
ClientHello without 0-RTT data.</t>

<t>To avoid this error condition, multi-server deployments SHOULD ensure a uniform
and stable deployment of TLS 1.3 without 0-RTT prior to enabling 0-RTT.</t>

</section>
<section anchor="backwards-compatibility-security-restrictions" title="Backwards Compatibility Security Restrictions">

<t>If an implementation negotiates use of TLS 1.2, then negotiation of cipher
suites also supported by TLS 1.3 SHOULD be preferred, if available.</t>

<t>The security of RC4 cipher suites is considered insufficient for the reasons
cited in <xref target="RFC7465"/>. Implementations MUST NOT offer or negotiate RC4 cipher suites
for any version of TLS for any reason.</t>

<t>Old versions of TLS permitted the use of very low strength ciphers.
Ciphers with a strength less than 112 bits MUST NOT be offered or
negotiated for any version of TLS for any reason.</t>

<t>The security of SSL 2.0 <xref target="SSL2"/> is considered insufficient for the reasons enumerated
in <xref target="RFC6176"/>, and MUST NOT be negotiated for any reason.</t>

<t>Implementations MUST NOT send an SSL version 2.0 compatible CLIENT-HELLO.
Implementations MUST NOT negotiate TLS 1.3 or later using an SSL version 2.0 compatible
CLIENT-HELLO. Implementations are NOT RECOMMENDED to accept an SSL version 2.0 compatible
CLIENT-HELLO in order to negotiate older versions of TLS.</t>

<t>Implementations MUST NOT send or accept any records with a version less than { 3, 0 }.</t>

<t>The security of SSL 3.0 <xref target="SSL3"/> is considered insufficient for the reasons enumerated
in <xref target="RFC7568"/>, and MUST NOT be negotiated for any reason.</t>

<t>Implementations MUST NOT send a ClientHello.client_version or ServerHello.server_version
set to { 3, 0 } or less. Any endpoint receiving a Hello message with
ClientHello.client_version or ServerHello.server_version set to { 3, 0 } MUST respond
with a “protocol_version” alert message and close the connection.</t>

<t>Implementations MUST NOT use the Truncated HMAC extension, defined in
Section 7 of <xref target="RFC6066"></xref>, as it is not applicable to AEAD ciphers and has
been shown to be insecure in some scenarios.</t>

</section>
</section>
<section anchor="security-analysis" title="Overview of Security Properties">

<t>[[TODO: This section is still a WIP and needs a bunch more work.]]</t>

<t>A complete security analysis of TLS is outside the scope of this document.
In this section, we provide an informal description the desired properties
as well as references to more detailed work in the research literature
which provides more formal definitions.</t>

<t>We cover properties of the handshake separately from those of the record layer.</t>

<section anchor="security-handshake" title="Handshake">

<t>The TLS handshake is an Authenticated Key Exchange (AKE) protocol which
is intended to provide both one-way authenticated (server-only) and
mutually authenticated (client and server) functionality. At the completion
of the handshake, each side outputs its view on the following values:</t>

<t><list style="symbols">
  <t>A “session key” (the master secret) from which can be derived a set of working keys.</t>
  <t>A set of cryptographic parameters (algorithms, etc.)</t>
  <t>The identities of the communicating parties.</t>
</list></t>

<t>We assume that the attacker has complete control of the network in
between the parties <xref target="RFC3552"/>. Even under these conditions, the
handshake should provide the properties listed below. Note that
these properties are not necessarily independent, but reflect
the protocol consumers’ needs.</t>

<t><list style="hanging">
  <t hangText='Establishing the same session key.'>
  The handshake needs to output the same session key on both sides of the
handshake, provided that it completes successfully on each endpoint
(See <xref target="CK01"/>; defn 1, part 1).</t>
  <t hangText='Secrecy of the session key.'>
  The shared session key should be known only to the communicating
parties, not to the attacker (See <xref target="CK01"/>; defn 1, part 2).  Note that
in a unilaterally authenticated connection, the attacker can establish
its own session keys with the server, but those session keys are
distinct from those established by the client.</t>
  <t hangText='Peer Authentication.'>
  The client’s view of the peer identity should reflect the server’s
identity. If the client is authenticated, the server’s view of the
peer identity should match the client’s identity.</t>
  <t hangText='Uniqueness of the session key:'>
  Any two distinct handshakes should produce distinct, unrelated session
keys </t>
  <t hangText='Downgrade protection.'>
  The cryptographic parameters should be the same on both sides and
should be the same as if the peers had been communicating in the
absence of an attack (See <xref target="BBFKZG16"/>; defns 8 and 9}).</t>
  <t hangText='Forward secret'>
  If the long-term keying material (in this case the signature keys in certificate-based
authentication modes or the PSK in PSK-(EC)DHE modes) are compromised after
the handshake is complete, this does not compromise the security of the
session key (See <xref target="DOW92"/>).</t>
  <t hangText='Protection of endpoint identities.'>
  The server’s identity (certificate) should be protected against passive
attackers. The client’s identity should be protected against both passive
and active attackers.</t>
</list></t>

<t>Informally, the signature-based modes of TLS 1.3 provide for the
establishment of a unique, secret, shared, key established by an
(EC)DHE key exchange and authenticated by the server’s signature over
the handshake transcript, as well as tied to the server’s identity by
a MAC. If the client is authenticated by a certificate, it also signs
over the handshake transcript and provides a MAC tied to both
identities. <xref target="SIGMA"/> describes the analysis of this type of key
exchange protocol. If fresh (EC)DHE keys are used for each connection,
then the output keys are forward secret.</t>

<t>The PSK and resumption-PSK modes bootstrap from a long-term shared
secret into a unique per-connection short-term session key. This
secret may have been established in a previous handshake. If
PSK-(EC)DHE modes are used, this session key will also be forward
secret. The resumption-PSK mode has been designed so that the
resumption master secret computed by connection N and needed to form
connection N+1 is separate from the traffic keys used by connection N,
thus providing forward secrecy between the connections.</t>

<t>For all handshake modes, the Finished MAC (and where present, the
signature), prevents downgrade attacks. In addition, the use of
certain bytes in the random nonces as described in <xref target="server-hello"/>
allows the detection of downgrade to previous TLS versions.</t>

<t>As soon as the client and the server have exchanged enough information
to establish shared keys, the remainder of the handshake is encrypted,
thus providing protection against passive attackers. Because the server
authenticates before the client, the client can ensure that it only
reveals its identity to an authenticated server. Note that implementations
must use the provided record padding mechanism during the handshake
to avoid leaking information about the identities due to length.</t>

<t>The 0-RTT mode of operation generally provides the same security
properties as 1-RTT data, with the two exceptions that the 0-RTT
encryption keys do not provide full forward secrecy and that the
the server is not able to guarantee full uniqueness of the handshake
(non-replayability) without keeping potentially undue amounts of
state. See <xref target="early-data-indication"/> for one mechanism to limit
the exposure to replay.</t>

<t>The reader should refer to the following references for analysis of the
TLS handshake <xref target="CHSV16"/> <xref target="FGSW16"/> <xref target="LXZFH16"/>.</t>

</section>
<section anchor="security-record-layer" title="Record Layer">

<t>The record layer depends on the handshake producing a strong session
key which can be used to derive bidirectional traffic keys and nonces.
Assuming that is true, and the keys are used for no more data than
indicated in <xref target="limits-on-key-usage"/> then the record layer should provide the following
guarantees:</t>

<t><list style="hanging">
  <t hangText='Confidentiality.'>
  An attacker should not be able to determine the plaintext contents
of a given record.
  </t>
  <t hangText='Integrity.'>
  An attacker should not be able to craft a new record which is
different from an existing record which will be accepted by the receiver.
  </t>
  <t hangText='Order protection/non-replayability'>
  An attacker should not be able to cause the receiver to accept a
record which it has already accepted or cause the receiver to accept
record N+1 without having first processed record N.
[[TODO: If we merge in DTLS to this document, we will need to update
this guarantee.]]</t>
  <t hangText='Length concealment.'>
  Given a record with a given external length, the attacker should not be able
to determine the amount of the record that is content versus padding.</t>
  <t>Forward security after key change.
If the traffic key update mechanism described in <xref target="key-update"/> has been
used and the previous generation key is deleted, an attacker who compromises
the endpoint should not be able to decrypt traffic encrypted with the old key.</t>
</list></t>

<t>Informally, TLS 1.3 provides these properties by AEAD-protecting the
plaintext with a strong key. AEAD encryption <xref target="RFC5116"/> provides confidentiality
and integrity for the data. Non-replayability is provided by using
a separate nonce for each record, with the nonce being derived from
the record sequence number (<xref target="nonce"/>), with the sequence
number being maintained independently at both sides thus records which
are delivered out of order result in AEAD deprotection failures.</t>

<t>The plaintext protected by the AEAD function consists of content plus
variable-length padding. Because the padding is also encrypted, the
attacker cannot directly determine the length of the padding, but
may be able to measure it indirectly by the use of timing channels
exposed during record processing (i.e., seeing how long it takes to
process a record). In general, it is not known how to remove this
type of channel because even a constant time padding removal
function will then feed the content into data-dependent functions.</t>

<t>Generation N+1 keys are derived from generation N keys via a key
derivation function <xref target="updating-traffic-keys"/>. As long as this function is truly one way, it
is not possible to compute the previous keys after a key change
(forward secrecy). However, TLS does not provide security for
data which is sent after the traffic secret is compromised,
even afer a key update (backward secrecy); systems which want backward secrecy must do
a fresh handshake and establish a new session key with an (EC)DHE
exchange.</t>

<t>The reader should refer to the following references for analysis of the
TLS record layer.</t>

</section>
</section>
<section anchor="working-group-information" title="Working Group Information">

<t>The discussion list for the IETF TLS working group is located at the e-mail
address <eref target="mailto:tls@ietf.org">tls@ietf.org</eref>. Information on the group and information on how to
subscribe to the list is at <eref target="https://www1.ietf.org/mailman/listinfo/tls">https://www1.ietf.org/mailman/listinfo/tls</eref></t>

<t>Archives of the list can be found at:
<eref target="https://www.ietf.org/mail-archive/web/tls/current/index.html">https://www.ietf.org/mail-archive/web/tls/current/index.html</eref></t>

</section>
<section anchor="contributors" title="Contributors">

<t><list style="symbols">
  <t>Martin Abadi <vspace />
University of California, Santa Cruz <vspace />
abadi@cs.ucsc.edu</t>
  <t>Christopher Allen (co-editor of TLS 1.0) <vspace />
Alacrity Ventures <vspace />
ChristopherA@AlacrityManagement.com</t>
  <t>Steven M. Bellovin <vspace />
Columbia University <vspace />
smb@cs.columbia.edu</t>
  <t>David Benjamin <vspace />
Google <vspace />
davidben@google.com</t>
  <t>Benjamin Beurdouche</t>
  <t>Karthikeyan Bhargavan (co-author of <xref target="RFC7627"></xref>) <vspace />
INRIA <vspace />
karthikeyan.bhargavan@inria.fr</t>
  <t>Simon Blake-Wilson (co-author of <xref target="RFC4492"></xref>) <vspace />
BCI <vspace />
sblakewilson@bcisse.com</t>
  <t>Nelson Bolyard (co-author of <xref target="RFC4492"></xref>) <vspace />
Sun Microsystems, Inc. <vspace />
nelson@bolyard.com</t>
  <t>Ran Canetti <vspace />
IBM <vspace />
canetti@watson.ibm.com</t>
  <t>Pete Chown <vspace />
Skygate Technology Ltd <vspace />
pc@skygate.co.uk</t>
  <t>Antoine Delignat-Lavaud (co-author of <xref target="RFC7627"></xref>) <vspace />
INRIA <vspace />
antoine.delignat-lavaud@inria.fr</t>
  <t>Tim Dierks (co-editor of TLS 1.0, 1.1, and 1.2) <vspace />
Independent <vspace />
tim@dierks.org</t>
  <t>Taher Elgamal <vspace />
Securify <vspace />
taher@securify.com</t>
  <t>Pasi Eronen <vspace />
Nokia <vspace />
pasi.eronen@nokia.com</t>
  <t>Cedric Fournet <vspace />
Microsoft <vspace />
fournet@microsoft.com</t>
  <t>Anil Gangolli <vspace />
anil@busybuddha.org</t>
  <t>David M. Garrett</t>
  <t>Vipul Gupta (co-author of <xref target="RFC4492"></xref>) <vspace />
Sun Microsystems Laboratories <vspace />
vipul.gupta@sun.com</t>
  <t>Chris Hawk (co-author of <xref target="RFC4492"></xref>) <vspace />
Corriente Networks LLC <vspace />
chris@corriente.net</t>
  <t>Kipp Hickman</t>
  <t>Alfred Hoenes</t>
  <t>David Hopwood <vspace />
Independent Consultant <vspace />
david.hopwood@blueyonder.co.uk</t>
  <t>Subodh Iyengar <vspace />
Facebook <vspace />
subodh@fb.com</t>
  <t>Daniel Kahn Gillmor <vspace />
ACLU <vspace />
dkg@fifthhorseman.net</t>
  <t>Phil Karlton (co-author of SSL 3.0)</t>
  <t>Paul Kocher (co-author of SSL 3.0) <vspace />
Cryptography Research <vspace />
paul@cryptography.com</t>
  <t>Hugo Krawczyk <vspace />
IBM <vspace />
hugo@ee.technion.ac.il</t>
  <t>Adam Langley (co-author of <xref target="RFC7627"></xref>) <vspace />
Google <vspace />
agl@google.com</t>
  <t>Ilari Liusvaara <vspace />
Independent <vspace />
ilariliusvaara@welho.com</t>
  <t>Jan Mikkelsen <vspace />
Transactionware <vspace />
janm@transactionware.com</t>
  <t>Bodo Moeller (co-author of <xref target="RFC4492"></xref>) <vspace />
Google <vspace />
bodo@openssl.org</t>
  <t>Erik Nygren <vspace />
Akamai Technologies <vspace />
erik+ietf@nygren.org</t>
  <t>Magnus Nystrom <vspace />
RSA Security <vspace />
magnus@rsasecurity.com</t>
  <t>Alfredo Pironti (co-author of <xref target="RFC7627"></xref>) <vspace />
INRIA <vspace />
alfredo.pironti@inria.fr</t>
  <t>Andrei Popov <vspace />
Microsoft <vspace />
andrei.popov@microsoft.com</t>
  <t>Marsh Ray (co-author of <xref target="RFC7627"></xref>) <vspace />
Microsoft <vspace />
maray@microsoft.com</t>
  <t>Robert Relyea <vspace />
Netscape Communications <vspace />
relyea@netscape.com</t>
  <t>Kyle Rose <vspace />
Akamai Technologies <vspace />
krose@krose.org</t>
  <t>Jim Roskind <vspace />
Netscape Communications <vspace />
jar@netscape.com</t>
  <t>Michael Sabin</t>
  <t>Dan Simon <vspace />
Microsoft, Inc. <vspace />
dansimon@microsoft.com</t>
  <t>Nick Sullivan <vspace />
CloudFlare Inc. <vspace />
nick@cloudflare.com</t>
  <t>Bjoern Tackmann <vspace />
University of California, San Diego <vspace />
btackmann@eng.ucsd.edu</t>
  <t>Martin Thomson <vspace />
Mozilla <vspace />
mt@mozilla.com</t>
  <t>Filippo Valsorda <vspace />
CloudFlare Inc. <vspace />
filippo@cloudflare.com</t>
  <t>Tom Weinstein</t>
  <t>Hoeteck Wee <vspace />
Ecole Normale Superieure, Paris <vspace />
hoeteck@alum.mit.edu</t>
  <t>Tim Wright <vspace />
Vodafone <vspace />
timothy.wright@vodafone.com</t>
</list></t>

</section>


  </back>
</rfc>

