[jose] Converting JWK <-> PEM

Anders Rundgren <anders.rundgren.net@gmail.com> Sat, 30 January 2021 05:16 UTC

Return-Path: <anders.rundgren.net@gmail.com>
X-Original-To: jose@ietfa.amsl.com
Delivered-To: jose@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 906783A0B44 for <jose@ietfa.amsl.com>; Fri, 29 Jan 2021 21:16:56 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 e3TBkpQ3G64U for <jose@ietfa.amsl.com>; Fri, 29 Jan 2021 21:16:55 -0800 (PST)
Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (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 091963A0B41 for <jose@ietf.org>; Fri, 29 Jan 2021 21:16:55 -0800 (PST)
Received: by mail-ej1-x62f.google.com with SMTP id ox12so16089413ejb.2 for <jose@ietf.org>; Fri, 29 Jan 2021 21:16:54 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=bWaMGQp47xOqvEKfWT+HNMrHA4I/kvvd+avZ9i5WfOY=; b=Vm6ROgRa7HnVPeYFtcPpZc2klo9uKa2BNjE4XbWyyDgBbQFLVDdPmj3sl+Efm2p34L opBWlq3X1EWUjER0PkNzUmLIRGhKltD1TKNRmTr/4fyrZXilAQ2SMWm34noREwPFScaZ uiZeSAU4aXlFEF8RR5qGkcPP5OAuyXgFC/TUvp04hfxpBmo+vDP9z2hDoh14iPk8+SHK VmL9PV33dL5zWfPUdT+ddcDX355m9VKLZdcjgsGM2GNTCqA/vm9GkqyR9LCV+pPXyq+b Wjy0d2+v2dzz2Vroz+y0qwOQGVn4agowF6Gajviw4aoy69YdjI9XhkK3n1SHXsKo4KXl xV3A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=bWaMGQp47xOqvEKfWT+HNMrHA4I/kvvd+avZ9i5WfOY=; b=lAcTII5etufHMHu5IWZ+fK13URZzhSpIgFKAsVzTBwDbPChg1HmKNonSR6xPl4uCSJ e44+I17W6D71FyQmxtQl1bSgfWZc57H2vChwq5Y8sA762vYXLBm5s0O8l7sv6dkQjBou qZMKeyj+CyBOWpLMFgo1dI5VOqctQJ8+WU102q2dqeoM1FZVeuKh9/dkeD3EOKWx231r mltnWj//OJ7qR4iQAIjnFzdIB1unMWOLizZUEg7xrykaIjmHOztGXLbaVQmeh0xmVrwH X+UlUwP0oGgyvMRntDb1JlM33fK3E0niKmSZTPOJLcvMi9/oREcHnA0FCjJLR6OS/7cq cA6w==
X-Gm-Message-State: AOAM533tsByEvSmwSA9WlEyWaCcV/ZPQ82NaJOV1P8eQ49ulitL0o6md bncOgLsbnhAawtS0Y4QA9kYNzsrSabA=
X-Google-Smtp-Source: ABdhPJxgEVlO5HV+NblSkSr6LM2fKu3Y3LEbCIk1W03StDqSbJ4kKpKmXM0yCSuywKmv6lnp4L/j9g==
X-Received: by 2002:a17:906:b215:: with SMTP id p21mr7548765ejz.407.1611983812917; Fri, 29 Jan 2021 21:16:52 -0800 (PST)
Received: from [192.168.1.79] (25.131.146.77.rev.sfr.net. [77.146.131.25]) by smtp.googlemail.com with ESMTPSA id cw21sm5485999edb.85.2021.01.29.21.16.51 for <jose@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 29 Jan 2021 21:16:52 -0800 (PST)
To: "jose@ietf.org" <jose@ietf.org>
From: Anders Rundgren <anders.rundgren.net@gmail.com>
Message-ID: <ba81698a-216a-e20e-a5a9-d5862d192c84@gmail.com>
Date: Sat, 30 Jan 2021 06:16:50 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/DH60ThtwrZYpTY83NPDMKRQF5wY>
Subject: [jose] Converting JWK <-> PEM
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 30 Jan 2021 05:16:57 -0000

Hi List,

It is a true pleasure dealing with PKIX standards since there always seem to be several standards for doing the same thing :-(

Representation of private keys is one such item where the public counterpart sometimes (and for some algorithms only...) is absent. I'm happy that the latter was properly addressed by JWK.

FWIW, I have just updated the on-line JWS/CT verifier with a JWK<->PEM conversion utility: https://mobilepki.org/jws-ct/keyconv

BTW, do you have any input to JWS/CT (https://tools.ietf.org/id/draft-jordan-jws-ct-02.html)?   The authors are planning submitting this to the RFC editor.

thanx,
Anders