Re: [pkix] PKCS #8? Re: Updated EdDSA/Ed25519 PKIX document

Simon Josefsson <simon@josefsson.org> Thu, 12 November 2015 08:38 UTC

Return-Path: <simon@josefsson.org>
X-Original-To: pkix@ietfa.amsl.com
Delivered-To: pkix@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 09B351ACE9A for <pkix@ietfa.amsl.com>; Thu, 12 Nov 2015 00:38:04 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.551
X-Spam-Level:
X-Spam-Status: No, score=-1.551 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HELO_EQ_SE=0.35, SPF_PASS=-0.001] autolearn=no
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 E29D5hXmGoHB for <pkix@ietfa.amsl.com>; Thu, 12 Nov 2015 00:38:03 -0800 (PST)
Received: from duva.sjd.se (duva.sjd.se [IPv6:2001:9b0:1:1702::100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id B78F41ACE90 for <pkix@ietf.org>; Thu, 12 Nov 2015 00:38:02 -0800 (PST)
Received: from latte.josefsson.org ([155.4.17.2]) (authenticated bits=0) by duva.sjd.se (8.14.4/8.14.4/Debian-4) with ESMTP id tAC8bqWv029068 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 12 Nov 2015 09:37:53 +0100
From: Simon Josefsson <simon@josefsson.org>
To: Anders Rundgren <anders.rundgren.net@gmail.com>
References: <878u7xtu06.fsf@latte.josefsson.org> <5643175F.9070405@gmail.com> <1447244606.16388.10.camel@josefsson.org> <56435732.8020405@gmail.com> <87io57bqsy.fsf@latte.josefsson.org> <56444D7D.7090502@gmail.com>
OpenPGP: id=54265E8C; url=http://josefsson.org/54265e8c.txt
X-Hashcash: 1:22:151112:pkix@ietf.org::tyfGIgNGW0tOHKVe:K+Qb
X-Hashcash: 1:22:151112:anders.rundgren.net@gmail.com::PONIterovpR4+JF8:bZm6
Date: Thu, 12 Nov 2015 09:37:51 +0100
In-Reply-To: <56444D7D.7090502@gmail.com> (Anders Rundgren's message of "Thu, 12 Nov 2015 09:27:41 +0100")
Message-ID: <87egfvbokg.fsf@latte.josefsson.org>
User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature"
X-Virus-Scanned: clamav-milter 0.98.7 at duva.sjd.se
X-Virus-Status: Clean
Archived-At: <http://mailarchive.ietf.org/arch/msg/pkix/yQEecAX_xIpSqAUn1BXsldUaNRY>
Cc: pkix@ietf.org
Subject: Re: [pkix] PKCS #8? Re: Updated EdDSA/Ed25519 PKIX document
X-BeenThere: pkix@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: PKIX Working Group <pkix.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pkix>, <mailto:pkix-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/pkix/>
List-Post: <mailto:pkix@ietf.org>
List-Help: <mailto:pkix-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pkix>, <mailto:pkix-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 12 Nov 2015 08:38:04 -0000

Anders Rundgren <anders.rundgren.net@gmail.com> writes:

> Pardon me for being somewhat unclear, I meant the distinction of EC versus ED.
...
> Essentially the question is weather you extend EC or create a new type.

Ah, now I understand.

Well, the situation is that GnuTLS implements a new key type (see [1]
but it should have more text) and there is ALSO the possibility of using
the RFC 5915 ECPrivateKey together with the NamedCurve defined in [2]
but it is a bit underspecified (see below).  I'm not negative about
doing a PKCS#15 format in addition to this.

The problem with re-using RFC 5915 is that has a number of references in
it that doesn't make a lot of sense for EdDSA (e.g., it uses I2OSP from
RSA for encoding!).  So it is not really clear how you would actually
re-use the existing EC type for EdDSA since it is so tailored around how
ECDSA works.  I assume this was the reason Nikos didn't re-use it but
created a new simpler private key format for EdDSA.

To have more alignment, we could describe an ECPrivateKey structure for
EdDSA keys that would be ASN.1-compatible but have different semantics
that would work for EdDSA.  I'm not convinced that is worth the effort,
as it will create implementation complexity and confusion.

/Simon

[1] https://tools.ietf.org/html/draft-josefsson-pkix-eddsa-04#section-8.3
[2] https://tools.ietf.org/html/draft-josefsson-pkix-newcurves-01