Re: [TLS] (no subject)
Eric Rescorla <ekr@rtfm.com> Thu, 09 March 2017 01:29 UTC
Return-Path: <ekr@rtfm.com>
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 7664D12953C
for <tls@ietfa.amsl.com>; Wed, 8 Mar 2017 17:29:48 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.598
X-Spam-Level:
X-Spam-Status: No, score=-2.598 tagged_above=-999 required=5
tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, URIBL_BLOCKED=0.001]
autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key)
header.d=rtfm-com.20150623.gappssmtp.com
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 M7SbTYLRWar3 for <tls@ietfa.amsl.com>;
Wed, 8 Mar 2017 17:29:46 -0800 (PST)
Received: from mail-yw0-x235.google.com (mail-yw0-x235.google.com
[IPv6:2607:f8b0:4002:c05::235])
(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 D66331295D3
for <tls@ietf.org>; Wed, 8 Mar 2017 17:29:45 -0800 (PST)
Received: by mail-yw0-x235.google.com with SMTP id o4so1463451ywd.3
for <tls@ietf.org>; Wed, 08 Mar 2017 17:29:45 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=rtfm-com.20150623.gappssmtp.com; s=20150623;
h=mime-version:in-reply-to:references:from:date:message-id:subject:to;
bh=8nHIoUhWVVm8LtDZCDGNkOcUxFricNV2onfLxWLqOtQ=;
b=HZNdjYaBSdBgbYypaLyaVw3vuXYZ6Giu0Q3lQTaDpuzX8IOa7WuX/IMBTJ8Jf+V9DR
xT1+24MQuLVtCkZJQ55Lbe9SN2yRXVoeQps6kT+R1dCbCbyvDcss/qiHhddF8upSKgbj
5vER9fZxMxbWo4aRoWO2ZYWOckOWrYplkJwioefdGtYNQzC1ZhuXvVZpe2i2BYsNaL+G
dzEeiumeHWOzR0o9E3zPI5RgOsGA0I4LDdeuFU3peOgNeHbL6Gv2XXamv5f9Ee2kN0qh
5Ve/lPF+yh+jPWmUmk9XtpseBmVdqRnitKGIL95Wz76XM7WGHY9guwZCZ/1Mh6JjOiIh
S7Gg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:mime-version:in-reply-to:references:from:date
:message-id:subject:to;
bh=8nHIoUhWVVm8LtDZCDGNkOcUxFricNV2onfLxWLqOtQ=;
b=IPqLc/Z5KSZXTMxJyuCxI+YW8R9b97LM8tr5I4+edeWBAuD6RoLmb3BK9hLvlE6qNk
KK0oi2qe7Y5KiHilaJ3v4VfkhV7UvXr1VdQEk3jT62k5FuqPIEp23gWhrVo3oXmxUw5F
Cvhm2P2rZY48CAqNnFRWjIbA0V4ZHQzNsi+nrfPeehoUe+pqTuyUCSHMLhM0Nzp8V2G9
TakxMra0dMDNMTMhcXbdZ+2KNZ7PIepNXZLHCViLt2bgigaPdrKyOBKFnZV0mmk9jdx1
A+5/zSuj+V/yWSNQMMp0sW0xjJuqGXX3DUqY6jBjgFzz80HFWHyL5lXBqU6X5U2eQ9kt
3Www==
X-Gm-Message-State: AMke39mSxZk9Wys15lqzyNtaAAijEXB9hAoZxcNMK16OizhHUA977oqYjveel4EXfRuk08Pj3n/CYKVHj98SIw==
X-Received: by 10.129.125.5 with SMTP id y5mr2317723ywc.120.1489022984781;
Wed, 08 Mar 2017 17:29:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.129.154.210 with HTTP; Wed, 8 Mar 2017 17:29:04 -0800 (PST)
In-Reply-To: <CABcZeBN_orTCuVoqg_KRQqRBvMXNzp=yT64W=d2M3D8r2=uoKg@mail.gmail.com>
References: <CABcZeBN_orTCuVoqg_KRQqRBvMXNzp=yT64W=d2M3D8r2=uoKg@mail.gmail.com>
From: Eric Rescorla <ekr@rtfm.com>
Date: Wed, 8 Mar 2017 17:29:04 -0800
Message-ID: <CABcZeBO84CxvAfvYKAZ1Q+hZYKZR-Hkgm9yMRcjKsjp4+S47Ow@mail.gmail.com>
To: "tls@ietf.org" <tls@ietf.org>
Content-Type: multipart/alternative; boundary=001a11493644122545054a422e7a
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/bsXLQfdu-hauHShrFhO1r1a61bk>
Subject: Re: [TLS] (no subject)
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: Thu, 09 Mar 2017 01:29:48 -0000
Based on people's seeming mild preference for option #1, I have produced: https://github.com/tlswg/tls13-spec/pull/901 I'll merge this tomorrow absent some loud screaming. -Ekr On Thu, Feb 9, 2017 at 1:17 PM, Eric Rescorla <ekr@rtfm.com> wrote: > Hi folks, > > We need to close on an issue about the size of the > state in the HelloRetryRequest. Because we continue the transcript > after HRR, if you want a stateless HRR the server needs to incorporate > the hash state into the cookie. However, this has two issues: > > 1. The "API" for conventional hashes isn't designed to be checkpointed > at arbitrary points (though PKCS#11 at least does have support > for this.) > 2. The state is bigger than you would like b/c you need to store both > the compression function and the "remainder" of bytes that don't > fit in [0] > > Opinions differ about how severe all this is, but it's certainly > unaesthetic, and it would be nice if the state that was stored in > the HRR cookie was just a hash output. There seem to be three > major approaches for this (aside from "do nothing"). > > 1. Special case HRR and say that the transcript is either > > CH || SH .... (no HRR) > > or > > Hash(CH1) || HRR || CH ... (HRR) [1] > > > 2. Pre-hash the messages, so that the handshake hash > becomes: > > Handshake_hash_N = Hash(Hash(msg_1) || Hash(msg_2) > ... Hash(msg_N)) > > 3. Recursively hash, so that the handshake hash becomes: > > Handshake_hash_N= Hash(Handshake_hash_N-1 || msg_N) > > [As Antoine Delignat-Lavaud points out, this is basically making > a new Merkle-Damgard hash with H as the compression function.] > > > I've posted PR#876, which implements version #2, but we could do any one > of the three. > and they all have the same state size. The argument for #1 seems to be > that it's the minimal change, and also the minimal overhead, and the > argument against is that it's non-uniform because CH1 is treated > differently. We might imagine making it seem more uniform by also > hashing HRR but that doesn't make the code any simpler. Versions #2 > and #3 both are more uniform but also more complicated changes. > > The arguments for #2 versus #3 are that #3 is somewhat faster > (consider the case where you have a short message to add, #2 always > needs to run the compression function twice whereas #3 can run it > once). However, with #3 it is possible to take a hash for an unknown > transcript and create a new hash that matches that unknown transcript > plus an arbitrary suffix. This is already a property of the M-D > hashes we are using but it's worse here because those hashes add > padding and length at the end before finalizing, so an extension > wouldn't generally reflect a valid handshake transcript, whereas in > this case you get to append a valid message, because the padding is > added with every finalization stage. I don't know of any reason > why this would be a security issue, but I don't have any proof it's > not, either. > > I'd like to get the WG's thoughts on how to resolve this issue over the > next > week or so so we can close this out. > > -Ekr > > [0] The worst-case overhead for SHA-256 is > 64 bytes and for SHA-512 > it’s > 128 bytes. The average is half that. > > [1] We actually need to do something to make it injective, because > H(CH1) might look like a handshake message, but that should be easy. > > > > _______________________________________________ > TLS mailing list > TLS@ietf.org > https://www.ietf.org/mailman/listinfo/tls > >
- [TLS] (no subject) Eric Rescorla
- Re: [TLS] (no subject) Kyle Nekritz
- Re: [TLS] (no subject) Dr Stephen Henson
- Re: [TLS] (no subject) Eric Rescorla
- Re: [TLS] (no subject) Eric Rescorla
- Re: [TLS] (no subject) Hubert Kario
- Re: [TLS] (no subject) Ilari Liusvaara
- Re: [TLS] (no subject) Eric Rescorla