微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Merkle 树第二个原像攻击防御 - 在特定字节值之前

如何解决Merkle 树第二个原像攻击防御 - 在特定字节值之前

来自https://github.com/fmerg/pymerkle

 Defense against second-preimage attack consists in the following security measures:
    - Before computing the hash of a leaf,prepend the corresponding record with 0x00
    - Before computing the hash of any interior node,prepend both of its parents' hashes with 0x01

(我知道 0x00 和 0x01 只是“特定的字节值”,它们可以是任何东西)

为什么会这样?

理论上攻击者不能找到以 0x00 开头的伪造内容的叶哈希吗?

预先添加父节点的哈希节点有什么好处?

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。