问题描述
来自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 (将#修改为@)