diff --git a/docs/core/compatibility/10.0.md b/docs/core/compatibility/10.0.md index b20300bcb804a..67869a9b4439b 100644 --- a/docs/core/compatibility/10.0.md +++ b/docs/core/compatibility/10.0.md @@ -53,6 +53,17 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af | [System.Linq.AsyncEnumerable included in core libraries](core-libraries/10.0/asyncenumerable.md) | Source incompatible | Preview 1 | | [YMM embedded rounding removed from AVX10.2](core-libraries/10.0/ymm-embedded-rounding.md) | Behavioral change | Preview 5 | +## Cryptography + +| Title | Type of change | Introduced version | +|-------|-------------------|--------------------| +| [CoseSigner.Key can be null](cryptography/10.0/cosesigner-key-null.md) | Behavioral/source incompatible change | Preview 7 | +| [MLDsa and SlhDsa 'SecretKey' members renamed](cryptography/10.0/mldsa-slhdsa-secretkey-to-privatekey.md) | Source incompatible | RC 1 | +| [OpenSSL cryptographic primitives aren't supported on macOS](cryptography/10.0/openssl-macos-unsupported.md) | Behavioral change | Preview 6 | +| [X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md) | Behavioral change | Preview 1 | +| [X509Certificate and PublicKey key parameters can be null](cryptography/10.0/x509-publickey-null.md) | Behavioral/source incompatible change | Preview 3 | +| [Environment variable renamed to DOTNET_OPENSSL_VERSION_OVERRIDE](cryptography/10.0/version-override.md) | Behavioral change | Preview 1 | + ## Entity Framework Core [Breaking changes in EF Core 10](/ef/core/what-is-new/ef-core-10.0/breaking-changes) @@ -72,16 +83,6 @@ If you're migrating an app to .NET 10, the breaking changes listed here might af |-------|-------------------|--------------------| | [Environment variable renamed to DOTNET_ICU_VERSION_OVERRIDE](globalization/10.0/version-override.md) | Behavioral change | Preview 1 | -## Cryptography - -| Title | Type of change | Introduced version | -|-------|-------------------|--------------------| -| [CoseSigner.Key can be null](cryptography/10.0/cosesigner-key-null.md) | Behavioral/source incompatible change | Preview 7 | -| [OpenSSL cryptographic primitives aren't supported on macOS](cryptography/10.0/openssl-macos-unsupported.md) | Behavioral change | Preview 6 | -| [X500DistinguishedName validation is stricter](cryptography/10.0/x500distinguishedname-validation.md) | Behavioral change | Preview 1 | -| [X509Certificate and PublicKey key parameters can be null](cryptography/10.0/x509-publickey-null.md) | Behavioral/source incompatible change | Preview 3 | -| [Environment variable renamed to DOTNET_OPENSSL_VERSION_OVERRIDE](cryptography/10.0/version-override.md) | Behavioral change | Preview 1 | - ## Interop | Title | Type of change | Introduced version | diff --git a/docs/core/compatibility/cryptography/10.0/mldsa-slhdsa-secretkey-to-privatekey.md b/docs/core/compatibility/cryptography/10.0/mldsa-slhdsa-secretkey-to-privatekey.md new file mode 100644 index 0000000000000..308900af099c6 --- /dev/null +++ b/docs/core/compatibility/cryptography/10.0/mldsa-slhdsa-secretkey-to-privatekey.md @@ -0,0 +1,52 @@ +--- +title: "Breaking change - MLDsa and SlhDsa 'SecretKey' members renamed" +description: "Learn about the breaking change in .NET 10 where MLDsa and SlhDsa members were renamed from using 'SecretKey' to using 'PrivateKey'." +ms.date: 09/05/2025 +ai-usage: ai-assisted +ms.custom: https://github.com/dotnet/docs/issues/47691 +--- + +# MLDsa and SlhDsa 'SecretKey' members renamed + +Some methods and properties in the `[Experimental]` post-quantum cryptography (PQC) classes and have been renamed. APIs that involve the `sk` value from their respective specifications now have `PrivateKey` in their names instead of `SecretKey`. + +## Version introduced + +.NET 10 RC 1 + +## Previous behavior + +Previously, you could call methods like `ImportMLDsaSecretKey` and `ImportSlhDsaSecretKey`, and you could access properties like `SecretKeySizeInBytes`. + +## New behavior + +Starting in .NET 10 RC 1, you must call methods like `ImportMLDsaPrivateKey` or `ImportSlhDsaPrivateKey`, and access properties like `PrivateKeySizeInBytes`. + +## Type of breaking change + +This change can affect [source compatibility](../../categories.md#source-compatibility). + +## Reason for change + +The change was made to align with existing asymmetric cryptography types in .NET and with related members such as . + +## Recommended action + +Resolve any compile breaks from this change by replacing instances of `SecretKey` with `PrivateKey` in the called member names: + +```diff +-int targetSize = key.Algorithm.SecretKeySizeInBytes; ++int targetSize = key.Algorithm.PrivateKeySizeInBytes; +byte[] output = new byte[targetSize]; +-key.ExportMLDsaSecretKey(output); ++key.ExportMLDsaPrivateKey(output); +``` + +## Affected APIs + +- +- +- +- +- +- diff --git a/docs/core/compatibility/toc.yml b/docs/core/compatibility/toc.yml index 2308812e76ac7..b9ab4277b8037 100644 --- a/docs/core/compatibility/toc.yml +++ b/docs/core/compatibility/toc.yml @@ -68,6 +68,8 @@ items: href: cryptography/10.0/cosesigner-key-null.md - name: Environment variable renamed to DOTNET_OPENSSL_VERSION_OVERRIDE href: cryptography/10.0/version-override.md + - name: MLDsa and SlhDsa 'SecretKey' members renamed + href: cryptography/10.0/mldsa-slhdsa-secretkey-to-privatekey.md - name: OpenSSL cryptographic primitives not supported on macOS href: cryptography/10.0/openssl-macos-unsupported.md - name: X500DistinguishedName validation is stricter