-
Notifications
You must be signed in to change notification settings - Fork 5
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
verify
passes when it should fail
#1
Comments
Wow, that's all sorts of bad. I'll look into it when I get some spare cycles. |
I've implemented a temporary "fix" that requires inputs be the proper length (at least 128 bytes in length). That said, I have my doubts that the implementation is valid and we should check the solutions this library creates with solutions from other libraries. |
@msporny I was doing work in other test suites and discovered this: I have found that if I roll back the latest commit in this module that the test will pass again. |
There are two more issues with the Equihash implementation we're using that MUST be fixed before production:
These bugs exist because the implementation doesn't implement some parts of the Equihash paper. |
The solution size can be computed based on the parameters Other implementations address repeating hashes via a function that checks for distinct hash values for every index of the solution (i.e. equihash solution verification calls for every element in the solution to be combined with the input to produce a hash; these hashes should all be unique and ordered lexicographically). |
Here's the result in CI: https://ci.digitalbazaar.com/job/equihash/6/console
The test is here: https://github.com/digitalbazaar/equihash/blob/implementation/test/test.js#L75-L99
The issue can be produced with a variety of strings that are not properly Base64 encoded.
The text was updated successfully, but these errors were encountered: