<?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-mldsa-02" updates="4253" obsoletes="" submissionType="IETF" xml:lang="en" tocInclude="true" tocDepth="4" symRefs="true" sortRefs="true" version="3">
	<front>
		<title abbrev="ML-DSA for SSH">ML-DSA Public Key Algorithms for the Secure Shell (SSH) Protocol</title>
		<seriesInfo name="Internet-Draft" value="draft-rpe-ssh-mldsa-02"/>
		<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="2025" month="10" day="19"/>
		<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>
		<abstract>
			<t>
This document describes the use of the ML-DSA digital signature algorithms in the Secure Shell (SSH) protocol. Accordingly, this RFC updates RFC 4253.
			</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-mldsa">draft-rpe-ssh-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-mldsa.xml">I-D ssh-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" format="default"/> 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>
This document describes the use of ML-DSA algorithms to be implemented by Secure Shells (SSH) and standardize the use of names <strong>mldsa-44</strong>, <strong>mldsa-65</strong>, and <strong>mldsa-87</strong>.
These algorithms correspond to the Table 1. "ML-DSA parameter sets" defined in <xref target="FIPS-204"/> Section 4 "Parameter Sets".
			</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" sectionFormat="comma" section="3"/> and the string data type from <xref target="RFC4251" sectionFormat="comma" section="5"/>.
			</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 Algorithm</name>
			<t>
This document describes a public key algorithms for use with SSH, as per <xref target="RFC4253" sectionFormat="comma" section="6.6"/>.
The name of the algorithms are <strong>mldsa-44</strong>, <strong>mldsa-65</strong>, and <strong>mldsa-87</strong>.
These algorithms only supports signing and not encryption.
Keys are generated according to the procedure described in <xref target="FIPS-204"/> Algorithm 1 step 5.
			</t>
			<t>
Standard implementations of SSH <bcp14>SHOULD</bcp14> implement <strong>mldsa-65</strong> public Key algorithm.
It <bcp14>MAY</bcp14> implement <strong>mldsa-44</strong> and <strong>mldsa-87</strong> public key algorithms.
			</t>
		</section>
		<section numbered="true" toc="default">
			<name>Public Key Format</name>
<ul>
<li>
			<t>
The <strong>mldsa-44</strong> key format has the following encoding:
			</t>
			<dl newline="false" spacing="normal" indent="6">
				<dt>string</dt>
				<dd><strong>mldsa-44</strong></dd>
				<dt>string</dt>
				<dd>key</dd>
			</dl>
			<t>
Here, 'key' is the 1312-octet public key encoded as is described in <xref target="FIPS-204"/> Algorithm 22.
			</t>
</li>
<li>
			<t>
The <strong>mldsa-65</strong> key format has the following encoding:
			</t>
			<dl newline="false" spacing="normal" indent="6">
				<dt>string</dt>
				<dd><strong>mldsa-65</strong></dd>
				<dt>string</dt>
				<dd>key</dd>
			</dl>
			<t>
Here, 'key' is the 1952-octet public key encoded as is described in <xref target="FIPS-204"/> Algorithm 22.
			</t>
</li>
<li>
			<t>
The <strong>mldsa-87</strong> key format has the following encoding:
			</t>
			<dl newline="false" spacing="normal" indent="6">
				<dt>string</dt>
				<dd><strong>mldsa-87</strong></dd>
				<dt>string</dt>
				<dd>key</dd>
			</dl>
			<t>
Here, 'key' is the 2592-octet public key encoded as is described in <xref target="FIPS-204"/> Algorithm 22.
			</t>
</li>
</ul>
		</section>
		<section numbered="true" toc="default">
			<name>Signature Algorithm</name>
			<t>
Signatures are generated according to the procedure described in <xref target="FIPS-204"/>.
Signature generation should use normal signing process (Pure ML-DSA Signature Generation) with empty string as context parameter.
The process is defined in <xref target="FIPS-204"/> Algorithm 2 step 10(sign) and Algorithm 3 step 5(verify).
			</t>
		</section>
		<section numbered="true" toc="default">
			<name>Signature Format</name>
<ul>
<li>
			<t>
The <strong>mldsa-44</strong> public key algorithm has the following format for encoding the signature:
			</t>
			<dl newline="false" spacing="normal" indent="6">
				<dt>string</dt>
				<dd><strong>mldsa-44</strong></dd>
				<dt>string</dt>
				<dd>signature</dd>
			</dl>
			<t>
Here, 'signature' is the 2420-octet signature produced in accordance with <xref target="FIPS-204"/> Algorithm 2.
			</t>
</li>
<li>
			<t>
The <strong>mldsa-65</strong> public key algorithm has the following format for encoding the signature:
			</t>
			<dl newline="false" spacing="normal" indent="6">
				<dt>string</dt>
				<dd><strong>mldsa-65</strong></dd>
				<dt>string</dt>
				<dd>signature</dd>
			</dl>
			<t>
Here, 'signature' is the 3309-octet signature produced in accordance with <xref target="FIPS-204"/> Algorithm 2.
			</t>
</li>
<li>
			<t>
The <strong>mldsa-87</strong> public key algorithm has the following format for encoding the signature:
			</t>
			<dl newline="false" spacing="normal" indent="6">
				<dt>string</dt>
				<dd><strong>mldsa-87</strong></dd>
				<dt>string</dt>
				<dd>signature</dd>
			</dl>
			<t>
Here, 'signature' 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>Verification Algorithm</name>
			<t>
ML-DSA signatures are verified according to the procedure in <xref target="FIPS-204"/> Algorithm 3 step 5.
			</t>
		</section>
		<section numbered="true" toc="default" anchor="IANA">
			<name>IANA Considerations</name>
			<t>
This document augments the Public Key Algorithm Names in <xref target="RFC4250" sectionFormat="comma" section="4.11.3"/>.
			</t>
			<t>
This document requests new entries to "Public Key Algorithm Names" in the "Secure Shell (SSH) Protocol Parameters" registry <xref target="IANA-SSH" format="default"/> according to the procedures in <xref target="RFC9519" sectionFormat="comma" section="3"/>:
			</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">mldsa-44</td>
						<td align="left">This document.</td>
					</tr>
					<tr>
						<td align="left">mldsa-65</td>
						<td align="left">This document.</td>
					</tr>
					<tr>
						<td align="left">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>
The security considerations in <xref target="RFC4251" sectionFormat="comma" section="9"/> apply to all SSH implementations, including those using ML-DSA-44, ML-DSA-65, and ML-DSA-87.
Also rules in <xref target="FIPS-204"/> Section 3.6 "Additional Requirements" apply as well.
			</t>
		</section>
	</middle>
	<back>
		<references>
			<name>References</name>
			<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>
				<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.4250.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.4253.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.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>
		</references>
		<section numbered="false" toc="default" anchor="Acknowledgements">
			<name>Acknowledgements</name>
			<t>
TBD
			</t>
		</section>
	</back>
</rfc>
