Re: [jose] Std Java key representation of OKP in draft-liusvaara-jose-cfrg-curves-00

Anders Rundgren <anders.rundgren.net@gmail.com> Thu, 24 December 2015 12:48 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id AA8831A90E1 for <jose@ietfa.amsl.com>; Thu, 24 Dec 2015 04:48:19 -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 QADDI0RoZA1Q for <jose@ietfa.amsl.com>; Thu, 24 Dec 2015 04:48:18 -0800 (PST)
Received: from mail-wm0-x234.google.com (mail-wm0-x234.google.com [IPv6:2a00:1450:400c:c09::234]) (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 A3F981A90E2 for <jose@ietf.org>; Thu, 24 Dec 2015 04:48:17 -0800 (PST)
Received: by mail-wm0-x234.google.com with SMTP id p187so177270530wmp.0 for <jose@ietf.org>; Thu, 24 Dec 2015 04:48:17 -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=txz084EobKlOGeiNqYhVPkcr5rrkewV3BMlyMJdzRNU=; b=FhBWQXkmjUGjrv2UInjtvJY7SisdQVi+ruUPI6sj8C89ciTSk0O9xXlLSq/Ft/1nd9 ql+vmXbEolgNp5L5e/g9MzZ6n31u6EcqZKPD06q+GY3yp+qi6oVeu/Y8VUm0GophZnDP aTZi61+vX6rnUUMSCcIuG9puJZTHMJlOQn52bXh9ej/l6Ru2YWD6C3xsf2zNZ6q4p7iz BDvjP3YUNY/6EaOeKxCC3WTjE4KFQLuuEJst2YPNWnN9EMtJtcXPSg+WuFup5nmWidp4 nEVltWZVYRPY7jji8KSYpsNT4TMNVGhoHf55Wk8go1NNx7/wVo+VwQmHVvQehJvYz6f7 Ub4A==
X-Received: by 10.28.59.66 with SMTP id i63mr40515407wma.103.1450961296177; Thu, 24 Dec 2015 04:48:16 -0800 (PST)
Received: from [192.168.1.79] (132.201.130.77.rev.sfr.net. [77.130.201.132]) by smtp.googlemail.com with ESMTPSA id w80sm11999213wme.17.2015.12.24.04.48.15 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Dec 2015 04:48:15 -0800 (PST)
To: Vladimir Dzhuvinov <vladimir@connect2id.com>, Ilari Liusvaara <ilariliusvaara@welho.com>
References: <00e001d13d1b$09519d50$1bf4d7f0$@augustcellars.com> <20151223064653.GA24022@LK-Perkele-V2.elisa-laajakaista.fi> <567A49F3.8050500@gmail.com> <20151224054643.GA25322@LK-Perkele-V2.elisa-laajakaista.fi> <567BCEB6.3040609@connect2id.com>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <567BE989.8020800@gmail.com>
Date: Thu, 24 Dec 2015 13:48:09 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <567BCEB6.3040609@connect2id.com>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/jose/F61QtiGOHth5TDW4S8ALrZ32epA>
Cc: jose@ietf.org
Subject: Re: [jose] Std Java key representation of OKP in draft-liusvaara-jose-cfrg-curves-00
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Javascript Object Signing and Encryption <jose.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jose>, <mailto:jose-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jose/>
List-Post: <mailto:jose@ietf.org>
List-Help: <mailto:jose-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jose>, <mailto:jose-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 24 Dec 2015 12:48:19 -0000

On 2015-12-24 11:53, Vladimir Dzhuvinov wrote:
> Hi Ilari,
>
> Thank you for making this new contribution to the JOSE suite.
>
> The Java library for JOSE that I maintain includes methods for converting
 > between JWK instances and the standard Java types for representing keys.
 > My reading of the spec is that the established Java DHPublicKey
 > <https://docs.oracle.com/javase/7/docs/api/javax/crypto/interfaces/DHPublicKey.html> /
 > DHPrivateKey <https://docs.oracle.com/javase/7/docs/api/javax/crypto/interfaces/DHPrivateKey.html>
 > interfaces would be the best match for the proposed "OKP" JWK. Does this make sense?

Hi Vladimir,

Is your goal to eventually make this a part of standard java?
I would be interested in cooperating on a OpenJDK contribution.

Regardless of that my experiences with named EC curves in Java
(without BouncyCastle installed) would speak against reusing DH*
since there is no place for "crv" (or whatever it will be called...)
and "x" is called Y.

https://docs.oracle.com/javase/7/docs/api/javax/crypto/spec/DHPublicKeySpec.html

I would therefore consider starting with a new key type (OKP*).

If something "standard-ish" is the target, I would try to get some
feedback on an early proposal.

Regards,
Anders

>
> The current JWK types map as follows:
>
>   * "OCT" JWKs map to / from javax.crypto.SecretKey
>
>   * "RSA" JWKs map to / from java.security.interfaces.RSA{Public|Private}Key
>
>   * "EC" JWKs map to / from java.security.interfaces.EC{Public|Private}Key
>
>
> Can you recommend Java implementations of the new algs? I'm looking for a good place to start in order to add support for them in JOSE.
>
> Thanks,
>
> Vladimir
>
> --
> Vladimir Dzhuvinov
>
>
>
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose
>