Re: [TLS] Limiting replay time frame of 0-RTT data

Erik Nygren <> Sun, 13 March 2016 02:49 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C4E7C12D952 for <>; Sat, 12 Mar 2016 18:49:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.349
X-Spam-Status: No, score=-2.349 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id b-hYbfeBtUEi for <>; Sat, 12 Mar 2016 18:49:41 -0800 (PST)
Received: from ( [IPv6:2607:f8b0:4003:c01::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 6000512D8AE for <>; Sat, 12 Mar 2016 18:49:41 -0800 (PST)
Received: by with SMTP id fz5so147523457obc.0 for <>; Sat, 12 Mar 2016 18:49:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=vVYEoWI2ALhJvHG5EO64To2iTiXR1+anMruJx8gDVMs=; b=x3Fk3NpufTpvtoe7ZADoNg4+19o492yBy0oGMv8QZewWrh28oHagTTpZRmmspACpw3 q2pVnqb9WL6X9GEsdcc7HpNBfdOVaGcoutoaAalpnG4arDWwDNlGf66uNaiLeUYRaSju 5zDJG6mCof2gt/UQTdoaZRsQCpK58BpcdamBwSYeDMNY4kf0aVUyKvEQWK17I3mxJBYT tfM2XGfCXm79XDWBnZNvIxjytnENCnOzjw6Me8YkI7c5Jlm+NzCdzRw5J2FcdR9/3GvC /Mb5frJEuMvrOV+Ukg6aTWerZcze+jGZzLIZC7wChU68eNGYZfBMhQPx0793jHbe2P5+ yTdg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=vVYEoWI2ALhJvHG5EO64To2iTiXR1+anMruJx8gDVMs=; b=JO6n4Br9eJlXuvZLGmDKz+8n6o5PgCCNhTN5iX+llzOtWC8fM6Rq+fTsA5cJ+xzGiw bacfeHsbKGvAJGUTPPMgyFEq0LFlAHjwVr7ERAKqC7hM2DxNbfPXV9HYoIAvUIHOxbAC YS032l6xd/gdY/9Z+uSptP80ONvtiRxzvwdmzIh8XmD6bHP3IrNqo39pmZXcxAmj/vHF Q0C2e8P3/JrecesgEL89SX415bPVzlqlfqmql49obu86rHxy3IpAENtB/9nG22rcvqhK lEWxPpp32btV4hUjLJJyntn/eH79EaCGByIXTj/8UALKno+m2CzLu40Z8ZecZLaicQCX Nvvw==
X-Gm-Message-State: AD7BkJIClyg2q/3jfRYX4hG3P8DyLmB1mW00bt15d8q6dfsWcyj2UPj1mcRZHYfnRd8LP00wJlcd5Be9pBrhZA==
MIME-Version: 1.0
X-Received: by with SMTP id q8mr9976329obf.67.1457837380751; Sat, 12 Mar 2016 18:49:40 -0800 (PST)
Received: by with HTTP; Sat, 12 Mar 2016 18:49:40 -0800 (PST)
In-Reply-To: <>
References: <> <>
Date: Sat, 12 Mar 2016 21:49:40 -0500
X-Google-Sender-Auth: 8CxVWqnnAkrGD7_f1OqHnLcH-IY
Message-ID: <>
From: Erik Nygren <>
To: Eric Rescorla <>
Content-Type: multipart/alternative; boundary=001a11c24b3838594e052de537a6
Archived-At: <>
Cc: "" <>
Subject: Re: [TLS] Limiting replay time frame of 0-RTT data
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." <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Sun, 13 Mar 2016 02:49:43 -0000

That does seem like a good idea to include a client time stamp in the 0RTT
flow to let the server force 1RTT in the case where this is too far off as
this bounds the duration of the replay window.  (I suspect we'll find a
whole range of other similar attacks using 0RTT.)  An encrypted client
timestamp could presumably be probed by the server.  (ie, if the server
response is a different size for timestamp-expired vs timestamp-not-expired
an attacker could keep probing until they change?)  That does seem like
more effort, however.


On Sat, Mar 12, 2016 at 7:56 AM, Eric Rescorla <> wrote:

> Hi Kyle,
> Clever attack. I don't think it would be unreasonable to put a low
> granularity time stamp in the
> ClientHello (and as you observe, if we just define it it can be done
> backward compatibly)
> or as you suggest, in an encrypted block. With that said, though couldn't
> you
> also just include the information in the HTTP header for HTTP? Do you
> think this is a sufficiently
> general issue that it merits a change to TLS.
> -Ekr
> On Fri, Mar 11, 2016 at 9:21 PM, Kyle Nekritz <> wrote:
>> Similar to the earlier discussion on 0.5-RTT data, I’m concerned with the
>> long term ability to replay captured 0-RTT early data, and the attack
>> vectors that it opens up. For example, take a GET request for an image to a
>> CDN. This is a request that seems completely idempotent, and that
>> applications will surely want to send as 0-RTT data. However, this request
>> can result in a few things happening:
>>     1) Resource unavailable
>>     2) Resource cached locally at edge cluster
>>     3) Cache miss, resource must be fetched from origin data center
>> #1 can easily be differentiated by the length of the 0.5-RTT response
>> data, allowing an attacker to determine when a resource has been
>> deleted/modified. #2 and #3 can also be easily differentiated by the timing
>> of the response. This opens up the following attack: if an attacker knows a
>> client has requested a resource X_i in the attacker-known set {X_1, X_2,
>> ..., X_n}, an attacker can do the following:
>>     1) wait for the CDN cache to be evicted
>>     2) request {X_1, X_2, …, X_(n/2)} to warm the cache
>>     3) replay the captured client early data (the request for X_i)
>>     4) determine, based on the timing of the response, whether it
>> resulted in a cache hit or miss
>>     5) repeat with set {X_1, X_2, …, X_(n/2)} or {X_(n/2 + 1), X_(n/2 +
>> 2), …, X_n} depending on the result
>> This particular binary search example is a little contrived and requires
>> that no-one else is requesting any resource in the set, however I think it
>> is representative of a significant new attack vector that allowing
>> long-term replay of captured early data will open up, even if 0-RTT is only
>> used for seemingly simple requests without TLS client authentication. This
>> is a much different threat than very short-term replay, which is already
>> somewhat possible on any TLS protocol if clients retry failed requests.
>> Given this, I think it is worth attempting to limit the time frame that
>> captured early data is useful to an attacker. This obviously doesn’t
>> prevent replay, but it can mitigate a lot of attacks that long-term replay
>> would open up. This can be done by including a client time stamp along with
>> early data, so that servers can choose to either ignore the early data, or
>> to delay the 0.5-RTT response to 1.5-RTT if the time stamp is far off. This
>> cuts down the time from days (until the server config/session ticket key is
>> rotated) to minutes or seconds.
>> Including the client time also makes a client random strike register
>> possible without requiring an unreasonably large amount of server-side
>> state.
>> I am aware that client time had previously been removed from the client
>> random, primarily due to fingerprinting concerns, however these concerns
>> can be mitigated by
>> 1) clients can choose to not include their time (or to include a random
>> time), with only the risk of their .5-RTT data being delayed
>> 2) placing the time stamp in an encrypted extension, so that it is not
>> visible to eavesdroppers
>> Note: it’s also useful for the server to know which edge cluster the
>> early data was intended for, however this is already possible in the
>> current draft. In ECDHE 0-RTT server configs can be segmented by cluster,
>> and with tickets, the server can store cluster information in the opaque
>> ticket.
>> _______________________________________________
>> TLS mailing list
> _______________________________________________
> TLS mailing list