[lamps] Re: I-D Action: draft-ietf-lamps-x509-slhdsa-04.txt

Russ Housley <housley@vigilsec.com> Fri, 25 April 2025 14:58 UTC

Return-Path: <housley@vigilsec.com>
X-Original-To: spasm@mail2.ietf.org
Delivered-To: spasm@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id AA6342132300 for <spasm@mail2.ietf.org>; Fri, 25 Apr 2025 07:58:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 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, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=vigilsec.com
Received: from mail2.ietf.org ([166.84.6.31]) by localhost (mail2.ietf.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F_TOvUXPHoLw for <spasm@mail2.ietf.org>; Fri, 25 Apr 2025 07:58:37 -0700 (PDT)
Received: from mail3.g24.pair.com (mail3.g24.pair.com [66.39.134.11]) (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 mail2.ietf.org (Postfix) with ESMTPS id CD7B121322F6 for <spasm@ietf.org>; Fri, 25 Apr 2025 07:58:37 -0700 (PDT)
Received: from mail3.g24.pair.com (localhost [127.0.0.1]) by mail3.g24.pair.com (Postfix) with ESMTP id CCD4B1A1C1D; Fri, 25 Apr 2025 10:58:36 -0400 (EDT)
Received: from smtpclient.apple (unknown [96.241.2.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail3.g24.pair.com (Postfix) with ESMTPSA id B59431A2D0D; Fri, 25 Apr 2025 10:58:36 -0400 (EDT)
From: Russ Housley <housley@vigilsec.com>
Message-Id: <7FDE1BAE-919A-4BDD-B002-12916D43F0F0@vigilsec.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_C9F8713C-2F9A-43C5-B37D-1191D176A75A"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.500.181.1.5\))
Date: Fri, 25 Apr 2025 10:58:26 -0400
In-Reply-To: <54a06be3-a17d-48ee-972b-82528e6c03ef@mtg.de>
To: Falko Strenzke <falko.strenzke@mtg.de>
References: <174223063931.385816.3602373685012148547@dt-datatracker-5b9b68c5b6-zxk6z> <ead8df8b-00ed-4ba6-875e-0818d68a2556@cryptonext-security.com> <8D6B5222-7DBD-4288-8A45-18EEF57941C8@vigilsec.com> <DU0PR03MB8696F1EE10DA6C73B5CC951E86A42@DU0PR03MB8696.eurprd03.prod.outlook.com> <1f94f907-d092-45bb-9267-f476fa45de6c@mtg.de> <f3d30ee2-b26f-4846-b546-b092720145b4@nist.gov> <49c6270c-c691-4f59-86fe-9ec5542b9c36@mtg.de> <54a06be3-a17d-48ee-972b-82528e6c03ef@mtg.de>
X-Mailer: Apple Mail (2.3826.500.181.1.5)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vigilsec.com; h=from:message-id:content-type:mime-version:subject:date:in-reply-to:cc:to:references; s=pair-202402141609; bh=ZjA7O1FbsqZ0aFTz8aGl70yuyV2paRILDi0eE2kpz5Q=; b=V5kYARLj4YiM6Ah0iggX7A8cEZZuNW/YKyIOyPaKpqJkn/Ss8tYiG+IuIaoqs4twAoIX9FQGtz5G55Sktd4M5AU33aTIwJeaM6p5P69JstdfZWOTIqlQbjmOw3uaf7gl2Dp9WYDsdzmP9KhBxeVhwcg9wpfVEW+FeQrHiUOt2gqdl3Co84sZ8XMxFUlp6fJxbsTA11rmxt8Uwp21FW9ewmJYeMQtJbAs4xIv4qRqLZ0gtlAYUU9Z8AnThXLrmjJHI6C6S7W1A6JYJPjclFQEdxML12iCkMz3WDIvF2+o5iR4qLIbbGmT37RXSZ7y5wmH8HrBwcwc1zc4myzxy4dXkg==
X-Scanned-By: mailmunge 3.09 on 66.39.134.11
Message-ID-Hash: JASGFK2ULD35LFKWYBBURRXHSPP7O2LK
X-Message-ID-Hash: JASGFK2ULD35LFKWYBBURRXHSPP7O2LK
X-MailFrom: housley@vigilsec.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: spasm@ietf.org
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [lamps] Re: I-D Action: draft-ietf-lamps-x509-slhdsa-04.txt
List-Id: This is the mail list for the LAMPS Working Group <spasm.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/spasm/R-th2NWLTc6aPTqSmWc7oCTW8c8>
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>

Falko:

The structure of these signatures is not defined by LAMPS.  There are RFCs for LMS and XMSS.  There is a FIPS for SLH-DSA.

LAMPS could recommend that the parameters of the AlgorithmIdentifier repeat some of the information from the signature value, but this really introduces another possible failure case, especially since the parameters are not integrity protected in amny situations.

Russ


> On Apr 25, 2025, at 6:10 AM, Falko Strenzke <falko.strenzke@mtg.de> wrote:
> 
> Unfortunately I rested my case too early. David's comment about the SLH-DSA verification not being two-pass is correct, but that is actually not the point here (and thus the wording of my initial message below is incorrect).
> 
> The relevant fact is that in the digest computation that is internal to the SLH-DSA verification, the randomizer R from the signature is needed before message can be consumed "destructively". This means that for a certificate or CRL, where the signature comes at the end, the verifier still needs store the full message before they can compute 
> 
> digest ← H𝑚𝑠𝑔(𝑅, PK.seed, PK.root, 𝑀 )
> 
> after having received the signature.
> 
> The same applies to XMSS and LMS in draft-ietf-lamps-x509-shbs-09. Both of these signature schemes also include randomizers that need to be taken from the signature and must be fed to the internal hash before the message during the verification. And to my understanding draft-ietf-lamps-x509-shbs-09 does not specify a pre-hash variant for the stateful hash-based algorithms. Since with those algorithms not even end-entity keys can use pre-hashing, protocols that need to verify large data will have to specify pre-hashing on their own layer or send the signature first.
> 
> I wonder whether this lack of streaming capabilities of stateful hash-based signatures for X.509 objects has been consciously taken into account for draft-ietf-lamps-x509-shbs-09. It affects the processing of CRLs and and potentially that of X.509 certificates (certificates are affected for instance in case they contain large PQ public keys which themselves can be processed in a streaming manner, as it is the case for McEliece) on memory-constrained devices.
> 
> In my view, the right place for the randomizer (and generally all other information that is not part of the public key and needs to be fed to the signature-internal hash before the message) would be a parameter in the AlgorithmIdentifier. In my understanding, the AlgorithmIdentifier is intended to convey all information that is needed to start the message digestion (this is why it contained early in the certificate and CRL TBS data even though it is contained a second time in the top-level structure after the TBS). With the hash-and-sign paradigm, this information was only the hash algorithm itself – for these new algorithms, it requires more. But note that the Alg-ID-parameter approach, if introduced now or later, is not compatible with what PKCS#11 v3.2 plans to specify with the "VerifySignature" set of functions – these expect the whole signature prior to the message.
> 
> Note also that any solution that sends the signature prior to the message is less efficient in terms of memory usage than sending the randomizer, then the message, and then the signature. This is especially relevant since hash-based signatures have considerable size.
> 
> Falko
> 
> 
> Am 24.03.25 um 16:51 schrieb Falko Strenzke:
>> I see, my error. In that case there is no concern for embedded devices that needs to be documented. Signing certificates and CRLs is certainly not relevant for them.
>> 
>> Falko
>> 
>> Am 24.03.25 um 16:39 schrieb David A. Cooper:
>>> SLH-DSA signing requires two passes over the message, but verification only requires one pass.
>>> 
>>> On 3/24/25 12:37 AM, Falko Strenzke wrote:
>>>> Another restriction that is worth mentioning in my view is that SLH-DSA as specified in this draft for CA certificates and CRLs prevents on-line (a.k.a. streaming) processing of these objects if they are signed with SLH-DSA. The reason is that the draft specifies the pure variant for theses objects, and that SLH-DSA signing and verification requires two passes over the message.
>>>> 
>>>> This is a significant restriction for embedded devices. Both types of objects can be of considerable size. This applies for instance to certificates that certify large public keys, as it would be the case for Classic McEliece, should it ever be standardised. McEliece encryption itself can be performed in an on-line manner. For an SLH-DSA-signed McEliece EE-certificate, it will nevertheless be required to store the full certificate in memory. And CRLs can obviously be large. Normally, they can naturally be processed in an on-line manner.
>>>> 
>>>> The availability of on-line processing of X.509 objects is historically accounted for: Both certificates and CRLs carry a copy of the signature algorithm very early in the TBS data for this purpose. Dropping support for on-line processing for the case of SLH-DSA in my view deserves documenting that decision and possibly also giving a reason.
>>>> 
>>>> Falko
>>>> 
>>>> Am 24.03.25 um 08:15 schrieb Tomas Gustavsson:
>>>>> I could not find a mentioning of the size limitations when using SLH-DSA with an HSM in the draft. Is it there but I missed it?
>>>>> 
>>>>> I think it's import to make this limitation noted as a consideration in the draft as this limits the use cases for SLH-DSA. I.e. it may be usable for a Root CA but not for EE certificates in most cases. The reason being that when using an HSM there are varying size limitation to how much data can be sent to an HSM. In my testing with ML-DSA (without external mu) and LMS it ranges from ability to have CRLs with as little at 2000 revocation entries, up to a few millions, but not more. Some HSMs will not be able to issue even SLH-DSA certificates without re-working of APIs. EE certificates with many SANs for example can also exceed the size limits of HSM signing operations.
>>>>> 
>>>>> If we know there is a limitation on use case it's ok, I think that it should be clear for anyone reading the RFC that this is the case, that will save us a lot of trouble.
>>>>> 
>>>>> Regards,
>>>>> Tomas
>>>>> 
>>>>> From: Russ Housley <housley@vigilsec.com> <mailto:housley@vigilsec.com>
>>>>> Sent: Monday, March 24, 2025 7:29 AM
>>>>> To: Daniel Van Geest <daniel.vangeest@cryptonext-security.com> <mailto:daniel.vangeest@cryptonext-security.com>
>>>>> Cc: spasm@ietf.org <mailto:spasm@ietf.org> <spasm@ietf.org> <mailto:spasm@ietf.org>; IETF Internet-Drafts <internet-drafts@ietf.org> <mailto:internet-drafts@ietf.org>
>>>>> Subject: [lamps] Re: I-D Action: draft-ietf-lamps-x509-slhdsa-04.txt
>>>>>  
>>>>> Daniel:
>>>>> 
>>>>> Will version -05 be needed?  I do not think ths SLH-DSA has the external Mu issue.  That said, I do not see a reason fir used Pre-hash mode for certificatee with SLH-DSA.
>>>>> 
>>>>> Russ
>>>>> 
>>>>> 
>>>>>> On Mar 19, 2025, at 11:42 AM, Daniel Van Geest <daniel.vangeest=40cryptonext-security.com@dmarc.ietf.org> <mailto:daniel.vangeest=40cryptonext-security.com@dmarc.ietf.org> wrote:
>>>>>> 
>>>>>> We think this version addresses all the WGLC comments, except maybe Mike Ounsworth's HashSLH-DSA ones.
>>>>>> Given the changes to ExternalMu in dilithium-certificates since those comments, I wanted to see if his comments still hold.
>>>>>> Here are the differences regarding pre-hashing between the two drafts.
>>>>>> dilithium-certificates:
>>>>>> - prohibits HashML-DSA signatures on PKIX objects
>>>>>> - otherwise does not prohibit HashML-DSA public keys in EE certificates, but doesn't specify conventions for them
>>>>>> - describes ExternalMu in an appendix
>>>>>> - provides rationale for disallowing HashML-DSA and preferring ExternalMu
>>>>>> x509-slhdsa:
>>>>>> - prohibits HashSLH-DSA signatures on certificates and CRLs
>>>>>> - allows the use of HashSLH-DSA public keys in EE certificates for non-PKIX use, and specifies conventions for them
>>>>>> - no SLH-DSA equivalent of ExternalMu
>>>>>> - no ExternalMu to have a rationale for preferring, no rationale for disallowing HashSLH-DSA
>>>>>> Should either of these drafts change on these points, to align with the other?
>>>>>> Thanks,
>>>>>> Daniel
>>>>>> On 2025-03-17 4:57 p.m., internet-drafts@ietf.org <mailto:internet-drafts@ietf.org> wrote:
>>>>>>> Internet-Draft draft-ietf-lamps-x509-slhdsa-04.txt is now available. It is a
>>>>>>> work item of the Limited Additional Mechanisms for PKIX and SMIME (LAMPS) WG
>>>>>>> of the IETF.
>>>>>>> 
>>>>>>>    Title:   Internet X.509 Public Key Infrastructure: Algorithm Identifiers for SLH-DSA
>>>>>>>    Authors: Kaveh Bashiri
>>>>>>>             Scott Fluhrer
>>>>>>>             Stefan-Lukas Gazdag
>>>>>>>             Daniel Van Geest
>>>>>>>             Stavros Kousidis
>>>>>>>    Name:    draft-ietf-lamps-x509-slhdsa-04.txt
>>>>>>>    Pages:   42
>>>>>>>    Dates:   2025-03-17
>>>>>>> 
>>>>>>> Abstract:
>>>>>>> 
>>>>>>>    Digital signatures are used within X.509 Public Key Infrastructure
>>>>>>>    such as X.509 certificates, Certificate Revocation Lists (CRLs), and
>>>>>>>    to sign messages.  This document describes the conventions for using
>>>>>>>    the Stateless Hash-Based Digital Signature Algorithm (SLH-DSA) in
>>>>>>>    X.509 Public Key Infrastructure.  The conventions for the associated
>>>>>>>    signatures, subject public keys, and private keys are also described.
>>>>>>> 
>>>>>>> The IETF datatracker status page for this Internet-Draft is:
>>>>>>> https://datatracker.ietf.org/doc/draft-ietf-lamps-x509-slhdsa/ <https://urldefense.com/v3/__https://datatracker.ietf.org/doc/draft-ietf-lamps-x509-slhdsa/__;!!BjbSd3t9V7AnTp3tuV-82YaK!1-afJO-F9Z1fZFCWdItmPr9N_mFoB6X8429Rs8O5yfkOtIoxohhJkLT3qmfhUNUL2MGafUz8hDL6LJH0ypDHUaHpiw$>
>>>>>>> 
>>>>>>> There is also an HTML version available at:
>>>>>>> https://www.ietf.org/archive/id/draft-ietf-lamps-x509-slhdsa-04.html <https://urldefense.com/v3/__https://www.ietf.org/archive/id/draft-ietf-lamps-x509-slhdsa-04.html__;!!BjbSd3t9V7AnTp3tuV-82YaK!1-afJO-F9Z1fZFCWdItmPr9N_mFoB6X8429Rs8O5yfkOtIoxohhJkLT3qmfhUNUL2MGafUz8hDL6LJH0ypBuJLreDQ$>
>>>>>>> 
>>>>>>> A diff from the previous version is available at:
>>>>>>> https://author-tools.ietf.org/iddiff?url2=draft-ietf-lamps-x509-slhdsa-04 <https://urldefense.com/v3/__https://author-tools.ietf.org/iddiff?url2=draft-ietf-lamps-x509-slhdsa-04__;!!BjbSd3t9V7AnTp3tuV-82YaK!1-afJO-F9Z1fZFCWdItmPr9N_mFoB6X8429Rs8O5yfkOtIoxohhJkLT3qmfhUNUL2MGafUz8hDL6LJH0ypCcrp0cwg$>
>>>>>>> 
>>>>>>> Internet-Drafts are also available by rsync at:
>>>>>>> rsync.ietf.org <http://rsync.ietf.org/>::internet-drafts
>>>>>>> 
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> Spasm mailing list -- spasm@ietf.org <mailto:spasm@ietf.org>
>>>>>>> To unsubscribe send an email to spasm-leave@ietf.org <mailto:spasm-leave@ietf.org>
>>>>>> _______________________________________________
>>>>>> Spasm mailing list -- spasm@ietf.org <mailto:spasm@ietf.org>
>>>>>> To unsubscribe send an email to spasm-leave@ietf.org <mailto:spasm-leave@ietf.org>
>>>>> 
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Spasm mailing list -- spasm@ietf.org <mailto:spasm@ietf.org>
>>>>> To unsubscribe send an email to spasm-leave@ietf.org <mailto:spasm-leave@ietf.org>
>>>> -- 
>>>> MTG AG
>>>> Dr. Falko Strenzke 
>>>> Phone: +49 6151 8000 24
>>>> E-Mail: falko.strenzke@mtg.de <mailto:falko.strenzke@mtg.de>
>>>> Web: mtg.de <https://www.mtg.de/>
>>>> MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
>>>> Commercial register: HRB 8901
>>>> Register Court: Amtsgericht Darmstadt
>>>> Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
>>>> Chairman of the Supervisory Board: Dr. Thomas Milde
>>>> 
>>>> This email may contain confidential and/or privileged information. If you are not the correct recipient or have received this email in error, 
>>>> please inform the sender immediately and delete this email.Unauthorised copying or distribution of this email is not permitted.
>>>> 
>>>> Data protection information: Privacy policy <https://www.mtg.de/en/privacy-policy>
>>> 
>>> 
>>> _______________________________________________
>>> Spasm mailing list -- spasm@ietf.org <mailto:spasm@ietf.org>
>>> To unsubscribe send an email to spasm-leave@ietf.org <mailto:spasm-leave@ietf.org>
>> -- 
>> MTG AG
>> Dr. Falko Strenzke 
>> Phone: +49 6151 8000 24
>> E-Mail: falko.strenzke@mtg.de <mailto:falko.strenzke@mtg.de>
>> Web: mtg.de <https://www.mtg.de/>
>> MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
>> Commercial register: HRB 8901
>> Register Court: Amtsgericht Darmstadt
>> Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
>> Chairman of the Supervisory Board: Dr. Thomas Milde
>> 
>> This email may contain confidential and/or privileged information. If you are not the correct recipient or have received this email in error, 
>> please inform the sender immediately and delete this email.Unauthorised copying or distribution of this email is not permitted.
>> 
>> Data protection information: Privacy policy <https://www.mtg.de/en/privacy-policy>
>> 
>> _______________________________________________
>> Spasm mailing list -- spasm@ietf.org <mailto:spasm@ietf.org>
>> To unsubscribe send an email to spasm-leave@ietf.org <mailto:spasm-leave@ietf.org>
> -- 
> MTG AG
> Dr. Falko Strenzke 
> Phone: +49 6151 8000 24
> E-Mail: falko.strenzke@mtg.de <mailto:falko.strenzke@mtg.de>
> Web: mtg.de <https://www.mtg.de/>
> MTG AG - Dolivostr. 11 - 64293 Darmstadt, Germany
> Commercial register: HRB 8901
> Register Court: Amtsgericht Darmstadt
> Management Board: Jürgen Ruf (CEO), Tamer Kemeröz
> Chairman of the Supervisory Board: Dr. Thomas Milde
> 
> This email may contain confidential and/or privileged information. If you are not the correct recipient or have received this email in error, 
> please inform the sender immediately and delete this email.Unauthorised copying or distribution of this email is not permitted.
> 
> Data protection information: Privacy policy <https://www.mtg.de/en/privacy-policy>_______________________________________________
> Spasm mailing list -- spasm@ietf.org <mailto:spasm@ietf.org>
> To unsubscribe send an email to spasm-leave@ietf.org <mailto:spasm-leave@ietf.org>