Re: [TLS] Un-deprecating everything TLS 1.2

Christopher Patton <> Tue, 06 October 2020 02:00 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 91C1A3A0E48 for <>; Mon, 5 Oct 2020 19:00:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.298
X-Spam-Status: No, score=-3.298 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-1.2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id PzF9A69npYM1 for <>; Mon, 5 Oct 2020 19:00:57 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4864:20::843]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 476103A0E23 for <>; Mon, 5 Oct 2020 19:00:57 -0700 (PDT)
Received: by with SMTP id m9so11093042qth.7 for <>; Mon, 05 Oct 2020 19:00:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MG3ETFVzXQCQXB6++P2aTpksi9KtvVu+OewdmNvqwCA=; b=jR5CnieiWd2sb5wfcj7g5gvDnERjEink424fr3RW4bUAusdMsI0meb85M1hLxlqZik g1dzNRa1Vq/f6RSKUzFTcXPVHqbNQZJClx2QaiWXC6KTPPQ65ZhgU+Lhm6YB8OKgqQsu 5wRFKACiAqZiKzj7IZplHIztXUbEZrHbd5r20=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MG3ETFVzXQCQXB6++P2aTpksi9KtvVu+OewdmNvqwCA=; b=WWNhEUUNyVwmql90vxftheKoipmVFDfJ/Ud34KS9rzaNS6I//wRDNuWwnnh7IxLt6F soKcyfiD+9b4Teh2hBFV3MPVjKFCeFVAukMO6Uda4OvxEQrUWv5hJH/vO4p4cpGTrpjq PTQr7Pot3xV48HlIrkKON6gzy4AaIMVBsHVzRtgc8LujLZHxsmefOKAEkYvtXJclfGxp DxdEVQMrgVW418bxweE7MiC/yTM5dVP5N3PjFqAGayZBxkjvd9KKerB80/rT0+WgDgjX 2qqeG3HlCMnbR9NULA1eYegGRZlWpZPItndow591CvXQhZkmSRkGt2DSQdzIZHNfp6mh zZ0Q==
X-Gm-Message-State: AOAM531J+8Gqk9n6mRdG8rLgEti8YKelQaDJSvUF3inafnkYK3vClyQ0 Ck7RnraREUIGeAICCIjYog6oFIobMO8QJQdTgOgRxg==
X-Google-Smtp-Source: ABdhPJzkGoZzX2Ea13sfbxh9fJjlucB4u97+AnawIq7QJYXp3vpx9Oym3h7u6P8c/hBOOGBRI3adZzncG/d6hrumElU=
X-Received: by 2002:ac8:acb:: with SMTP id g11mr2934341qti.388.1601949656209; Mon, 05 Oct 2020 19:00:56 -0700 (PDT)
MIME-Version: 1.0
References: <> <> <> <>
In-Reply-To: <>
From: Christopher Patton <>
Date: Mon, 5 Oct 2020 19:00:45 -0700
Message-ID: <>
To: "Michael D'Errico" <>
Cc: TLS List <>
Content-Type: multipart/alternative; boundary="00000000000034fdda05b0f6f82f"
Archived-At: <>
Subject: Re: [TLS] Un-deprecating everything TLS 1.2
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 06 Oct 2020 02:01:00 -0000

I agree that the HRR code path is hard to reason about, but I don't really
see an attack here. Is it your contention that the HRR code path leads to
an attack not accounted for by existing proofs?

I don't think this is likely. One way to think about this problem is as
follows [1]. Given an attacker that exploits the HRR code path, can you
efficiently construct an attacker that exploits a version of the protocol
without the HRR code path implemented? If the answer is "yes", and if we
assume the protocol is secure *without* the HRR code path implemented (as
asserted by a proof of security, say), it must be case that the protocol is
also secure *with* the HRR code path implemented.

Although I haven't studied this problem specifically ---  Dowling et al.
appear to address this problem, if only implicitly --- my intuition is that
the answer is "yes". The reason, loosely, is that the HRR code path doesn't
appear to depend on any ephemeral or long-term secret key material used by
the server for the core handshake. In particular, it doesn't depend on the
server's key share or signing key. This means that the adversary can
"simulate" any computation involving the HRR code path in its head, without
interacting with a real server. This observation ought to yield the
reduction I described above. Perhaps the spec is vague here, but if you
study any one of the high quality implementations that exist (openSSL,
boringSSL, NSS, Go's crypto/tls just to name a few), it won't be hard to
convince yourself that the HRR code path doesn't depend on secrets used in
the core handshake.

Chris P.


On Mon, Oct 5, 2020 at 2:47 PM Michael D'Errico <> wrote:

> On 10/5/20 10:21, Christopher Patton wrote:
> > A couple pointers for getting started:
> Thank you for providing these links!  I'm going through
> the first one now and will note that it does not even
> mention the HelloRetryRequest message.  So while I am
> confident there has been quite a bit of study of a
> ClientHello -> ServerHello handshake, there may not
> have been much study of ClientHello1 -> HelloRetryRequest
> -> ClientHello2 -> ServerHello handshakes.
> I'm especially concerned about the fact that a "stateless"
> server does not even remember what the ClientHello1 or
> HelloRetryRequest messages were when it receives the
> second ClientHello.  Load-balanced data centers seem to
> do this based on some of the discussion I've had this
> week.
> The protocol handles the missing ClientHello1 message by
> replacing it with hash-of-ClientHello1, but then you're
> supposed to rely on the client to tell you this value in
> its ClientHello2.  Even if nothing funny is happening,
> how is the (stateless) server supposed to put the
> HelloRetryRequest message in the Transcript-Hash?  Where
> does it get this value from if it's not also somehow in
> the "cookie" (which is how the client reminds the server
> of hash-of-ClientHello1)?
> And how would you put the HelloRetryRequest message into
> the cookie extension when the cookie itself is a part of
> the HelloRetryRequest?
> Just trying to imagine the code I'd have to write to do
> this correctly makes my head spin:
>    0)  [disable "TCP Fast Open" so I don't do lots of
>        processing without knowing there's a routable
>        address associated with the client]
>    1)  receive ClientHello1
>    2)  generate HelloRetryRequest message without cookie
>    3)  package ClientHello1 and HelloRetryRequest-minus-
>        cookie into a data structure, encrypt + MAC to
>        create a cookie
>    4)  insert the cookie into the HelloRetryRequest,
>        remembering to update the length of the extensions
>    5)  send HelloRetryRequest (with cookie) to client
>    6)  erase all memory of what just happened!!!
>    7)  receive ClientHello2
>    8)  ensure it has a cookie extension (well I should
>        at least remember the fact that I already sent a
>        HelloRetryRequest and not be completely stateless,
>        right?  Otherwise the client may be able to send
>        many ClientHelloN's without a cookie)
>    9)  check MAC on the cookie and if it's valid, decrypt
>        it to determine the contents of ClientHello1 and
>        the HelloRetryRequest (without cookie) messages
>    10) MAKE SURE ClientHello2 is valid according to what
>        was received in ClientHello1 (RFC 8446 has a list
>        of things a client is allowed to do; I would want
>        to check all of them, so a hash of ClientHello1
>        is inadequate in my opinion).  This seems to be a
>        necessary thing to do even for stateful servers.
>    11) Recreate the actual HelloRetryRequest message
>        that was sent to the client by putting the cookie
>        into HRR-minus-cookie (in the same place within
>        the list of extensions as was already done in step
>        4, but since we threw it away, do it again)
>    12) Hash the ClientHello1 and add this hash to the
>        Transcript-Hash along with the HelloRetryRequest
>        message
> And I didn't even handle the possibility of replay.........
> Can a cryptographer (I don't claim to be one) please take a
> few moments to look at the possibilities for a server which
> doesn't implement step 8 and allows multiple ClientHello's
> without a cookie on the same connection?  Or a server that
> doesn't put the entire ClientHello1 into the cookie and can
> not check whether ClientHello2 is conformant to the list of
> allowed changes?  Or a server that has to maybe "guess" the
> content of HelloRetryRequest based on ClientHello2 since it
> just sent hash-of-ClientHello1 in the cookie?  And if it
> guesses wrong and the Transcript-Hash ends up different
> from the client, the peers will not be able to communicate
> (denial of service to legitimate clients).
> Implementers -- how do you put a HelloRetryRequest message
> into the Transcript-Hash if you are "stateless" and threw
> it in the bin along with ClientHello1?
> Mike
> >  1. Check out Dowling et al.'s recent analysis. Published a month or
> >     so ago, it's the most recent proof of security of the full
> >     handshake (also includes PSK modes):
> >  2. Check out Paterson and van der Merwe's survey of the body of
> >     papers that helped to shape TLS 1.3. It also overviews the myriad
> >     attacks against TLS 1.2 and below that catalyzed a more proactive
> >     design approach for 1.3:
> >
> >
> > If you're unable to download the second (2.), the same paper appears
> > in a slightly different form in van der Merwe's PhD thesis.
> >
> > No analysis is perfect, but so far, 1.3 appears to be far superior to
> > 1.0-1.2.
> >
> > Best,
> > Chris P.