Re: [jose] Call for Adoption: draft-jones-jose-fully-specified-algorithms

Neil Madden <neil.e.madden@gmail.com> Fri, 05 January 2024 21:19 UTC

Return-Path: <neil.e.madden@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 F1B68C2D5827 for <jose@ietfa.amsl.com>; Fri, 5 Jan 2024 13:19:02 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.215
X-Spam-Level:
X-Spam-Status: No, score=-1.215 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] 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 S6JMyXeFsT_x for <jose@ietfa.amsl.com>; Fri, 5 Jan 2024 13:19:02 -0800 (PST)
Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) (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 9CE7FC26F264 for <jose@ietf.org>; Fri, 5 Jan 2024 13:18:57 -0800 (PST)
Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-40e34d136d5so13535e9.0 for <jose@ietf.org>; Fri, 05 Jan 2024 13:18:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704489535; x=1705094335; darn=ietf.org; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :content-transfer-encoding:from:from:to:cc:subject:date:message-id :reply-to; bh=NlX41kTWw3LBWs5xkYc3P8Xp/DfsZEy0+gnqvRVGmaI=; b=a9GpC1jzhZuIo7xxU0WwKhxbxCUIduNR59qO1k98l31MO+Lw0UhDtxN8sBkdUrAfUj zCJ1wlMMQ7SV9bEDb7HXMrszMEB+Y/MRr2L8lNF8sbd0ZxHpJytkC2qZxIPcCIF/y/Li 1RyBM6hVT2b8pVJ4bVODMRTkt3hxjafKxphN5FADvgGNP7fuZF7qafCn70KQd93Nj/Pl 1O5AIVxKKbuCWJLm9IAWJMXApwbXQ+6GgNmY+eRFs9pmdk7K8Yj86DikyLsfPBWWTQRv QALcpi6090yLwfIzVGtxUaxFxSgXQMxpzCAf2PBudcjKq7dEIqvbpD0qhzn7uxYdreX1 857g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704489535; x=1705094335; h=to:in-reply-to:cc:references:message-id:date:subject:mime-version :content-transfer-encoding:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NlX41kTWw3LBWs5xkYc3P8Xp/DfsZEy0+gnqvRVGmaI=; b=DQE+SBVOGoGy4IQnMM20HkPPyVFT0kQVX8Op/zCUH5VPDH0x89BPaacLi0SPd0F60e LabEabDLfOkwXaYpxNcL8qrchyq3PTPP814WE93GdoXpDZpqXgOOgmOiUi0sVqomVamp tVtczp3lSTd4keJe8xDJmUlyhxmADWYI81F2nlFc1aoXsNK6MBvxMkcXzKYmCyhjXvZf rf7Nl2q1ds94/1vzVu391P3RMJvIW/OvBRSnsiEEdl5+ETDAWYzu/vOg9a/M1AH7zCr+ CA7RYtC0JKLIDSwaHxFtfXuxEV3bIoBJfEipWbQ7vqpIUZXTj7cEOKNxDfG24ifozCWS TLCA==
X-Gm-Message-State: AOJu0YwXALaHxI5U3Lc8jUT6vX6aTTjcr/dwng5hiagbH9V/bTHv2VeF gzgaewY+ps0AsSTWdLRsHXE=
X-Google-Smtp-Source: AGHT+IFfQ0Mxl42BPsPt+alYAurBPDuR1CkxmU9K+coYxhnddZJZBDkm+QDzVBDHf8VDZ2hEuIGxBA==
X-Received: by 2002:a05:600c:5108:b0:40d:5ae4:726a with SMTP id o8-20020a05600c510800b0040d5ae4726amr110485wms.4.1704489535293; Fri, 05 Jan 2024 13:18:55 -0800 (PST)
Received: from smtpclient.apple (11.133.143.150.dyn.plus.net. [150.143.133.11]) by smtp.gmail.com with ESMTPSA id fc7-20020a05600c524700b0040d7b340e07sm2633769wmb.45.2024.01.05.13.18.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 05 Jan 2024 13:18:54 -0800 (PST)
From: Neil Madden <neil.e.madden@gmail.com>
X-Google-Original-From: Neil Madden <Neil.E.Madden@gmail.com>
Content-Type: multipart/alternative; boundary="Apple-Mail-8196DB5E-5AC6-4480-A091-CEC4EE41BCCC"
Content-Transfer-Encoding: 7bit
Mime-Version: 1.0 (1.0)
Date: Fri, 05 Jan 2024 21:18:42 +0000
Message-Id: <9F1370E2-FB28-4030-932B-2B967C962667@gmail.com>
References: <B28A795E-EA91-4F2E-8F26-422C1C4E7E4E@gmail.com>
Cc: Orie Steele <orie@transmute.industries>, Karen ODonoghue <kodonog@pobox.com>, jose@ietf.org
In-Reply-To: <B28A795E-EA91-4F2E-8F26-422C1C4E7E4E@gmail.com>
To: Neil Madden <neil.e.madden@gmail.com>
X-Mailer: iPhone Mail (21B101)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jose/CdXcRwFTt-b2I0DuWRZJ5VEGc14>
Subject: Re: [jose] Call for Adoption: draft-jones-jose-fully-specified-algorithms
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: Fri, 05 Jan 2024 21:19:03 -0000



On 5 Jan 2024, at 20:30, Neil Madden <neil.e.madden@gmail.com> wrote:



On 4 Jan 2024, at 19:37, Orie Steele <orie@transmute.industries> wrote:

A similar issue occurs with secp256k1 and ecdsa today.

Some implementations normalize to lower-s (and expect it), others don't.

When you cross test, you get errors in implementations that assume ES256K is always lower S, and it's not... that's for the same ES256K public key (arguably an even worse problem).

The point being that we could fix this by making "ES256K-LS", and we'd have the same problem with older implementations that advertised ES256K.

I'm not familiar with this issue or what "lower S" refers to here. Do you mean some implementations spell the algorithm "Es256K" with a lowercase s?

I’ve just twigged that you’re referring to the s-value in the signature! Presumably some libraries are rejecting non-canonical signature values? I guess that’s an artifact of secp256k1 being the Bitcoin curve and hence a lot of libraries impose additional constraints, for consensus reasons, beyond what is required for signature security. That seems like a straightforward bug in JOSE/COSE implementations that use those libraries.

— Neil