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

Falko Strenzke <falko.strenzke@mtg.de> Fri, 25 April 2025 10:10 UTC

Return-Path: <falko.strenzke@mtg.de>
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 886012111736 for <spasm@mail2.ietf.org>; Fri, 25 Apr 2025 03:10:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: 0.315
X-Spam-Level:
X-Spam-Status: No, score=0.315 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_FONT_LOW_CONTRAST=0.001, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, SUSP_UTF8_WORD_COMBO=2.313] autolearn=no autolearn_force=no
Authentication-Results: mail2.ietf.org (amavisd-new); dkim=pass (2048-bit key) header.d=mtg.de
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 wuUiQf89RGWm for <spasm@mail2.ietf.org>; Fri, 25 Apr 2025 03:10:52 -0700 (PDT)
Received: from www.mtg.de (www.mtg.de [IPv6:2a02:b98:8:2::2]) (using TLSv1.3 with cipher TLS_CHACHA20_POLY1305_SHA256 (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 EA865211172E for <spasm@ietf.org>; Fri, 25 Apr 2025 03:10:49 -0700 (PDT)
Received: from minka.mtg.de (minka [IPv6:2a02:b98:8:1:0:0:0:9]) by www.mtg.de (8.18.1/8.18.1) with ESMTPS id 53PAAlu1010792 (version=TLSv1.3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256 verify=NOT) for <spasm@ietf.org>; Fri, 25 Apr 2025 12:10:47 +0200
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mtg.de; s=mail201801; t=1745575847; bh=B1Nf8pPu4yQ8/My2GgGuk6SQRXO0+UJDjPtBu3Z7FNg=; h=Date:Subject:From:To:References:In-Reply-To; b=Q4T5U1vq5K4VcZVd/RTSsTuMotF14bEza5DsZBmCsJTK6LgNmzEaKomVrI0UyngOg cKQqj6u4KYn5tC6h1VR4BpTubIWkDWBghH0WBVdgPTaNm49l+39KcuNy4r62dBmS1I 1+MlJHrOcw1DkAEtF425a2P8Efh8XQs81m5Xyhw9GsRwWAOHfhJc6hS0iezTyXxkY2 uEykCEkIb8oe+YkdPR7Ic6RRx4l57VesgSJaeAl47K7D9plCizNPdaUldrJCSzdRBt MrVv066EA7j/6IYBBJjTR9pZkGFAYuXPLYw0v7MyIV11sfD93OPVcr4Ch0PFw+HSwO BvGvT6C8Zf71w==
Received: from [10.8.0.100] (vpn-10-8-0-100 [10.8.0.100]) by minka.mtg.de (8.18.1/8.18.1) with ESMTPS id 53PAAjIb001401 (version=TLSv1.3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256 verify=NOT) for <spasm@ietf.org>; Fri, 25 Apr 2025 12:10:45 +0200
Message-ID: <54a06be3-a17d-48ee-972b-82528e6c03ef@mtg.de>
Date: Fri, 25 Apr 2025 12:10:45 +0200
MIME-Version: 1.0
User-Agent: Mozilla Thunderbird
From: Falko Strenzke <falko.strenzke@mtg.de>
To: spasm@ietf.org
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>
Content-Language: en-GB
Organization: MTG AG
In-Reply-To: <49c6270c-c691-4f59-86fe-9ec5542b9c36@mtg.de>
Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg="sha-512"; boundary="------------ms030004050109060808010304"
Message-ID-Hash: FCR6K5FG4G4IVMKWBSDINR2ID7DFZPTK
X-Message-ID-Hash: FCR6K5FG4G4IVMKWBSDINR2ID7DFZPTK
X-MailFrom: falko.strenzke@mtg.de
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
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/JOIXDWGR33cfsS5eDTIutrikB5o>
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>

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 
thestateful 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>
>>>> *Sent:* Monday, March 24, 2025 7:29 AM
>>>> *To:* Daniel Van Geest <daniel.vangeest@cryptonext-security.com>
>>>> *Cc:* spasm@ietf.org <spasm@ietf.org>; IETF Internet-Drafts 
>>>> <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>
>>>> 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> 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::internet-drafts
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Spasm mailing list --spasm@ietf.org <mailto:spasm@ietf.org>
>>>>>> To unsubscribe send an email tospasm-leave@ietf.org <mailto:spasm-leave@ietf.org>
>>>>> _______________________________________________
>>>>> Spasm mailing list -- spasm@ietf.org
>>>>> To unsubscribe send an email to spasm-leave@ietf.org
>>>>
>>>>
>>>> _______________________________________________
>>>> Spasm mailing list --spasm@ietf.org
>>>> To unsubscribe send an email tospasm-leave@ietf.org
>>> -- 
>>>
>>> *MTG AG*
>>> Dr. Falko Strenzke
>>>
>>> Phone: +49 6151 8000 24
>>> E-Mail: 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
>> To unsubscribe send an email tospasm-leave@ietf.org
> -- 
>
> *MTG AG*
> Dr. Falko Strenzke
>
> Phone: +49 6151 8000 24
> E-Mail: 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
> To unsubscribe send an email tospasm-leave@ietf.org
-- 

*MTG AG*
Dr. Falko Strenzke

Phone: +49 6151 8000 24
E-Mail: 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>