add support for mldsa44-ed25519 (draft-miller-sshm-composite-sigs) - #583
Open
quexten wants to merge 3 commits into
Open
add support for mldsa44-ed25519 (draft-miller-sshm-composite-sigs)#583quexten wants to merge 3 commits into
quexten wants to merge 3 commits into
Conversation
quexten
commented
Aug 28, 2026
| @@ -0,0 +1 @@ | |||
| The lethargic, colorless dog sat beneath the energetic, stationary fox. No newline at end of file | |||
Author
There was a problem hiding this comment.
quexten
commented
Aug 28, 2026
| 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) |
Author
There was a problem hiding this comment.
Is this okay? Or should we verify both sigs first, then do a const time comparison of the results?
quexten
commented
Aug 28, 2026
|
|
||
| let mldsa_sig = mldsa_signing_key(sk) | ||
| .expanded_key() | ||
| .sign_deterministic(&m_prime, LABEL) |
Author
There was a problem hiding this comment.
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
marked this pull request as ready for review
August 28, 2026 08:42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 2026in 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):
