What are the encryption defaults for the RijndaelManaged class (AES encryption) in .NET 4.x?

Posted: (EET/GMT+2)

 

Microsoft built .NET with strong cryptography features from the start, and one example of such implementations is the RijndaelManaged class in the System.Security.Cryptography namespace. The name "Rijndael" is another name for Advanced Encryption Standard, or AES.

When you create an instance of the RijndaelManaged class, the question becomes: what are the defaults for key size, block size and block mode? The following are the defaults:

RijndaelManaged aes = new RijndaelManaged();
aes.KeySize = 256;
aes.BlockSize = 128;
aes.Mode = CipherMode.CBC;

Thus, the default key size is 256 bits (32 bytes), the largest supported by AES, the block size is 128 bits (this is the only size supported by AES), and finally, the so-called cipher mode is CBC, or Cipher Block Chaining.

Hope this helps!