Re: [TLS] Server-side missing_extension MUSTs

David Benjamin <> Wed, 13 July 2016 14:44 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id C693512D94F for <>; Wed, 13 Jul 2016 07:44:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -3.986
X-Spam-Status: No, score=-3.986 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.287, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (1024-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id FomcTLYDC0HU for <>; Wed, 13 Jul 2016 07:44:10 -0700 (PDT)
Received: from ( [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id EFE0012D923 for <>; Wed, 13 Jul 2016 07:44:09 -0700 (PDT)
Received: by with SMTP id f6so45059698ith.0 for <>; Wed, 13 Jul 2016 07:44:09 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4aVmdtRfvYGziovRm77cZhHa9/zFY1yEum2Dm3Ae+O0=; b=ENBOYUcvKUnOMpawNLHhCU18Lfo/ZhDWjzTeVP0FeRKqD1EhfDXdRRCb4qCD0NPIQ2 5sKo5DGzjpARJYplwJtfkKq5Il/3jTxTIRYN+5LVEvUNrKcSeTXv/NvvV0a/UVHaXFzI hZhKVqJWxq3UuXI9u4ZCuOsp+6L8AYY2Q99fE=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4aVmdtRfvYGziovRm77cZhHa9/zFY1yEum2Dm3Ae+O0=; b=FZUuWkZnq6OcNKFOKtLQ0mbCEnyb138XN+5UQEm/U5ujOejLh3mlPptESZzSvo2lop 0MKCXSdKAZk3FPNwtwK2mD1/Hod6Q3cgs/1IM7GnbAiy6q9Mtgbw7C6vJKWxH5+akU5E 5ZA6V3knVCfA8w9asq43Z+ZGP6v451prcuMsrV8XDrwulNIOL0HbK4GTiAKZQ4Dtt8vl 2Ncv3S8LGIZUEojM1i502Ixu+X/5MYK0LPoZs+iBthzlhDOQiwb9iU5hUFq1QXdI+6Yu q9ldpt2KGS0iuB2EN7uFRmAMuZ1om4J9CzkCl2diyMXd8abHo6PDU23CXXSX7mwxxlPQ wNoA==
X-Gm-Message-State: ALyK8tJSYjtzgUIOha4ttVz8HwL6R8iP0+qWG0d3ZcHx5TIfG1AZZYa9r5B7FPk+TMxb9GnS5RMVtB7IXImbdj21
X-Received: by with SMTP id 132mr9853271itz.76.1468421048777; Wed, 13 Jul 2016 07:44:08 -0700 (PDT)
MIME-Version: 1.0
References: <> <> <> <> <>
In-Reply-To: <>
From: David Benjamin <>
Date: Wed, 13 Jul 2016 14:43:58 +0000
Message-ID: <>
To: Hubert Kario <>,
Content-Type: multipart/alternative; boundary="001a11446074ff91e80537856a01"
Archived-At: <>
Subject: Re: [TLS] Server-side missing_extension MUSTs
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: Wed, 13 Jul 2016 14:44:12 -0000

To be clear, I am not at all opposed to useful errors or strict policing of
what the peer sends. That's all great. Indeed the linked test below makes
use of more specific error codes than TLS provides. But I would like such
things to:

1. Be useful, either for debugging or because it rejects an invalid
handshake that would otherwise go unnoticed.
2. Come out naturally out of what the implementation would do anyway, to
keep complexity down.

I'm also quite okay with budging on #2 where #1 is strong. Complexity is
the currency we pay for adding things. But I do not think this particular
error code passes #1 (the special-case is not useful and such a peer would
not be able to handshake against correct implementations anyway), so I'm
not willing to sacrifice #2 for it.

On Wed, Jul 13, 2016 at 10:02 AM David Benjamin <>

> On Wed, Jul 13, 2016 at 3:31 AM Dave Garrett <>
> wrote:
>> To be clear though, completely mandatory extensions, at least as we're
>> doing them here, are a new thing. TLS 1.2 relied on separate messages for
>> stuff, but we're front-loading everything into the ClientHello to get
>> reliable 1RTT (with the exception of HRR).
> On Wed, Jul 13, 2016 at 8:12 AM Hubert Kario <> wrote:
>> On Wednesday 13 July 2016 05:23:53 David Benjamin wrote:
>> > I don't believe an implementation which fails to send supported_groups,
>> > etc., in 1.3 would ever leave a developer's workstation. It would not
>> > interoperate with anything.
>> it would interoperate with itself, and for some deployments that's enough
>> of a passing grade... (Even if you do interoperatbility testing you
>> do not check all possible permutations of features and settings)
>> I wholeheartedly agree with Dave here, error definitions should be strict
>> (both on the when and what to do). One, because it allows to better
>> diagnose (in general, maybe not in this specific situation) problems.
>> Two, because you can write a strict negative test case that actually
>> checks for it.
> Also something I have plenty of experience with. We're obsessive about
> adding this kind of test in BoringSSL[0]. :-)
> One doesn't need this alert to write a test for curve negotiation. Just
> test that the handshake hits the usual codepath for there not being a
> common cipher.
> This semi-mandatory extension isn't new in TLS 1.3, depending on your 1.2
> behavior. BoringSSL will already refuse to select an ECDHE cipher if
> supported_curves is missing. 1.2 does not require this, but we opted to do
> it for simplicity[1].
> David
> [0] If anyone wants to try, I'm sure there is an implementation-agnostic
> TLS protocol test suite one could extract out of that. It would take some
> wrangling as we cheat and condition on BoringSSL error codes, but the nice
> thing is I've already built up a large battery of tests here.
> [1] Previously we always picking our most preferred curve if the extension
> was missing, like OpenSSL. But now our most preferred curve is X25519, not
> P-256. It did not seem worth kludging that when we could just decline the
> cipher. No one's noticed, so I would say that worked.