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

fix: sha256 leaves to avoid 2nd pre-image attack #77

Merged
merged 2 commits into from
May 16, 2022

Conversation

shotaronowhere
Copy link
Contributor

Differentiate leaves from interior nodes with different hash functions to prevent 2nd order pre-image attack.

https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/

This commit was supposed to have been included in the original PR.

@jaybuidl jaybuidl self-requested a review May 12, 2022 11:13
@jaybuidl jaybuidl added this to the prealpha-3 milestone May 12, 2022
jaybuidl
jaybuidl previously approved these changes May 12, 2022
@jaybuidl jaybuidl linked an issue May 12, 2022 that may be closed by this pull request
@codeclimate
Copy link

codeclimate bot commented May 12, 2022

Code Climate has analyzed commit 04e4f30 and detected 0 issues on this pull request.

View more on Code Climate.

@jaybuidl jaybuidl merged commit b70f8b2 into master May 16, 2022
@jaybuidl jaybuidl deleted the feat/merkle-library branch May 16, 2022 20:54
Params10 pushed a commit that referenced this pull request Feb 3, 2023
fix: sha256 leaves to avoid 2nd pre-image attack
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fast Bridging: message batching
2 participants