Re: [TLS] Safe ECC usage

Peter Gutmann <pgut001@cs.auckland.ac.nz> Thu, 03 October 2013 12:25 UTC

Return-Path: <pgut001@cs.auckland.ac.nz>
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 BA23021F9DCA for <tls@ietfa.amsl.com>; Thu, 3 Oct 2013 05:25:47 -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 DPkdWdBlZzNW for <tls@ietfa.amsl.com>; Thu, 3 Oct 2013 05:25:25 -0700 (PDT)
Received: from mx2.auckland.ac.nz (mx2.auckland.ac.nz [130.216.125.245]) by ietfa.amsl.com (Postfix) with ESMTP id 1C02E21F9B03 for <tls@ietf.org>; Thu, 3 Oct 2013 05:23:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=auckland.ac.nz; i=@auckland.ac.nz; q=dns/txt; s=uoa; t=1380802995; x=1412338995; h=from:to:subject:date:message-id: content-transfer-encoding:mime-version; bh=XIRYouOx0qVjM0w4viLIxvOXK77ZFpydJefwoqJLR1s=; b=oOxV6RSOtB8fOrKuD+xaNW4+rI77T/CPYtbf4DNzYOcBVyt2JG/MZ+C7 H1or29K8w4AHnpCHH/f72Y2Vza4RD0TKxMmnlepoJ6UKkf318eJNSaFXD HAVgzQJVcEJeEgcbcDh5axwAOUnwpdGeqykh3FDDhydZtlwzskwz4txO0 o=;
X-IronPort-AV: E=Sophos;i="4.90,1026,1371038400"; d="scan'208";a="215727079"
X-Ironport-HAT: MAIL-SERVERS - $RELAYED
X-Ironport-Source: 130.216.4.171 - Outgoing - Outgoing
Received: from uxchange10-fe4.uoa.auckland.ac.nz ([130.216.4.171]) by mx2-int.auckland.ac.nz with ESMTP/TLS/AES128-SHA; 04 Oct 2013 01:23:12 +1300
Received: from UXCN10-6.UoA.auckland.ac.nz ([169.254.10.92]) by uxchange10-fe4.UoA.auckland.ac.nz ([130.216.4.171]) with mapi id 14.02.0318.004; Fri, 4 Oct 2013 01:23:12 +1300
From: Peter Gutmann <pgut001@cs.auckland.ac.nz>
To: "<tls@ietf.org>" <tls@ietf.org>
Thread-Topic: [TLS] Safe ECC usage
Thread-Index: Ac7AM1NsVidsxPpMS3Sq7adPe9QRGg==
Date: Thu, 3 Oct 2013 12:23:11 +0000
Message-ID: <9A043F3CF02CD34C8E74AC1594475C7355681240@uxcn10-6.UoA.auckland.ac.nz>
Accept-Language: en-NZ, en-GB, en-US
Content-Language: en-NZ
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [130.216.158.4]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [TLS] 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: Thu, 03 Oct 2013 12:25:48 -0000

Santosh Chokhani <SChokhani@cygnacom.com> writes:

>Simply copying RSA template and thus the key usage bits should not yield the
>behavior you mention.  RSA certificates should set the key encipherment bit.
>EC type certificates should not set that bit; the appropriate bit is key
>agreement.

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.

Peter.