Re: [TLS] TLS1.3 + PSK with multiple identities

David Woodhouse <dwmw2@infradead.org> Mon, 19 September 2016 14:08 UTC

Return-Path: <BATV+e4a5c8c88c3adab274df+4775+infradead.org+dwmw2@bombadil.srs.infradead.org>
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 7D8BE12B15D for <tls@ietfa.amsl.com>; Mon, 19 Sep 2016 07:08:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.516
X-Spam-Level:
X-Spam-Status: No, score=-6.516 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-2.316] autolearn=ham autolearn_force=no
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 gg-TF366yiHZ for <tls@ietfa.amsl.com>; Mon, 19 Sep 2016 07:07:59 -0700 (PDT)
Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (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 2DA2C12B04E for <tls@ietf.org>; Mon, 19 Sep 2016 07:07:59 -0700 (PDT)
Received: from [2001:8b0:10b:1:841b:5eff:0:3b3] (helo=i7.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.85_2 #1 (Red Hat Linux)) id 1blzEi-0003td-CF; Mon, 19 Sep 2016 14:07:56 +0000
Message-ID: <1474294073.144982.327.camel@infradead.org>
From: David Woodhouse <dwmw2@infradead.org>
To: Eric Rescorla <ekr@rtfm.com>
Date: Mon, 19 Sep 2016 15:07:53 +0100
In-Reply-To: <CABcZeBMmZggyn=K64uRp48JKm0Ox71K54BwB0RMa7fwHP6bW+A@mail.gmail.com>
References: <1470644260.3026.13.camel@redhat.com> <20160808082836.jgq7a4qqvis6msp5@LK-Perkele-V2.elisa-laajakaista.fi> <1470648042.3026.44.camel@redhat.com> <1474278590.144982.255.camel@infradead.org> <CABcZeBNfzzZXmtEiMptB3_eKsydvvsZ0gBMzLLPbQcBHtF_H+A@mail.gmail.com> <1474288002.144982.304.camel@infradead.org> <CABcZeBMmZggyn=K64uRp48JKm0Ox71K54BwB0RMa7fwHP6bW+A@mail.gmail.com>
Content-Type: multipart/signed; micalg="sha-256"; protocol="application/x-pkcs7-signature"; boundary="=-JOFQwjB5VR/k5eAgutDy"
X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24)
Mime-Version: 1.0
X-SRS-Rewrite: SMTP reverse-path rewritten from <dwmw2@infradead.org> by bombadil.infradead.org. See http://www.infradead.org/rpr.html
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/805NsMF-y_ORsFFIgztvcr59-Wk>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] TLS1.3 + PSK with multiple identities
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.17
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: Mon, 19 Sep 2016 14:08:03 -0000

On Mon, 2016-09-19 at 05:46 -0700, Eric Rescorla wrote:
> 
> > And then the client only needs to supply one copy of it for the
> > identity which the server actually selected, not one for *each*
> > identity which was being offered by the client.
> 
> We're most likely going to allow only on PSK anyway.

You mean "only one", I assume?

What if my client authenticates with an actual pre-shared key, and I
also want to resume a session? As it stands, that means I really do
need to offer two PSK identities — one for the real identity, and one
for the session resumption attempt. Are you saying that won't be
permitted?

Or do we stop to stop conflating the two types of PSK-identity, so that
we can allow only one of each?

> > I share Nikos's concern about using the PSK identity for two completely
> > different types of identifiers — especially given that one type has
> > historically been defined as UTF-8 text, while the other is binary.
> > 
> > The reason I care about this right now is that we're looking at using
> > PSK to bootstrap a DTLS connection in the context of an SSL VPN,
> > currently using DTLS 1.2 and draft-jay-tls-psk-identity-extension.
> 
> I recommend against this: I very much doubt that we are going to adopt this
> draft in TLS.

That is useful feedback; thank you. Although I'm slightly confused —
although the draft is out of date, I thought the point of it was to
simply document what you *are* adopting in TLS1.3, for use in TLS1.2.
Are you saying that the extension will never be retroactively 'blessed'
for TLS1.2 even when it's part of TLS1.3?

What we're trying to do is move away from the existing model, inherited
from Cisco AnyConnect, where the DTLS ciphersuite is negotiated out-of-
band along with a master secret, and then we 'resume' a DTLS session
that never really existed.

It took us a *long* time to gain support for DTLS1.2 and AEAD cipher
suites because of that, and it would be much better just to let DTLS
negotiate as $DEITY intended.

But the architecture of our server is such that it *really* wants to
know from the very first ClientHello packet which client it's talking
to, so that the packet can be dispatched to the correct worker
process. 

The first prototype of this continued to abuse the Session-ID to
identify the client — making it *look* like a session resume attempt
when in fact we weren't prepared to resume the session at all, and we
rely on the server *not* doing so.

I kind of threw my toys out of the pram at that — if we're going to
attempt to use the protocol properly, then I really do want to do it
*properly*. Hence the interest in draft-jay-tls-psk-identity-extension.

If that's not going to be viable, then I'm starting to wonder if we
should just wait for DTLS1.3. After all we *already* support the fun
parts of DTLS1.2, and AEAD ciphersuites, so there's no desperate rush
to start using proper negotiation.

-- 
dwmw2