Re: [TLS] What does it mean to not include 0-RTT message in the handshake hash?

Ilari Liusvaara <> Fri, 25 December 2015 08:04 UTC

Return-Path: <>
Received: from localhost ( []) by (Postfix) with ESMTP id 92B381A8989 for <>; Fri, 25 Dec 2015 00:04:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -1.91
X-Spam-Status: No, score=-1.91 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id JUQn6mYEiLMm for <>; Fri, 25 Dec 2015 00:04:21 -0800 (PST)
Received: from ( []) by (Postfix) with ESMTP id 436801A8988 for <>; Fri, 25 Dec 2015 00:04:20 -0800 (PST)
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1E830237B; Fri, 25 Dec 2015 10:04:19 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at
Received: from ([IPv6:::ffff:]) by localhost ( [::ffff:]) (amavisd-new, port 10024) with ESMTP id 4lS2pIH1JaF2; Fri, 25 Dec 2015 10:04:18 +0200 (EET)
Received: from LK-Perkele-V2 ( []) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPSA id B540D138; Fri, 25 Dec 2015 10:04:18 +0200 (EET)
Date: Fri, 25 Dec 2015 10:04:18 +0200
From: Ilari Liusvaara <>
To: Eric Rescorla <>
Message-ID: <>
References: <> <> <> <> <>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <>
User-Agent: Mutt/1.5.24 (2015-08-30)
Archived-At: <>
Cc: "" <>
Subject: Re: [TLS] What does it mean to not include 0-RTT message in the handshake hash?
X-Mailman-Version: 2.1.15
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, 25 Dec 2015 08:04:23 -0000

On Thu, Dec 24, 2015 at 08:08:25PM -0500, Eric Rescorla wrote:
> On Thu, Dec 24, 2015 at 5:48 PM, Dave Garrett <>
> wrote:
> >
> > This last bit stops this, yes. I would prefer the spec say this very
> > explicitly, as right now it doesn't and all I see is a line saying:
> > "If any of these checks fail, the server MUST NOT respond with the
> > extension and must discard all the remaining first flight data (thus
> > falling back to 1-RTT)."
> Well, this is a general requirement any time the record MAC is bad:
> See
> "If the decryption fails, a fatal “bad_record_mac” alert MUST be generated."
> > The current text doesn't explicitly say how to handle 0-RTT data that it
> > thinks it should be able to decrypt but can't. After rereading things a bit
> > I think you're correct in that the correct course of action the spec
> > currently expects is to abort, however implementers frequently err on the
> > side of working partially vs not at all when given any wiggle room. A clear
> > hard "MUST abort" on failed decrypt of 0RTT data would deal with this and
> > avoid any other possible misunderstanding. Either do or do not; no try.
> >
> If you have suggested text, I'd be happy to see a PR.

Except that when server is doing 1RTT fallback and skipping 0-RTT data,
then records that get deprotect failure (is that the proper term?) are
ignored instead of generating bad_record_mac like "normal" deprotect
failure would.

Then there's also the case where server is skipping 0-RTT data for retry
(there one can recognize end of data from content-type 23 changing back
to 22).

Then one has to ensure that configuration_id's are never reused: If
client and server disagree about server-valid configuration, the result
can easily be hard failure (instead of fallback).

One server-side trick to ensure non-reuse would be to hash the server
certificate and the configuration messages (with configuration_id being
zeroes of approriate length) using e.g. SHA-256 and then use the resulting
hash as configuration_id.