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

Hash Function #1

Open
mehranshakeri opened this issue Feb 12, 2019 · 1 comment
Open

Hash Function #1

mehranshakeri opened this issue Feb 12, 2019 · 1 comment

Comments

@mehranshakeri
Copy link

Hi,

In your documentation you mention adding 0x00 and 0x01 to children and inner nodes and apply it in you hash function as well H(0x01, X). However in your code you don't bring this byte in your CRC calculation. You only show it in serialization.

Based on my googling, we need to add this prefix to the data and the run hashing on it which is what you have in your README file. But your implementation is missing this byte.

Is this a bug?

@Godstimendako
Copy link

node ./verify.js ./output_merkle_tree_small.txt 64b3993941c4989c

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

No branches or pull requests

2 participants