防止“padding oracle”如果数据是流式传输或对于 HMAC 来说太大,会发生攻击吗?

发布于 2024-09-30 20:42:33 字数 270 浏览 1 评论 0原文

我知道针对 padding oracle 攻击的最佳解决方案是将 HMAC 包装并附加到完整的加密消息中。但还有什么其他解决方案呢?如果我的数据太大而需要流式传输怎么办?我可以在最后检查 HMAC,但我无法承担两次加载整个文件并首先检查 HMAC,然后将其流式传输并解密给用户的费用?

有不同的方法吗?

如果我使用 AES_CBC(zlib(data)),攻击者是否也可以进行填充预言机攻击?如果压缩后的数据最终出现乱码,zlib 会报错。攻击者是否也可以利用 zlib 的错误来获取一点信息?

I know that the best solution against the padding oracle attack is to wrap and append a HMAC to the complete encrypted message. But what other solutions are there? What if my data is so large that I need to stream it? I can check the HMAC at the very end, but I cannot afford loading the whole file twice and check the HMAC first and then stream and decrypt it to the user?

Are there different ways?

Can an attacker also do padding oracle attacks if I use AES_CBC(zlib(data))? zlib will emit errors if the compressed data is garbled eventually. Can an attacker use that error of zlib to get one bit of information, too?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

誰ツ都不明白 2024-10-07 20:42:34

针对 padding oracle 攻击的建议修复方法是 Encrypt-Then-MAC。这意味着您可以将密文分解为大小合适的块(例如 4096 字节)和 MAC。

The suggested fix for the padding oracle attacks is to Encrypt-Then-MAC. This means that you can break the ciphertext up into conveniently-sized blocks (say, 4096 bytes) and MAC each individually.

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