1 write to Algorithm
System.Security.Cryptography (1)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (1)
80
Algorithm
= algorithm;
35 references to Algorithm
System.Security.Cryptography (35)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsa.cs (27)
146
if (
Algorithm
.MinSignatureSizeInBytes ==
Algorithm
.MaxSignatureSizeInBytes)
148
byte[] signature = new byte[
Algorithm
.MaxSignatureSizeInBytes];
159
using (CryptoPoolLease lease = CryptoPoolLease.Rent(
Algorithm
.MaxSignatureSizeInBytes, skipClear: true))
166
if (!
Algorithm
.IsValidSignatureSize(bytesWritten))
216
if (destination.Length <
Algorithm
.MaxSignatureSizeInBytes)
223
int bytesWritten = SignDataCore(data, context, destination.Slice(0,
Algorithm
.MaxSignatureSizeInBytes));
225
if (!
Algorithm
.IsValidSignatureSize(bytesWritten))
333
if (!
Algorithm
.IsValidSignatureSize(signature.Length))
1394
int minimumPossiblePkcs8Key =
Algorithm
.MinPrivateKeySizeInBytes;
1513
byte[] publicKey = new byte[
Algorithm
.MaxPublicKeySizeInBytes];
1550
if (destination.Length <
Algorithm
.MinPublicKeySizeInBytes)
1587
if (destination.Length <
Algorithm
.MinPublicKeySizeInBytes)
1593
using (CryptoPoolLease lease = CryptoPoolLease.RentConditionally(
Algorithm
.MaxPublicKeySizeInBytes, destination, skipClear: true))
1597
if (!
Algorithm
.IsValidPublicKeySize(localBytesWritten))
1635
byte[] privateKey = new byte[
Algorithm
.MaxPrivateKeySizeInBytes];
1675
if (destination.Length <
Algorithm
.MinPrivateKeySizeInBytes)
1712
if (destination.Length <
Algorithm
.MinPrivateKeySizeInBytes)
1718
using (CryptoPoolLease lease = CryptoPoolLease.RentConditionally(
Algorithm
.MaxPrivateKeySizeInBytes, destination, skipClearIfNotRented: true))
1722
if (!
Algorithm
.IsValidPrivateKeySize(localBytesWritten))
1814
using (CryptoPoolLease lease = CryptoPoolLease.Rent(
Algorithm
.MaxPrivateKeySizeInBytes))
1818
if (!
Algorithm
.IsValidPrivateKeySize(privateKeySize))
1835
writer.WriteObjectIdentifier(
Algorithm
.Oid);
1904
byte[] buffer = new byte[
Algorithm
.MaxPublicKeySizeInBytes];
1907
if (!
Algorithm
.IsValidPublicKeySize(written))
1924
writer.WriteObjectIdentifier(
Algorithm
.Oid);
1936
int size =
Algorithm
.MaxPrivateKeySizeInBytes;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaCng.Windows.cs (5)
129
ExportKey(CngKeyBlobFormat.PQDsaPublicBlob,
Algorithm
.MaxPublicKeySizeInBytes, destination);
140
ReadOnlySpan<byte> privateKey = KeyFormatHelper.ReadPkcs8([
Algorithm
.Oid], pkcs8.AsSpan(), out _);
156
return ExportKey(CngKeyBlobFormat.PQDsaPrivateBlob,
Algorithm
.MaxPrivateKeySizeInBytes, destination);
210
if (!PqcBlobHelpers.TryGetCompositeMLDsaParameterSet(
Algorithm
, out string? expectedParameterSet))
212
Debug.Fail($"Unknown algorithm {
Algorithm
.Name}.");
src\runtime\src\libraries\Common\src\System\Security\Cryptography\CompositeMLDsaImplementation.Windows.cs (1)
168
if (!PqcBlobHelpers.TryGetCompositeMLDsaParameterSet(
Algorithm
, out string? expectedParameterSet))
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (2)
1168
if (publicKey.
Algorithm
!= privateKey.
Algorithm
)