doujia1163
2014-12-03 16:25
浏览 66
已采纳

AES:在给定解密文本和加密文本的情况下搜索密钥

Although this may sound impractical, please hear me out...

Let's say I have two strings:
"test"
"apis"

I want to use AES 256-bit Encryption to convert the first string to the second string.

In AES (or any similar) Encryption, is it possible to search for a key that would work for such a situation, where the decrypted and encrypted text are known but not the passphrase?

If so, could someone suggest how I could implement it in PHP?

图片转代码服务由CSDN问答提供 功能建议

虽然这听起来不切实际,但请听我说...

假设我有两个字符串:
“test”
“apis”

我想使用AES 256位加密将第一个字符串转换为 第二个字符串。

在AES(或任何类似的)加密中,是否可以搜索适用于这种情况的密钥,其中解密和加密的文本是已知的,但不是 密码?

如果是这样,有人可以建议我如何在PHP中实现它吗?

  • 写回答
  • 关注问题
  • 收藏
  • 邀请回答

1条回答 默认 最新

  • doter1995 2014-12-03 16:40
    已采纳

    This is how bruteforcing encryption works, well the other way around, but still. You try all possible combinations and see if the decrypted text makes sense.

    Unless the encryption algorithm is completely broken, you can't do what you ask. AES-256 is not broken.

    Imagine if this was possible, then you could find the encryption key in a https dialog for instance as a response always starts the same way. I.e. "200 Ok"

    已采纳该答案
    打赏 评论

相关推荐 更多相似问题