Rijndael information
The RijndaelCryptoServiceProvider class is our implementation of the unmanaged AES CSP that ships with Windows Server 2003 and higher.
In order to use the unmanaged Rijndael implementation, certain requirements must be met. If these requirements are not met, the RijndaelCryptoServiceProvider class automatically reverts to the RijndaelManaged class.
These are the requirements that must be met in order to use the unmanaged Rijndael implementation:
- Windows Server 2003: currently only Windows Server 2003 and higher ship with the AES crypto service provider.
- BlockSize of 128 bits: the Rijndael algorithm can handle block sizes of 128, 192 and 256 bits, however the AES standard only specifies a block size of 128 bits. Hence, the unmanaged AES CSP only implements 128 bits block sizes.
- PKCS#7 padding: the unmanaged Rijndael implementation does not support a padding mode other than PKCS#7.
Although not many Windows versions support the AES CSP, the advantages of using the unmanaged implementation are significant. The RijndaelCryptoServiceProvider regularly outperforms the RijndaelManaged class with encryption and decryption speeds that are up to 7x faster.