[jose] WebCrypto incompatible? Re: JWK Generator Service

Anders Rundgren <anders.rundgren.net@gmail.com> Tue, 04 November 2014 15:33 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 []) by ietfa.amsl.com (Postfix) with ESMTP id EE8CC1A8A07 for <jose@ietfa.amsl.com>; Tue, 4 Nov 2014 07:33:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
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 ([]) by localhost (ietfa.amsl.com []) (amavisd-new, port 10024) with ESMTP id YWbyChq8cfjw for <jose@ietfa.amsl.com>; Tue, 4 Nov 2014 07:33:45 -0800 (PST)
Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1F1141A8A1D for <jose@ietf.org>; Tue, 4 Nov 2014 07:33:44 -0800 (PST)
Received: by mail-wi0-f169.google.com with SMTP id n3so9023038wiv.0 for <jose@ietf.org>; Tue, 04 Nov 2014 07:33:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=PWV+DraIS/NDaGOS8z6M27lEN11rkMgkzd5JMG86sso=; b=q4B8Uwd1q7OxBPf6DzC2wh29044XGby0pqjyOI3XsdtDWVDmOrCns+bEnWOeZn6/+5 T1JFPHD9IY+8IAsN+5cdwqy8GWFWTr1QlxEK0GVgkUC0EMbIaO0wwdi0u4FZT3Ax42eO DOwd6IVQAlpuU9K19EVZBrzeBhu6eQ+lzaAA9roBZvCfKn4OkdB6MtDD4uJY7A7kWm6a 4pntyNY/wcoKay7gwtSwbYrCsZ6hjCxpXg7Iwg044YdYjV/j55afs0r4CjxZ93Z6UJyK o6QltvuE6QHX0pcmsitEFwfmBYIncWBeKhnb38zQ3IgeB8oi320FakqfzoNldlUCp2PC xA5A==
X-Received: by with SMTP id yz9mr9741441wjc.34.1415115223785; Tue, 04 Nov 2014 07:33:43 -0800 (PST)
Received: from [] ( []) by mx.google.com with ESMTPSA id u13sm1414564wiv.10.2014. for <multiple recipients> (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Nov 2014 07:33:43 -0800 (PST)
Message-ID: <5458F1C1.20007@gmail.com>
Date: Tue, 04 Nov 2014 16:33:21 +0100
From: Anders Rundgren <anders.rundgren.net@gmail.com>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0
MIME-Version: 1.0
To: Justin Richer <jricher@mit.edu>, "jose@ietf.org" <jose@ietf.org>
References: <5458E645.9020904@mit.edu>
In-Reply-To: <5458E645.9020904@mit.edu>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: http://mailarchive.ietf.org/arch/msg/jose/hyQryIZ4T4vWwIpE4AQI6BKUvrk
Subject: [jose] WebCrypto incompatible? Re: JWK Generator Service
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: <http://www.ietf.org/mail-archive/web/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: Tue, 04 Nov 2014 15:33:47 -0000

It seems that the representation the private keys is incompatible with WebCrypto import.
Chrome and Firefox also wants the SHOULD parameters.


On 2014-11-04 15:44, Justin Richer wrote:
> A while ago, I was fed up with creating self-signed X.509 certificates
> just to manage the bare keys used in JOSE processing. There's a lot of
> extraneous effort that goes into making fake certificate chains that are
> then dutifully ignored by the application, especially when the JWK
> format can hold both public and private keys natively already. So we
> switched our apps over to reading the JWK format instead of X.509, but
> we still needed something to securely generate the keys themselves. So I
> created a commandline Java application to generate keys in JWK format
> (based on the NimbusDS JOSE library):
>     https://github.com/mitreid-connect/json-web-key-generator
> It's slightly unwieldy to compile and run but it gets the job done. Last
> night, I wrapped that commandline application with a webapp and made it
> publicly available:
>     https://mkjwk.org/
> This simple service will generate a JWK in RSA, EC, or Oct (shared
> secret) format for you, using Java's cryptographic engine. You can add
> in the use, kid, and alg parameters, and the results are formatted into
> easily-copyable JSON. It will even wrap the key in a keyset and pull out
> the public key separately for you, in case you need those.
> We don't log any of the keys being generated by the service, but to be
> extra safe I would still recommend using a local generation mechanism
> (like the commandline app above) for production systems.
> Finally, I put the code to the site online in the name of transparency:
>     https://github.com/mitreid-connect/mkjwk.org
> I hope that people can find this useful, and we can start moving off of
> X.509 for bare key storage in applications. Much thanks to MIT KIT for
> providing hosting and support.
>    -- Justin
> _______________________________________________
> jose mailing list
> jose@ietf.org
> https://www.ietf.org/mailman/listinfo/jose