Skip to content

ML-DSA support - #2767

Merged
bapt merged 3 commits into
freebsd:mainfrom
tetlowgm:mldsa-support
Oct 25, 2026
Merged

bapt merged 3 commits into
freebsd:mainfrom
tetlowgm:mldsa-support

Conversation

@tetlowgm

@tetlowgm tetlowgm commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

Add support for ML-DSA-87 signing of packages. This supports both key based and signing_command based methods of signing and verification. Code was cribbed from the ossl provider, modernized for current OpenSSL releases, and added test coverage for the signing type.

Add a signer backed by OpenSSL's ML-DSA-87 implementation, available
when pkg is built against OpenSSL 3.5 or later.

Keys may be generated with pkg key --create -t mldsa or with:
openssl genpkey -algorithm ML-DSA-87 -out repo.key -outpubkey repo.pub

The signer signs the hex-encoded SHA512 of the repository catalog and
reports SHA512 as its digest, so signing_command (with --sign-type
mldsa) and local key signing produce signatures that verify the same
way. Verification works for both PUBKEY and FINGERPRINTS repositories,
and only ML-DSA-87 keys are accepted.
Describe the mldsa signer in pkg-repo(8) and pkg-key(8): the digest it
signs, generating keys with pkg key or OpenSSL, signing a repository
with a local key or a signing server via --sign-type mldsa, and the
OpenSSL 3.5 requirement.
Cover key creation, public key export and signing (with OpenSSL interop
when openssl(1) supports ML-DSA), signing and verifying a repository
with a public key, rejection of a mismatched key and of a non-ML-DSA-87
key, and signing via a signing command with fingerprint verification.

Add atf_require_signer so these are skipped when pkg is built against an
OpenSSL without ML-DSA.
@bapt
bapt merged commit c9d7158 into freebsd:main Oct 25, 2026
7 checks passed
@tetlowgm
tetlowgm deleted the mldsa-support branch October 30, 2026 18:23
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.

2 participants