Comments (5)
Wow, that's all sorts of bad. I'll look into it when I get some spare cycles.
from equihash.
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.
from equihash.
@msporny I was doing work in other test suites and discovered this:
https://ci.digitalbazaar.com/job/bedrock-ledger-validator-equihash/6/
I have found that if I roll back the latest commit in this module that the test will pass again.
from equihash.
There are two more issues with the Equihash implementation we're using that MUST be fixed before production:
- Inputs less than k in size automatically pass.
- Inputs with repeating hashes (e.g. 1, 2, 3, 42, 42, 5) automatically pass.
These bugs exist because the implementation doesn't implement some parts of the Equihash paper.
from equihash.
The solution size can be computed based on the parameters n
and k
; we should have a sanity check in the verify
function that enforces the proper size before doing any other work to check the solution.
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).
from equihash.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from equihash.