如果我有输入和输出以及方法但没有密钥,我可以解密加密数据吗?
这是一个安全问题,如果我向用户提供:
- 后的示例输出
- 加密前的示例输入 加密加密
- 方法
,但我没有提供加密方法的正确密钥,用户是否可以轻松找到加密密钥?
提前致谢。
This is a security question, What if I give to the user:
- a sample input before encrypting
- a sample output after encrypting
- the encryption method
but I did not provide the correct key for the encryption method, would it be easily that the user can find the encryption key?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不容易,不。不过,它确实使破解加密变得更容易。您已经确认了生成加密字符串的确切逻辑,并为攻击者提供了一个用于测试的示例。
Not easy, no. It does make cracking the encyption easier though. You have confirmed the exact logic for producing the encrypted string, and given the attacker an example to test with.
一般来说,我们认为算法是公开的,因此您不需要提供任何类型的关键信息来泄露密钥。此外,您描述了一种已知明文攻击,其中用户拥有一对明文和相应的密文,该密文假定对所有用户都是公开的。仅考虑这两个因素,强密码算法应该很难通过恢复加密解密密钥(对称)来破解。
Generally, the algorithm we suppose to be something public, hence you do not provide any kind of critical information to reveal the key. Moreover, you describe a known-plaintext attack where the user has a pair of plaintext and the corresponding ciphertext which it suppose to be something public to all users. A strong cipher algorithm should be difficult to break by recovering the encryption-decryption key(symmetric) having in mind only these two factors.