Giter VIP home page Giter VIP logo

Comments (2)

btalbot avatar btalbot commented on August 13, 2024

Yes, the parsing of the node path is very broken when the path uses the negative notation or when the index value is >= 2147483648. The readme states that these notations are supported but there is very sparse testing of this. In fact the one test for negative indexes goes out of its way to avoid testing and tests using m/0'/-1 instead. (m/-0/-1 will not pass).

From what I can tell, no index of 2147483648 (0x80000000) or larger will work and negative indexes of -0 will also fail; unfortunately hardened-0 is very commonly required.

This library's use of signed arithmetic for index values is troubling to me in general since the spec says that index values are unsigned 32 bit integers. Supporting the negative notation when parsing the path is fine, but actually handling internal index values less then zero is problematic since -0 is not < 0 which this code expects to be true.

To me these are very serious bugs that should prevent anyone from using this gem as it will lead to loss of funds.

from money-tree.

thedoctor avatar thedoctor commented on August 13, 2024

Yep, bugs; patches welcome.

from money-tree.

Related Issues (20)

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.