Re: [TLS] Deprecate SHA1 for signatures in TLS 1.3 (was Re: TLS 1.3 draft-07 sneak peek)

Andrei Popov <Andrei.Popov@microsoft.com> Wed, 08 July 2015 18:09 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 F0E2C1A6F03 for <tls@ietfa.amsl.com>; Wed, 8 Jul 2015 11:09:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.902
X-Spam-Level:
X-Spam-Status: No, score=-1.902 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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 1ZOjuD-AeBL0 for <tls@ietfa.amsl.com>; Wed, 8 Jul 2015 11:08:58 -0700 (PDT)
Received: from na01-by2-obe.outbound.protection.outlook.com (mail-by2on0134.outbound.protection.outlook.com [207.46.100.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C46BD1A6F02 for <tls@ietf.org>; Wed, 8 Jul 2015 11:08:55 -0700 (PDT)
Received: from BLUPR03MB1396.namprd03.prod.outlook.com (10.163.81.142) by BLUPR03MB1394.namprd03.prod.outlook.com (10.163.81.140) with Microsoft SMTP Server (TLS) id 15.1.207.19; Wed, 8 Jul 2015 18:08:53 +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.0207.004; Wed, 8 Jul 2015 18:08:53 +0000
From: Andrei Popov <Andrei.Popov@microsoft.com>
To: "mrex@sap.com" <mrex@sap.com>, Dave Garrett <davemgarrett@gmail.com>
Thread-Topic: [TLS] Deprecate SHA1 for signatures in TLS 1.3 (was Re: TLS 1.3 draft-07 sneak peek)
Thread-Index: AQHQuMqGail83kPeBUGeFeksHA1hqJ3QLTyAgAAI+QCAAAQ1gIAADWmAgAA2FYCAAVxcgIAAAVqAgAAEyoCAAAAu4A==
Date: Wed, 08 Jul 2015 18:08:53 +0000
Message-ID: <BLUPR03MB1396BD991E9DBE5F8EDF58D88C910@BLUPR03MB1396.namprd03.prod.outlook.com>
References: <201507081350.39322.davemgarrett@gmail.com> <20150708180747.8C9B11A1C7@ld9781.wdf.sap.corp>
In-Reply-To: <20150708180747.8C9B11A1C7@ld9781.wdf.sap.corp>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
authentication-results: sap.com; dkim=none (message not signed) header.d=none;
x-originating-ip: [2001:4898:80e8:ee31::5]
x-microsoft-exchange-diagnostics: 1; BLUPR03MB1394; 5:rkw2EfCkTRlJOwikPhA0WIBbidWKZbS9D0ltCp6wKSnqyI7gflR3FIfqDjXzZLZT7TlGJto+aAIuHF3aroC7iGQ9U+O7wKu/VKphKEqqj5hqpSNR41qJfYpZDfRrJIwjaM6AQuyT8FgZg6rnfxd3Jw==; 24:p+lHLTUJbCYZnY7cPsHt8HA+C8vbgCnMLT+FvdM7Mno2uvZT9rqhHKUCBy9Eb665E9t/uo4W8k7luMsGuCBgoYaltCCNCOAtQRpoNxB6C4A=; 20:7zo5powz0l/UhZH4rjqh1EK2+j6jJ9gQwTgrxrXc0Q9ichRg2vCjs5+Zq78tu6AWFZo/wq87ih3XQ9GttD0XKA==
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BLUPR03MB1394;
x-microsoft-antispam-prvs: <BLUPR03MB13948A6BFA0F7E2F2B40AC728C910@BLUPR03MB1394.namprd03.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:;
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401001)(5005006)(3002001); SRVR:BLUPR03MB1394; BCL:0; PCL:0; RULEID:; SRVR:BLUPR03MB1394;
x-forefront-prvs: 0631F0BC3D
x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(51704005)(377454003)(24454002)(13464003)(46102003)(122556002)(62966003)(189998001)(87936001)(50986999)(5003600100002)(86362001)(77096005)(76576001)(74316001)(5002640100001)(40100003)(5001960100002)(2900100001)(15975445007)(77156002)(102836002)(106116001)(2656002)(5001770100001)(2501003)(86612001)(92566002)(19580395003)(33656002)(54356999)(76176999)(19580405001)(7059030)(3826002)(19627235001); DIR:OUT; SFP:1102; SCL:1; SRVR:BLUPR03MB1394; H:BLUPR03MB1396.namprd03.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en;
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginatorOrg: microsoft.com
X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jul 2015 18:08:53.3815 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR03MB1394
Archived-At: <http://mailarchive.ietf.org/arch/msg/tls/kns5V9Z6x4r1R696kj0hNmYDpDo>
Cc: "tls@ietf.org" <tls@ietf.org>
Subject: Re: [TLS] Deprecate SHA1 for signatures in TLS 1.3 (was Re: TLS 1.3 draft-07 sneak peek)
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: Wed, 08 Jul 2015 18:09:01 -0000

For context: on multiple threads, Martin has repeatedly brought up the fact that schannel complies with section 7.4.1.4.1 "Signature Algorithms" of RFC 5246, which says:

"   If the client does not send the signature_algorithms extension, the
   server MUST do the following:

   -  If the negotiated key exchange algorithm is one of (RSA, DHE_RSA,
      DH_RSA, RSA_PSK, ECDH_RSA, ECDHE_RSA), behave as if client had
      sent the value {sha1,rsa}.

   -  If the negotiated key exchange algorithm is one of (DHE_DSS,
      DH_DSS), behave as if the client had sent the value {sha1,dsa}.

   -  If the negotiated key exchange algorithm is one of (ECDH_ECDSA,
      ECDHE_ECDSA), behave as if the client had sent value {sha1,ecdsa}."

This means that e.g. if IIS only has a SHA256 cert, and the client offers TLS1.2 and no signature_algorithms extension, IIS will indeed fail the handshake.

It is possible that we might improve the product by not complying with section 7.4.1.4.1 of RFC 5246 in a future release, but currently schannel does comply.

Cheers,

Andrei

-----Original Message-----
From: TLS [mailto:tls-bounces@ietf.org] On Behalf Of Martin Rex
Sent: Wednesday, July 8, 2015 11:08 AM
To: Dave Garrett
Cc: tls@ietf.org
Subject: Re: [TLS] Deprecate SHA1 for signatures in TLS 1.3 (was Re: TLS 1.3 draft-07 sneak peek)

Dave Garrett wrote:
> Martin Rex wrote:
>> Unfortunately, a non-marginal installed base is exhibiting this 
>> self-imposed (mis)behaviour of connection failure: Microsoft SChannel 
>> beginning with Windows 7 / 2008R2 (aka WinNT 6.1), and Windows 8 / 
>> 2012 and Windows 8.1 / 2012R2 exhibit the same (mis)behaviour.
>> 
>> When you install a server certificate with a sha256WithRsaEncryption 
>> signature on a Microsoft IIS on one of these platforms, enable 
>> TLSv1.2 on the server and try to connect with an extension-free 
>> ClientHello that offers client_version= (3,3), you will face a 
>> connection failure (IIS simply closes the network connection--IIS is 
>> notorious in failing to put fatal alerts on the wire).
>> 
>> The handshake succeeds (with TLSv1.1) if the client offers at most 
>> TLSv1.1, or if the client offers TLSv1.2 in a SSL Version2 
>> CLIENT-HELLO rather than an extensionless TLS ClientHello, if TLSv1.2 
>> is disabled on IIS, or if a server certificate with only sha1WithRsaEncryption ist used.
> 
> To clarify, how does this scenario respond with a TLS 1.2 ClientHello 
> with at least one extension? Does it matter what extension(s)?
> (e.g. does IIS have to know what it is?)


The issue here is the (lack of the) TLSv1.2 signature_algorithms extension.

Windows SChannel appears to treat the absence of this extension the same as the presence of an extension with (md5,rsa) (sha1,rsa) (sha1,dsa)

If you send the TLSv1.2 signature_algorithms extension with the algorithm matching the signature of the server certificate, e.g. (sha256,rsa) in the above example, then a TLSv1.2 handshake will succeed.


Correcting a slight inaccuracy above:  when the server certificate is signed with sha1WithRsaEncryption, the handshake will succeed with TLSv1.2.

When an SSLv2 ClientHello offering TLSv1.2 is sent, the TLS handshake will succeed independent of the signature on the IIS server certificate, but the server will pick only TLSv1.1 rather than TLSv1.2.


-Martin

_______________________________________________
TLS mailing list
TLS@ietf.org
https://www.ietf.org/mailman/listinfo/tls