[jose] Off-topic: WebCrypto JWK algorithm registrations

Neil Madden <neil.madden@forgerock.com> Fri, 20 September 2019 15:51 UTC

Return-Path: <neil.madden@forgerock.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 E7E2412026E for <jose@ietfa.amsl.com>; Fri, 20 Sep 2019 08:51:55 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=forgerock.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 pI48rBGx60Yd for <jose@ietfa.amsl.com>; Fri, 20 Sep 2019 08:51:53 -0700 (PDT)
Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) (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 E46B512024E for <jose@ietf.org>; Fri, 20 Sep 2019 08:51:52 -0700 (PDT)
Received: by mail-wm1-x331.google.com with SMTP id p7so3042881wmp.4 for <jose@ietf.org>; Fri, 20 Sep 2019 08:51:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=forgerock.com; s=google; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=ZBb4NSifdHHMXs1q5G+8L/mi0wJELVgbroKoyNPBh3M=; b=KTDpfsytnbDoakMed+DMcru7pnSe2vCQWXzmTX6at6HiyK4ggBRYNf6l44D3/OGsdG /OjVd2VdprkUaPH4MMmneXQaJCTTNeUiq18vZa5UhulozPM9SfqhuHU1JTVInHzk4fGO urBHGmKOLGhIwKhVeX1yDi9W+Lv8FySknqJCU=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=ZBb4NSifdHHMXs1q5G+8L/mi0wJELVgbroKoyNPBh3M=; b=fxz+0zNUFgwgS67h9NrPkjERaQAKUYK93jrRHIyPXDb5gJ2SfK8Vy/+PnK4PHcLst3 icVIbWlKnoPWMo25P+ZRs1mLsMtbfi3sr6E5wLYFgc88HgMj8PA2ELyitTVpItCwgX9Q SWv6hQ5i57dYKBM5JeamLj2Tv/lFJhAz6Dq36ft/+MhLtuSBYb3RPia59Mj5NtuhxYl1 w4R5FLErVV9k5LC2ExrqMIAinxoHCVLNLSaf+NwmK3ElD1rO3/iJFCHtoOBJwy6zodKQ alI3HpOTxUkoANOlSBhRuAZuwEhjaHSwlXlkC0RakjwcA037amGLt72l1MbYA1dGeoyY +miw==
X-Gm-Message-State: APjAAAXF+GK15IIWD4nwxXSqg+lTJZ0vy1DNRCzc4pQXBIyhGSB+tdAX VOdVYUfALa1kaEQ7Y13EwZOnxQ==
X-Google-Smtp-Source: APXvYqz4awuahO2fMNt0IEaZm/HEWGvPJm+63R43j+Yghivd+Ty+C7iYxngjuX6NvHHjQx0qY+O43w==
X-Received: by 2002:a1c:c14a:: with SMTP id r71mr4162507wmf.46.1568994711121; Fri, 20 Sep 2019 08:51:51 -0700 (PDT)
Received: from [192.168.1.64] (253.58.93.209.dyn.plus.net. [209.93.58.253]) by smtp.gmail.com with ESMTPSA id t13sm4413021wra.70.2019.09.20.08.51.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Sep 2019 08:51:50 -0700 (PDT)
From: Neil Madden <neil.madden@forgerock.com>
Message-Id: <8F10A42F-B687-494B-9586-C0A05115936E@forgerock.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_64172CD8-50B5-414D-AE4D-AD10B119B4FC"
Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\))
Date: Fri, 20 Sep 2019 16:51:49 +0100
In-Reply-To: <013c01d56fc8$56cb8b20$0462a160$@augustcellars.com>
Cc: ivaylo petrov <ivaylo@ackl.io>, jose@ietf.org, cose@ietf.org
To: Jim Schaad <ietf@augustcellars.com>
References: <CAJFkdRzEF0wh9-H4dDNQeUHVd_VD8KKv1jOJ7BWs+bKN2e6gBQ@mail.gmail.com> <CAJFkdRy6Bs77gFGG0QGMC1fe_niQC6Of7_2Z8+jjYzpWkuMDBQ@mail.gmail.com> <465EE321-1595-4453-8D4E-E3A6A457C86E@forgerock.com> <012001d56fc0$1fb30e90$5f192bb0$@augustcellars.com> <F6FF776D-FFF9-4330-8A6B-81F783D990C2@forgerock.com> <013c01d56fc8$56cb8b20$0462a160$@augustcellars.com>
X-Mailer: Apple Mail (2.3445.104.11)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/btwKJ5TPfOTlCT1hVuWzdPfSdRc>
Subject: [jose] Off-topic: WebCrypto JWK algorithm registrations
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: Fri, 20 Sep 2019 15:51:56 -0000

> 
> Ouch, I hadn't seen this. The WebCrypto group really did a number on the registry. Thankfully most of them (including RS1) are only registered for JWK usage and marked as Prohibited. (What does it even mean for things like "A128CBC" to be registered as a JWK "alg" value?)
>  
> [JLS] One can have a JWK which contains a symmetric key so in that case an “alg” value of “A128CBC” makes sense.  Only use this key with this algorithm.  

OK, off-topic but this reveals an ambiguity in the JWK spec. Section 4.4 of RFC 7517 describing the JWK "alg" parameter just says that the values should be registered in the "JSON Web Signature and Encryption Algorithms" registry, but as this registry contains both JWE Algorithms ("alg" in JWE) and Content Encryption Methods ("enc"), it is ambiguous which is allowed. I have always assumed that only JWE/JWS "alg" values where allowed in a JWK "alg" claim, but I guess the wording would also allow you to put an "enc" value in there. I presume that's what the WebCrypto spec is intending with these registrations, rather than registering "A128CBC" etc as key-wrapping algorithms?

-- Neil