Re: [TLS] Is stateless HelloRetryRequest worthwhile? (was Re: TLS 1.3 Problem?)

Michael D'Errico <> Fri, 02 October 2020 18:17 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 815713A1664 for <>; Fri, 2 Oct 2020 11:17:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Status: No, score=-2.098 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, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key) header.b=i99zeJbR; dkim=pass (2048-bit key) header.b=i4Uj+NgQ
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id WxL_uMyvrciO for <>; Fri, 2 Oct 2020 11:17:01 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 3F2293A1663 for <>; Fri, 2 Oct 2020 11:17:00 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal []) by mailout.west.internal (Postfix) with ESMTP id 79272C44 for <>; Fri, 2 Oct 2020 14:16:59 -0400 (EDT)
Received: from imap21 ([]) by compute4.internal (MEProxy); Fri, 02 Oct 2020 14:16:59 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; h= mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm1; bh=ECrn+kazCmK3jIrKBepPm7AAbJw2J8Z hsJl7tfrZK6k=; b=i99zeJbR93HHfm4TWKLxte6yuYe3hD8iYpw7ZF4SBUFSSd5 3xKv3Pcr+y9yvjYEm5pasW4YUIa8gQlOQBy3hOKZAIBMyFj1d70+B9UtBIpcVchd 1yPULBtggei3ZXHDkm0jbRc7nGhDJWQnZar6AowP+qSOWb7ADc+XyvmEk4Q2MscQ UyM9F4pbQ8vs8D3pwJstWmH1xdO2fW/WptEwLfY3aQmwEj5/WOA61J4KgH+6U6Yt gPx3YXCO1ZZRKjqB6M2vZefNdLsZrsUtw2wsVbrvbyXbUrniAb9nVlgNyMPrt4Ry tC3T/nOm8fJ/PG9WY1TdT8EtNaK5miEH+mPPx3Q==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=ECrn+k azCmK3jIrKBepPm7AAbJw2J8ZhsJl7tfrZK6k=; b=i4Uj+NgQNSwdphv4sTfjYc sUVCuYH9sAhzQWNBBp4+YQbvS9iOwlL79bVWiR+11qdPCLYi46uMKJ5O96onL8jG sWx9rw1JdPFm7r6i4F2gwLIVm6LV+MFoWeJO05rGHQ6N/krlHbFcnDGPBNVD7cEL 94bkTddxcXkltRIAjwxQ/jggGA3pLQ2KXZUC3S2XsJ6jCjj/tBp8MxwqDtKBuqTc 6d+F/N8ClaF0rKgVX0OQHp8Wpy+uSm32be5TWkd8TYjhA8nWCIIZ+hceIdVwMmir JBKCeX3KFTwfDvecNLblbGUBdR+M7ylBVMLUYAzyV9R4q2k0/H+5vT39c/PVaNmQ ==
X-ME-Sender: <xms:mm53X0rnCBmnboZa72haFaVx8jh9aEjijOoSoXfBaNE_3AxfEvTIuA> <xme:mm53X6oSxVRJFYnu_i7sen-WmGKnDIsYPPfRi5Z7IvLJcUcMIBQ0MbBxtia4CJ7DU n_dW4wYOMr-HBGFYA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrfeeigdduvddvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderreejnecuhfhrohhmpedfofhitghhrggvlhcuffdkgfhrrhhitghofdcuoehmihhk vgdqlhhishhtsehpohgsohigrdgtohhmqeenucggtffrrghtthgvrhhnpeeludetffeivd ehgeeltdehleffkeelfedtheelkeeghefhffekgeelkeekudekueenucevlhhushhtvghr ufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihhkvgdqlhhishhtsehpoh gsohigrdgtohhm
X-ME-Proxy: <xmx:mm53X5MGxr4_-bt5FENx7OL9ppXpPyjskQScQGasQWeiyPXdbasxQg> <xmx:mm53X75KoPIEmHlZpgyllT2MHsKXYzQ4Nm3mw2ONnyfkA9TzbcNfSg> <xmx:mm53Xz5L0jj6jx1g93ASfqVA-_gAMnxYkKNFLXP0I16AKe4iUYVdPw> <xmx:m253X1Exz7EuaHbgR_xA-T1etps9WkXAeRdKw1hwfMjG96L8T8UCUA>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 92A67660069; Fri, 2 Oct 2020 14:16:50 -0400 (EDT)
X-Mailer: Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-382-ge235179-fm-20200928.002-ge2351794
Mime-Version: 1.0
Message-Id: <>
In-Reply-To: <>
References: <> <> <> <> <> <> <> <> <> <> <> <03ba01d6974e$ffaefe30$ff0cfa90$> <> <> <> <> <> <>
Date: Fri, 02 Oct 2020 14:15:48 -0400
From: "Michael D'Errico" <>
Content-Type: text/plain
Archived-At: <>
Subject: Re: [TLS] =?utf-8?q?Is_stateless_HelloRetryRequest_worthwhile=3F_=28?= =?utf-8?q?was_Re=3A_TLS_1=2E3_Problem=3F=29?=
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: Fri, 02 Oct 2020 18:17:03 -0000

> > You can't possibly implement [stateless HelloRetryRequest] the
> > way the spec suggests with just a hash in a HRR cookie extension. 
> The only thing the server needs to know is the hash of the ClientHello 
> (so it can restore the transcript hash) and that the server has already 
> sent a HelloRetryRequest (which it can detect by presence of the 
> cookie). The only argument I've seen made for what the spec suggests 
> not working is being able to verify which fields changed between 
> ClientHello1 and ClientHello2.

The server also needs to know the entire HelloRetryRequest message
since this goes into the Transcript Hash calculation:

  Transcript-Hash(ClientHello1, HelloRetryRequest, ... Mn) =
      Hash(message_hash ||        /* Handshake type */
           00 00 Hash.length  ||  /* Handshake message length (bytes) */
           Hash(ClientHello1) ||  /* Hash of ClientHello1 */
           HelloRetryRequest  || ... || Mn)

Many of the fields in HelloRetryRequest are fixed or predictable, but
the legacy_session_id_echo is not, for example.  Also, relying on the
client to remind you what the hash of ClientHello1 is seems extremely
"optimistic" (in my opinion).

> I see no language in RFC 8446 that the server MUST enforce that
> the ClientHello2 is conformant with respect to  ClientHello1.

It doesn't, and you could probably argue that the HelloRetryRequest
can be just a "do over" and let the client try again however it wants.

But if the server doesn't do 100% validation of the second ClientHello
as if it never received the first one, then there is room for mischief by
a "curious" client.