c# - 将字符串加密两次...好、坏还是丑?

标签 c# encryption rijndael

我正在开发一个使用 Rijndael 算法(C#、ASP.Net 4.5)的加密类,出于好奇,我想知道对字符串进行两次加密有多大好处。我的意思是用一个 key 加密字符串,然后用另一个 key 加密生成的加密结果?

这是否使它更加安全(我知道没有什么是安全的,并且我的软件中可能存在其他可被利用的漏洞)? CPU 开销是否值得(不确定这有多重,但我无法想象它会轻)?

我在网上寻找一些建议,但没有找到。有什么想法吗?

最佳答案

有几个可能对您有用的问题:

总体思路似乎是这样的:

Well, think about it this way. If breaking one encryption with brute force will take longer than the lifetime of the universe, are you any safer with an encryption scheme that will take twice the lifetime of the universe? No. The first encryption cannot be broken. Adding a second encryption just adds computation overhead with no real benefit. - mikeazo

我建议在 https://crypto.stackexchange.com/ 中提出这个问题,他们可能会为您提供有关该主题的更多详细信息。

关于c# - 将字符串加密两次...好、坏还是丑?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17893164/

相关文章:

c# - 正则表达式中的匹配函数为空?

java - 如何在 Java 中加密,在 Android 和 iOS 中解密

iphone - iOS:在我的代码中硬编码 AES key 是否安全?

java - 暴力破解问题

.net - 在 Rijndael 加密中对许多文件使用静态 IV 值是否可以?

php - 使用 Rijndael 进行不同的 Delphi/PHP 加密解密

c# - 不良 PKCS7 填充错误 : Invalid length 106

c# - 是否有可用的 C# 面部识别库?

c# - 对象无法序列化,因为它没有无参数构造函数

c# - Javascript 函数不会从代码隐藏中调用