Re: [TLS] Enforcing keyUsage restrictions (was Re: Safe ECC usage)

Santosh Chokhani <SChokhani@cygnacom.com> Sat, 12 October 2013 01:16 UTC

Return-Path: <SChokhani@cygnacom.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 654B811E80FE for <tls@ietfa.amsl.com>; Fri, 11 Oct 2013 18:16:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Wli8REjON2CO for <tls@ietfa.amsl.com>; Fri, 11 Oct 2013 18:16:00 -0700 (PDT)
Received: from ipedge1.cygnacom.com (ipedge1.cygnacom.com [216.191.252.12]) by ietfa.amsl.com (Postfix) with ESMTP id 2DE4D11E80E2 for <tls@ietf.org>; Fri, 11 Oct 2013 18:16:00 -0700 (PDT)
X-IronPort-AV: E=Sophos;i="4.93,479,1378872000"; d="scan'208";a="785630"
Received: from unknown (HELO scygexch10.cygnacom.com) ([10.4.60.26]) by ipedge1.cygnacom.com with ESMTP; 11 Oct 2013 21:15:58 -0400
Received: from SCYGEXCH10.cygnacom.com ([fe80::d8df:b0bd:28be:ad62]) by scygexch10.cygnacom.com ([fe80::d8df:b0bd:28be:ad62%15]) with mapi id 14.02.0247.003; Fri, 11 Oct 2013 21:15:58 -0400
From: Santosh Chokhani <SChokhani@cygnacom.com>
To: Brian Smith <brian@briansmith.org>, Peter Gutmann <pgut001@cs.auckland.ac.nz>
Thread-Topic: [TLS] Enforcing keyUsage restrictions (was Re: Safe ECC usage)
Thread-Index: Ac7G6JkxaJ8RpP5WSUe5BTrzM0zEDg==
Date: Sat, 12 Oct 2013 01:15:57 +0000
Message-ID: <4262AC0DB9856847A2D00EF817E8113908E095@scygexch10.cygnacom.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [10.60.24.99]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Cc: "<tls@ietf.org>" <tls@ietf.org>
Subject: Re: [TLS] Enforcing keyUsage restrictions (was Re: Safe ECC usage)
X-BeenThere: tls@ietf.org
X-Mailman-Version: 2.1.12
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: <http://www.ietf.org/mail-archive/web/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, 12 Oct 2013 01:16:04 -0000

DS bit for RSA based TLS server is not appropriate since the Server key is used by the client to encrypt and never used for digital signature verification.

I thought we set the DS bit in case the server acts as a client.

As to the EC, that should depend on the cipher suite used.  It could be ECDH or ECDSA certificate and that should translate to key agreement or DS bit respectively.

-----Original Message-----
From: tls-bounces@ietf.org [mailto:tls-bounces@ietf.org] On Behalf Of Brian Smith
Sent: Friday, October 11, 2013 8:51 PM
To: Peter Gutmann
Cc: <tls@ietf.org>
Subject: [TLS] Enforcing keyUsage restrictions (was Re: Safe ECC usage)

On Thu, Oct 3, 2013 at 5:23 AM, Peter Gutmann <pgut001@cs.auckland.ac.nz> wrote:
> My code, in its default configuration, strictly enforces keyUsage.  
> From this I've found that both applications and CAs can set these bits 
> more or less at random, including completely illogical settings like 
> keyAgreement for RSA keys.  I've also found, through trial-and-error, 
> that many applications completely ignore them and use the keys in 
> whatever way they feel appropriate (the situation for PKCS #12 files 
> in particular is so bad that after fighting it for awhile I had to 
> turn off checking of keyUsage entirely).  So this isn't a case of 
> copying an RSA template, it's broken software generating them and equally broken software ignoring them.

Software based on NSS's libssl has a pretty liberal interpretation of keyUsage, and this is something I'd like to correct in Firefox soon.
In particular, I want to encourage CAs to offer ECDSA SSL certificates only with the digitalSignature bit set, and to provide the option to their customers to request RSA certificates with only the digitalSignature bit set. This should provide defense-in-depth from server misconfiguration for websites that want to switch exclusively to ephemeral key exchange.

If you have any more specific information you could share regarding your experience with attempting strict(er) KU enforcement, it would be great if you could share it. (Not just Peter, but everybdoy.)

Cheers,
Brian
--
Mozilla Networking/Crypto/Security (Necko/NSS/PSM) _______________________________________________
TLS mailing list
TLS@ietf.org
https://www.ietf.org/mailman/listinfo/tls