Re: [openpgp] PKI (RFC 5480) mapping to ECC keys (RFC 6637)

Paul Wouters <paul@nohats.ca> Fri, 19 July 2013 20:33 UTC

Return-Path: <paul@nohats.ca>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 78B3A11E81A3 for <openpgp@ietfa.amsl.com>; Fri, 19 Jul 2013 13:33:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.383
X-Spam-Level:
X-Spam-Status: No, score=-2.383 tagged_above=-999 required=5 tests=[AWL=-0.384, BAYES_00=-2.599, J_CHICKENPOX_54=0.6]
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 9Vt9rBg5Wcih for <openpgp@ietfa.amsl.com>; Fri, 19 Jul 2013 13:33:05 -0700 (PDT)
Received: from mx.nohats.ca (mx.nohats.ca [193.110.157.68]) by ietfa.amsl.com (Postfix) with ESMTP id 3B56C11E819F for <openpgp@ietf.org>; Fri, 19 Jul 2013 13:33:03 -0700 (PDT)
Received: from localhost (localhost [IPv6:::1]) by mx.nohats.ca (Postfix) with ESMTP id 3bxkRs2GQlz1wM; Fri, 19 Jul 2013 16:32:57 -0400 (EDT)
X-Virus-Scanned: amavisd-new at mx.nohats.ca
Received: from mx.nohats.ca ([IPv6:::1]) by localhost (mx.nohats.ca [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id ZJU5luUm9aCf; Fri, 19 Jul 2013 16:32:56 -0400 (EDT)
Received: from bofh.nohats.ca (bofh.nohats.ca [76.10.157.69]) by mx.nohats.ca (Postfix) with ESMTP; Fri, 19 Jul 2013 16:32:56 -0400 (EDT)
Received: by bofh.nohats.ca (Postfix, from userid 500) id 60FEF80FB2; Fri, 19 Jul 2013 16:32:57 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1]) by bofh.nohats.ca (Postfix) with ESMTP id 5097280EF3; Fri, 19 Jul 2013 16:32:57 -0400 (EDT)
Date: Fri, 19 Jul 2013 16:32:57 -0400 (EDT)
From: Paul Wouters <paul@nohats.ca>
To: Andrey Jivsov <openpgp@brainhub.org>
In-Reply-To: <51E9A029.6000303@brainhub.org>
Message-ID: <alpine.LFD.2.10.1307191628560.20296@bofh.nohats.ca>
References: <51E84A3C.8060800@brainhub.org> <87a9lid8yq.fsf@vigenere.g10code.de> <51E9A029.6000303@brainhub.org>
User-Agent: Alpine 2.10 (LFD 1266 2009-07-14)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
Cc: openpgp@ietf.org
Subject: Re: [openpgp] PKI (RFC 5480) mapping to ECC keys (RFC 6637)
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/openpgp>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 19 Jul 2013 20:33:14 -0000

On Fri, 19 Jul 2013, Andrey Jivsov wrote:

>> You can't use 20 because it was used for Elgamal in rfc2440.  A new one
>> needs to be allocated.  22 would be the next.

Indeed.

> I was thinking about recycling ID 20, given that there is small benefit for 
> the IDs to be consecutive.
>
> The simplification is generic. Now that we would have 3 IDs for ECC, it is 
> more efficient to check 18 <= x <= 20 then for 3 arbitrary IDs. Also, 
> consecutive IDs allow easy transition to zero-based indexing (just subtract 
> 18).

Those "benefits" are just coding errors waiting to happen in the future. A
switch statement seems much more appropriate.

> Current definition of 20 in RFC 4880 is:
>
>   20         - Reserved (formerly Elgamal Encrypt or Sign)
>
> In RFC 2440 it is:
>
>   20         - Elgamal (Encrypt or Sign)
>
> Do we know of at least one case when 20 is used in deployed applications? 
> This will be enough to require 22 for ECDSA+ECDH.

Even with no implementation out there, the allocated numbers should not be
recycled, unless in extreme use cases, eg where we've ran out of
numbers.

Paul