Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,14 +96,7 @@ private Func<SymmetricAlgorithm> GetSymmetricBlockCipherAlgorithmFactory(Managed

if (configuration.EncryptionAlgorithmType == typeof(Aes))
{
Func<Aes>? factory = null;
if (OSVersionUtil.IsWindows())
{
// If we're on desktop CLR and running on Windows, use the FIPS-compliant implementation.
factory = () => new AesCryptoServiceProvider();
}

return factory ?? Aes.Create;
return Aes.Create;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the FIPS compliance statement no longer valid?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AesCryptoServiceProvider is being obsoleted, not sure if the base API is FIPS compliant?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup, but that's in netcore, no? Aes in net461 is probably not FIPs compliant. Do we need to cross-compile this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GrabYourPitchforks is this safe to just always use Aes.Create now?

}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class CertificateXmlEncryptorTests
public void Encrypt_Decrypt_RoundTrips()
{
// Arrange
var symmetricAlgorithm = new TripleDESCryptoServiceProvider();
var symmetricAlgorithm = TripleDES.Create();
symmetricAlgorithm.GenerateKey();

var mockInternalEncryptor = new Mock<IInternalCertificateXmlEncryptor>();
Expand Down