Skip to content

Add breaking change documentation for CoseSigner.Key property nullability #47740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 5, 2025

This PR adds documentation for a breaking change in .NET 10 Preview 7 where the CoseSigner.Key property may now return null.

Changes

The System.Security.Cryptography.Cose.CoseSigner.Key property has changed from type AsymmetricAlgorithm to AsymmetricAlgorithm? to support Post-Quantum Cryptography (PQC) algorithms like ML-DSA that don't derive from AsymmetricAlgorithm.

Previous behavior:

using RSA rsaKey = RSA.Create();
CoseSigner signer = new CoseSigner(rsaKey, RSASignaturePadding.Pss, HashAlgorithmName.SHA512);
AsymmetricAlgorithm key = signer.Key; // key was never null

New behavior:

using MLDsa mldsa = MLDsa.GenerateKey(MLDsaAlgorithm.MLDsa44);
CoseKey coseKey = new CoseKey(mldsa);
CoseSigner signer = new CoseSigner(coseKey);
AsymmetricAlgorithm? key = signer.Key; // key is null for non-AsymmetricAlgorithm keys

Documentation updates

  • Created: docs/core/compatibility/cryptography/10.0/cosesigner-key-null.md - Complete breaking change documentation following the standard template
  • Updated: docs/core/compatibility/10.0.md - Added entry to the Cryptography section table
  • Updated: docs/core/compatibility/toc.yml - Added navigation entry under Cryptography > .NET 10

The documentation explains the reason for the change (support for PQC algorithms), provides clear examples of both old and new behavior, and includes recommended actions for handling null values.

Fixes #46999.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] [Breaking change]: CoseSigner.Key may now be null Add breaking change documentation for CoseSigner.Key property nullability Aug 5, 2025
@Copilot Copilot AI requested a review from gewarren August 5, 2025 23:44
Copilot finished work on behalf of gewarren August 5, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Breaking change]: CoseSigner.Key may now be null
2 participants