简体   繁体   中英

AES256 Encryption in C#

I am using System.Security.Cryptography.RijndaelManaged class in C#(.NET 3.5) to do encryption with settings:

RijndaelManaged AesCrypto = new RijndaelManaged();
AesCrypto.BlockSize = 128;
AesCrypto.Mode = CipherMode.CBC;
CryptoStream CryptStream = new CryptoStream(memStream1,
    AesCrypto.CreateEncryptor(EncryptionKey1, EncryptionIV1),
                    CryptoStreamMode.Write);

And with 256 bit key and IV. I believe that results in AES256. Am I right?

Would there be any differences if I am using System.Security.Cryptography.AesManaged class?

Also, I was thinking, we TRUST Microsoft implementation of AES, can this be verified, or maybe one should write his own implementation of AES?

About the differences between AesManaged and RijndaelManaged :

The AES algorithm is essentially the Rijndael symmetric algorithm with a fixed block size and iteration count. This class functions the same way as the RijndaelManaged class but limits blocks to 128 bits and does not allow feedback modes.

Taken from MSDN, here is the http://msdn.microsoft.com/en-us/library/system.security.cryptography.aesmanaged.aspx

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM