Cheeso
Cheeso

Reputation: 192497

When would I choose AesCryptoServiceProvider over AesManaged or RijndaelManaged?

I think the distinguishing factors are

is that about right?

Upvotes: 12

Views: 8539

Answers (1)

PaulG
PaulG

Reputation: 14021

AesManaged documentation states that

"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."

That would suggest its using ECB (Electronic Codebook) mode. This can be a significant weakness to the encrypted data as it means identical blocks of plain text data will result in identical blocks of cipher output.


Edit: (As correction)
Documentation for the Mode property indicates that Mode infact defaults to CBC (which confusingly IS a feedback mode) but cannot be set to CFB or OFB (Cipher Feedback / Output Feedback)

Upvotes: 3

Related Questions