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

Anders Rundgren <anders.rundgren.net@gmail.com> Thu, 12 November 2015 08:27 UTC

Return-Path: <anders.rundgren.net@gmail.com>
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 3997A1ACC8F for <pkix@ietfa.amsl.com>; Thu, 12 Nov 2015 00:27:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=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 98W9SLrS7iPS for <pkix@ietfa.amsl.com>; Thu, 12 Nov 2015 00:27:45 -0800 (PST)
Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 21FB91AC439 for <pkix@ietf.org>; Thu, 12 Nov 2015 00:27:45 -0800 (PST)
Received: by wmww144 with SMTP id w144so189991924wmw.1 for <pkix@ietf.org>; Thu, 12 Nov 2015 00:27:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=xtUC1f7FmGm5afQw24a5a2+zcrYGI2ujNPfQWMAOtyw=; b=CzoAa/KYfSApXSG81TioSu95CD3L3w6nn1fZwi4OdjSxIPIFPNiyklpTdImDswFNyu 0VYBJuO6tGyaTRZxVuZq2QtuOhl0ZQllpwmLxlEHxkR2eZELF3LeTJAU6byCAnmVwhkn NEXfXOyLxSsxyQPh48fRXRbzeTZsfIYxNfWTAQjEt/YRugT8rwlsZ1SWrpuDTNW1QJn0 azWeqTiN154l2TCBs8jynAB/UnbU2XiD/KhNpBAo91N/twPOHsI9x5aSkNqFQ2fDDW1w HmxpgBCKRQgKmwxu0DR1NhTQH5cSND5yZj+c10i+/lp0PT47INfJyud1H3lChuZu0zRe IsEA==
X-Received: by 10.194.179.101 with SMTP id df5mr14547659wjc.60.1447316863744; Thu, 12 Nov 2015 00:27:43 -0800 (PST)
Received: from [192.168.1.79] (148.198.130.77.rev.sfr.net. [77.130.198.148]) by smtp.googlemail.com with ESMTPSA id lv4sm13123219wjb.43.2015.11.12.00.27.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Nov 2015 00:27:43 -0800 (PST)
To: Simon Josefsson <simon@josefsson.org>
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>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <56444D7D.7090502@gmail.com>
Date: Thu, 12 Nov 2015 09:27:41 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
MIME-Version: 1.0
In-Reply-To: <87io57bqsy.fsf@latte.josefsson.org>
Content-Type: text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/pkix/5F5UgKQ53JVnahTAHH_KpUBrSrY>
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:27:47 -0000

On 2015-11-12 08:49, Simon Josefsson wrote:
> Anders Rundgren <anders.rundgren.net@gmail.com> writes:
>
>>> Right now we are re-using the
>>> EdDSA public key OID for the private key OID too.
>>
>> I think this should be harmonized with JOSE who essentially have the following
>> alternatives for describing public keys:
>>
>> jwk:
>>    {
>>      "kty": "EC",
>>      "crv": "ED25519",
>>      "x": "8dymopMICY76wfnqdpX0JDpCRYke0-Jp1p7lKPQIIRg",
>>    }
>>
>> The above departs from the current JWK standard which requires an "y" as well
>> making the the following approach a viable alternative:
>>
>> jwk:
>>   {
>>    "kty": "ED",
>>    "crv": "ED25519",
>>    "x": "8dymopMICY76wfnqdpX0JDpCRYke0-Jp1p7lKPQIIRg",
>> }
>>
>>  From what I can deduct, this latter scheme is more in line with your PKIX
>> SPKI solution.
>
> No, https://tools.ietf.org/html/draft-josefsson-pkix-eddsa-03 only
> encodes the x parameter.  So this appears consistent.

Pardon me for being somewhat unclear, I meant the distinction of EC versus ED.

>
>> This would also be great for Android and Java.  In fact the only solution
>> I have found for Java indeed defines a new provider key class:
>> https://github.com/str4d/ed25519-java/blob/master/test/net/i2p/crypto/eddsa/EdDSAEngineTest.java#L36
>>
>> Of course this choice won't shatter the earth but having different solutions
>> for PKIX and JOSE would IMO be quite unfortunate.
>
> I don't believe there is sufficient overlap in implementation to matter
> in practice, however the fundamental principles should be the same for
> both protocols, so it would indeed be surprising if they ended up differently.

Essentially the question is weather you extend EC or create a new type.

Anders

>
> /Simon
>
>> Anders
>>
>>
>>>
>>> One alternative to the approach we've taken is to re-use the RFC 5915 EC
>>> private key format.  Then everything is covered by the combination of
>>> RFC 5915 and the NamedCurve registration in:
>>> https://tools.ietf.org/html/draft-josefsson-pkix-newcurves-01
>>>
>>> Does anyone have thoughts on which approach to use?
>>>
>>> Thanks,
>>> /Simon
>>>
>>>>
>>>> Anders
>>>>
>>>>>
>>>>> I have pushed out a new version of the document describing EdDSA public
>>>>> keys, signatures and certificates for PKIX.  The change in -03 include
>>>>> the addition of the prehash mode, test vectors generated by GnuTLS, and
>>>>> a section recommending certain human readable names.
>>>>>
>>>>> https://tools.ietf.org/html/draft-josefsson-pkix-eddsa-03
>>>>>
>>>>> I've started a thread to discuss whether it is wortwhile to be able to
>>>>> use the same Ed25519 key for both PureEdDSA mode and HashEdDSA signing,
>>>>> and I'd appreciate feedback on whether people are interested in this and
>>>>> generally if it is a good idea or not.  The complexity involved make me
>>>>> shy away a bit from it, but it is fun to consider.  The thread is here:
>>>>> https://moderncrypto.org/mail-archive/curves/2015/000630.html
>>>>>
>>>>> /Simon
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> pkix mailing list
>>>>> pkix@ietf.org
>>>>> https://www.ietf.org/mailman/listinfo/pkix
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> pkix mailing list
>> pkix@ietf.org
>> https://www.ietf.org/mailman/listinfo/pkix
>>