1 write to Algorithm
System.Security.Cryptography (1)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (1)
60Algorithm = algorithm;
47 references to Algorithm
System.Security.Cryptography (47)
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.cs (24)
111if (ciphertext.Length != Algorithm.CiphertextSizeInBytes) 114SR.Format(SR.Argument_DestinationImprecise, Algorithm.CiphertextSizeInBytes), 118if (sharedSecret.Length != Algorithm.SharedSecretSizeInBytes) 121SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 151byte[] localCiphertext = new byte[Algorithm.CiphertextSizeInBytes]; 152byte[] localSharedSecret = new byte[Algorithm.SharedSecretSizeInBytes]; 203if (ciphertext.Length != Algorithm.CiphertextSizeInBytes) 208if (sharedSecret.Length != Algorithm.SharedSecretSizeInBytes) 211SR.Format(SR.Argument_DestinationImprecise, Algorithm.SharedSecretSizeInBytes), 250if (ciphertext.Length != Algorithm.CiphertextSizeInBytes) 255byte[] sharedSecret = new byte[Algorithm.SharedSecretSizeInBytes]; 291if (destination.Length != Algorithm.PrivateSeedSizeInBytes) 294SR.Format(SR.Argument_DestinationImprecise, Algorithm.PrivateSeedSizeInBytes), 317byte[] seed = new byte[Algorithm.PrivateSeedSizeInBytes]; 522if (destination.Length != Algorithm.DecapsulationKeySizeInBytes) 525SR.Format(SR.Argument_DestinationImprecise, Algorithm.DecapsulationKeySizeInBytes), 548byte[] decapsulationKey = new byte[Algorithm.DecapsulationKeySizeInBytes]; 576if (destination.Length != Algorithm.EncapsulationKeySizeInBytes) 579SR.Format(SR.Argument_DestinationImprecise, Algorithm.EncapsulationKeySizeInBytes), 600byte[] encapsulationKey = new byte[Algorithm.EncapsulationKeySizeInBytes]; 1637int encapsulationKeySize = Algorithm.EncapsulationKeySizeInBytes; 1649Algorithm = Algorithm.Oid, 1771int initialSize = Algorithm.DecapsulationKeySizeInBytes + 32; 1801int size = Algorithm.DecapsulationKeySizeInBytes + 32;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKem.Windows.cs (1)
40ReadOnlySpan<char> expectedParamSet = PqcBlobHelpers.GetMLKemParameterSet(Algorithm);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemCng.Windows.cs (7)
96Debug.Assert(ciphertext.Length == Algorithm.CiphertextSizeInBytes); 97Debug.Assert(sharedSecret.Length == Algorithm.SharedSecretSizeInBytes); 110Debug.Assert(ciphertext.Length == Algorithm.CiphertextSizeInBytes); 111Debug.Assert(sharedSecret.Length == Algorithm.SharedSecretSizeInBytes); 132Debug.Assert(destination.Length == Algorithm.PrivateSeedSizeInBytes); 148Debug.Assert(destination.Length == Algorithm.DecapsulationKeySizeInBytes); 164Debug.Assert(destination.Length == Algorithm.EncapsulationKeySizeInBytes);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.cs (1)
21MLKemAlgorithm alg = key.Algorithm;
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemImplementation.Windows.cs (7)
84Debug.Assert(ciphertext.Length == Algorithm.CiphertextSizeInBytes); 85Debug.Assert(sharedSecret.Length == Algorithm.SharedSecretSizeInBytes); 96Debug.Assert(ciphertext.Length == Algorithm.CiphertextSizeInBytes); 97Debug.Assert(sharedSecret.Length == Algorithm.SharedSecretSizeInBytes); 111Debug.Assert(destination.Length == Algorithm.PrivateSeedSizeInBytes); 119Debug.Assert(destination.Length == Algorithm.DecapsulationKeySizeInBytes); 127Debug.Assert(destination.Length == Algorithm.EncapsulationKeySizeInBytes);
src\runtime\src\libraries\Common\src\System\Security\Cryptography\MLKemPkcs8.cs (3)
20Algorithm = kem.Algorithm.Oid, 31int seedSize = kem.Algorithm.PrivateSeedSizeInBytes; 40int decapsulationKeySize = kem.Algorithm.DecapsulationKeySizeInBytes;
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
860if (publicKey.Algorithm != privateKey.Algorithm) 865using (CryptoPoolLease pk1 = CryptoPoolLease.Rent(publicKey.Algorithm.EncapsulationKeySizeInBytes, skipClear: true)) 866using (CryptoPoolLease pk2 = CryptoPoolLease.Rent(publicKey.Algorithm.EncapsulationKeySizeInBytes, skipClear: true))