何时选择AesCryptoServiceProvider超过AesManaged或RijndaelManaged的? [英] When would I choose AesCryptoServiceProvider over AesManaged or RijndaelManaged?
问题描述
我觉得区别因素是
- AesCryptoServiceProvider是符合FIPS
- AesManaged是跨平台的,需要.NET 3.0
- 在RijndaelManaged的运行于.NET 2.0,需要限制块大小
是基本正确?
推荐答案
的 AesManaged文档指出
AES算法在本质上是Rijndael的对称算法有一个固定的块大小和迭代次数。这类功能的方式相同RijndaelManaged类但限制块为128位和不允许反馈模式。
"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."
这会建议其使用ECB(电子codebook)模式。这可以是一个显著弱点对加密数据,因为它意味着纯文本数据的相同电路块会导致密输出的相同电路块。
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.
编辑:(截至校正)
为模式属性指示模式INFACT默认为CBC(这容易混淆的是反馈模式),但不能设置为CFB或OFB(加密反馈/输出反馈)
(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)
这篇关于何时选择AesCryptoServiceProvider超过AesManaged或RijndaelManaged的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!