Re: [jose] Fully-Specified Algorithms for JOSE and COSE
Filip Skokan <panva.ip@gmail.com> Wed, 30 August 2023 08:21 UTC
Return-Path: <panva.ip@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 802E5C15106B for <jose@ietfa.amsl.com>; Wed, 30 Aug 2023 01:21:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.213
X-Spam-Level:
X-Spam-Status: No, score=-1.213 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, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, MIME_HTML_ONLY_MULTI=0.001, MIME_QP_LONG_LINE=0.001, MPART_ALT_DIFF=0.79, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=no autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mQOJdnq9U4_4 for <jose@ietfa.amsl.com>; Wed, 30 Aug 2023 01:21:54 -0700 (PDT)
Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 429BEC14CE40 for <jose@ietf.org>; Wed, 30 Aug 2023 01:21:54 -0700 (PDT)
Received: by mail-ej1-x62b.google.com with SMTP id a640c23a62f3a-99bfcf4c814so691750166b.0 for <jose@ietf.org>; Wed, 30 Aug 2023 01:21:54 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693383712; x=1693988512; darn=ietf.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:from:to:cc:subject:date:message-id :reply-to; bh=tFupvfLb5ej73rxsiwc4tnhAni2CNBAZD+q8gQUoz1g=; b=LAvYC2MAiLMR5X3/42aZ9jKycG98tZxU5SBOrgc2UyNcFHGoYxBK0GaJJmOo+QWlTg e7HWPE6huTWixDPjeaNoBYED/OGjdSaW6690XnhhdREJRIdeeBnBfL9eDJxjziMnMFUK ymvITM8AkLiLTXd1gI/kwxuk2mqK7g4O97VIONt4dkM2KXBOhom9AcAMTYavvjlUYEhR RaEkpXPBKPOXhQf1byKM2JvO5arY+Iv7LnoSnBpPYUKhE7Rtuvi+FVJnugytWASVtmvR b7djXH9DHuLU3xWj4B8yxGSxYu5OxPHZN85SPDG/D/t58hclbZE4QFniVPYMiLxSy2bF pneg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693383712; x=1693988512; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :from:content-transfer-encoding:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tFupvfLb5ej73rxsiwc4tnhAni2CNBAZD+q8gQUoz1g=; b=ZuL9TsBXiYQBiorBZUbuGAtPX+9V4U1dy27B/HjI+a3FCDHBdouVlQF+TA76X9RmDf 2Gl9vUNEHdI6KrD2PcqCfCcQ/fc7zzTsqRGdqMC5lQ5rW58zwpTqXx/TdtPK1QTkkXoz jkKSrKoYdVsupRrTXWjjtTASt17A94hYKPAcWbNXXQewVmjVxeXF4MG8lBB62KorVzQY 4p7ifELF8UY5Tp4FSLnOzJ+pBt83ut55V3F9okXw99fb7zbWs5J1YMUdSIRIdlIJ+oZv mC1/TXtRlluDdIUwOXu+7MV1gnjfCAJYGTZUn0p77zuOrNzJ63cxfovqWWADsntDjsxc NPUA==
X-Gm-Message-State: AOJu0YwFXPIWZOI19YrQoEWksFgAZDbu8y92KFma7s64zIKD7u3EgWoj ZZyIQIrlN+FfqjmFfUBIYA==
X-Google-Smtp-Source: AGHT+IFtSKsln9ABfXrvJfdYMRZkPYvyWwyTZpmU9GEDHpL43PtWJ/GRe3dZTWAhjgqpcH3qWixSHQ==
X-Received: by 2002:a17:907:7758:b0:99c:6692:7f76 with SMTP id kx24-20020a170907775800b0099c66927f76mr1188784ejc.16.1693383711599; Wed, 30 Aug 2023 01:21:51 -0700 (PDT)
Received: from smtpclient.apple (cst-prg-27-97.cust.vodafone.cz. [46.135.27.97]) by smtp.gmail.com with ESMTPSA id q4-20020a170906144400b00992eabc0ad8sm6875124ejc.42.2023.08.30.01.21.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Aug 2023 01:21:51 -0700 (PDT)
Content-Type: multipart/alternative; boundary="Apple-Mail-870D209F-54A1-473F-B579-92D7A9F66513"
Content-Transfer-Encoding: 7bit
From: Filip Skokan <panva.ip@gmail.com>
Mime-Version: 1.0 (1.0)
Date: Wed, 30 Aug 2023 10:21:19 +0200
Message-Id: <B9C58AE1-3343-4358-B566-1EC305D964ED@gmail.com>
References: <MW4PR02MB74287C966F89DBE52787E914B7E6A@MW4PR02MB7428.namprd02.prod.outlook.com>
Cc: jose@ietf.org, Orie Steele <orie@transmute.industries>
In-Reply-To: <MW4PR02MB74287C966F89DBE52787E914B7E6A@MW4PR02MB7428.namprd02.prod.outlook.com>
To: Michael Jones <michael_b_jones@hotmail.com>
X-Mailer: iPhone Mail (20G75)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/M0xwYipvZaN5u1jjrvG6pGA_afQ>
Subject: Re: [jose] Fully-Specified Algorithms for JOSE and COSE
X-BeenThere: jose@ietf.org
X-Mailman-Version: 2.1.39
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: Wed, 30 Aug 2023 08:21:58 -0000
30. 8. 2023 v 3:28, Michael Jones <michael_b_jones@hotmail.com>:
_______________________________________________https://twitter.com/OR13b" rel="nofollow">Orie Steele and I have written a new specification creating algorithm identifiers for JOSE and COSE that fully specify the cryptographic operations to be performed – something we’d promised to do during https://datatracker.ietf.org/meeting/117/materials/slides-117-jose-fully-specified-algorithms-for-jose-and-cose-00" rel="nofollow">our presentation to the JOSE working group at IETF 117. The introduction to the specification (quoted below) describes why this matters.
The IANA algorithm registries for JOSE [https://www.iana.org/assignments/jose/jose.xhtml#web-signature-encryption-algorithms" rel="nofollow">IANA.JOSE.Algorithms] and COSE [https://www.iana.org/assignments/cose/cose.xhtml#algorithms" rel="nofollow">IANA.COSE.Algorithms] contain two kinds of algorithm identifiers:
· Fully Specified: Those that fully determine the cryptographic operations to be performed, including any curve, key derivation function (KDF), hash functions, etc. Examples are
RS256andES256Kin both JOSE and COSE andES256in JOSE.· Polymorphic: Those requiring information beyond the algorithm identifier to determine the cryptographic operations to be performed. Such additional information could include the actual key value and a curve that it uses. Examples are
EdDSAin both JOSE and COSE andES256in COSE.
This matters because many protocols negotiate supported operations using only algorithm identifiers. For instance, OAuth Authorization Server Metadata [https://www.rfc-editor.org/rfc/rfc8414.html" rel="nofollow">RFC8414] uses negotiation parameters like these (from an example in the specification):
"token_endpoint_auth_signing_alg_values_supported": ["RS256", "ES256"]
OpenID Connect Discovery [https://openid.net/specs/openid-connect-discovery-1_0.html" rel="nofollow">OpenID.Discovery] likewise negotiates supported algorithms using
algandencvalues. W3C Web Authentication [https://www.w3.org/TR/2021/REC-webauthn-2-20210408/" rel="nofollow">WebAuthn] and FIDO Client to Authenticator Protocol (CTAP) [https://fidoalliance.org/specs/fido-v2.1-ps-20210615/fido-client-to-authenticator-protocol-v2.1-ps-20210615.html" rel="nofollow">FIDO2] negotiate using COSEalgnumbers.
This does not work for polymorphic algorithms. For instance, with
EdDSA, you do not know which of the curvesEd25519and/orEd448are supported! This causes real problems in practice.
WebAuthn contains this de-facto algorithm definition to work around this problem:
-8 (EdDSA), where crv is 6 (Ed25519)
This redefines the COSE
EdDSAalgorithm identifier for the purposes of WebAuthn to restrict it to using theEd25519curve – making it non-polymorphic so that algorithm negotiation can succeed, but also effectively eliminating the possibility of usingEd448. Other similar workarounds for polymorphic algorithm identifiers are used in practice.
This specification creates fully-specified algorithm identifiers for all registered polymorphic JOSE and COSE algorithms and their parameters, enabling applications to use only fully-specified algorithm identifiers. It furthermore deprecates the practice of registering polymorphic algorithm identifiers.
The specification is available at:
· https://www.ietf.org/archive/id/draft-jones-jose-fully-specified-algorithms-00.html" rel="nofollow">https://www.ietf.org/archive/id/draft-jones-jose-fully-specified-algorithms-00.html
-- Mike
P.S. This note was also published at https://self-issued.info/?p=2401" rel="nofollow"> https://self-issued.info/?p=2401 and was referenced from https://twitter.com/selfissued/status/1696693714008322088" rel="nofollow"> https://twitter.com/selfissued/status/1696693714008322088.
jose mailing list
jose@ietf.org
https://www.ietf.org/mailman/listinfo/jose
- [jose] Fully-Specified Algorithms for JOSE and CO… Michael Jones
- Re: [jose] Fully-Specified Algorithms for JOSE an… Anders Rundgren
- Re: [jose] Fully-Specified Algorithms for JOSE an… Ilari Liusvaara
- Re: [jose] Fully-Specified Algorithms for JOSE an… Anders Rundgren
- Re: [jose] Fully-Specified Algorithms for JOSE an… Orie Steele
- Re: [jose] Fully-Specified Algorithms for JOSE an… Filip Skokan
- Re: [jose] Fully-Specified Algorithms for JOSE an… Brian Campbell
- Re: [jose] Fully-Specified Algorithms for JOSE an… Orie Steele
- Re: [jose] Fully-Specified Algorithms for JOSE an… Ilari Liusvaara
- Re: [jose] Fully-Specified Algorithms for JOSE an… Michael Jones
- Re: [jose] Fully-Specified Algorithms for JOSE an… Michael Jones
- Re: [jose] Fully-Specified Algorithms for JOSE an… Ilari Liusvaara
- Re: [jose] Fully-Specified Algorithms for JOSE an… Orie Steele
- Re: [jose] Fully-Specified Algorithms for JOSE an… Ilari Liusvaara