-
Notifications
You must be signed in to change notification settings - Fork 53
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
Is this implementation safe against second preimage attacks? #13
Comments
Yes, but!
so instead of if you don't hash the leaf of a merkle tree you are not applying the correct merkle tree algorithm. or even better add |
After Re Reading the attack it should be possible. So it is not safe. |
Can you add a note about this in the README? |
This is from 2018 and still not fixed. Any chance you'll fix this with a 0x00 prefix for leaves and a 0x01 prefix for branches ? |
https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/
https://en.wikipedia.org/wiki/Merkle_tree#Second_preimage_attack
The text was updated successfully, but these errors were encountered: