[Ssh] Re: Supporting pure ML-DSA as hostkey and authkey

Filippo Valsorda <filippo@ml.filippo.io> Wed, 29 April 2026 17:33 UTC

Return-Path: <filippo@ml.filippo.io>
X-Original-To: ssh@mail2.ietf.org
Delivered-To: ssh@mail2.ietf.org
Received: from localhost (localhost [127.0.0.1]) by mail2.ietf.org (Postfix) with ESMTP id D00A6E5D86BD for <ssh@mail2.ietf.org>; Wed, 29 Apr 2026 10:33:18 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ietf.org; s=ietf1; t=1777483998; bh=EmEdnnqNoifX3W78kSBmfCDPnYTpC321e5e8XlDBSyQ=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=tdxFTIPPQIggA4h1xrKbNz/yNDvpWW8IY6g8cUrU28iswZELebohibS8y7RueIkT5 FgdqMjVbDFZCq3ejlxyKyMW1IjmhKvXOTyiXVpMHAPfz2CUhrMzRGFIFTQyL1zCa2y gEeFHWJBF7V0HdWLjOD+HGCQhbmnVOqvqraRkDoM=
X-Virus-Scanned: amavisd-new at ietf.org
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_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=filippo.io header.b="AqYG/Xfc"; dkim=pass (2048-bit key) header.d=messagingengine.com header.b="ssS8y5Bv"
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 6cZnJFesdePi for <ssh@mail2.ietf.org>; Wed, 29 Apr 2026 10:33:16 -0700 (PDT)
Received: from fhigh-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) (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 675DCE5D8635 for <SSH@ietf.org>; Wed, 29 Apr 2026 10:33:16 -0700 (PDT)
Received: from phl-compute-09.internal (phl-compute-09.internal [10.202.2.49]) by mailfhigh.phl.internal (Postfix) with ESMTP id 2EF401400105; Wed, 29 Apr 2026 13:33:16 -0400 (EDT)
Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-09.internal (MEProxy); Wed, 29 Apr 2026 13:33:16 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=filippo.io; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1777483996; x=1777570396; bh=xSAEJDN6BTOzj3CLDtWNYR3HExY6Bb7wd8KykpCOiZI=; b= AqYG/XfcohAuwspGflTyI7KrTSalZAFP/BFC9b874PwVfdBYh5japcS4PfjnG4Ek atL04z5CwKWSS4sTC5Im1EZdYqJTLvMtefNDFz8v+4CyEsgjkpYf38A5Si1rQGHv EAl6gDh1h0DrnA17j7HjxAStDA7Z08EH7jtwFzQNZrJ90Pnb6iEQui3ZAPcQT0Gr 1QAfScPsOX32J/9ENfWoL9p5ZgwxLdrH8wTQjqXuL/S+dvhU1AeHa2ETq7t1XMYU lw+/FzfCrPttYDom4d9ysyHiY73Gy85pQwjPkU8tCzSTyU8yOMoLJZNJECOnOCQH LYVVZyq7FqfIFlQmxXK9OA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1777483996; x= 1777570396; bh=xSAEJDN6BTOzj3CLDtWNYR3HExY6Bb7wd8KykpCOiZI=; b=s sS8y5BvJis/2SCkqRs/c6BRwgzZywDzyabCTp3SOZUkCFGLZrtdaVlsEJzoC9nUf Vf+NwKUtCYDTPbQm03MNu7i+FgRcWOmOtmdkaqNeGNo+L5oZJbeRnQW5ke7FtWsR sRliNDz7JvmvJGdvJf7FiFr8ojBOrtefvkb/i1bZpnz8Le15ZtezqdGSKkWgPyoN 3Bc1By1fGipsG6Ii7WpeE/5mlRydNcHeaq5m8XjV4uI9kqKpMKyjnV1OLq9Vo2YH cuCLbTG0WJiVyye46jV6mQHn/DKDhushOdTUo/VZ110qyuw64wSj3VoX7xVDsfbj OyWhHgRcU9T6nYFuoMGeg==
X-ME-Sender: <xms:20DyaX91P2-nTdBlS1kcjh56ms-cx5qjWT-oUmDt3470WjPtxJA6oQ> <xme:20Dyaej0N7Dq3a0zjq_v6tgUTbPCzLW9Qm91XzYs1P0xkrJysvzMe9dsQ73EO-t-K 3GqwfUjdpM2V_mZL2vbIxbtCNiQnydjK_N_2ZlkfHTeuJP_O6jBKVo>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefhedrtddtgdekhedthecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefoggffhffvvefkjghfufgtgfesthejredtredttdenucfhrhhomhepfdfhihhlihhp phhoucggrghlshhorhgurgdfuceofhhilhhiphhpohesmhhlrdhfihhlihhpphhordhioh eqnecuggftrfgrthhtvghrnhepkedvkefhhffgtdfgleffgfdtvddvheffkeehieevieeh feduudfgieejfeekvedunecuffhomhgrihhnpehivghtfhdrohhrghdpghholhgrnhhgrd horhhgpdhgihhthhhusgdrtghomhenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgr mhepmhgrihhlfhhrohhmpehfihhlihhpphhosehmlhdrfhhilhhiphhpohdrihhopdhnsg gprhgtphhtthhopeegpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehnihgtohhl rgdrmhhurhhinhhosehgmhgrihhlrdgtohhmpdhrtghpthhtohepfigrthhsohhnsghlrg guugesghhmrghilhdrtghomhdprhgtphhtthhopehsshhhsehivghtfhdrohhrghdprhgt phhtthhopegujhhmsehmihhnughrohhtrdhorhhg
X-ME-Proxy: <xmx:20DyabB-seYBHckRLdOtQm5MhcSVR7Xgm0Jjl28E40opZJ9YbtbKVw> <xmx:20DyaYjR036DvgGIBOk4rfHftrM1SvVYoy45YKGqpHxpG2SlUwEsMw> <xmx:20Dyabl0utUjs5PTc4Qe-ZFyEP0xYTw7Lsn95PfPzh_UmqllKVOxjA> <xmx:20Dyacr27WZPxnLQl8SmfyTx7ES0PHs0weo4hi_zCyxg2bLvphuZnw> <xmx:3EDyafhzx1SSgGnoBXXrL3kPOSpiIdW5P_ZQ1NFGp8SbjXn3MbG2fNJR>
Feedback-ID: i2e91459c:Fastmail
Received: by mailuser.phl.internal (Postfix, from userid 501) id 7AC6C700065; Wed, 29 Apr 2026 13:33:15 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
MIME-Version: 1.0
X-ThreadId: A_AVEdQZ0ntZ
Date: Wed, 29 Apr 2026 19:32:54 +0200
From: Filippo Valsorda <filippo@ml.filippo.io>
To: Damien Miller <djm@mindrot.org>
Message-Id: <b3047f6f-1b17-4832-86b2-d2878221ea06@app.fastmail.com>
In-Reply-To: <534410e1-5a26-f610-ba68-1f0595ab7a64@mindrot.org>
References: <68bc138c-ccfc-2d97-0f25-64271655c23b@mindrot.org> <CACsn0ckzxMZRN6MxmkUjByzzgbgJdH3eRxVT1dA37TYQHeUq2Q%mail.gmail.com@mailhub.eait.uq.edu.au> <461a8358-8bd8-4f45-f8f3-073f993fb18f@mindrot.org> <ba9669a6-65a6-4276-8306-bd55ef0d146f@app.fastmail.com> <534410e1-5a26-f610-ba68-1f0595ab7a64@mindrot.org>
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Message-ID-Hash: OAL6UHBRE2IOQKWQRLCXAZD5NEUCSK7R
X-Message-ID-Hash: OAL6UHBRE2IOQKWQRLCXAZD5NEUCSK7R
X-MailFrom: filippo@ml.filippo.io
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header
CC: Watson Ladd <watsonbladd@gmail.com>, "ssh@ietf.org" <SSH@ietf.org>, Nicola Murino <nicola.murino@gmail.com>
X-Mailman-Version: 3.3.9rc6
Precedence: list
Subject: [Ssh] Re: Supporting pure ML-DSA as hostkey and authkey
List-Id: "The SSH mail list will allow discussions on improving aspects of the Secure Shell (SSH) protocol." <ssh.ietf.org>
Archived-At: <https://mailarchive.ietf.org/arch/msg/ssh/bsU8L8vCTtQvA8QHPokLGOpG3Do>
List-Archive: <https://mailarchive.ietf.org/arch/browse/ssh>
List-Help: <mailto:ssh-request@ietf.org?subject=help>
List-Owner: <mailto:ssh-owner@ietf.org>
List-Post: <mailto:ssh@ietf.org>
List-Subscribe: <mailto:ssh-join@ietf.org>
List-Unsubscribe: <mailto:ssh-leave@ietf.org>

2026-04-29 18:16 GMT+02:00 Damien Miller <djm@mindrot.org>:
> The argument for doing pure signatures whe we did not have the
> confidence to do pure KEMs was that we'd get more time with them before
> we had to migrate. This seems to no longer be the case.

But we did get more time. We did hybrid KEMs for years, and we have had the
ML-DSA spec for two years now to develop the implementations and opinions.

> >  2. Picking and specifying a composite will take longer, as proven by the
> >     failure of every other ecosystem to pick and deploy a composite so far.
> 
> Well, as I said previously, we have ietf-lamps-pq-composite-sigs, which
> seems to have "won" the construction fight. We need only pick the
> algorithms to plug into it.

"only" =)

> >  4. Composites, unlike hybrid ephemeral key exchange, add complexity across
> >     the stack, as I have argued on the TLS WG mailing list:
> > 
> >     https://mailarchive.ietf.org/arch/msg/tls/oh3jmmkHzHdp1hk4R4M9QjkmvBk/
> 
> You make two points there, 1) that they leak across the whole stack and
> 2) that they make the already complex X.509 authentication even more
> complex.
> 
> #2 does not apply to SSH and I don't think #1 universally does either.
> Please take a look at my test implementation of ML-DSA65/Ed25519. There
> is zero leakage of the compositeness of the key beyond the single file
> that implements the composite primitive.

I totally believe you that in OpenSSH the complexity cost is limited.
OpenSSH is not the whole ecosystem, and most other SSH implementations are
not so integrated with their cryptography layer.

> >     I know some folks hold on to the idea that composites will be "just
> >     another key type" but that's wishful at best, especially in the context
> >     of SSH, which is not tightly integrated with the cryptography library.
> >
> >     public/private key type in that package, we'll not be able to return it
> >     from ParsePKCS8PrivateKey in crypto/x509, because the latter is in the
> >     standard library. That's just an example of how composites leak through
> >     API layers.
> 
> I don't follow here. ietf-lamps-pq-composite-sigs defines a PKCS8
> encoding. It can absolutely be just another key type there.

Right, it has to be a key type *in the Go standard library* which is not
golang.org/x/crypto/ssh, so it leaked. (Concretely, where do I put the
SSHCompositePublicKey and SSHCompositePrivateKey types? And then do I allow
instantiating a SSHCompositePrivateKey from the components? If not, what do
I tell folks with hardware ECC and not hardware SSH composite? Note that
hardware SSH composite will take a much longer time than hardware ML-DSA.)

> > If we do absolutely need to implement composites:
> > 
> >  1. We will categorically implement at most one combination, ever.
> 
> That's my preference too.
> 
> >  2. The ECC side should at least be useful for hardware binding.
> > 
> >     There is one benefit to hybrids, and it's using hardware keys that
> >     provide protections like limited PIN retries and per-signature user
> >     intent (i.e. touching the YubiKey). We don't have yet widely available
> >     ML-DSA hardware, so it might make sense for tools like
> >     https://github.com/FiloSottile/yubikey-agent to do software / hardware
> >     hybrids (which by the way breaks the "composites are just an opaque
> >     key type" illusion).
> > 
> >     That means using ECDSA P-256.
> 
> This seems directly contradictory with your opening point - if
> you're arguing against hybrid constructions on the basis that
> their classical component will be broken soon, then there is no
> reason to demand their use when implemented in hardware.

We live in a world of tradeoffs. None of these arguments are absolutely
right or wrong. I said that if you assume a CRQC will come soon*er* then
the advantages of hybrids are *smaller*.

Then I said that "[i]f we do absolutely need to implement composites" we
should capture the IMHO biggest part of the upside, which is not defending
against ML-DSA being broken, but bridging the gap to ML-DSA hardware.

> I'll also observe that there are many hardware devices that support
> Ed25519. It's specified for both FIDO and PKCS#11 and indeed OpenSSH
> supports it for both of them.

I don't have a YubiKey that can do Ed25519 over PIV, and I have a lot of
YubiKeys. Ed25519 is indeed specified and supported in software, but that
doesn't mean it's supported in hardware.

I can offer more data points about this, but is there a strong reason to
conversely prefer Ed25519?

Again thinking about non-OpenSSH implementations: do they all support
Ed25519? Because if not they will have to implement two new things to
adopt the composite, and Ed25519 is IMHO trickier than ML-DSA.

> >  3. The only PQ parameters that make sense to us are ML-DSA-44 and -87.
> > 
> >     If we are making a risk- and security-based analysis, ML-DSA-44 is
> >     perfectly fine. Unlike ML-KEM-512, which was... hotly debated, leading
> >     to the selection of ML-KEM-768 for hybrids, ML-DSA-44 is Category 2,
> >     so it already has a healthy margin for small improvements in lattice
> >     cryptanalysis. There is no reason to think large improvements would
> >     leave any parameter set standing.
> > 
> >     If we are making a bigger-is-better or compliance-based analysis, then
> >     the obvious answer is ML-DSA-87, which is the only one allowed by
> >     CNSA 2.0, and is... bigger! (Both the bigger-is-better and compliance
> >     arguments are weaker when selecting a hybrid, because the hybrid is
> >     already supposed to provide additional margin, and because CNSA 2.0
> >     actually has a preference against hybrids, so ML-DSA-87 makes more
> >     sense as a pure parameter set.)
> > 
> >     I see no logical argument for selecting ML-DSA-65.
> 
> I'm happy to take feedback on which ML-DSA variant to adopt in a
> composite construction. In particular, ML-DSA 44 for the composite and
> ML-DSA 87 for pure is a future I could envisage.

Again I would prefer ML-DSA-44 and ML-DSA-87, but I could live with
ML-DSA-44 + ECDSA P-256 and ML-DSA-87, and the complexity cost would be
offset by a year or two of hardware token availability.