TLS 1.3 Extended Key Schedule
Cloudflare Ltd.
jonathan.hoyland@gmail.com
Cloudflare
caw@heapingbits.net
Security
jhoyla
Internet-Draft
TLS 1.3 is sometimes used in situations where it is necessary to inject extra
key material into the handshake. This draft aims to describe methods for doing
so securely. This key material must be injected in such a way that both parties
agree on what is being injected and why, and further, in what order.
Note to Readers
Discussion of this document takes place on the
TLS Working Group mailing list (tls@ietf.org),
which is archived at https://mailarchive.ietf.org/arch/browse/tls/.
Source for this draft and an issue tracker can be found at
https://github.com/jhoyla/draft-jhoyla-tls-key-injection.
Introduction
Introducing additional key material into the TLS handshake is a non-trivial
process because both parties need to agree on the injection content and context.
If the two parties do not agree then an attacker may exploit the mismatch in
so-called channel synchronization attacks, such as those described by
.
Injecting key material into the TLS handshake allows other protocols to be bound
to the handshake. For example, it may provide additional protections to the
ClientHello message, which in the standard TLS handshake only receives
protections after the server's Finished message has been received. It may also
permit the use of combined shared secrets, possibly from multiple key exchange
algorithms, to be included in the key schedule. This pattern is common for Post
Quantum key exchange algorithms, as discussed in
. In particular, uses the
concatenation pattern described in this draft, but does not add the requisite framing.
The goal of this document is to provide a standardised way for binding extra
context into TLS 1.3 handshakes in a way that is easy to analyse from a security
perspective, reducing the need for security analysis of extensions that affect
the key schedule. It separates the concerns of whether an extension achieves its
goals from the concerns of whether an extension reduces the security of a TLS
handshake, either directly or through some unforseen interaction with another
extension.
Conventions and Definitions
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 BCP 14
when, and only when, they appear in all capitals, as shown here.
Key Schedule Extension
This section describes two places in which additional secrets can be injected
into the TLS 1.3 key schedule.
Handshake Secret Injection
To inject extra key material into the Handshake Secret it is recommended to
prefix it, inside an appropriate frame, to the (EC)DHE input, where ||
represents concatenation.
HKDF-Extract = Handshake Secret
|
v
]]>
Main Secret Injection
To inject key material into the Main Secret it is recommended to prefix it,
inside an appropriate frame, to the 0 input.
HKDF-Extract = Main Secret
|
v
]]>
This structure mirrors the Handshake Injection point.
Key Schedule Injection Negotiation
Applications which make use of additional key schedule inputs MUST define a
mechanism for negotiating the content and type of that input. This input MUST
be framed in a KeyScheduleSecret struct, as defined in .
Applications must take care that any negotiation that takes place unambiguously
agrees a secret. It must be impossible, even under adversarial conditions, that
a client and server agree on the transcript of the negotiation, but disagree on
the secret that was negotiated.
Key Schedule Extension Structure
In some cases, protocols may require more than one secret to be injected at a
particular stage in the key schedule. Thus, we require a generic and extensible
way of doing so. To accomplish this, we use a structure - KeyScheduleInput -
that encodes well-ordered sequences of secret material to inject into the key
schedule. KeyScheduleInput is defined as follows:
;
} KeyScheduleSecret;
enum {
(65535)
} KeyScheduleSecretType;
struct {
KeyScheduleSecret secrets<0..2^16-1>;
} KeyScheduleInput;
]]>
Each secret included in a KeyScheduleInput structure has a type and
corresponding secret data. Each secret MUST have a unique
KeyScheduleSecretType. When encoding KeyScheduleInput as the key schedule Input
value, the KeyScheduleSecret values MUST be in ascending sorted order. This
ensures that endpoints always encode the same KeyScheduleInput value when using
the same secret keying material.
Security Considerations
provides a proof that the concatenation approach in is
secure as long as either the concatenated secret is secure or the existing KDF
input is secure.
[[OPEN ISSUE: Is this guarantee sufficient? Do we also need to guarantee that a malicious prefix can't weaken the resulting PRF output?]]
IANA Considerations
This document requests the creation of a new IANA registry: TLS KeyScheduleInput Types.
This registry should be under the existing Transport Layer Security (TLS) Parameters
heading. It should be administered under a Specification Required policy .
[[OPEN ISSUE: specify initial registry values]]
Value |
Description |
DTLS-OK |
Reference |
TBD |
TBD |
TBD |
TBD |
References
Normative References
Key words for use in RFCs to Indicate Requirement Levels
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.
Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words
RFC 2119 specifies common key words that may be used in protocol specifications. This document aims to reduce the ambiguity by clarifying that only UPPERCASE usage of the key words have the defined special meanings.
Guidelines for Writing an IANA Considerations Section in RFCs
Many protocols make use of points of extensibility that use constants to identify various protocol parameters. To ensure that the values in these fields do not have conflicting uses and to promote interoperability, their allocations are often coordinated by a central record keeper. For IETF protocols, that role is filled by the Internet Assigned Numbers Authority (IANA).
To make assignments in a given registry prudently, guidance describing the conditions under which new values should be assigned, as well as when and how modifications to existing values can be made, is needed. This document defines a framework for the documentation of these guidelines by specification authors, in order to assure that the provided guidance for the IANA Considerations is clear and addresses the various issues that are likely in the operation of a registry.
This is the third edition of this document; it obsoletes RFC 5226.
Informative References
Hybrid Key Encapsulation Mechanisms and Authenticated Key Exchange
Transcript Collision Attacks: Breaking Authentication in TLS, IKE, and SSH
Hybrid key exchange in TLS 1.3
Hybrid key exchange refers to using multiple key exchange algorithms simultaneously and combining the result with the goal of providing security even if all but one of the component algorithms is broken. It is motivated by transition to post-quantum cryptography. This document provides a construction for hybrid key exchange in the Transport Layer Security (TLS) protocol version 1.3. Discussion of this work is encouraged to happen on the TLS IETF mailing list tls@ietf.org or on the GitHub repository which contains the draft: https://github.com/dstebila/draft-ietf-tls-hybrid-design.
Bootstrapped TLS Authentication
This document defines a TLS extension that enables a server to prove to a client that it has knowledge of the public key of a key pair where the client has knowledge of the private key of the key pair. Unlike standard TLS key exchanges, the public key is never exchanged in TLS protocol messages. Proof of knowledge of the public key is used by the client to bootstrap trust in the server. The use case outlined in this document is to establish trust in an EAP server.
Semi-Static Diffie-Hellman Key Establishment for TLS 1.3
TLS 1.3 [RFC8446] specifies a signed Diffie-Hellman exchange modelled after SIGMA [SIGMA]. This design is suitable for endpoints whose certified credential is a signing key, which is the common situation for current TLS servers. This document describes a mode of TLS 1.3 in which one or both endpoints have a certified DH key which is used to authenticate the exchange. Note to Readers Source for this draft and an issue tracker can be found at https://github.com/ekr/draft-rescorla-tls13-semistatic-dh (https://github.com/ekr/draft-rescorla-tls13-semistatic-dh).
Potential Use Cases
The draft provides a mechanism for importing additional information into the TLS key schedule.
Future applications and specifications can use this mechanism to layer TLS on to other protocols,
as opposed to layering other protocols over TLS. For example, as discussed in , this can
be used for hybrid key exchange, which, in effect, is layering TLS over a secondary AKE.
Although the key exchanges are interleaved, the post-quantum AKE completes first, as demonstrated
by its output key being used as an input for computing TLS's master secret.
This can also be used in more direct ways, such as bootstrapping EAP-TLS as in
. This draft also allows for more direct
implementations of things such as semi-static DH . The aim of this draft is to be
sufficiently flexible that it can be used as the basis for layering TLS on top
of any protocol that outputs a secure channel binding, where secure is defined
by the goals of the overall layered protocol. This draft does not provide
security itself, it simply provides a standard format for layering.
Acknowledgments
We thank Karthik Bhargavan for his comments.