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