-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: Milestone Merkle Validation #12
RFC: Milestone Merkle Validation #12
Conversation
text/0012-milestone-merkle-validation/0012-milestone-merkle-validation.md
Outdated
Show resolved
Hide resolved
text/0012-milestone-merkle-validation/0012-milestone-merkle-validation.md
Outdated
Show resolved
Hide resolved
text/0012-milestone-merkle-validation/0012-milestone-merkle-validation.md
Outdated
Show resolved
Hide resolved
…lidation.md Co-authored-by: Thibault Martinez <thibault.martinez.30@gmail.com>
- The Merkle tree hash can be defined recursively:<br> | ||
MTH(D<sub>n</sub>) = BLAKE2( 0x01 || MTH({d<sub>1</sub>, ..., d<sub>k</sub>}) || MTH({d<sub>k+1</sub>, ..., d<sub>n</sub>}) ). | ||
|
||
Note that the hash calculations for leaves and nodes differ. This allows the validator to distinguish between leaves and nodes, which is required to provide second preimage resistance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should add a reference link because I don't think this is common knowledge?
Btw, even without this protection it is not a big deal if I understand correctly?
Even so, we should nonetheless add the protection you described
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't want to add an external link whose content or availability might change in the near future. Instead, I added a few more sentences explaining that particular attack on Merkle trees.
text/0012-milestone-merkle-validation/0012-milestone-merkle-validation.md
Outdated
Show resolved
Hide resolved
text/0012-milestone-merkle-validation/0012-milestone-merkle-validation.md
Show resolved
Hide resolved
TIP-47: Storage Deposit
Rendered
Example Go implementation in wollac/iota-crypto-demo: