Re: [TLS] PR for anti-downgrade mechanism

Dave Garrett <davemgarrett@gmail.com> Sat, 17 October 2015 21:34 UTC

Return-Path: <davemgarrett@gmail.com>
X-Original-To: tls@ietfa.amsl.com
Delivered-To: tls@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AFBFB1B2A4E for <tls@ietfa.amsl.com>; Sat, 17 Oct 2015 14:34:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] autolearn=ham
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 Y6IGWkYP0gnw for <tls@ietfa.amsl.com>; Sat, 17 Oct 2015 14:34:29 -0700 (PDT)
Received: from mail-qg0-x236.google.com (mail-qg0-x236.google.com [IPv6:2607:f8b0:400d:c04::236]) (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 49DCD1B2A1A for <tls@ietf.org>; Sat, 17 Oct 2015 14:34:29 -0700 (PDT)
Received: by qgez77 with SMTP id z77so128426129qge.1 for <tls@ietf.org>; Sat, 17 Oct 2015 14:34:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=YC3asJQV1rQoLjn8RVOC/a62IOT0n5WLBhUuTwbt158=; b=owYyiJtUQyqDKK+YU4ecjwrqxV2BcDuEleCsayuj8XVe+9MQKug3LsGMFP4MjRdXeb U+SV0+ynODp9wHkL0JjVz/WVGNVlbZDKR2vk7MElg65ZVrXJQr2W+LcWOn4erzVFEW3Z f59hVPNbka6xz2StSJvAd76C6lXGuvj1KeuXboZln9I4CBaL13mVkIxAHFDJGtLYsTZa WYQkft2alx9Z6JtlvxG9sRfV8RMZOaz59lK2D6ugIsb4A4KkVlTP9FUzyPbCvL6ay8Go J9M6U+4jeGhGoZRo9kmyWlO7uxJOrfzIgKINPII9pRpbyToAm/gQ7McOrfFjcFyQ+rN4 29eA==
X-Received: by 10.140.237.14 with SMTP id i14mr28544412qhc.28.1445117668528; Sat, 17 Oct 2015 14:34:28 -0700 (PDT)
Received: from dave-laptop.localnet (pool-72-94-152-197.phlapa.fios.verizon.net. [72.94.152.197]) by smtp.gmail.com with ESMTPSA id 28sm10913363qkw.12.2015.10.17.14.34.27 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sat, 17 Oct 2015 14:34:27 -0700 (PDT)
From: Dave Garrett <davemgarrett@gmail.com>
To: Eric Rescorla <ekr@rtfm.com>
Date: Sat, 17 Oct 2015 17:34:26 -0400
User-Agent: KMail/1.13.5 (Linux/2.6.32-74-generic-pae; KDE/4.4.5; i686; ; )
References: <CABcZeBOB9mnQ8bLOCSysnx9LMv0hxrPCA21jTnxAMb3Yom_Aow@mail.gmail.com> <201510171708.16547.davemgarrett@gmail.com> <CABcZeBOzJkdjC-NnjPcHtoU_6rmEMPqj4Y7xKuA=CHZLT9r49w@mail.gmail.com>
In-Reply-To: <CABcZeBOzJkdjC-NnjPcHtoU_6rmEMPqj4Y7xKuA=CHZLT9r49w@mail.gmail.com>
MIME-Version: 1.0
Content-Type: Text/Plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
Message-Id: <201510171734.26589.davemgarrett@gmail.com>
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/ytoVIl9Nvim3v5oEvSec52C-Vls>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] PR for anti-downgrade mechanism
X-BeenThere: tls@ietf.org
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." <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: Sat, 17 Oct 2015 21:34:30 -0000

On Saturday, October 17, 2015 05:16:49 pm Eric Rescorla wrote:
> On Sat, Oct 17, 2015 at 2:08 PM, Dave Garrett <davemgarrett@gmail.com>
> wrote:
> 
> > On Saturday, October 17, 2015 03:10:18 pm Martin Thomson wrote:
> > > The observation is still valuable in the sense that prohibiting values
> > > > 1.3 would reduce the likelihood of a false positive by some
> > > miniscule amount.  In other words, I agree with ekr here, though we
> > > could cap the value to 1.3.
> > >
> > > Maybe we could just define two values: one for TLS 1.3 (and greater,
> > > presumably) and one for TLS 1.2.  I don't see any value in protecting
> > > 1.1 or 1.0 from downgrade any more given relative prevalence of those
> > > protocols and their age.
> >
> > Two values seems like a good compromise to me if one isn't considered
> > sufficient. I don't particularly want them changing in the future so old
> > (e.g. TLS 1.3, in a future with TLS 1.4+) implementations don't need to
> > worry about seeing something new here and making a mistake. Checks would be
> > for one of two 64-bit values, rather than 56-bit values with a byte with a
> > possibly unknown value
> 
> 
> My assumption here was that the client would do the following:
> 
> 1. Look to see if the server negotiated its highest version. If so, then
> all is good.
> 2. If the server did not negotiate the highest version, then look for the
> sentinel.
>     If it's set, you have a downgrade.
> 3. (Optional) If you have a downgrade, parse the last byte to see the
> server's actual version.
>     In any case, abort.
> 
> What have I missed?

A 64-bit sentinel can be trivially checked as a 64-bit uint. If we have an open-ended series, we could have implementations checking for a set of 64-bit integers rather than a 56-bit followed by another byte to be inspected. I'm being paranoid, yes, but it's simpler just to have a round number bits value or two and I don't think you get much by encoding further information.

It also has a slightly better collision risk, though it's already down quite low.


Dave