<?xml version='1.0' encoding='utf-8'?>
<rfc consensus="true" xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" category="std" docName="draft-rpe-ssh-x509-mldsa-00" updates="6187" obsoletes="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">
	<front>
		<title abbrev="X.509 ML-DSA for SSH">X.509v3 ML-DSA Certificates for the Secure Shell (SSH) Protocol</title>
		<seriesInfo name="Internet-Draft" value="draft-rpe-ssh-x509-mldsa-00"/>
		<author initials="R." surname="Petrov" fullname="Roumen Petrov">
			<address>
				<postal>
					<city>Sofia</city>
					<code>1750</code>
					<country>Bulgaria</country>
				</postal>
				<email>pkixssh@roumenpetrov.info</email>
				<uri>https://roumenpetrov.info/secsh/</uri>
			</address>
		</author>
		<date year="2026" month="1" day="2"/>
		<area>sec<!--Security Area--></area>
		<workgroup>sshm<!--Secure Shell Maintenance--></workgroup>
		<keyword>Module-Lattice-Based Digital Signature Standard</keyword>
		<keyword>ML-DSA</keyword>
		<keyword>Secure Shell</keyword>
		<keyword>SSH</keyword>
		<keyword>Secure remote-login</keyword>
		<keyword>Public Key Algorithm</keyword>
		<keyword>X.509v3 Certificates</keyword>
		<abstract>
			<t>
This document describes the use of Module-Lattice-Based Digital Signature Algorithm (ML-DSA) in Internet X.509 version 3 Public Key Certificate in the Secure Shell protocol.
Accordingly, the document updates RFC6187.
			</t>
		</abstract>
		<note removeInRFC="true">
			<name>Document and implementation details</name>
			<t>
The datatracker status page of the draft is <eref target="https://datatracker.ietf.org/doc/draft-rpe-ssh-x509-mldsa">draft-rpe-ssh-x509-mldsa</eref>.
			</t>
			<t>
The source of this document is located at <eref target="https://gitlab.com/secsh/pkixssh/-/blob/mldsa_demo/draft-rpe-ssh-x509-mldsa.xml">I-D ssh-x509-mldsa</eref>.
Implementation could be found at PKIX-SSH<eref target="https://gitlab.com/secsh/pkixssh/-/tree/mldsa_demo">MLDSA-DEMO</eref> branch.
			</t>
			<t>
Discussion of this document takes place on the <eref target="https://datatracker.ietf.org/group/sshm/about"> Secure Shell Maintenance (sshm)"</eref> <eref target="mailto:ssh@ietf.org">mailing list</eref> which is <eref target="https://mailarchive.ietf.org/arch/browse/ssh/">archived here</eref>.
			</t>
		</note>
	</front>
	<middle>
		<section numbered="true" toc="default">
			<name>Introduction</name>
			<t>
Secure Shell (SSH) <xref target="RFC4251"/> is a secure remote-login protocol. It provides for an extensible variety of public key algorithms for identifying servers and users to one another.
			</t>
			<t>
The Module-Lattice-Based Digital Signature Algorithm (ML-DSA) is a post-quantum digital signature algorithm.
It is one of NIST's Post-Quantum Cryptography (PQC) project results standardised in <xref target="FIPS-204"/>.
Note ML-DSA was known as Dilithium but standardised ML-DSA and Dilithium are not compatible.
			</t>
			<t>
X.509 Version 3(x509v3) digital certificate format is specified in <xref target="RFC5280"/>.
The use of ML-DSA in Public Key Infrastructure X.509 (PKIX) is specified in <xref target="RFC9881"/>.
			</t>
			<t>
The Secure Shell (SSH) Transport Layer Protocol, see <xref target="RFC4253"/>, describes how server is authenticated to the client.
The meaning of SSH Public Key Algorithms is described in the same document, see <xref target="RFC4253" section="6.6" sectionFormat="comma"/>.
Authentication of the client to the server is described in SSH Authentication Protocol, see <xref target="RFC4252"/>.
			</t>
			<t>
In <xref target="RFC6187" section="2" sectionFormat="comma"/> are described currently standardised X.509 V3 certificates used in SSH Public Key Algorithms.
This document details the use of X.509 digital certificates with ML-DSA signature algorithm to be implemented by SSH and standardize the use of names
<strong>x509v3-mldsa-44</strong>, <strong>x509v3-mldsa-65</strong>, and <strong>x509v3-mldsa-87</strong>.
			</t>
		</section>
		<section numbered="true" toc="default">
			<name>Conventions Used in This Document</name>
			<t>
The descriptions of key and signature formats use the notation introduced in <xref target="RFC4251" section="3" sectionFormat="comma"/> and the string data type from <xref target="RFC4251" section="5" sectionFormat="comma"/>.
			</t>
			<section numbered="true" toc="default" anchor="requirements">
				<name>Requirements Language</name>
				<t>
The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as described in BCP 14 <xref target="RFC2119"/><xref target="RFC8174"/> when, and only when, they appear in all capitals, as shown here.
				</t>
			</section>
		</section>
		<section numbered="true" toc="default">
			<name>Public Key Algorithms using X.509v3 Certificates with ML-DSA public key</name>
			<t>
The SSH <xref target="RFC4253" section="6.6" sectionFormat="comma">Public Key Algorithms</xref> define the type,
how the key or certificate is encoded, the signature and/or encryption algorithms, and their encoding.
			</t>
			<t>
For X.509 certificates is used following "Public Key Format", added here only for reference:
			</t>
			<blockquote>
				<dl newline="false" spacing="compact">
					<dt>string</dt><dd>key-type</dd>
					<dt>uint32</dt><dd>certificate-count</dd>
					<dt>string</dt><dd>certificate[1..certificate-count]</dd>
					<dt>uint32</dt><dd>ocsp-response-count</dd>
					<dt>string</dt><dd>ocsp-response[0..ocsp-response-count]</dd>
				</dl>
			</blockquote>
			<t>
<!-- FIXME how to force line break-->
			</t>
			<t>
For complete description of each item see <xref target="RFC6187" section="2.1" sectionFormat="comma"/>.
In scope of this document is first(sender's) certificate from certificate list whose "subjectPublicKeyInfo" field is a
ML-DSA public key in a certificate is specified in <xref target="RFC9881" section="4" sectionFormat="comma"/>.
The respective algorithm identifiers are in listed in <xref target="RFC9881" section="2" sectionFormat="comma"/>.
In this document ML-DSA certificate and X.509 certificate with ML-DSA public key are used interchangeably.
			</t>
			<t>
For ML-DSA Certificates key-type field uses prefix "x509v3-" followed by corresponding plain key algorithm.
For more details about ML-DSA plain key algorithms see <xref target="I-D.rpe-ssh-mldsa"/>.
Signatures are generated as for plain key algorithms i.e., according to the "Pure ML-DSA Signature Generation" procedure described in
<xref target="FIPS-204"/> Algorithm 2 step 10(sign) and Algorithm 3 step 5(verify).
			</t>
<ul>
<li>
			<t>
The <strong>x509v3-mldsa-44</strong> key-type is used when algorithm identifier, in "subjectPublicKeyInfo" field, is <strong>id-ml-dsa-44</strong>.
This means that public key is an octet string of size 1312 without ASN.1 wrapping.
			</t>
			<t>
Corresponding plain key algorithm is <strong>mldsa-44</strong>.
For both public key algorithms signature is generated and encoded in the same way:
			</t>
			<dl newline="false" spacing="compact" indent="6">
				<dt>string</dt><dd>mldsa-44</dd>
				<dt>string</dt><dd>signature</dd>
			</dl>
			<t>
Here, <strong>signature</strong> is the 2420-octet signature produced in accordance with <xref target="FIPS-204"/> Algorithm 2.
			</t>
</li>
<li>
			<t>
The <strong>x509v3-mldsa-65</strong> key-type is used when algorithm identifier, in "subjectPublicKeyInfo" field, is <strong>id-ml-dsa-65</strong>.
This means that public key is an octet string of size 1952 without ASN.1 wrapping.
			</t>
			<t>
Corresponding plain key algorithm is <strong>mldsa-65</strong>.
For both public key algorithms signature is generated and encoded in the same way:
			</t>
			<dl newline="false" spacing="compact" indent="6">
				<dt>string</dt><dd>mldsa-65</dd>
				<dt>string</dt><dd>signature</dd>
			</dl>
			<t>
Here, <strong>signature</strong> is the 3309-octet signature produced in accordance with <xref target="FIPS-204"/> Algorithm 2.
			</t>
</li>
<li>
			<t>
The <strong>x509v3-mldsa-87</strong> key-type is used when algorithm identifier, in "subjectPublicKeyInfo" field, is
<strong>id-ml-dsa-87</strong>.
This means that public key is an octet string of size 2592 without ASN.1 wrapping.
			</t>
			<t>
Corresponding plain key algorithm is <strong>mldsa-87</strong>.
For both public key algorithms signature is generated and encoded in the same way:
			</t>
			<dl newline="false" spacing="compact" indent="6">
				<dt>string</dt><dd>mldsa-87</dd>
				<dt>string</dt><dd>signature</dd>
			</dl>
			<t>
Here, <strong>signature</strong> is the 4627-octet signature produced in accordance with <xref target="FIPS-204"/> Algorithm 2.
			</t>
</li>
</ul>
		</section>
		<section numbered="true" toc="default">
			<name>Certificate Extensions</name>
			<t>
Certificate extensions specify additional attributes associated with an X.509v3 Certificate, see <xref target="RFC5280" section="4.2" sectionFormat="comma"/>.
			</t>
			<section numbered="true" toc="default">
				<name>Key Usage</name>
				<t>
For ML-DSA Certificates <strong>keyUsage</strong> extension is defined in <xref target="RFC9881" section="5" sectionFormat="comma"/>.
As is specified in <xref target="RFC6187" section="2.2.1" sectionFormat="comma"/>, certificate used in public key algorithms <strong>digitalSignature</strong> bit MUST be set.
As well, This is applicable to the public key algorithms <strong>x509v3-mldsa-44</strong>, <strong>x509v3-mldsa-65</strong>, and <strong>x509v3-mldsa-87</strong> defined in this document.
				</t>
			</section>
			<section numbered="true" toc="default">
				<name>Extended Key Usage</name>
				<t>
Paragraphs in <xref target="RFC6187" section="2.2.2" sectionFormat="comma"/> define two SSH specific extension - <strong>secureShellClient</strong>, and <strong>secureShellServer</strong>.
As stated in the section, in accordance with <xref target="RFC5280" section="4.2.1.12" sectionFormat="comma"/>, ML-DSA certificate MUST be used only for the indicated purposes too.
				</t>
			</section>
			<section numbered="true" toc="default">
				<name>Subject Alternative Name</name>
				<t>
At end of chapter <xref target="RFC6187" section="4" sectionFormat="parens"/> is detailed recommendation for <strong>subjectAlternativeName</strong> X.509 certificate extension.
These recommendation are relevant for ML-DSA certificate used in SSH as public key algorithm.
				</t>
			</section>
		</section>
		<section numbered="true" toc="default">
			<name>Usage</name>
			<t>
The use of X.509v3 Certificates SSH "Public Key Algorithms" is described in <xref target="RFC6187" section="4" sectionFormat="comma"/>.
This is applicable to ML-DSA Certificates as well.
			</t>
			<t>
The ML-DSA digital signature algorithms correspond to the Table 1. defined in <xref target="FIPS-204"/> Section 4 "Parameter Sets".
The table below match parameters sets to "NIST PQC Security Strength Category":
			</t>
			<table align="center">
				<thead>
					<tr>
						<th align="left">Parameters</th>
						<th align="left">NIST PQC Security Strength Category</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td align="left">ML-DSA-44</td>
						<td align="left">Category 2, NIST Level 2 (128-bit equivalent)</td>
					</tr>
					<tr>
						<td align="left">ML-DSA-65</td>
						<td align="left">Category 3, NIST Level 3 (192-bit equivalent)</td>
					</tr>
					<tr>
						<td align="left">ML-DSA-87</td>
						<td align="left">Category 5, NIST Level 2 (256-bit equivalent)</td>
					</tr>
				</tbody>
			</table>
			<t>
Use of ML-DSA plain key algorithms is specified in <xref target="I-D.rpe-ssh-mldsa"/> and standard implementations of SSH <bcp14>SHOULD</bcp14> implement <strong>mldsa-65</strong> public Key algorithm.
Implementation of ML-DSA Certificates <bcp14>MUST</bcp14> follow recommendation for plain-key algorithms.
In addition certificate algorithm must be offered in preference to plain-key algorithm.
This means that <strong>x509v3-mldsa-NN</strong> must precede <strong>mldsa-NN</strong>, where NN match number in parameter set.
Also if ML-DSA Certificates are supported the public key algorithm <strong>x509v3-mldsa-65</strong> <bcp14>SHOULD</bcp14> implemented.
			</t>
		</section>
		<section numbered="true" toc="default" anchor="IANA">
			<name>IANA Considerations</name>
			<t>
This document augments the Public Key Algorithm Names described in <xref target="RFC6187" section="2" sectionFormat="comma"/>.
			</t>
			<t>
This document requests new entries to "Public Key Algorithm Names" in the "Secure Shell (SSH) Protocol Parameters" registry <xref target="IANA-SSH"/> according to the procedures in <xref target="RFC9519" section="3" sectionFormat="comma"/>:
			</t>
			<table align="center">
				<thead>
					<tr>
						<th align="left">Public Key Algorithm Name</th>
						<th align="left">Reference</th>
					</tr>
				</thead>
				<tbody>
					<tr>
						<td align="left">x509v3-mldsa-44</td>
						<td align="left">This document.</td>
					</tr>
					<tr>
						<td align="left">x509v3-mldsa-65</td>
						<td align="left">This document.</td>
					</tr>
					<tr>
						<td align="left">x509v3-mldsa-87</td>
						<td align="left">This document.</td>
					</tr>
				</tbody>
			</table>
		</section>
		<section numbered="true" toc="default" anchor="Security">
			<name>Security Considerations</name>
			<t>
This documents inherits security considerations for public key algorithms used for user and for server authentication.
For "user", see <xref target="RFC4252" section="11" sectionFormat="comma"/> , and for "server" see <xref target="RFC4253" section="14" sectionFormat="comma"/>.
The both documents refer to <xref target="RFC4251" section="9" sectionFormat="comma"/> as full security considerations for SSH protocol.
			</t>
			<t>
For X.509v3 Certificates used in secure shell authentication are applicable the security considerations detailed in <xref target="RFC6187" section="5" sectionFormat="comma"/>.
The security considerations for ML-DSA plain-keys, see <xref target="I-D.rpe-ssh-mldsa"/>  applies to this specification as well.
For ML-DSA Certificates applies as well specification of ML-DSA for Internet X.509 Public Key Infrastructure, see <xref target="RFC9881" section="9" sectionFormat="comma"/>.
			</t>
		</section>
	</middle>
	<back>
		<references>
			<name>Normative References</name>
			<reference anchor="FIPS-204" target="https://csrc.nist.gov/pubs/fips/204/final">
				<front>
					<title>Module-lattice-based digital signature standard</title>
					<author>
						<organization/>
					</author>
					<date month="August" year="2024"/>
				</front>
				<seriesInfo name="DOI" value="10.6028/nist.fips.204"/>
				<refcontent>National Institute of Standards and Technology (U.S.)</refcontent>
			</reference>
			<reference anchor="I-D.rpe-ssh-mldsa">
				<front>
					<title>ML-DSA Public Key Algorithms for the Secure Shell (SSH) Protocol</title>
					<author initials="R." surname="Petrov" fullname="Roumen Petrov">
					</author>
					<date year="2025" month="10" day="19"/>
					<abstract>
						<t>
This document describes the use of the ML-DSA digital signature algorithms in the Secure Shell (SSH) protocol.
Accordingly, this RFC updates <xref target="RFC4253"/>.
						</t>
					</abstract>
				</front>
				<seriesInfo name="Internet-Draft" value="draft-rpe-ssh-mldsa-02"/>
			</reference>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.2119.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4251.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4252.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.4253.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.5280.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.6187.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.8174.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9881.xml"/>
			<xi:include href="https://xml2rfc.tools.ietf.org/public/rfc/bibxml/reference.RFC.9519.xml"/>
		</references>
		<references>
			<name>Informative References</name>
			<reference anchor="IANA-SSH" target="https://www.iana.org/assignments/ssh-parameters">
				<front>
					<title>Secure Shell (SSH) Protocol Parameters</title>
					<author>
						<organization>IANA</organization>
					</author>
				</front>
			</reference>
		</references>
		<section numbered="false" toc="default" anchor="Acknowledgements">
			<name>Acknowledgements</name>
			<t>
TBD
			</t>
		</section>
	</back>
</rfc>
