Re: [TLS] [kitten] Fwd: Last Call: <draft-ietf-kitten-tls-channel-bindings-for-tls13-09.txt> (Channel Bindings for TLS 1.3) to Proposed Standard

Jonathan Hoyland <jonathan.hoyland@gmail.com> Tue, 09 November 2021 16:01 UTC

Return-Path: <jonathan.hoyland@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1B2C83A0899; Tue, 9 Nov 2021 08:01:44 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XskXFOLbWI_1; Tue, 9 Nov 2021 08:01:39 -0800 (PST)
Received: from mail-qv1-xf2b.google.com (mail-qv1-xf2b.google.com [IPv6:2607:f8b0:4864:20::f2b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E7D033A088F; Tue, 9 Nov 2021 08:01:24 -0800 (PST)
Received: by mail-qv1-xf2b.google.com with SMTP id u25so14536687qve.2; Tue, 09 Nov 2021 08:01:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=o7PAlrsvg4naCgwzxJgStT+P7IuKTF5Mho3Bqs81Cz8=; b=WX2z/ZGSzpLjlzEQ6rGa3LhLadcL98jnU+kStDlwjhIAw+aPkl0/jbwiMAOwEVjNdS MiZJcGePt4HiKgxdasjBOYTeHfyBdjSiZ0NWS5v6btRKraD079E1gKfpJ1JcOj+fmYzQ x8IzbBFKxb/tHGVvPBgn3UDURx3Y8TsZvhmVR9UxXfpEn6o1PgXuzpqaKXfO6FejPSKL XnoXbfg+jc3mk94qHMph3eH7UP2W/oBb/m0ZNSec63uAIAi7P3n6ZhMEulidBCuAaEfR Rz19FTCp2D6RI6kpLVIzKrQVOCWsX8OFaVsxBVZQ1j/ByVGZIu/S5m3wFNz6w08ojUz1 qbMA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=o7PAlrsvg4naCgwzxJgStT+P7IuKTF5Mho3Bqs81Cz8=; b=NiW09LUyhC0FCwojubLtxaB86UkEY4lna8nK4JuU8mCV69lBs288TWGAjujFTu5zNG 3qOfHUG8WUwQtky7Ihdi2Hxc1He1hOXXROVhD28tDvvgKjUFmpPkmjb9ZpQSLWNcPncr HnOpPMWpJgF5KdB/4UJCyVaTMueGyFlpU32vAyaX4/Jcv70coqvCuLfh7dI3C9bpYeDU 9g9OnN4dv3iZIPvT+j7M68u6tHAApLfJ5DzlFDOWbIq6hckJcccZ5xWVbAz8JFwi0noj qvNDTrhXz921jIXf8sbo//uXOR2AxRqkuWSd8WttzGx57eQ8MUcQCgLBggKhxOgO76Yr BEbA==
X-Gm-Message-State: AOAM531C58rEgL21dXIIefm2hUfcyZJWLpq3ojJy9S4SjxEifv0SmAnl Z5/gahKyVmzZpYsBiW3CMKEU2SJkNttmEhBDE/oUY+ze
X-Google-Smtp-Source: ABdhPJyUMa6hqp3dhW6JP1UNt9B+Z2su2U00Gkly/9ZVDqjX6W8eYEMITPtKrvlMzDvcwmpd9aZd90gWlhC8qknNhUg=
X-Received: by 2002:a0c:eb90:: with SMTP id x16mr8524934qvo.41.1636473682652; Tue, 09 Nov 2021 08:01:22 -0800 (PST)
MIME-Version: 1.0
References: <163311243544.13917.11736165165419008870@ietfa.amsl.com> <20211001190002.GC98042@kduck.mit.edu> <CABcZeBPQG82xJdwMrmj4-=9aJymo1xts=D6VZedBW5X9k+34cQ@mail.gmail.com> <92ed26c1-bfde-43c1-93f4-2bbdbd4f6ec1@www.fastmail.com> <CAChr6Sw6Rs42DfS8KgD3qasPcWM_gGZhWN5C4b7W7JsPy0wDzw@mail.gmail.com> <8796f867-12b8-41f8-b124-82b3ab0e2d32@www.fastmail.com> <CAChr6SyKAnBcE9t68coGGXFt9WPLuDuWtVKoCXrK+QrwAVtPXw@mail.gmail.com> <f1bcd676-13ad-49b3-a8e8-8a272e0124e3@www.fastmail.com> <CABcZeBNo0gKjNZOKPYJYraioaw6G=z5ibTqh-o9GkWsDkfDmSQ@mail.gmail.com> <c4d6f2e5-0712-42a6-aef5-0cbada7e149e@www.fastmail.com> <CABcZeBM6y-6ZqaLGZ=8qr+uBnWOOgczhcx=ruy5S=n-YrHweKg@mail.gmail.com> <ca676a77-b2c9-4926-9842-d1d6587206ed@www.fastmail.com> <CACykbs11rHUweXmR1NSU0N2rRjcQ8Sf1S+DY2LO7T+e6cLt+5w@mail.gmail.com> <CAKHUCzz5ErY0xuBXVRuoNeZ3RS-7MwKrGH37kgZ=qwyqb-CgOg@mail.gmail.com>
In-Reply-To: <CAKHUCzz5ErY0xuBXVRuoNeZ3RS-7MwKrGH37kgZ=qwyqb-CgOg@mail.gmail.com>
From: Jonathan Hoyland <jonathan.hoyland@gmail.com>
Date: Tue, 09 Nov 2021 16:01:11 +0000
Message-ID: <CACykbs251Tn77jMN_YjcL8RxSax0NcFp8RNRT+oJp1Z=Z+qB2A@mail.gmail.com>
To: Dave Cridland <dave@cridland.net>
Cc: Sam Whited <sam@samwhited.com>, KITTEN Working Group <kitten@ietf.org>, "<tls@ietf.org>" <tls@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000089f56605d05d3841"
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/TaSsVExNkSC56ZhiJglADABs4HE>
Subject: Re: [TLS] [kitten] Fwd: Last Call: <draft-ietf-kitten-tls-channel-bindings-for-tls13-09.txt> (Channel Bindings for TLS 1.3) to Proposed Standard
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "This is the mailing list for the Transport Layer Security working group of the IETF." <tls.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/tls>, <mailto:tls-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/tls/>
List-Post: <mailto:tls@ietf.org>
List-Help: <mailto:tls-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/tls>, <mailto:tls-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 09 Nov 2021 16:01:44 -0000

Hi All,

My specific solution is to simply include a *different* fixed string for
each variant of SCRAM and GSS-API, and ideally a nonce.
Given that applications will have to update their stacks anyway to
accommodate the new fixed string in the current proposal I don't see that
as a hugely difficult proposition.

The goal of labels in material that is used to derive keys (yes, material
that is used to derive keys is necessarily secret, yes material derived
from keys is not necessarily secret), is to exclude classes of attack.
It is good protocol design.

One of the things use of a TLS channel binding gives you is protection for
the upper level protocol against TLS being MITMed.
Using a fixed string for multiple protocols probably gives you that
protection (assuming the channel binding is correctly agreed by both sides).

Using a distinct channel binding, even if the upper level protocol is not
secure, means that if both sides agree on the channel binding they agree on
the intent of the upper layer protocol, i.e. it gives you some level
assurance that the client and server agree on what was intended.
This eliminates classes of attack such as message confusion.
Adding this protection costs virtually nothing, given that you are
_already_ commiting to updating this section of code (no code currently
makes this specific call to the TLS-Exporter interface).
Leaving it out means that people like me who do formal analysis can't
reasonably analyse these designs.
I build models of protocols and prove they meet certain properties.
The only way to keep that analysis viable (we're already talking hundreds
of hours of work) is to eliminate classes of attack wholesale.
Yes, you can add unique and clever protections into every sub-protocol, but
it makes formally proving anything about the security exponentially harder
(and yes, I mean that in the literal / mathematical sense).

Regards,

Jonathan




On Tue, 9 Nov 2021 at 13:00, Dave Cridland <dave@cridland.net> wrote:

> On Tue, 26 Oct 2021 at 17:33, Jonathan Hoyland
> <jonathan.hoyland@gmail.com> wrote:
> > There isn't even a one-to-one relationship between GSS-API / SCRAM runs.
> This channel binding design doesn't protect against messages being swapped
> between two GSS-API runs on a single TLS connection.
>
> As I understand your case, you're suggesting that if the same channel
> binding is used on multiple authentication runs within the same TLS
> session, there may be cases where this may result in weakening of the
> bound authentication.
>
> It is not clear to me that this is the case. The channel binding data
> is known to both parties of the TLS session for the duration of the
> TLS session, so it doesn't seem likely that reusing it could actually
> cause problems here.
>
> Most SASL or GSS-API based protocols do not allow multiple
> authentications within a single connection, and therefore TLS session,
> but there are exceptions.
>
> I think the exceptions are:
> * IMAP with draft-newman-imap-unauth - a three year old I-D not
> published as an RFC.
> * LDAP (and X.500 DAP) both allow multiple consecutive binds.
>
> The suggestion you propose in the quote above is that a single message
> could be replayed within one TLS session.
>
> Replay resistance is generally baked into SASL and GSS-API mechanisms,
> rather than the channel binding itself. This includes, for example,
> SCRAM - replaying one of the messages would result in a failed
> authentication whether or not TLS channel binding were to be used.
> Some mechanisms are replayable - PLAIN being one - but these both
> assume that the TLS session remains confidential, and also they do not
> include channel binding information anyway. But there are SASL
> mechanisms that have been proposed in the past that do not provide
> replay resistance but do include a TLS channel binding. In these
> cases, then, your attack is possible and hinges on the reuse of a TLS
> channel binding.
>
> The result would be that - on some IMAP and LDAP servers - an
> authenticated user could reauthenticate as themselves.
>
> Now, all this does assume that an attacker cannot break a TLS session
> during the duration of a TLS session; that is, that we assume TLS
> sessions maintain confidentiality, integrity, and authenticity during
> the session at least. If this is not the case, then it's game over
> anyway, on a number of levels, and your proposed attack (which, I
> reiterate, is entirely unproven) makes no difference.
>
> What we do not assume however is that the certificate remains
> sacrosanct during this. Again, SASL mechanisms often (and again, this
> includes SCRAM) handle their own mutual authentication, so not only
> does the client authenticate to the server but the server has to prove
> its identity to the client. Assuming ephemeral keying, then, an
> attacker compromising the server's certificate doesn't actually make
> as much difference as you'd think here. At this point I'm reaching the
> edges of my knowledge, but I believe that although the identity as
> authenticated by the server's certificate could be spoofed if the
> certificate were compromised, ephemeral keying would still protect the
> session and SASL mutual authentication would still authenticate the
> server later.
>
> Overall, therefore, I have to ask you to find some kind of concrete
> attack. "Reusing an exported key within the same TLS session" does not
> appear to form the core of an attack as you suggest.
>
> Dave.
>