Repository navigation
crypto/mldsa: respect OpenSSL external-mu capabilities - #2662
Merged
Merged
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
This was referenced Oct 28, 2026
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Obsolete OpenSSL checksums remain in go.sum, causing go mod tidy -diff to report removals and TestXCryptoDependencyIsSynced to fail.
No open issues 🎉
What changed in this PR
Updates Microsoft Go’s ML-DSA backend to respect OpenSSL provider capabilities, allowing Azure Linux 4 external-mu operations to use the cached Go fallback without disabling ordinary native ML-DSA.
Changes:
- Checks external-mu support for the key’s specific ML-DSA parameter set.
- Updates platform and stub signatures while preserving Windows and Darwin behavior.
- Upgrades the OpenSSL dependency and regenerates the vendor patch and index.
Patches are happy!
| File | Description |
|---|---|
patches/index.json |
Refreshes vendor patch hashes and line mappings. |
patches/0001-Vendor-external-dependencies.patch |
Vendors the capability probe and updated backend integration. |
cryptobackend/mldsa/nobackend.go |
Updates the unsupported-backend stub signature. |
cryptobackend/mldsa/mldsa_windows.go |
Accepts parameters while retaining native external-mu support. |
cryptobackend/mldsa/mldsa_openssl.go |
Delegates capability checks to OpenSSL. |
cryptobackend/mldsa/mldsa_msgostd.go |
Gates native signing using the key’s parameters. |
cryptobackend/mldsa/mldsa_darwin.go |
Updates the signature while retaining Go fallback behavior. |
cryptobackend/go.sum |
Adds checksums for the upgraded OpenSSL dependency. |
cryptobackend/go.mod |
Pins the OpenSSL revision containing the capability probe. |
Review effort: Balanced
Quim Muntal (qmuntal)
approved these changes
Oct 28, 2026
George Adams (gdams)
enabled stacked auto-merge
October 28, 2026 13:20
Use the provider-aware per-parameter external-mu probe from go-crypto-openssl to select native signing or the existing cached Go fallback. Preserve ordinary native ML-DSA and existing Windows/Darwin support. Pin the backend fix and regenerate its vendor patch and index. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Pin the merged c9be04267896 commit instead of the PR branch commit. Run go generate in cryptobackend to remove stale checksums and fix TestXCryptoDependencyIsSynced, then regenerate the vendor patch and index. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
George Adams (gdams)
force-pushed
the
dev/gdams/mldsa-mu-main
branch
from
October 28, 2026 16:07
de4044f to
f06b6b2
Compare
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.
Native validation stack
Bottom layer of stack #2664, landing on
microsoft/main: this ML-DSA fix → Azure Linux 4 matrix #2651. The top layer runs CI with this fix included. Auto-merge is disabled; use the native stack merge flow.Summary
Fix Azure Linux 4’s
crypto/mldsa.TestExternalMufailures without disabling ML-DSA or skipping standard-library tests.Uses merged microsoft/go-crypto-openssl#108, pinned to main merge commit
c9be04267896c74dd64bc75eb25869fdc037f96d(v0.5.1-0.20261028130524-c9be04267896).Unblocks the Azure Linux 4 matrix PR #2651. Go 1.27 counterpart: #2663; Go 1.26 has no ML-DSA package/integration and needs no backport.
Validation
Ran
go generateincryptobackendand removed stale checksums. Fullgo test ./...andgo mod tidy -diffnow pass, including the previously failingTestXCryptoDependencyIsSynced.Built the patched main toolchain and tested the actual published Azure Linux 4 ARM64 image with its SymCrypt/OpenSSL 3.5.4 provider.
TestExternalMupasses for ML-DSA-44/65/87 with cgo enabled and disabled.Complete
crypto/mldsatests andgo/build.TestDependenciespass.External-mu tests also pass with the CI FIPS environment (
OPENSSL_FORCE_FIPS_MODE=1) in both cgo modes and with systemcrypto disabled as a control.Complete ML-DSA tests pass on macOS/arm64 as well.
Backend shim tests/vet and pipeline-generation reproducibility pass.
Source changes were squashed into the vendor commit and regenerated via
git go-patch extract; patch extraction succeeds.