Giter Site home page Giter Site logo

Comments (5)

msporny avatar msporny commented on August 23, 2024

Wow, that's all sorts of bad. I'll look into it when I get some spare cycles.

from equihash.

msporny avatar msporny commented on August 23, 2024

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.

mattcollier avatar mattcollier commented on August 23, 2024

@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.

msporny avatar msporny commented on August 23, 2024

There are two more issues with the Equihash implementation we're using that MUST be fixed before production:

  1. Inputs less than k in size automatically pass.
  2. 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.

dlongley avatar dlongley commented on August 23, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.