[lamps] Re: Request to Extend IETF WGLC for ML-KEM and ML-DSA private key format Specifications

Simo Sorce <ssorce@redhat.com> Wed, 22 January 2025 20:33 UTC

Return-Path: <ssorce@redhat.com>
X-Original-To: spasm@ietfa.amsl.com
Delivered-To: spasm@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A316AC1DA2EB for <spasm@ietfa.amsl.com>; Wed, 22 Jan 2025 12:33:32 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.251
X-Spam-Level:
X-Spam-Status: No, score=-2.251 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.148, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redhat.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 bWnyuSsS8PVx for <spasm@ietfa.amsl.com>; Wed, 22 Jan 2025 12:33:32 -0800 (PST)
Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-256) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1BBC5C1D4CD0 for <spasm@ietf.org>; Wed, 22 Jan 2025 12:33:32 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737578010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2uCOF19YKBxNNsSwsgTq2n8r+LD86iLVZSwDIrjHJpQ=; b=NdH0FU1q1ed5QrksXxPZFuqV0TwekbZZeKRqfEccK4khoi/9tlx2tTyokdr41WTqiDCXQH MaJdJU+1V/ZJiEHv0WZORELfXRdQEiN1K5fSe0zav0rPB6TII+9UYvl8IUH1t0abmUw7iS qGNScBQF2cldOIYT4wtWxJnnGPrAFX0=
Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-163-VCvw0zg9NVmOl1zqhk2fYQ-1; Wed, 22 Jan 2025 15:33:27 -0500
X-MC-Unique: VCvw0zg9NVmOl1zqhk2fYQ-1
X-Mimecast-MFC-AGG-ID: VCvw0zg9NVmOl1zqhk2fYQ
Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6e1e06456c1so5408986d6.1 for <spasm@ietf.org>; Wed, 22 Jan 2025 12:33:26 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737578006; x=1738182806; h=mime-version:user-agent:content-transfer-encoding:organization :references:in-reply-to:date:cc:to:from:subject:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2uCOF19YKBxNNsSwsgTq2n8r+LD86iLVZSwDIrjHJpQ=; b=I/Ct/LSde8n2amV7Es1ZPgBAltnL7Pl3+Uz/hhhuNN9FeEy0yZESR2xebjPhQhzGMI j63G9LZerQNdb3VYbICqMFdjtS/cY/3hfrmDXAp7/3XlEEOwrIXdYxeOAL1tFMLJ4gS0 9xHqlnJEzgA6B7IDZOKPSmGt6tlS1RqRuzH38vhuWTdM+fR4C2pSsgs8xwWU7cvXmr9Y qmtX0Pnt4NP3/GW9gZgQ4El+hvjaUbe4R0KvCG5zJ6K95/+6LQ/o15LDsMNSXIkOngdA fJsUQt/ghrigZvjWPvaTXoz4a01Fxw+WArmjDGIGMMTdyi1ez690EQ6sv/h0BCjsvbCl Ucjw==
X-Forwarded-Encrypted: i=1; AJvYcCUPCW06NJMkTY+oqMCVQm2VHtL5SJIglhQwfNs2GXfmXvI5ZTkdRn2vpIsjfOtR4KGB8tqBng==@ietf.org
X-Gm-Message-State: AOJu0YxU6GYcmOoMNMWxR7iNX03Jr4GukMBdpzeJHwe+I1rHYDanlUhK ZECvjxi71gfUS69A0DqUyFNc3AR2LrLeLXyC04zuggh0cFuw6F503CJm0LCckJ7mKqkzrbm2fKh WGl/RxvEqwLl9MQhafOTtl/LDOe8iQeX4uIMiVflpgDQ=
X-Gm-Gg: ASbGncuWcibHyw7PzIuYGFOjRK2VqNLN27FgB6O/b71MizfNt2qlqNEXrXtYqBrMfXv sc0hGMKDqHqplvNIPv5TDlCnHxE3tpZj3wQm3W89+dyHVYSIAtFxg6WijLoI28OKpTR0I+H1P+b Dn895ynH1Ti3JNHoUycAuTeUjN4SgC4yGvRZ9PcGHjpBchgYWiLZ1doxXs4jsTEv5HqSGVIDoxl gu853IuqqvyF/d4Sl+LRbAcQkWzPb5a21n+/Q+cGLfRS3uIga29u5ai2+BIQg5mkkk=
X-Received: by 2002:ad4:5ca5:0:b0:6d8:f7eb:199c with SMTP id 6a1803df08f44-6e1f9fa752amr10005306d6.9.1737578006023; Wed, 22 Jan 2025 12:33:26 -0800 (PST)
X-Google-Smtp-Source: AGHT+IGEvIqwGswZADvdU5FSUYkLP14PTKLwUH+9LJZ6jUOps97gT2N9O34WSdzmKwzffkF5bg/Hkw==
X-Received: by 2002:ad4:5ca5:0:b0:6d8:f7eb:199c with SMTP id 6a1803df08f44-6e1f9fa752amr10004956d6.9.1737578005593; Wed, 22 Jan 2025 12:33:25 -0800 (PST)
Received: from m8.users.ipa.redhat.com ([2603:7000:9400:fe80::986]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e1e0a39f89sm23597186d6.19.2025.01.22.12.33.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jan 2025 12:33:24 -0800 (PST)
Message-ID: <7be4c1702d3f4da31ab682e4a1928eb362f4ac25.camel@redhat.com>
From: Simo Sorce <ssorce@redhat.com>
To: Sophie Schmieg <sschmieg@google.com>, David Hook <dgh@bouncycastle.org>
Date: Wed, 22 Jan 2025 15:33:22 -0500
In-Reply-To: <CAEEbLAa88c4bQQEoK7STBwjt8so3uKVXeRfoHPqZFMRf+m4qgQ@mail.gmail.com>
References: <11c0eaaa13b74f78b2c0abe9aeae8820@amazon.com> <2460be7f-bc9d-4480-a5d4-615eb512409c@bouncycastle.org> <CAEEbLAa88c4bQQEoK7STBwjt8so3uKVXeRfoHPqZFMRf+m4qgQ@mail.gmail.com>
Organization: Red Hat
User-Agent: Evolution 3.52.4 (3.52.4-2.fc40)
MIME-Version: 1.0
X-Mimecast-Spam-Score: 0
X-Mimecast-MFC-PROC-ID: B9ZQNAd6q2nuMXh8jshUIIMcn9k-INGPLcTvHuy8Nfk_1737578006
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Message-ID-Hash: 7XWAJAX6P2XUFX6ZY776TN3WD2CICROB
X-Message-ID-Hash: 7XWAJAX6P2XUFX6ZY776TN3WD2CICROB
X-MailFrom: ssorce@redhat.com
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-spasm.ietf.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: "Kampanakis, Panos" <kpanos@amazon.com>, Viktor Dukhovni <ietf-dane@dukhovni.org>, "spasm@ietf.org" <spasm@ietf.org>, "lamps-chairs@ietf.org" <lamps-chairs@ietf.org>, "lamps-ads@ietf.org" <lamps-ads@ietf.org>, Dmitry Belyavskiy <dbelyavs@redhat.com>, Matt Caswell <matt@openssl.org>, Tim Hudson <tjh@openssl.org>, Robert Relyea <rrelyea@redhat.com>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [lamps] Re: Request to Extend IETF WGLC for ML-KEM and ML-DSA private key format Specifications
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/S9YnhrO1nWZE2ZA9AuPgAcNm3TQ>
List-Archive: <https://mailarchive.ietf.org/arch/browse/spasm>
List-Help: <mailto:spasm-request@ietf.org?subject=help>
List-Owner: <mailto:spasm-owner@ietf.org>
List-Post: <mailto:spasm@ietf.org>
List-Subscribe: <mailto:spasm-join@ietf.org>
List-Unsubscribe: <mailto:spasm-leave@ietf.org>

On Wed, 2025-01-22 at 08:50 -0800, Sophie Schmieg wrote:
> We thank Viktor and the cosignatories for their well-written input, but we
> strongly believe that:
> 
>    1.
> 
>    The private key format should be simple – meaning optimized for the
>    easiest implementation to be the correct one, and
>    2.
> 
>    If a format for NIST’s semi-expanded private key is needed, it should
>    have a separate OID.


I am sorry, but in a standard that is expected to be widely adopted the
first principle is interoperability. Standards need to be as simple as
possible but not any simpler.

The ASN.1 proposed with implicit or explicit tags is objectively
simple, and can be parsed without any ASN.1 Decoder by simple
memcmp()/memcpy() operations.

Embedding OIDs in the format as you mention in point 2 would definitely
not be simple (It is not the *algorithm* OID that would change, that
would be preposterous) and frankly excessive, at most you could request
an explicit TAG to be used, but that also seem unnecessary.

Being able to store just the SEED is fine and probably should be
recommended, but it is unclear why there is resistance to address a
clearly described interoperability request. You can blame NIST for
creating this situation if you want, but we need to deal with it,
burying our collective heads under the sand is not really helpful to
anyone.

People that do not have the need to deal with expanded keys can simply
write software that accept only the SEED portion and ignore anything
else, that software won't be any more complicated than it is today.


-- 
Simo Sorce
Distinguished Engineer
RHEL Crypto Team
Red Hat, Inc