Re: [TLS] Enforcing stronger server side signature/hash combinations in TLS 1.2

Andrei Popov <Andrei.Popov@microsoft.com> Thu, 23 March 2017 16:51 UTC

Return-Path: <Andrei.Popov@microsoft.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 A224C129A38 for <tls@ietfa.amsl.com>; Thu, 23 Mar 2017 09:51:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.02
X-Spam-Level:
X-Spam-Status: No, score=-2.02 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=microsoft.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 FbPdZll7FY3c for <tls@ietfa.amsl.com>; Thu, 23 Mar 2017 09:51:47 -0700 (PDT)
Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0122.outbound.protection.outlook.com [104.47.40.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 8FF2112999F for <tls@ietf.org>; Thu, 23 Mar 2017 09:51:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+D6iRsaEXOKw+Eir8KCsqPy9tIgOYS0Neu8a0yDNaa8=; b=g+aNukCp8o4DeEYu7TpPr3tf4ZPx6EYQahLaEsY3vf8XNwBcWRbXjtdTgyaidecv6PqJB6TTxW807rVOEo1ktpSitYc9O1517FfkGslOqvPCZOtDkB46vgmX2XyThguarZr19YiQKlAdPJ+u+C5RowVWpN7uA/VbgBvbso6UptE=
Received: from DM2PR21MB0091.namprd21.prod.outlook.com (10.161.141.14) by DM2PR21MB0091.namprd21.prod.outlook.com (10.161.141.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1005.2; Thu, 23 Mar 2017 16:51:46 +0000
Received: from DM2PR21MB0091.namprd21.prod.outlook.com ([10.161.141.14]) by DM2PR21MB0091.namprd21.prod.outlook.com ([10.161.141.14]) with mapi id 15.01.1005.002; Thu, 23 Mar 2017 16:51:46 +0000
From: Andrei Popov <Andrei.Popov@microsoft.com>
To: "Fries, Steffen" <steffen.fries@siemens.com>, TLS WG <tls@ietf.org>
Thread-Topic: [TLS] Enforcing stronger server side signature/hash combinations in TLS 1.2
Thread-Index: AdKj4jdTMGBzllsXQzCZ8vwWateOaAAAQFKAAAGKvAAAAHthAAACB/PQ
Date: Thu, 23 Mar 2017 16:51:46 +0000
Message-ID: <DM2PR21MB009159D219B9691EF67FD5568C3F0@DM2PR21MB0091.namprd21.prod.outlook.com>
References: <E6C9F0E527F94F4692731382340B337846DD1B@DENBGAT9EH2MSX.ww902.siemens.net> <4DD1F233-D659-4F79-9ADA-BC31A49DA653@dukhovni.org> <CABcZeBNu_9EHKWFzWFvtcUZ5GA5SQ8DbjHqEvn4yjBLH6=yuXg@mail.gmail.com> <E6C9F0E527F94F4692731382340B337846DE14@DENBGAT9EH2MSX.ww902.siemens.net>
In-Reply-To: <E6C9F0E527F94F4692731382340B337846DE14@DENBGAT9EH2MSX.ww902.siemens.net>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: siemens.com; dkim=none (message not signed) header.d=none;siemens.com; dmarc=none action=none header.from=microsoft.com;
x-originating-ip: [2001:4898:80e8:a::1d2]
x-microsoft-exchange-diagnostics: 1; DM2PR21MB0091; 7:fZHmojvc/ZvssBl84GwNZOMFNfBKF6jLfeTvvi+puMwxTnGxQCkz7rKW+8l1fCf8G3MyVhp6pMc0/sBigaE0MqxRYGF7pxBTVRv0AEzAAp6ODormnVPh47BYnHl5vWEeZuN4nbartOV+FiQGk7ocjb+FpHJy8satOcif3fRw8rRTavVUwGhehWvGFRTvheHJm3aj1HoroO9yyIu/LOQO7o/Tyh1GJ2avTOBx+nnM1+ElLV/l1DaZT9LP/om3NQ+6NUviIG6fujdq2KC1lZIrblot4slfZdu77xoPIqN5mR3nZvO1O2rcyZhWVym8/dtePEXHcttGc2h7AZl5+0YOETqAFMf0dV8hBCkuET24pDI=
x-ms-office365-filtering-correlation-id: 0cae8883-697f-432a-6696-08d4720ce452
x-ms-office365-filtering-ht: Tenant
x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254075)(48565401081); SRVR:DM2PR21MB0091;
x-microsoft-antispam-prvs: <DM2PR21MB0091463100B626702A4F6F068C3F0@DM2PR21MB0091.namprd21.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(192374486261705)(126837547833334)(155532106045638)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6040386)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006021)(93001021)(6055026)(61426038)(61427038)(6041248)(20161123555025)(20161123558025)(20161123564025)(20161123562025)(201703131423011)(201702281528011)(201703061421011)(201703061406011)(20161123560025)(6072148); SRVR:DM2PR21MB0091; BCL:0; PCL:0; RULEID:; SRVR:DM2PR21MB0091;
x-forefront-prvs: 0255DF69B9
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(39860400002)(39840400002)(39450400003)(39410400002)(39400400002)(39850400002)(24454002)(52314003)(377454003)(15404003)(7906003)(7736002)(33656002)(236005)(9686003)(606005)(790700001)(229853002)(102836003)(81166006)(189998001)(54356999)(2900100001)(10290500002)(19609705001)(6116002)(76176999)(25786009)(6306002)(99286003)(8936002)(53936002)(55016002)(54896002)(5005710100001)(50986999)(10090500001)(3660700001)(7696004)(9326002)(2906002)(38730400002)(5660300001)(86612001)(86362001)(2950100002)(6246003)(93886004)(77096006)(8676002)(3280700002)(6436002)(6506006)(53546009)(122556002)(74316002)(34023003); DIR:OUT; SFP:1102; SCL:1; SRVR:DM2PR21MB0091; H:DM2PR21MB0091.namprd21.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_DM2PR21MB009159D219B9691EF67FD5568C3F0DM2PR21MB0091namp_"
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 23 Mar 2017 16:51:46.1080 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR21MB0091
Archived-At: <https://mailarchive.ietf.org/arch/msg/tls/fH5lhszNl_SpRAIcTb0lxc-ozzk>
Subject: Re: [TLS] Enforcing stronger server side signature/hash combinations in TLS 1.2
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.22
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, 23 Mar 2017 16:51:51 -0000

Hi Steffen,

You’re stepping on a sore point for this WG☺. Based on the strict interpretation of the TLS 1.2 RFC, your conclusions are correct.
If a TLS1.2 client does not send the signature algorithms extension (or the extension does not include SHA256), a compliant TLS 1.2 server with a SHA256 certificate has no choice but terminate the handshake.

Unfortunately, in practice there are TLS 1.2 clients that support SHA256, but don’t advertise it via the signature algorithms extension. Some of their implementers will argue that extensions are, by definition, optional functionality. Or that a TLS client may not have insight into its PKI library’s capabilities. Or that a TLS server is has no say in what certificate to use.

Be that as it may, from the server’s perspective, this strict compliance with the RFC reduces interoperability without a clear security gain. A server that favors interoperability over RFC compliance would send its SHA256 cert anyway, and let the client terminate the handshake. This is a change I made (rather reluctantly) in the latest versions of Windows.

Cheers,

Andrei

From: TLS [mailto:tls-bounces@ietf.org] On Behalf Of Fries, Steffen
Sent: Thursday, March 23, 2017 8:37 AM
To: TLS WG <tls@ietf.org>
Subject: Re: [TLS] Enforcing stronger server side signature/hash combinations in TLS 1.2

Hi Erik,

based on your reply my conclusion is that

-          there is no (standard compliant) way for a server to use a SHA256 based certificate for server side authentication in cases where the client does not provide the signature_algorithm extension

-          clients should always use the signature algorithm extension to ensure the server can apply a certificate with the appropriate crypt algorithms

Best regards
Steffen

On Thu, Mar 23, 2017 at 7:39 AM, Viktor Dukhovni <ietf-dane@dukhovni.org<mailto:ietf-dane@dukhovni.org>> wrote:

> On Mar 23, 2017, at 10:31 AM, Fries, Steffen <steffen.fries@siemens.com<mailto:steffen.fries@siemens.com>> wrote:
>
> According to  TLS 1.2 section 7.4.1.4.1. a client may use the
> signature_algorithm extension to signal any combinations the
> client supports, listed in the order of preferences.

The signature algorithm is primarily about signatures made as part
of the TLS handshake, and not so much signatures in certificates.

This does not seem consistent with https://tools.ietf.org/rfcmarkup?doc=5246#section-7.4.2

"If the client provided a "signature_algorithms" extension, then all certificates provided by
the server MUST be signed by a hash/signature algorithm pair that appears in that extension."

I appreciate that there are people who feel that this rule is bad, and
to some extent it has been relaxed in 1.3, but I think the text is
pretty clear here.


> If the client does not use this extension, the server must use the
> signature algorithm in combination with SHA1.

For signing the TLS key exchange, however, it should still present
whatever certificate chain it has, even if that chain employs SHA256.
It is exceedingly unlikely these days that a client will not support
SHA256 signatures in the certificate chain.

Yes, that's generally true. Though a TLS 1.2 client which does not offer SHA-256
in its ClientHello but accepts SHA-256 is broken. So, this should generally
only happen with TLS 1.1 and below.



> Unfortunately the server is not allowed to use this extension, otherwise
> he could tell the client his preferences according to his security policy.

The protocol (as it should) lacks the additional round-trips necessary for
the server to initiate signature algorithm negotiation.

I'm not sure quite what the OP Is trying to achieve here. For certificates offered
by the server, the client just tells you what algorithms it will accept for no negotiation
is needed. For certificates offered by the client, the server tells the client
what algorithms it will accept in the CertificateRequest.
https://tools.ietf.org/rfcmarkup?doc=5246#section-7.4.4

-Ekr