Skip to content

ML-DSA-44 support (OpenSSL backend)#14430

Open
abbra wants to merge 6 commits intopyca:mainfrom
abbra:abbra-add-ml-dsa-44
Open

ML-DSA-44 support (OpenSSL backend)#14430
abbra wants to merge 6 commits intopyca:mainfrom
abbra:abbra-add-ml-dsa-44

Conversation

@abbra
Copy link
Contributor

@abbra abbra commented Mar 5, 2026

I'm submitting first of ML-DSA branches for consideration of higher level API. All branches build up on each other, so ML-DSA-65 version is built on top of this one, and ML-DSA-87 is on top of ML-DSA-65 branch.

The branch is not supposed for merge but rather for discussing whether higher level API is what PyCA wants to see.

We have validated that with these patches we are able to enable FreeIPA to operate as ML-DSA CA.

abbra added 6 commits March 4, 2026 15:54
This is a temporary solution until rust-openssl PRs merged

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Changes:
- Add mldsa44_supported() backend method
- Implement MlDsa44PrivateKey and MlDsa44PublicKey classes
- Add Rust backend implementation with OpenSSL 3.5+ support
- Add PKCS8/SPKI key parsing and serialization
- Add comprehensive test suite
- Add API documentation

ML-DSA-44 provides NIST Level 2 post-quantum security with the smallest
signature and key sizes of the ML-DSA family.

Assisted-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Replace generic &pyo3::Bound<'_, pyo3::PyAny> with concrete
crate::serialization::Encoding/PrivateFormat/PublicFormat types
in private_bytes() and public_bytes() methods, consistent with
how other key backends are implemented.

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Remove the unnecessary & reference when constructing
MlDsa44PrivateKeyValue::Seed.

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
@alex
Copy link
Member

alex commented Mar 7, 2026

I had a cursory review, the Python API here looks pretty consistent with the one in #14404 which is good. The major differences look to be: a) whether context comes via a seperate method or as an arg to sign/verify (we landed on arg, rather than seperate method in the other PR), and the exact spelling of some serialization methods.

This is a good sign and indicates that we're headed in the right direction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants