是否可以对 AES256 进行逆向工程?

发布于 2024-07-18 04:12:17 字数 324 浏览 11 评论 0原文

想象一下我有这个:

$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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

千年*琉璃梦 2024-07-25 04:12:17

简单的回答:不。

这已经过测试,并在 Wiki 链接中提到。

相关密钥攻击最多可破坏 9 个
256 位 AES 轮。 A
选择明文攻击可以破8
192 位和 256 位 AES 轮,以及 7 轮
轮 128 位 AES,尽管
工作负载为 2128 不切实际 -
2119

或者换句话说:在中奖的同一天,你被闪电击中的机会比打破它的机会更大!

Simple answer: NO.

This has been tested, and mentioned in the Wiki link.

A related-key attack can break up to 9
rounds of 256-bit AES. A
chosen-plaintext attack can break 8
rounds of 192- and 256-bit AES, and 7
rounds of 128-bit AES, although the
workload is impractical at 2128 -
2119.

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!

So尛奶瓶 2024-07-25 04:12:17

这称为已知明文攻击。 正如其他人所解释的那样,像 AES 这样的好的密码应该不受它的影响。

This is called a known-plaintext attack. A good cipher like AES should be immune to it, as the others explained.

厌味 2024-07-25 04:12:17

如果 $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...

情愿 2024-07-25 04:12:17

另一段引述来自维基百科

AES 允许使用 256 位密钥。
破解对称 256 位密钥
暴力破解需要 2^128 倍以上
比128位的计算能力
钥匙。 一种可以检查的设备
十亿 (10^18) 个 AES 密钥
第二个需要大约 3 x
10^51 年耗尽 256 位
键空间。

当您知道原始文本时,暴力破解可能会更快,但 3 x 10^51 年仍然是一个很长的时间。 另外,还存在一个问题,可能没有可以每秒检查十亿个 (10^18) 个密钥的设备。

简而言之:一切皆有可能,但这在我们现在生活的世界中是不可行的。

Another quote, from Wikipedia:

AES permits the use of 256-bit keys.
Breaking a symmetric 256-bit key by
brute force requires 2^128 times more
computational power than a 128-bit
key. A device that could check a
billion billion (10^18) AES keys per
second would require about 3 x
10^51 years to exhaust the 256-bit
key space.

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.

流星番茄 2024-07-25 04:12:17

你可以暴力破解,但这需要很长时间。 就像几十年甚至更长时间一样。 这就是 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.

离不开的别离 2024-07-25 04:12:17

与所有优秀的加密算法一样,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.

携君以终年 2024-07-25 04:12:17

当然不是——唯一的方法就是暴力。
您真的认为 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?

长安忆 2024-07-25 04:12:17

借助超级计算机的力量,AES 加密崩溃的时间将大大缩短......我听说......

with the power of super computers the time to crash AES encryption with be dramatically shortened.... I heard...

苏大泽ㄣ 2024-07-25 04:12:17

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文