Skip to content

add support for mldsa44-ed25519 (draft-miller-sshm-composite-sigs) - #583

Open
quexten wants to merge 3 commits into
RustCrypto:masterfrom
quexten:mldsa-eddsa
Open

add support for mldsa44-ed25519 (draft-miller-sshm-composite-sigs)#583
quexten wants to merge 3 commits into
RustCrypto:masterfrom
quexten:mldsa-eddsa

Conversation

@quexten

@quexten quexten commented Aug 28, 2026

Copy link
Copy Markdown

Adds support for https://www.ietf.org/archive/id/draft-miller-sshm-composite-sigs-01.html mldsa44-ed25519 composite keys. Given that openssh currently does not have plans to support raw mldsa keys, this superseeds my other PR.

I've tested support for interoperability on OpenSSH_10.5p1, OpenSSL 3.6.3 9 Jun 2026 in SSH agent (I signed and verified a file signature via SSH agent using this PR's implementation).

(With some further patches in Bitwarden's SSH Agent):
image

@quexten quexten changed the title mldsa eddsa add support for mldsa44-ed25519 Aug 28, 2026
@@ -0,0 +1 @@
The lethargic, colorless dog sat beneath the energetic, stationary fox. No newline at end of file

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let mldsa_sig =
ml_dsa::Signature::<MlDsa44>::try_from(mldsa_sig).map_err(|_| Error::Signature)?;

if !VerifyingKey::<MlDsa44>::decode(&mldsa_pk).verify_with_context(&m_prime, LABEL, &mldsa_sig)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this okay? Or should we verify both sigs first, then do a const time comparison of the results?


let mldsa_sig = mldsa_signing_key(sk)
.expanded_key()
.sign_deterministic(&m_prime, LABEL)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

 The ML-DSA and Ed25519 signatures are calculated as:

    mldsa_sig = ML-DSA-44.Sign(mldsa_sk, M', ctx=Label)
    ed25519_sig = Ed25519.Sign(ed25519_sk, M')

@quexten quexten changed the title add support for mldsa44-ed25519 add support for mldsa44-ed25519 (draft-miller-sshm-composite-sigs) Aug 28, 2026
@quexten
quexten marked this pull request as ready for review August 28, 2026 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant