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

Vladimir Dzhuvinov <vladimir@connect2id.com> Thu, 24 December 2015 10:53 UTC

Return-Path: <vladimir@connect2id.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 366E51B2A23 for <jose@ietfa.amsl.com>; Thu, 24 Dec 2015 02:53:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.899
X-Spam-Level:
X-Spam-Status: No, score=-1.899 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001] 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 rmHaLly75Ew7 for <jose@ietfa.amsl.com>; Thu, 24 Dec 2015 02:53:45 -0800 (PST)
Received: from p3plsmtpa08-03.prod.phx3.secureserver.net (p3plsmtpa08-03.prod.phx3.secureserver.net [173.201.193.104]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 891E01B2A1F for <jose@ietf.org>; Thu, 24 Dec 2015 02:53:45 -0800 (PST)
Received: from [192.168.0.112] ([77.77.164.50]) by p3plsmtpa08-03.prod.phx3.secureserver.net with id xNtj1r00115ZTut01NtjLj; Thu, 24 Dec 2015 03:53:45 -0700
To: 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>
From: Vladimir Dzhuvinov <vladimir@connect2id.com>
X-Enigmail-Draft-Status: N1110
Organization: Connect2id Ltd.
Message-ID: <567BCEB6.3040609@connect2id.com>
Date: Thu, 24 Dec 2015 12:53:42 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0
MIME-Version: 1.0
In-Reply-To: <20151224054643.GA25322@LK-Perkele-V2.elisa-laajakaista.fi>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-256"; boundary="------------ms040401010407010209070100"
Archived-At: <http://mailarchive.ietf.org/arch/msg/jose/pkREC_yYNdfWHups8iie-ZL61EA>
Cc: jose@ietf.org
Subject: [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 10:53:47 -0000

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?

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