Skip to content

[release/10.0] Fix blob type in CopyWithPrivateKey for ML-DSA - #129865

Merged
lewing merged 1 commit into
release/10.0from
backport/pr-129839-to-release/10.0
Jun 26, 2026
Merged

[release/10.0] Fix blob type in CopyWithPrivateKey for ML-DSA#129865
lewing merged 1 commit into
release/10.0from
backport/pr-129839-to-release/10.0

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Backport of #129839 to release/10.0

/cc @PranavSenthilnathan

Customer Impact

  • Customer reported
  • Found internally

Found when running unit tests on a recent Windows insider build. An exception will be thrown in some cases when an ML-DSA certificate and key are paired. Specifically, when the key is a BCrypt key that was generated or imported with a seed, we try to re-import it into NCrypt as a private key (instead of a seed). Previously, Windows was tolerant to this and was able to recognize that the key material represented the seed instead of the private key. With recent insider builds this has started to fail, so we need to be accurate when telling NCrypt the format of the key material.

Regression

  • Yes
  • No

Testing

Validated on insider build of Windows. This wasn't an issue before because Windows was more permissive in its ML-DSA imports by allowing seeds even when the blob type was private key instead.

Risk

Low. We're now passing the correct parameter for blob type as described in:

https://learn.microsoft.com/en-us/windows/win32/api/bcrypt/nf-bcrypt-bcryptimportkeypair#parameters

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @bartonjs, @vcsjones, @dotnet/area-system-security
See info in area-owners.md if you want to be subscribed.

@PranavSenthilnathan PranavSenthilnathan self-assigned this Jun 25, 2026
@PranavSenthilnathan PranavSenthilnathan added this to the 10.0.x milestone Jun 25, 2026
@rbhanda rbhanda modified the milestones: 10.0.x, 10.0.11 Jun 25, 2026
@rbhanda rbhanda added the Servicing-approved Approved for servicing release label Jun 25, 2026
@lewing
lewing merged commit 8f030f8 into release/10.0 Jun 26, 2026
96 of 97 checks passed
@lewing
lewing deleted the backport/pr-129839-to-release/10.0 branch June 26, 2026 02:15
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Security Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants