Skip to content
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

Merged
merged 14 commits into from
Jul 13, 2020

Conversation

Wollac
Copy link
Contributor

@Wollac Wollac commented May 6, 2020

Rendered

Example Go implementation in wollac/iota-crypto-demo:

@Wollac Wollac changed the title RFC: Milestone merkle validation RFC: Milestone Merkle Validation May 6, 2020
…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.
Copy link
Contributor

@GalRogozinski GalRogozinski Jul 5, 2020

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

Copy link
Contributor Author

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.

@Wollac Wollac merged commit ccd1df2 into iotaledger:master Jul 13, 2020
@Wollac Wollac deleted the milestone-merkle-validation branch July 13, 2020 11:12
PhilippGackstatter pushed a commit that referenced this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants