Change default FeedbackSize for TripleDES internal implementation
authorKevin Jones <kevin@vcsjones.com>
Tue, 13 Oct 2020 19:11:46 +0000 (15:11 -0400)
committerGitHub <noreply@github.com>
Tue, 13 Oct 2020 19:11:46 +0000 (12:11 -0700)
commitf2090e72fc13725951e98b3542349c0ff0b14c0b
treee8db3e3ced9601a86d0b9b8c38a316ac1126324a
parent84ba45fc9d961ed3a7b43c89433321d5cb8300b8
Change default FeedbackSize for TripleDES internal implementation

In .NET Framework, TripleDESCryptoServiceProvider defaults to a feedback
size of 8, and TripleDESCng defaults to a feedback size of 64. The
static Create by default would return TripleDESCryptoServiceProvider,
thus the TripleDES from Create would have a default feedback size of 8.

This changes the default sizes of TripleDES to behave more
similarly to .NET Framework to make porting CFB code from Framework
easier.

The internal 3DES implementation (and thus
TripleDESCryptoServiceProvider, since that is a wrapper around the
internal implementation) now defaults to a feedback size of 8.
TripleDESCng and user-derived classes from TripleDES will continue to
use a feedback size of 64.
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/AES/AesContractTests.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/TripleDES/TripleDESCipherTests.cs
src/libraries/System.Security.Cryptography.Algorithms/src/Internal/Cryptography/TripleDesImplementation.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/AesTests.cs
src/libraries/System.Security.Cryptography.Algorithms/tests/TripleDesTests.cs
src/libraries/System.Security.Cryptography.Cng/tests/TripleDESCngTests.cs
src/libraries/System.Security.Cryptography.Csp/src/System/Security/Cryptography/TripleDESCryptoServiceProvider.cs
src/libraries/System.Security.Cryptography.Csp/tests/TripleDESCryptoServiceProviderTests.cs