diff --git a/src/libraries/Common/src/System/Security/Cryptography/Asn1/MLDsaPrivateKeyAsn.xml b/src/libraries/Common/src/System/Security/Cryptography/Asn1/MLDsaPrivateKeyAsn.xml
index d612dfa842722e..56044f2d0ac740 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/Asn1/MLDsaPrivateKeyAsn.xml
+++ b/src/libraries/Common/src/System/Security/Cryptography/Asn1/MLDsaPrivateKeyAsn.xml
@@ -6,7 +6,7 @@
emitType="ref">
diff --git a/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs b/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs
index 21944f3c1dc180..c7cdfbf1370bfa 100644
--- a/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs
+++ b/src/libraries/Common/src/System/Security/Cryptography/MLDsa.cs
@@ -665,7 +665,6 @@ public bool VerifyMu(ReadOnlySpan externalMu, ReadOnlySpan signature
///
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public byte[] ExportSubjectPublicKeyInfo()
{
ThrowIfDisposed();
@@ -695,7 +694,6 @@ public byte[] ExportSubjectPublicKeyInfo()
///
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public bool TryExportSubjectPublicKeyInfo(Span destination, out int bytesWritten)
{
ThrowIfDisposed();
@@ -718,7 +716,6 @@ public bool TryExportSubjectPublicKeyInfo(Span destination, out int bytesW
///
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public string ExportSubjectPublicKeyInfoPem()
{
ThrowIfDisposed();
@@ -745,7 +742,6 @@ public string ExportSubjectPublicKeyInfoPem()
/// -or-
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public byte[] ExportPkcs8PrivateKey()
{
ThrowIfDisposed();
@@ -774,7 +770,6 @@ public byte[] ExportPkcs8PrivateKey()
///
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public bool TryExportPkcs8PrivateKey(Span destination, out int bytesWritten)
{
ThrowIfDisposed();
@@ -818,7 +813,6 @@ public bool TryExportPkcs8PrivateKey(Span destination, out int bytesWritte
///
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
protected abstract bool TryExportPkcs8PrivateKeyCore(Span destination, out int bytesWritten);
///
@@ -834,7 +828,6 @@ public bool TryExportPkcs8PrivateKey(Span destination, out int bytesWritte
///
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public string ExportPkcs8PrivateKeyPem()
{
ThrowIfDisposed();
@@ -869,7 +862,6 @@ public string ExportPkcs8PrivateKeyPem()
/// -or-
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public byte[] ExportEncryptedPkcs8PrivateKey(ReadOnlySpan password, PbeParameters pbeParameters)
{
ArgumentNullException.ThrowIfNull(pbeParameters);
@@ -917,7 +909,6 @@ public byte[] ExportEncryptedPkcs8PrivateKey(ReadOnlySpan password, PbePar
/// -or-
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public byte[] ExportEncryptedPkcs8PrivateKey(ReadOnlySpan passwordBytes, PbeParameters pbeParameters)
{
ArgumentNullException.ThrowIfNull(pbeParameters);
@@ -940,7 +931,6 @@ public byte[] ExportEncryptedPkcs8PrivateKey(ReadOnlySpan passwordBytes, P
///
/// or is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public byte[] ExportEncryptedPkcs8PrivateKey(string password, PbeParameters pbeParameters)
{
ArgumentNullException.ThrowIfNull(password);
@@ -984,7 +974,6 @@ public byte[] ExportEncryptedPkcs8PrivateKey(string password, PbeParameters pbeP
/// -or-
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public bool TryExportEncryptedPkcs8PrivateKey(
ReadOnlySpan password,
PbeParameters pbeParameters,
@@ -1045,7 +1034,6 @@ public bool TryExportEncryptedPkcs8PrivateKey(
/// -or-
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public bool TryExportEncryptedPkcs8PrivateKey(
ReadOnlySpan passwordBytes,
PbeParameters pbeParameters,
@@ -1072,7 +1060,6 @@ public bool TryExportEncryptedPkcs8PrivateKey(
///
/// or is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public bool TryExportEncryptedPkcs8PrivateKey(
string password,
PbeParameters pbeParameters,
@@ -1112,7 +1099,6 @@ public bool TryExportEncryptedPkcs8PrivateKey(
/// -or-
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public string ExportEncryptedPkcs8PrivateKeyPem(
ReadOnlySpan password,
PbeParameters pbeParameters)
@@ -1157,7 +1143,6 @@ public string ExportEncryptedPkcs8PrivateKeyPem(
/// -or-
/// An error occurred while exporting the key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public string ExportEncryptedPkcs8PrivateKeyPem(
ReadOnlySpan passwordBytes,
PbeParameters pbeParameters)
@@ -1176,7 +1161,6 @@ public string ExportEncryptedPkcs8PrivateKeyPem(
///
/// or is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public string ExportEncryptedPkcs8PrivateKeyPem(
string password,
PbeParameters pbeParameters)
@@ -1370,7 +1354,6 @@ public static MLDsa GenerateKey(MLDsaAlgorithm algorithm)
/// The platform does not support ML-DSA. Callers can use the property
/// to determine if the platform supports ML-DSA.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportSubjectPublicKeyInfo(ReadOnlySpan source)
{
Helpers.ThrowIfAsnInvalidLength(source);
@@ -1397,7 +1380,6 @@ static void SubjectPublicKeyReader(ReadOnlySpan key, in ValueAlgorithmIden
///
/// is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportSubjectPublicKeyInfo(byte[] source)
{
ArgumentNullException.ThrowIfNull(source);
@@ -1435,7 +1417,6 @@ public static MLDsa ImportSubjectPublicKeyInfo(byte[] source)
/// The platform does not support ML-DSA. Callers can use the property
/// to determine if the platform supports ML-DSA.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportPkcs8PrivateKey(ReadOnlySpan source)
{
Helpers.ThrowIfAsnInvalidLength(source);
@@ -1450,7 +1431,6 @@ public static MLDsa ImportPkcs8PrivateKey(ReadOnlySpan source)
///
/// is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportPkcs8PrivateKey(byte[] source)
{
ArgumentNullException.ThrowIfNull(source);
@@ -1500,7 +1480,6 @@ public static MLDsa ImportPkcs8PrivateKey(byte[] source)
/// The platform does not support ML-DSA. Callers can use the property
/// to determine if the platform supports ML-DSA.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportEncryptedPkcs8PrivateKey(ReadOnlySpan passwordBytes, ReadOnlySpan source)
{
Helpers.ThrowIfAsnInvalidLength(source);
@@ -1550,7 +1529,6 @@ public static MLDsa ImportEncryptedPkcs8PrivateKey(ReadOnlySpan passwordBy
/// The platform does not support ML-DSA. Callers can use the property
/// to determine if the platform supports ML-DSA.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportEncryptedPkcs8PrivateKey(ReadOnlySpan password, ReadOnlySpan source)
{
Helpers.ThrowIfAsnInvalidLength(source);
@@ -1567,7 +1545,6 @@ public static MLDsa ImportEncryptedPkcs8PrivateKey(ReadOnlySpan password,
///
/// or is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportEncryptedPkcs8PrivateKey(string password, byte[] source)
{
ArgumentNullException.ThrowIfNull(password);
@@ -1612,7 +1589,6 @@ public static MLDsa ImportEncryptedPkcs8PrivateKey(string password, byte[] sourc
///
///
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportFromPem(ReadOnlySpan source)
{
ThrowIfNotSupported();
@@ -1630,7 +1606,6 @@ public static MLDsa ImportFromPem(ReadOnlySpan source)
///
/// is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportFromPem(string source)
{
ArgumentNullException.ThrowIfNull(source);
@@ -1698,7 +1673,6 @@ public static MLDsa ImportFromPem(string source)
///
/// This method supports the ENCRYPTED PRIVATE KEY PEM label.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportFromEncryptedPem(ReadOnlySpan source, ReadOnlySpan password)
{
ThrowIfNotSupported();
@@ -1763,7 +1737,6 @@ public static MLDsa ImportFromEncryptedPem(ReadOnlySpan source, ReadOnlySp
///
/// This method supports the ENCRYPTED PRIVATE KEY PEM label.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportFromEncryptedPem(ReadOnlySpan source, ReadOnlySpan passwordBytes)
{
ThrowIfNotSupported();
@@ -1778,7 +1751,6 @@ public static MLDsa ImportFromEncryptedPem(ReadOnlySpan source, ReadOnlySp
///
/// or is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportFromEncryptedPem(string source, string password)
{
ArgumentNullException.ThrowIfNull(source);
@@ -1792,7 +1764,6 @@ public static MLDsa ImportFromEncryptedPem(string source, string password)
///
/// or is .
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa ImportFromEncryptedPem(string source, byte[] passwordBytes)
{
ArgumentNullException.ThrowIfNull(source);
diff --git a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestsData.Ietf.cs b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestsData.Ietf.cs
index b2d5fce556a279..7db1588e6c15ff 100644
--- a/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestsData.Ietf.cs
+++ b/src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/MLDsa/MLDsaTestsData.Ietf.cs
@@ -11,7 +11,7 @@ namespace System.Security.Cryptography.Tests
{
public static partial class MLDsaTestsData
{
- // Data is from https://datatracker.ietf.org/doc/draft-ietf-lamps-dilithium-certificates/09/
+ // Data is from https://datatracker.ietf.org/doc/rfc9881/ Appendix C.
internal static partial MLDsaKeyInfo IetfMLDsa44 => field ??= new MLDsaKeyInfo(
MLDsaAlgorithm.MLDsa44,
"d7b2b47254aae0db45e7930d4a98d2c97d8f1397d17" +
diff --git a/src/libraries/Microsoft.Bcl.Cryptography/src/CompatibilitySuppressions.xml b/src/libraries/Microsoft.Bcl.Cryptography/src/CompatibilitySuppressions.xml
index c5a74a9d8396cf..af71d1f7e00f09 100644
--- a/src/libraries/Microsoft.Bcl.Cryptography/src/CompatibilitySuppressions.xml
+++ b/src/libraries/Microsoft.Bcl.Cryptography/src/CompatibilitySuppressions.xml
@@ -1,6 +1,13 @@
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509CertificateKeyAccessors.CopyWithPrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ true
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509CertificateKeyAccessors.CopyWithPrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2,System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
@@ -8,6 +15,20 @@
lib/net10.0/Microsoft.Bcl.Cryptography.dll
true
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509CertificateKeyAccessors.GetMLDsaPrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ true
+
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509CertificateKeyAccessors.GetMLDsaPublicKey(System.Security.Cryptography.X509Certificates.X509Certificate2):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ true
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509CertificateKeyAccessors.GetMLKemPrivateKey(System.Security.Cryptography.X509Certificates.X509Certificate2):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
@@ -22,6 +43,180 @@
lib/net10.0/Microsoft.Bcl.Cryptography.dll
true
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKey(System.String,System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKeyPem(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKeyPem(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKeyPem(System.String,System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportPkcs8PrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportPkcs8PrivateKeyPem:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportSubjectPublicKeyInfo:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportSubjectPublicKeyInfoPem:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportEncryptedPkcs8PrivateKey(System.String,System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Char}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.String,System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.String,System.String):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromPem(System.ReadOnlySpan{System.Char}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromPem(System.String):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportPkcs8PrivateKey(System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportPkcs8PrivateKey(System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportSubjectPublicKeyInfo(System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportSubjectPublicKeyInfo(System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportEncryptedPkcs8PrivateKey(System.String,System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportPkcs8PrivateKey(System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportPkcs8PrivateKeyCore(System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportSubjectPublicKeyInfo(System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ lib/net10.0/Microsoft.Bcl.Cryptography.dll
+ lib/net11.0/Microsoft.Bcl.Cryptography.dll
+
CP0014
M:System.Security.Cryptography.MLKem.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
diff --git a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/X509Certificates/X509CertificateKeyAccessors.cs b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/X509Certificates/X509CertificateKeyAccessors.cs
index 9d3e37af1d8506..f660dbd297516f 100644
--- a/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/X509Certificates/X509CertificateKeyAccessors.cs
+++ b/src/libraries/Microsoft.Bcl.Cryptography/src/System/Security/Cryptography/X509Certificates/X509CertificateKeyAccessors.cs
@@ -149,7 +149,6 @@ public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certific
///
/// The public key was invalid, or otherwise could not be imported.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa? GetMLDsaPublicKey(this X509Certificate2 certificate)
{
ArgumentNullException.ThrowIfNull(certificate);
@@ -194,7 +193,6 @@ public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certific
///
/// An error occurred accessing the private key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static MLDsa? GetMLDsaPrivateKey(this X509Certificate2 certificate)
{
ArgumentNullException.ThrowIfNull(certificate);
@@ -244,7 +242,6 @@ public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certific
///
/// Combining a certificate and an ML-DSA private key is not supported on this platform.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public static X509Certificate2 CopyWithPrivateKey(this X509Certificate2 certificate, MLDsa privateKey)
{
ArgumentNullException.ThrowIfNull(certificate);
diff --git a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
index fd5b675a60f8e0..04cb0d4ac85d74 100644
--- a/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
+++ b/src/libraries/System.Security.Cryptography/ref/System.Security.Cryptography.cs
@@ -2033,17 +2033,11 @@ protected MLDsa(System.Security.Cryptography.MLDsaAlgorithm algorithm) { }
public static bool IsSupported { get { throw null; } }
public void Dispose() { }
protected virtual void Dispose(bool disposing) { }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] ExportEncryptedPkcs8PrivateKey(string password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public string ExportEncryptedPkcs8PrivateKeyPem(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public string ExportEncryptedPkcs8PrivateKeyPem(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public string ExportEncryptedPkcs8PrivateKeyPem(string password, System.Security.Cryptography.PbeParameters pbeParameters) { throw null; }
public byte[] ExportMLDsaPrivateKey() { throw null; }
public void ExportMLDsaPrivateKey(System.Span destination) { }
@@ -2054,32 +2048,19 @@ public void ExportMLDsaPrivateSeed(System.Span destination) { }
public byte[] ExportMLDsaPublicKey() { throw null; }
public void ExportMLDsaPublicKey(System.Span destination) { }
protected abstract void ExportMLDsaPublicKeyCore(System.Span destination);
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] ExportPkcs8PrivateKey() { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public string ExportPkcs8PrivateKeyPem() { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public byte[] ExportSubjectPublicKeyInfo() { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public string ExportSubjectPublicKeyInfoPem() { throw null; }
public static System.Security.Cryptography.MLDsa GenerateKey(System.Security.Cryptography.MLDsaAlgorithm algorithm) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.ReadOnlySpan source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.ReadOnlySpan source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportEncryptedPkcs8PrivateKey(string password, byte[] source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportFromEncryptedPem(System.ReadOnlySpan source, System.ReadOnlySpan passwordBytes) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportFromEncryptedPem(System.ReadOnlySpan source, System.ReadOnlySpan password) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportFromEncryptedPem(string source, byte[] passwordBytes) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportFromEncryptedPem(string source, string password) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportFromPem(System.ReadOnlySpan source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportFromPem(string source) { throw null; }
public static System.Security.Cryptography.MLDsa ImportMLDsaPrivateKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, byte[] source) { throw null; }
public static System.Security.Cryptography.MLDsa ImportMLDsaPrivateKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, System.ReadOnlySpan source) { throw null; }
@@ -2087,13 +2068,9 @@ public void ExportMLDsaPublicKey(System.Span destination) { }
public static System.Security.Cryptography.MLDsa ImportMLDsaPrivateSeed(System.Security.Cryptography.MLDsaAlgorithm algorithm, System.ReadOnlySpan source) { throw null; }
public static System.Security.Cryptography.MLDsa ImportMLDsaPublicKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, byte[] source) { throw null; }
public static System.Security.Cryptography.MLDsa ImportMLDsaPublicKey(System.Security.Cryptography.MLDsaAlgorithm algorithm, System.ReadOnlySpan source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportPkcs8PrivateKey(byte[] source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportPkcs8PrivateKey(System.ReadOnlySpan source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportSubjectPublicKeyInfo(byte[] source) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public static System.Security.Cryptography.MLDsa ImportSubjectPublicKeyInfo(System.ReadOnlySpan source) { throw null; }
public byte[] SignData(byte[] data, byte[]? context = null) { throw null; }
public void SignData(System.ReadOnlySpan data, System.Span destination, System.ReadOnlySpan context = default(System.ReadOnlySpan)) { }
@@ -2112,17 +2089,11 @@ public void SignMu(System.ReadOnlySpan externalMu, System.Span desti
public void SignPreHash(System.ReadOnlySpan hash, System.Span destination, string hashAlgorithmOid, System.ReadOnlySpan context = default(System.ReadOnlySpan)) { }
[System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected abstract void SignPreHashCore(System.ReadOnlySpan hash, System.ReadOnlySpan context, string hashAlgorithmOid, System.Span destination);
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan passwordBytes, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportEncryptedPkcs8PrivateKey(string password, System.Security.Cryptography.PbeParameters pbeParameters, System.Span destination, out int bytesWritten) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportPkcs8PrivateKey(System.Span destination, out int bytesWritten) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
protected abstract bool TryExportPkcs8PrivateKeyCore(System.Span destination, out int bytesWritten);
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public bool TryExportSubjectPublicKeyInfo(System.Span destination, out int bytesWritten) { throw null; }
public bool VerifyData(byte[] data, byte[] signature, byte[]? context = null) { throw null; }
public bool VerifyData(System.ReadOnlySpan data, System.ReadOnlySpan signature, System.ReadOnlySpan context = default(System.ReadOnlySpan)) { throw null; }
@@ -3593,7 +3564,6 @@ public sealed partial class PublicKey
public PublicKey(System.Security.Cryptography.AsymmetricAlgorithm key) { }
[System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")]
public PublicKey(System.Security.Cryptography.CompositeMLDsa key) { }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006")]
public PublicKey(System.Security.Cryptography.MLDsa key) { }
public PublicKey(System.Security.Cryptography.MLKem key) { }
public PublicKey(System.Security.Cryptography.Oid oid, System.Security.Cryptography.AsnEncodedData? parameters, System.Security.Cryptography.AsnEncodedData keyValue) { }
@@ -3617,7 +3587,6 @@ public PublicKey(System.Security.Cryptography.SlhDsa key) { }
public System.Security.Cryptography.ECDiffieHellman? GetECDiffieHellmanPublicKey() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public System.Security.Cryptography.ECDsa? GetECDsaPublicKey() { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
public System.Security.Cryptography.MLDsa? GetMLDsaPublicKey() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("browser")]
@@ -3938,7 +3907,6 @@ public X509Certificate2(string fileName, string? password, System.Security.Crypt
[System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.CompositeMLDsa privateKey) { throw null; }
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.ECDiffieHellman privateKey) { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLDsa privateKey) { throw null; }
public System.Security.Cryptography.X509Certificates.X509Certificate2 CopyWithPrivateKey(System.Security.Cryptography.MLKem privateKey) { throw null; }
[System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
@@ -3966,9 +3934,7 @@ public X509Certificate2(string fileName, string? password, System.Security.Crypt
public System.Security.Cryptography.CompositeMLDsa? GetCompositeMLDsaPublicKey() { throw null; }
public System.Security.Cryptography.ECDiffieHellman? GetECDiffieHellmanPrivateKey() { throw null; }
public System.Security.Cryptography.ECDiffieHellman? GetECDiffieHellmanPublicKey() { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.MLDsa? GetMLDsaPrivateKey() { throw null; }
- [System.Diagnostics.CodeAnalysis.ExperimentalAttribute("SYSLIB5006", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public System.Security.Cryptography.MLDsa? GetMLDsaPublicKey() { throw null; }
public System.Security.Cryptography.MLKem? GetMLKemPrivateKey() { throw null; }
public System.Security.Cryptography.MLKem? GetMLKemPublicKey() { throw null; }
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs
index 0905992bd64694..a59f008ae7a01f 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/PublicKey.cs
@@ -85,7 +85,6 @@ public PublicKey(MLKem key) : this(key.ExportSubjectPublicKeyInfo())
/// must return a
/// valid ASN.1-DER encoded X.509 SubjectPublicKeyInfo.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId)]
public PublicKey(MLDsa key) : this(key.ExportSubjectPublicKeyInfo())
{
}
@@ -379,7 +378,6 @@ public static PublicKey CreateFromSubjectPublicKeyInfo(ReadOnlySpan source
///
/// The key contents are corrupt or could not be read successfully.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
[UnsupportedOSPlatform("browser")]
public MLDsa? GetMLDsaPublicKey()
{
diff --git a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
index e90a05c8a22613..85e7f0a4434f73 100644
--- a/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
+++ b/src/libraries/System.Security.Cryptography/src/System/Security/Cryptography/X509Certificates/X509Certificate2.cs
@@ -891,7 +891,6 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey)
///
/// The public key was invalid, or otherwise could not be imported.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public MLDsa? GetMLDsaPublicKey()
{
MLDsaAlgorithm? algorithm = MLDsaAlgorithm.GetMLDsaAlgorithmFromOid(GetKeyAlgorithm());
@@ -914,7 +913,6 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey)
///
/// An error occurred accessing the private key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public MLDsa? GetMLDsaPrivateKey()
{
MLDsaAlgorithm? algorithm = MLDsaAlgorithm.GetMLDsaAlgorithmFromOid(GetKeyAlgorithm());
@@ -947,7 +945,6 @@ public X509Certificate2 CopyWithPrivateKey(MLKem privateKey)
///
/// The certificate already has an associated private key.
///
- [Experimental(Experimentals.PostQuantumCryptographyDiagId, UrlFormat = Experimentals.SharedUrlFormat)]
public X509Certificate2 CopyWithPrivateKey(MLDsa privateKey)
{
ArgumentNullException.ThrowIfNull(privateKey);
diff --git a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml
index 8cde111fd924bb..08762ea745bf52 100644
--- a/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml
+++ b/src/libraries/apicompat/ApiCompatBaseline.NetCoreAppLatestStable.xml
@@ -145,24 +145,54 @@
net10.0/System.Runtime.Intrinsics.dll
net11.0/System.Runtime.Intrinsics.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/netstandard.dll
+ net11.0/netstandard.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/netstandard.dll
net11.0/netstandard.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/netstandard.dll
+ net11.0/netstandard.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLKemPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/netstandard.dll
net11.0/netstandard.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/netstandard.dll
+ net11.0/netstandard.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/netstandard.dll
net11.0/netstandard.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/netstandard.dll
+ net11.0/netstandard.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/netstandard.dll
+ net11.0/netstandard.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLKemPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
@@ -175,24 +205,54 @@
net10.0/netstandard.dll
net11.0/netstandard.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.dll
+ net11.0/System.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.dll
net11.0/System.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.dll
+ net11.0/System.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLKemPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.dll
net11.0/System.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.dll
+ net11.0/System.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.dll
net11.0/System.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.dll
+ net11.0/System.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.dll
+ net11.0/System.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLKemPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
@@ -271,6 +331,180 @@
net10.0/System.Runtime.dll
net11.0/System.Runtime.dll
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKey(System.String,System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKeyPem(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKeyPem(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportEncryptedPkcs8PrivateKeyPem(System.String,System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportPkcs8PrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportPkcs8PrivateKeyPem:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportSubjectPublicKeyInfo:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ExportSubjectPublicKeyInfoPem:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportEncryptedPkcs8PrivateKey(System.String,System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.ReadOnlySpan{System.Char},System.ReadOnlySpan{System.Char}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.String,System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromEncryptedPem(System.String,System.String):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromPem(System.ReadOnlySpan{System.Char}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportFromPem(System.String):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportPkcs8PrivateKey(System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportPkcs8PrivateKey(System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportSubjectPublicKeyInfo(System.Byte[]):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.ImportSubjectPublicKeyInfo(System.ReadOnlySpan{System.Byte}):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Char},System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportEncryptedPkcs8PrivateKey(System.String,System.Security.Cryptography.PbeParameters,System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportPkcs8PrivateKey(System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportPkcs8PrivateKeyCore(System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.MLDsa.TryExportSubjectPublicKeyInfo(System.Span{System.Byte},System.Int32@):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
CP0014
M:System.Security.Cryptography.MLKem.ExportEncryptedPkcs8PrivateKey(System.ReadOnlySpan{System.Byte},System.Security.Cryptography.PbeParameters):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
@@ -445,24 +679,54 @@
net10.0/System.Security.Cryptography.dll
net11.0/System.Security.Cryptography.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.Security.Cryptography.dll
net11.0/System.Security.Cryptography.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLKemPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.Security.Cryptography.dll
net11.0/System.Security.Cryptography.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.Security.Cryptography.dll
net11.0/System.Security.Cryptography.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.dll
+ net11.0/System.Security.Cryptography.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLKemPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
@@ -475,24 +739,54 @@
net10.0/System.Security.Cryptography.dll
net11.0/System.Security.Cryptography.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.X509Certificates.dll
+ net11.0/System.Security.Cryptography.X509Certificates.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.#ctor(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.Security.Cryptography.X509Certificates.dll
net11.0/System.Security.Cryptography.X509Certificates.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.X509Certificates.dll
+ net11.0/System.Security.Cryptography.X509Certificates.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.PublicKey.GetMLKemPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.Security.Cryptography.X509Certificates.dll
net11.0/System.Security.Cryptography.X509Certificates.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLDsa):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.X509Certificates.dll
+ net11.0/System.Security.Cryptography.X509Certificates.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.CopyWithPrivateKey(System.Security.Cryptography.MLKem):[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
net10.0/System.Security.Cryptography.X509Certificates.dll
net11.0/System.Security.Cryptography.X509Certificates.dll
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.X509Certificates.dll
+ net11.0/System.Security.Cryptography.X509Certificates.dll
+
+
+ CP0014
+ M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLDsaPublicKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]
+ net10.0/System.Security.Cryptography.X509Certificates.dll
+ net11.0/System.Security.Cryptography.X509Certificates.dll
+
CP0014
M:System.Security.Cryptography.X509Certificates.X509Certificate2.GetMLKemPrivateKey:[T:System.Diagnostics.CodeAnalysis.ExperimentalAttribute]