Re: [TLS] Allow NamedGroups from the server?

Andrei Popov <Andrei.Popov@microsoft.com> Thu, 22 October 2015 17:06 UTC

Return-Path: <Andrei.Popov@microsoft.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 641931B39C8 for <tls@ietfa.amsl.com>; Thu, 22 Oct 2015 10:06:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.012
X-Spam-Level:
X-Spam-Status: No, score=-0.012 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-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 ztWJCeG3sijR for <tls@ietfa.amsl.com>; Thu, 22 Oct 2015 10:06:11 -0700 (PDT)
Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0137.outbound.protection.outlook.com [207.46.100.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 3D1981B39C9 for <tls@ietf.org>; Thu, 22 Oct 2015 10:06:07 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:To:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=Qtt8DvHJOejZCiv9HyWy0AIvOSHkoIRto0k2Y2yNLCk=; b=bOHx/GFhTiMza4KqV1Ii0PfsPemfVrX0vDSlT8K+w3QpTgEBw7reoOv4g/FYrJtAC6PGX8aXEEkdoWcuDdATrAup/GDDmAkSlUC/kt4zBoDmmswJowyo7WhBhVqTHlEJOXTPv7ay2slvfhdcT6/D/GaRauIT2bF7Saq76OLdf3o=
Received: from BLUPR03MB1396.namprd03.prod.outlook.com (10.163.81.142) by BLUPR03MB1395.namprd03.prod.outlook.com (10.163.81.141) with Microsoft SMTP Server (TLS) id 15.1.300.14; Thu, 22 Oct 2015 17:06:04 +0000
Received: from BLUPR03MB1396.namprd03.prod.outlook.com ([10.163.81.142]) by BLUPR03MB1396.namprd03.prod.outlook.com ([10.163.81.142]) with mapi id 15.01.0300.010; Thu, 22 Oct 2015 17:06:04 +0000
From: Andrei Popov <Andrei.Popov@microsoft.com>
To: Eric Rescorla <ekr@rtfm.com>, "mrex@sap.com" <mrex@sap.com>
Thread-Topic: [TLS] Allow NamedGroups from the server?
Thread-Index: AQHRDFwySYYLbapvF0OM4bIxRSdhpp52qJkAgAABqACAAM8DgIAACVYAgAA7XHA=
Date: Thu, 22 Oct 2015 17:06:04 +0000
Message-ID: <BLUPR03MB1396D9A28A7F73B21E6609728C270@BLUPR03MB1396.namprd03.prod.outlook.com>
References: <CABcZeBP-xz0UAyizac9ScxFjEbBkRYZ0CnY8xabEdtFONJf_sg@mail.gmail.com> <20151022125557.9B1651A31C@ld9781.wdf.sap.corp> <CABcZeBNikLAxO45+zryRjXD1f3jbKKjqbwtYWsVLqOjKAC9kHA@mail.gmail.com>
In-Reply-To: <CABcZeBNikLAxO45+zryRjXD1f3jbKKjqbwtYWsVLqOjKAC9kHA@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Andrei.Popov@microsoft.com;
x-originating-ip: [2001:4898:80e8::1d2]
x-microsoft-exchange-diagnostics: 1; BLUPR03MB1395; 5:lOJGU5TvLh7yoy3jmHuelhAIukzme+29w7psYtiY6FH1nauzMsYAlRx4MWteYGz2FZvwfRFo1MRcGq/4YhUo648D4h3V+Gztn3uQMLjtEQ263uOwtuRer8Rj3JgCRCdqMmKom6UCDtNvY4EbeDECQw==; 24:piCGiW6Z9Gcus4MbU63FE4O6WqKp0qPIlnelgBi2wu4inenk+0TQyB6FwSipVUqa4pXB2cn1CKPkipSS7ZgaGrg8jrzmuPBXhg/X2lwjQxY=; 20:BTMSNl9c5fRpTXc8FeG+KeISgR6stFZakgRogWM4Y+DU6KkbDosGxrjhvOa9lk3SC63auwg9nhVZz4+uLVt5xQ==
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1395;
x-microsoft-antispam-prvs: <BLUPR03MB139595F149DA8217793539278C270@BLUPR03MB1395.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(189930954265078)(108003899814671);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425024)(601004)(2401047)(520078)(5005006)(8121501046)(3002001)(102215026)(61426024)(61427024); SRVR:BLUPR03MB1395; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1395;
x-forefront-prvs: 0737B96801
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(199003)(24454002)(377454003)(189002)(60444003)(5002640100001)(19617315012)(15975445007)(5003600100002)(10090500001)(19580395003)(105586002)(87936001)(86362001)(77096005)(19300405004)(86612001)(106356001)(189998001)(102836002)(99286002)(2950100001)(19609705001)(2900100001)(74316001)(76576001)(92566002)(10290500002)(11100500001)(50986999)(5004730100002)(16236675004)(54356999)(5005710100001)(5007970100001)(8990500004)(19580405001)(101416001)(33656002)(10400500002)(97736004)(122556002)(106116001)(5001770100001)(19625215002)(2501003)(40100003)(81156007)(64706001)(46102003)(5001960100002)(5008740100001)(76176999)(7059030)(3826002); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1395; H:BLUPR03MB1396.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:23
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_BLUPR03MB1396D9A28A7F73B21E6609728C270BLUPR03MB1396namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Oct 2015 17:06:04.6829 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1395
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/g1ySc1qI2DOTmla_ndx0TAc6z1I>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Allow NamedGroups from the server?
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: Thu, 22 Oct 2015 17:06:15 -0000

Would the server-side “supported elliptic curves” be used for anything other than guiding client cert selection?

Cheers,

Andrei

From: TLS [mailto:tls-bounces@ietf.org] On Behalf Of Eric Rescorla
Sent: Thursday, October 22, 2015 6:29 AM
To: mrex@sap.com
Cc: tls@ietf.org
Subject: Re: [TLS] Allow NamedGroups from the server?



On Thu, Oct 22, 2015 at 5:55 AM, Martin Rex <mrex@sap.com<mailto:mrex@sap.com>> wrote:
Eric Rescorla wrote:
> Dave Garrett <davemgarrett@gmail.com<mailto:davemgarrett@gmail.com>> wrote:
>
>> On Wednesday, October 21, 2015 07:56:13 pm Eric Rescorla wrote:
>>> https://github.com/tlswg/tls13-spec/issues/292<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2fgithub.com%2ftlswg%2ftls13-spec%2fissues%2f292&data=01%7c01%7cAndrei.Popov%40microsoft.com%7c55fa019d2b514077868108d2dae4eab9%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=4FfUfD78WcOKL6JuvHQ4aX4jrXXR35XD858DhOTMkdc%3d>
>>>
>>> Presently, RFC 4492 only specifies the EC points it can support in
>>> ServerHello, but does not let the server indicate which EC curves it
>>> supports. Unless I'm missing something, this means that there's
>>> no way for the server to indicate what groups it would support.
>>>
>>> That seems less than ideal. There seem like three options here:
>>>
>>> 1. Put it in CertificateRequest
>>> 2. Send it in ServerHello
>>> 3. Do nothing.
>>
>> I prefer #2. I don't think encryption is necessarily required for this,
>> but EncryptedExtensions is fine too (Martin's 2b).
>>
>> I'm generally against putting it in CertificateRequest, as we're reusing
>> an existing hello extension so keeping it in a hello message (or it's
>> trailing encrypted field) seems best. (restricted to TLS 1.3+ clients,
>> though)
>
>
> This would need to be limited to 1.3 in any case because in all the other
> cases it would be illegal.


Why do you believe that it would be "illegal" for a TLSv1.[012] server
to return a "Supported Elliptic Curves" TLS extension in ServerHello
in response to the presence of such a TLS extension in ClientHello?

rfc4492 does not define semantics for the presence of "Supported Elliptic
Curves" TLS extension in ServerHello, but on a quick read, it also does
not prohibit including/sending it.

https://tools.ietf.org/html/rfc4492#section-5.2<https://na01.safelinks.protection.outlook.com/?url=https%3a%2f%2ftools.ietf.org%2fhtml%2frfc4492%23section-5.2&data=01%7c01%7cAndrei.Popov%40microsoft.com%7c55fa019d2b514077868108d2dae4eab9%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=jNoHM%2frP9jxkRUPFaIsSzXfJcVmBwnqNM8M7Nm2vtwc%3d>

Well, the draft says that it is defining two ClientHello extensions
(supported elliptic curves and supported point formats) and that it is defining
one ServerHello extension, so if the server is sending supported elliptic
curves it's doing something undefined. I don't think you need to have
an explicit prohibition to suggest that doing something undefined isn't
great.

From an implementation perspective, I wouldn't be surprised if client
implementations choked on the server sending this. I had to check
to see if NSS would do so. It doesn't, but given the way the code
is written, it wouldn't have surprised me if it checked that all extensions
were handled and choked otherwise.

-Ekr


-Martin