是否可以对 AES256 进行逆向工程?
想象一下我有这个:
$cdata = AES_256($data, $pass);
AES_256 实现了 AES 算法。
如果我知道 $cdata
的内容和 $data
的内容并且还有 AES_256()
代码,我可以进行逆向工程并找到 $pass
吗?
Imagine I have this:
$cdata = AES_256($data, $pass);
AES_256 implements the AES algorithm.
If I know the content of $cdata
and the content of $data
and also have
the AES_256()
code, can I reverse engineer and find $pass
?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
简单的回答:不。
这已经过测试,并在 Wiki 链接中提到。
或者换句话说:在中奖的同一天,你被闪电击中的机会比打破它的机会更大!
Simple answer: NO.
This has been tested, and mentioned in the Wiki link.
Or put it another way: you have a better chance of being struck by lighting... on the same day you win the Lottery, than breaking it!
这称为已知明文攻击。 正如其他人所解释的那样,像 AES 这样的好的密码应该不受它的影响。
This is called a known-plaintext attack. A good cipher like AES should be immune to it, as the others explained.
如果
$pass
实际上是密码而不是 256 位密钥,那么您可能很幸运。虽然执行起来绝非易事,但针对普通密码的暴力攻击比暴力破解 256 位密钥要快得多。
因此,修改众多密码暴力破解工具之一,您就会遇到一次攻击(取决于密码的强度)可能需要几周到几年的时间 - 但这与 3x10^51 年相比已经很快了……
If
$pass
is actually a password and not a 256-bit key, you may be in luck.While it is far from trivial to perform, a brute-force attack against a normal password is much faster than brute-forcing a 256-bit key.
So modify one of the many password-brute-forcing tools, and you have a attack that (depending on the strength of the password) might take weeks to several years - but that is fast compared to 3x10^51 years...
另一段引述来自维基百科:
当您知道原始文本时,暴力破解可能会更快,但 3 x 10^51 年仍然是一个很长的时间。 另外,还存在一个问题,可能没有可以每秒检查十亿个 (10^18) 个密钥的设备。
简而言之:一切皆有可能,但这在我们现在生活的世界中是不可行的。
Another quote, from Wikipedia:
Brute forcing when you know the original text might be faster but still, 3 x 10^51 years is a long time. Plus there's the problem of probably not having a device that can check a billion billion (10^18) keys/second.
In short: everything is possible, but this is not feasible in the world we are now living in.
你可以暴力破解,但这需要很长时间。 就像几十年甚至更长时间一样。 这就是 AES 等加密算法的意义所在。
You could brute force it, but it would take a long time. As in decades or even longer. That's the point of encryption algorithms like AES.
与所有优秀的加密算法一样,AES 不依赖于通过模糊实现安全性。
换句话说,代码中没有“秘密”,因此拥有代码不会对您有特别帮助。
已知明文是一个单独的问题,我对此不太了解,所以我将其留给其他回答者。
AES, like all good crypto algorithms, doesn't rely on security through obscurity.
In other words, there are no "secrets" in the code, so you having the code won't help you particularly.
Known plaintext is a separate issue, which I don't know much about so I'll leave that up to the other answerers.
当然不是——唯一的方法就是暴力。
您真的认为 NIST 愚蠢到为新标准选择如此容易破解的密码吗?
Of course not - the only approach is brute force.
Do you really think NIST is so stupid as to choose a cipher that is so easily cracked for a new standard?
借助超级计算机的力量,AES 加密崩溃的时间将大大缩短......我听说......
with the power of super computers the time to crash AES encryption with be dramatically shortened.... I heard...
2x2^256 种可能的组合对于暴力破解来说是很多的。 但暴力破解是唯一的方法。 实际上需要大约30年的时间。 我想说,AES 是目前最好的加密方式。 但使用 CPU 只需要那么多时间。 由于 GPU(图形处理单元)严格基于数学,因此人们一直在编写仅使用 GPU 来破解基于数学的算法的程序,其速度比 CPU 快得多。 换句话说,AES 可能无法持续 3 年。 如果永恒密码是可能的就好了。 看起来动态加密可能是人们在不久的将来真正隐藏信息的唯一方法。
2x2^256 possible combinations is a lot to bruteforce. But bruteforcing is the only way. It would actually take about 3 decades. AES is the best Encryption possible right now I'd say. But that would only take that much time using a CPU. Because GPU's (Graphic Processing Units) are strictly math based, people have been making programs that only use the GPU to crack math based algorithms much more quickly than a CPU could. In other words AES might not last 3 decades. If only eternity codes were possible. Well looks like dynamic encryption may be the only way people can really hide their information in the near future.