Skip to main content

Importing External Pre-Shared Keys (PSKs) for TLS 1.3
draft-ietf-tls-external-psk-importer-08

Yes

Roman Danyliw

No Objection

Éric Vyncke
(Alissa Cooper)
(Alvaro Retana)
(Andrew Alston)
(Barry Leiba)
(Deborah Brungard)
(Magnus Westerlund)

Note: This ballot was opened for revision 06 and is now closed.

Paul Wouters
Yes
Comment (2022-04-06 for -07) Sent
These comments can be addressed or ignored as seen fit by the authors


"TLS Exporters" is mentioned with no reference. I had to google it to find
RFC 5705. Maybe just add the reference here and add it as informative reference?

        Each of these derived PSKs are bound a target

missing "to "

        i.e., not from a TLS connection, which is a tuple of [...]

I would use: (i.e., not from a TLS connection) to make it clear that the
"tuple" is not related to that part of the sentence.

        If the EPSK is a key derived from some other protocol [...]

Why 'other' ? As opposed to? TLS 1.3 ? Even if derived from some external TLS 1.3
protocol, wouldn't everything here still apply? That is, an EPSK is per definition
derived from "something external" and that would need a proper context identifier
for channel binding. "Since the EPSK is a key derived from an external protocol, [...]"

        Note that this means future versions of TLS will increase the number
        of PSKs derived from an external PSK.

The number of PSKs? I think what is meant is the number of labels corresponding to target_protocol ?
But also, would it not only increase if one would be willing to still support the older TLS versions?
e.g. if we get to TLS 1.5, we might no longer need to derive the PSK for TLS 1.3, because we won't
want to speak that old protocol anymore.

        Future specifications that
        change the way the KDF is negotiated will need to update this
        specification to make clear how target KDFs are determined for the
        import process.

Doesn't this statement technically cause an Update: 8446
As in, someone writing TLS 1.4 needs to be aware of this and the
way to do this is to make this document Update: 8446 ?

        that means Application-Layer Protocol Negotiation value [...]

I had to reread this a few times. I suggest:

        this means that the Application-Layer Protocol Negotiation value [...]

        If a client or server wish to

wish -> wishes

   External PSK identities are typically static by design so that
   endpoints may use them to lookup keying material.  However, for some
   systems and use cases, this identity may become a persistent tracking
   identifier.

One could use ephemeral identities to make it harder to track users. It would
still be a static lookup table, just much larger. Or if one really cares, a
onetime pad could be used to provide ephemeral identities per client.
Roman Danyliw
Yes
Erik Kline
No Objection
Comment (2020-12-28 for -06) Sent
[[ questions ]]

[ section 4.2 ]

* I'm insufficiently versed in TLS and HKDF to know for sure, but the text
  about "replace the string" and the diagrammed example don't seem to agree,
  **to my untrained eye**.  The example seems to show "imp binder" perhaps
  concatenated with the "standard" sequence, rather than "imp binder"
  /replacing/ "ext binder".

  Am I way off base here? In other words, should

    "ext binder" | "res binder" | "imp binder"

  actually be (if I understand the use of the word "replace" correctly):

    "imp binder" | "res binder"

  ?

  I will happily differ to others more knowledgeable than myself
  (essentially: almost everybody).


[[ nits ]]

[ section 3 ]

* "are bound a target protocol" -> "are bound to a target protocol"
Francesca Palombini
No Objection
Comment (2022-04-11 for -07) Not sent
Many thanks to Darrel Miller for his ART ART review: https://mailarchive.ietf.org/arch/msg/art/Mp_VUSUDMlLTcZSu6i_-UINBpNM/, which I hope the authors will address before publication.

Francesca
John Scudder
No Objection
Comment (2022-04-05 for -07) Not sent
Just a few nits.

1. Section 3, "Each of these derived PSKs are bound a target
   protocol," 

should be "bound *to* a target". (Looks like Erik Kline noted this in -06 as well.)

2. Section 6, "However, only limited analysis
   has been done, and as such is not a recommended configuration."

As such, *what* is not? Probably "this is not" would be an adequate fix.

3. Section 8, "   External PSK identities are typically static by design so that
   endpoints may use them to lookup keying material."

My preference would be "look up" and not "lookup".
Murray Kucherawy
No Objection
Comment (2021-01-05 for -06) Sent
Section 3: "derived PSKs are bound a target" -- should be "bound to a target", right?
Warren Kumari
No Objection
Comment (2022-04-06 for -07) Sent
Thank you for this document -- I thought that it seemed really familiar, and only after getting most of the way through did I realize that it was a returning item.

Also thanks to Al Morton for his OpsDir review (https://datatracker.ietf.org/doc/review-ietf-tls-external-psk-importer-05-opsdir-lc-morton-2020-10-10/), and to the authors for addressing the comment.
Zaheduzzaman Sarker
No Objection
Comment (2022-04-04 for -07) Not sent
Thanks for working on this specification.

One comment - it time to update the QUIC reference to RFC9000 I guess.
Éric Vyncke
No Objection
Benjamin Kaduk Former IESG member
Yes
Yes (2020-12-31 for -06) Sent
Sorry about the large volume of comments; this document is actually in
pretty good shape, there are just a bunch of details that can be subtle
to get exactly right.

I specifically call out the note in Section 4.1 about which
HKDF-Expand-Label is to be used, since that would affect the actual
derived keys for DTLS 1.3 (and any hypothetical future TLS versions).

Section 1

   While there is no known way in which the same external PSK might
   produce related output in TLS 1.3 and prior versions, only limited
   analysis has been done.  Applications SHOULD provision separate PSKs
   for TLS 1.3 and prior versions.

   To mitigate against any interference, this document specifies a PSK
   Importer interface by which external PSKs may be imported and
   subsequently bound to a specific key derivation function (KDF) and
   hash function for use in TLS 1.3 [RFC8446] and DTLS 1.3 [DTLS13].  [...]

IIRC the main target use cases for this mechanism are for *existing*
external PSKs (violating the "SHOULD" from the first quoted paragraph),
as well as deployments that are simplified by only needing to provision
a single PSK.  Does it make sense to include such clarifying description
here?  (Similarly, is it accurate to say that "[a]pplications SHOULD
provision separate PSKs [...], but the mechanism defined in this
document provides a partial mitigation for use when that is not possible"?

Also, we only use the word "interference" twice in this document
(this is the first instance), so it might be worth a couple more words
to clarify the nature of the potential interference.

Section 3

   non-imported keys for TLS versions prior to TLS 1.3.  Non-imported
   and imported PSKs are distinct since their identities are different
   on the wire.  See Section 6 for more details.

(side note?) I think the precise story here is a little subtle -- for
any given key, the imported and non-imported identities are distinct,
but in principle one could construct a non-imported identity that
overlaps with an imported identity for a different key (and we say as
much at the end of Section 7).  This is vanishingly rare to happen by
chance, but makes the statement as written not quite categorically true.
That said, the change to the binder key derivation (§ 4.2) seems to
obviate any potential consequences to such a collision (though the
connection attempt would presumably fail).

   Endpoints which import external keys MUST NOT use either the external
   keys or the derived keys for any other purpose.  Moreover, each

IIUC, this is "MUST NOT use the keys that are input to the import
process for any purpose other than the importer, and MUST NOT use the
derived keys for any purpose other than TLS PSKs".  Is it worth spelling
it out explicitly like that?

   external PSK MUST be associated with at most one hash function, as
   per the rules in Section 4.2.11 from [RFC8446].  See Section 7 for
   more discussion.

Does this requirement apply to the inputs to the importer process, the
outputs, or both?

Section 3.1

   *  Imported PSK (IPSK): A PSK derived from an EPSK, External
      Identity, optional context string, target protocol, and target
      KDF.

There is an "External Identity" that is contained within the EPSK
itself; is the "External Identity" listed here distinct from that?

Section 4.1

   The PSK Importer interface takes as input an EPSK with External
   Identity "external_identity" and base key "epsk", as defined in
   Section 3.1, along with an optional context, and transforms it into a
   set of PSKs and imported identities for use in a connection based on
   target protocols and KDFs.  In particular, for each supported target
   protocol "target_protocol" and KDF "target_kdf", the importer
   constructs an ImportedIdentity structure as follows:

If I understand correctly the "target_kdf" is supposed to be the KDF
associated with the cipher suite(s) the derived PSK will be usable for.
This is something of a divergence from RFC 8446, where we *assume* that
the KDF will be HKDF and associate only a *hash function* with the
cipher suite.  While discussing a more generic KDF concept seems
reasonable (and is directly in line with the cryptographic principles
that motivate this work), I'd recommend adding a few more words
somewhere in this section to clarify the relationship between the
target_kdf and the cipher suite(s), probably in the paragraph that
starts "[e]ndpoints SHOULD generate a compatible 'ipskx' for each target
ciphersuite they offer".

   struct {
      opaque external_identity<1...2^16-1>;
      opaque context<0..2^16-1>;
      uint16 target_protocol;
      uint16 target_kdf;
   } ImportedIdentity;

Should we say that this is using the TLS presentation language?

   ImportedIdentity.context MUST include the context used to derive the
   EPSK, if any exists.  For example, ImportedIdentity.context may

(nit?) "derive" suggests a cryptographic key derivation process, but the
rest of the prose suggests that this is more a process of
"identification" or "determination".  Is there a more appropriate word
to use?

   Given an ImportedIdentity and corresponding EPSK with base key
   "epsk", an Imported PSK IPSK with base key "ipskx" is computed as
   follows:

      epskx = HKDF-Extract(0, epsk)
      ipskx = HKDF-Expand-Label(epskx, "derived psk",
                                Hash(ImportedIdentity), L)

I think we need to say that the HKDF-Expand-Label used (i.e., the
HkdfLabel.label prefix) is the one corresponding to
ImportedIdentity.target_protocol.

   L corresponds to the KDF output length of ImportedIdentity.target_kdf
   as defined in Section 9.  For hash-based KDFs, such as
   HKDF_SHA256(0x0001), this is the length of the hash function output,
   i.e., 32 octets.  This is required for the IPSK to be of length

(32 octets for SHA256, not all hash-based KDFs)

   The identity of "ipskx" as sent on the wire is ImportedIdentity,
   i.e., the serialized content of ImportedIdentity is used as the
   content of PskIdentity.identity in the PSK extension.  The
   corresponding TLS 1.3 binder key is "ipskx".

In RFC 8446, the "binder_key" is the *output* of the key schedule, but
ipskx is an *input* to the key schedule.  So I think we want to say
something like "the corresponding PSK input for the TLS 1.3 key schedule
is 'ipskx'".

   The hash function used for HKDF [RFC5869] is that which is associated
   with the EPSK.  It is not the hash function associated with
   ImportedIdentity.target_kdf.  If no hash function is specified,

I predict that someone will mess up the hash function selection while
implementing this.  Perhaps we could provide test vectors for the full
matrix of (EPSK Hash, target_kdf hash) pairs using SHA256/SHA384?

   SHA-256 [SHA2] MUST be used.  Diversifying EPSK by

I think we might be able to tolerate the *protocol* having a strict
requirement that the associated hash function is specified, and provide
a recommended value that would be used by people deploying the protocol
in the absence of other information.  This might in some sense help
future-proof the document for the scenario where SHA256 weakens or is
broken and the default should change.

   KDFs, protocols, and context string(s) are known a priori.  EPSKs MAY
   also be imported for early data use if they are bound to protocol
   settings and configurations that would otherwise be required for
   early data with normal (ticket-based PSK) resumption.  Minimally,
   that means Application-Layer Protocol Negotiation [RFC7301], QUIC

RFC 8446 does not limit 0-RTT data to resumption, so I think we just
want "if they are bound to the protocol settings and configuration that
are required for sending early data".

Also, nit: I think we usually refer to the "ALPN value" instead of just
"ALPN" being configured.

Section 5

   If a client or server wish to deprecate a hash function and no longer
   use it for TLS 1.3, they remove the corresponding KDF from the set of
   target KDFs used for importing keys.  This does not affect the KDF
   operation used to derive Imported PSKs.

Should we also include a paragraph about how to deprecate the Hash used
in deriving Imported PSKs?  (It's fixed per EPSK, so, "configure a new
EPSK", basically.)

Section 6

   Recall that TLS 1.2 permits computing the TLS PRF with any hash
   algorithm and PSK.  Thus, an EPSK may be used with the same KDF (and
   underlying HMAC hash algorithm) as TLS 1.3 with importers.  However,
   critically, the derived PSK will not be the same since the importer
   differentiates the PSK via the identity and target KDF and protocol.
   Thus, PSKs imported for TLS 1.3 are distinct from those used in TLS
   1.2, and thereby avoid cross-protocol collisions.  [...]

As I read this I recalled that up in Section 1 we say that applications
"SHOULD provision separate PSKs for TLS 1.3 and prior versions".  The
scenario being described here sounds like it can only occur if that
SHOULD is ignored, which might be worth reiterating.

We also say in § 4.1 that "external PSKs MUST NOT be imported for (D)TLS
1.2 or prior versions".  In light of these two observations, my best
interpretation of the quoted text is that it should be equivalent to:

NEW:
   Recall that TLS 1.2 permits computing the TLS PRF with any hash
   algorithm and PSK.  Accordingly, a given EPSK might be both used
   directly as a TLS 1.2 PSK and used with TLS 1.3 via the importer
   mechanism (noting that this configuration is not recommended, per Section
   1), using the same KDF algorithm.  However, because the TLS 1.3
   importer mechanism includes an additional key-derivation step, the
   actual PSK used in the TLS 1.3 key schedule will be distinct from the
   one used in the TLS 1.2 key schedule, so there are no cross-protocol
   collisions possible.
--

                                                      Note that this
   does not preclude endpoints from using non-imported PSKs for TLS 1.2.

For some reason this line implies to me that endpoints might use
imported PSKs for TLS 1.2, but this is forbidden by Section 4.1 (as
quoted above).  Perhaps "does not preclude endpoints from continuing to
use TLS 1.2 and the non-imported PSKs it requires"?

Section 7

We should probably note that any information placed in
ImportedIdentity.context will be visible on the wire in cleartext, and
thus that confidential identifiers from other protocols should either
not be used or should be protected (e.g., by hashing) prior to use.

   1.  Externally provisioned PSKs imported into a TLS connection
       achieve compound authentication of the provisioning process and
       connection.

   2.  Context-free PSKs only achieve authentication within the context
       of a single connection.

Do we need to use psk_dh_ke to get the strong compound authentication
property, or is it attainable with psk_ke as well?

Section 10.1

I'm not sure why [QUIC] and RFC 5246 are listed as normative references.

Appendix B

   The Selfie attack [Selfie] relies on a misuse of the PSK interface.
   The PSK interface makes the implicit assumption that each PSK is
   known only to one client and one server.  If multiple clients or
   multiple servers with distinct roles share a PSK, TLS only
   authenticates the entire group.  A node successfully authenticates
   its peer as being in the group whether the peer is another node or
   itself.

I think it may be useful to call out that the "multiple clients" and
"multiple servers" case can occur even when there are only two endpoints
that know the key (that is, when they do not have predetermined
client/server roles).

     struct {
       opaque client_mac<0..2^16-1>;
       opaque server_mac<0..2^16-1>;
     } Context;

We may not need the whole 16k to hold a MAC address, especially since
this is just an example.

   If an attacker then redirects a ClientHello intended for one node to
   a different node, the receiver will compute a different context
   string and the handshake will not complete.

Similarly to the above, this could be "a different node (including the
node that generated the ClientHello)".
Alissa Cooper Former IESG member
No Objection
No Objection (for -06) Not sent

                            
Alvaro Retana Former IESG member
No Objection
No Objection (for -06) Not sent

                            
Andrew Alston Former IESG member
No Objection
No Objection (for -07) Not sent

                            
Barry Leiba Former IESG member
No Objection
No Objection (for -06) Not sent

                            
Deborah Brungard Former IESG member
No Objection
No Objection (for -06) Not sent

                            
Lars Eggert Former IESG member
No Objection
No Objection (2022-04-05 for -07) Sent
Using lowercase "not" together with an uppercase RFC2119 keyword is not
acceptable usage. Found: "SHOULD not"

Thanks to Brian Carpenter for their General Area Review Team (Gen-ART) review
(https://mailarchive.ietf.org/arch/msg/gen-art/vpFO8fQNaWU_qRWSelGo99K3rVY).

-------------------------------------------------------------------------------
NIT
-------------------------------------------------------------------------------
All comments below are about very minor potential issues that you may choose to
address in some way - or ignore - as you see fit. Some were flagged by
automated tools (via https://github.com/larseggert/ietf-reviewtool), so there
will likely be some false positives. There is no need to let me know what you
did with these suggestions.

Document references draft-ietf-quic-transport, but that has been published as
RFC9000.

Reference [RFC5246] to RFC5246, which was obsoleted by RFC8446 (this may be on
purpose).
Magnus Westerlund Former IESG member
No Objection
No Objection (for -06) Not sent

                            
Martin Duke Former IESG member
(was Discuss) No Objection
No Objection (2021-02-23 for -06) Sent
Thanks for answering my DISCUSS. The length mismatch will end up being resolved by the TLS decoder. I created a PR that can provide a useful warning for implementers, but I don't see this as an interoperability issue anymore.
Robert Wilton Former IESG member
No Objection
No Objection (2021-01-04 for -06) Not sent
Thanks to Al for the OPS directorate review.

Rob