0

来自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 开头的伪造内容的叶子哈希吗?

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

4

0 回答 0