[TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis)
Eric Rescorla <ekr@rtfm.com> Fri, 30 May 2025 16:09 UTC
Return-Path: <ekr@rtfm.com>
X-Original-To: tls@mail2.ietf.org
Delivered-To: tls@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id 945922ED425A for <tls@mail2.ietf.org>; Fri, 30 May 2025 09:09:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=rtfm-com.20230601.gappssmtp.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SMlHDHUASDkv for <tls@mail2.ietf.org>; Fri, 30 May 2025 09:09:19 -0700 (PDT)
Received: from mail-yb1-xb2e.google.com (mail-yb1-xb2e.google.com [IPv6:2607:f8b0:4864:20::b2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by mail2.ietf.org (Postfix) with ESMTPS id DF2F12ED4247 for <tls@ietf.org>; Fri, 30 May 2025 09:09:19 -0700 (PDT)
Received: by mail-yb1-xb2e.google.com with SMTP id 3f1490d57ef6-e7569ccf04cso1879351276.0 for <tls@ietf.org>; Fri, 30 May 2025 09:09:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rtfm-com.20230601.gappssmtp.com; s=20230601; t=1748621359; x=1749226159; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=I971imUuXYLlecD+VqZdc72/QD1arMbfLXD+LDDU2lw=; b=QVWJ0mGkXncO0/vA8Mn0A370BwXtRxzAZ+CFqa0NpnZ5kCU4AIRyCNqqcU1zO+kG10 7gpfh8sh9J1ShdQcr1Pe4pmENqDwzM3KhLlYSHqk5EKq+tVnE1pzoY59Y7Ttm4zVyHW7 PpglbkfxEHeIpnEnLcadbO9KTkKLCboC2PMwgDbjgD5GThCtpwB+Dvo7QFuXtGT2EWFG Vr3Dn9KQUaAwiolA+/B/ZF3GtLBOqNyfvvlvkoZiVMgvNd/BRu3YeSL7s3L9K+uSxROI crCh/gpEpOvB+kIA6VQywCZtZCFKvwsOqnzIYBH2yevyxIdfje8kJbIbm+vcgxjbKgom fCtg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1748621359; x=1749226159; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=I971imUuXYLlecD+VqZdc72/QD1arMbfLXD+LDDU2lw=; b=Bad7jWyp1X3cC5smyI6rKiUhc3dsauT8OoiZ1uy0BZ+W33QdS7KREXXGBpaZdN3b/o +jsstzfhHqvzAcVOcADm+orq/kWGZoe9WXC0PsIl431EqO4AbRIpnG12pn3o1hwSF8+f 1PHzHqkjia35A2IG8QG9YfFxBw32rOewevM7gGnh1q3bdB33weU57OW4zapt1oIE1vql MEjli+vBdt8/Qx5gVcki8DJ1HD+yor/jfetYTz4YjsPFugkmRJcUkx0CII7ONhkjEisl IT8SEM57+yI1tfZrlbbkab0wXamPxnHL9q8IVCGDekHTvO8GN4mOcwmAymIi5QrwLDFc fuhQ==
X-Gm-Message-State: AOJu0Yx4VyFrQId7EBZ0PVpH54uOpyUVdPnmmYhzEh8HdXrq1tZ2HWwH JlCA9AVCC+yIvBLK3O0QLDYkwJ7ZImz1AuOSJJVhF1++1OSPvll3P85bi9jZKI2IISbpKL8KyFl ODRZtJXj4wkjcoiYtmrV6x9yMJF0l1vVWkjtbFiQz/A==
X-Gm-Gg: ASbGncts/jgu7ZLxtfs2FfUgCvw4R3vm9vNZsUSaqCDafs+FG+nuHIBjgMe20MzXgUm DCp3uuxd5Pr8vPDUb28iHaZOS1M3+ElvO1gwfetpv5NXsfqidKPiCNdWil7Qu+NqQ/xEYwD1Qzv ruo7WTkAPSwDJ1QzmfuuqcCzpihavDkyaygU4=
X-Google-Smtp-Source: AGHT+IFEd8Vc4RXB1xA8lPrA2ysHHf9M+DMfl3+yDMd/q1+mZ4OkUSPwlmtwUFFHkvQ5YfFLuFiRDrVKNHan/Mqwm7M=
X-Received: by 2002:a05:6902:f84:b0:e7d:5e41:a8b0 with SMTP id 3f1490d57ef6-e7f81f00008mr5609565276.38.1748621359199; Fri, 30 May 2025 09:09:19 -0700 (PDT)
MIME-Version: 1.0
References: <90bdd3cd-a5d0-4a82-b28c-2965536a7154@tu-dresden.de> <CADi0yUP27w+gcLvfWjn=+EqxfiWebFiyaNa1aUomVai8AUAU5w@mail.gmail.com> <f16029e7-33ea-449d-9a6d-936b649d30d5@tu-dresden.de> <b805cab0-1395-44cc-9dfb-8599e491226d@tu-dresden.de> <CABcZeBP_fqYBjUhNdEhZJcUorVYhAiTnP-2x6zqU9BQTs=Rm+A@mail.gmail.com> <42ac6c35-6277-4c64-a479-553edd70627d@tu-dresden.de>
In-Reply-To: <42ac6c35-6277-4c64-a479-553edd70627d@tu-dresden.de>
From: Eric Rescorla <ekr@rtfm.com>
Date: Fri, 30 May 2025 09:08:43 -0700
X-Gm-Features: AX0GCFvnY8sGyiJwm-U99rGtkguEC01Ei9RDPCfXLU4k1GeycNaSIm5FX63kZxo
Message-ID: <CABcZeBN5UkzZesn+AoSObFqosisnOn6KnVfeTn=C3p-2yzBvxA@mail.gmail.com>
To: Muhammad Usama Sardar <muhammad_usama.sardar@tu-dresden.de>
Content-Type: multipart/alternative; boundary="000000000000f653fe06365ca2fa"
Message-ID-Hash: LWMU2DHOMHAIGFZ4AFYW2BDPQRJQBOAL
X-Message-ID-Hash: LWMU2DHOMHAIGFZ4AFYW2BDPQRJQBOAL
X-MailFrom: ekr@rtfm.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-tls.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: tls@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis)
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/h2TfNJ50YgbEDxc1LJRvGX4t8Zo>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Owner: <mailto:tls-owner@ietf.org>
List-Post: <mailto:tls@ietf.org>
List-Subscribe: <mailto:tls-join@ietf.org>
List-Unsubscribe: <mailto:tls-leave@ietf.org>
On Thu, May 22, 2025 at 11:15 AM Muhammad Usama Sardar < muhammad_usama.sardar@tu-dresden.de> wrote: > Thank you for responses. Please see inline. > On 22.05.25 17:36, Eric Rescorla wrote: > > However, this text does seem clear > even if others used a different definition; given that this is not > part of the protocol definition but just in an appendix listing > the security properties, I think it's reasonable to say as-is. > > I tend to disagree unless you mean that client_early_traffic_secret and > early_exporter_master_secret are not "session keys". These two secrets are > not derived from Main Secret as currently defined. These are derived from > Early Secret. If you actually mean that these are not session keys, I would > like to know why. > I think we'd have to go over the text in this section to determine whether the statements made in this section apply to the early secret. They don't apply to the handshake secret. > > Issue 2: "Binder Finished Key" > > > > TL;DR: Please confirm if this is correct and if so, mention it > explicitly in RFC8446bis. > > > > Details: > > > >> Dowling et al. [1] also mention "Binder Finished Key" derived from > > Binder Key (Figure 2 and Table 1 in [1]). In my read of > > RFC8446bis-12 (particularly section 4.4 and 4.4.4), I could not > > figure out where this is coming from. The only mention of binders in > > these sections is: > > > > > The PSK binders also perform key confirmation, in a similar fashion. > > > > Perhaps the intention here was not to say key confirmation alone, > > but also handshake integrity via Finished message? Specifically, > > Table 2 never mentions binder key, as one of the base keys for the > > derivation. > > Here too, it seems like we have a situation where the specification > is clear: > > The PskBinderEntry is computed in the same way as the Finished > message (Section 4.4.4) but with the BaseKey being the binder_key > derived via the key schedule from the corresponding PSK which is > being offered (see Section 7.1). > > It seems like Dowling has chosen to call the output of the computation > indicated in S 4.4.4 but with BaseKey as the binder key as a > "Binder Finished Key". I don't think that's an unreasonable choice, > even though it's not technically a Finished key, just computed in > the same fashion. > > I would appreciate an explicit entry in Table 2, rather than burying it > deep in Section 4.2.11.2. Something like: > > Mode = PSK | Handshake Context = ... | Base Key = binder_key > I don't think this change is indicated. It is not a Finished key. > > Does someone know any security implications that could originate > > from -- for example -- using "0" instead of "" in HKDF-Expand-Label? > > I think depending on HMAC construction used, this might lead to > > security concerns, generating unexpected keys and breaking the key > > agreement at the very least. > > I'm not a cryptographer but I don't know of any impacts. Glancing > quickly at the specification, it doesn't appear that there are any > situations where you could have either "" or some value, so I don't > *think* there's room for ambiguity here. I'm not sure what you mean by > "depending on HMAC construction used", as HMAC is a single > construction just instantiated with hashes. I agree it would be good > to get some confirmation here. > > I am not a cryptographer either, so I may be completely wrong. I'll try to > clarify my thought. I don't think "0" and "" are interchangeable in a way > ProVerif implementation seems to indicate by using just one constant for > both. It works in ProVerif because both endpoints are using the same key > derivation functions. But if one endpoint was using "0" and the other was > using "", they should end up with a different HKDF-Expand-Label, and never > agree on transcript hash. > I agree that they will not interoperate. I thought your question was whether the confusion about this impacted the security analysis. > > > --- > > > > Issue 4: Full key derivation schedule: > > > > TL;DR: Please add full key derivation schedule in specifications in > RFC8446bis. > > > > Details: > > > > The text in section 7.1 says > > > > > This produces a full key derivation schedule shown in the diagram > below. > > > > The figure, however, by no means is anything close to a full key > > schedule. It shows only the first stage of keys. Seems like it would > > be very beneficial if at least the Appendix of RFC8446bis includes a > > full key derivation schedule. Right now, the key schedule is > > scattered around in sections 7.1, 7.3, 7.5, 4.4 and 4.4.4. > > This diagram is already quite large, so I fear it would be a lot of > work to produce something that was readable. I agree it's not helpful > to say "full" here, and I'd welcome some revised text. > > Happy to propose revised text but without such a complete diagram, I don't > know how we can have consensus on what is a "full" key schedule. For > example, how can I be sure that I have not missed a key buried somewhere > deep in the specs? How can I be sure that the "reference" key schedule -- > that I am using to validate the key schedule -- is correct and complete? > Well "full key schedule" isn't used otherwise, so I'm not sure we need to have a definition for this. Are you saying that there is some lack of clarity on what keys are generated, or merely that you think it requires a close read to find it. For revised text, how about something like this: > > "This produces the *first stage* of key schedule shown in the diagram > below." > Sure. > Also curious whether there was any reason to put "key derivation schedule" > rather than "key schedule" since the former does not appear anywhere else > in the whole document. > No, I don't think of a reason. Just the way the text was written. > Please also add a caption to this figure. It would be easier to refer to > it by just saying figure N rather than figure in Section 7.1. > I'll take a look. -Ekr
- [TLS] Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- Re: [TLS] Key Hierarchy TLS 1.3 RFC8446(bis) Hugo Krawczyk
- Re: [TLS] Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Fwd: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Eric Rescorla
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Eric Rescorla
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Eric Rescorla
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Eric Rescorla
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar
- [TLS] Re: Key Hierarchy TLS 1.3 RFC8446(bis) Muhammad Usama Sardar