在.NET中可以在CTR模式下使用AES吗? [英] Can I use AES in CTR mode in .NET?
问题描述
.NET的AES不直接实现CTR。它只实现CBC,CFB,CTS,ECB和OFB。
.NET's AES does not implement CTR directly. It only implements CBC, CFB, CTS, ECB and OFB.
我可以使用任何这些模式,并安全地实施点击率,还是需要使用不同的图书馆一共?
Can I use any of these modes and securely implement CTR around them, or do I need to use a different library altogether?
推荐答案
是的,您可以使用.NET的AES在ECB模式和计数器中构建CTR,您自己初始化并增加,为每个块加密。
Yes, you can build a CTR using .NET's AES in ECB mode and a counter, that you yourself initialize and increment, for each block encrypted.
一个例子是WinZipAes加密流,它是开源DotNetZip的一部分。
WinZip指定使用AES加密加密ZIP文件,在CTR模式下使用AES。 DotNetZip使用ECB和计数器实现CTR模式。
An example of this is the WinZipAes encryption stream, which is part of the open-source DotNetZip.
WinZip specifies the use of AES encryption for encrypted ZIP files, using AES in CTR mode. DotNetZip implements the CTR mode using ECB and the counter.
请参阅这里一些评论。
这篇关于在.NET中可以在CTR模式下使用AES吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!