Coder Social home page Coder Social logo

Bug in EC points addition about ecsol HOT 5 CLOSED

k06a avatar k06a commented on June 8, 2024
Bug in EC points addition

from ecsol.

Comments (5)

k06a avatar k06a commented on June 8, 2024

Or I am using it the wrong way :)

from ecsol.

k06a avatar k06a commented on June 8, 2024

Calling ec._ecAdd(x1,y1,1,x2,y2,1) instead of ec._jAdd(x1,y1,x2,y2) gives:

04
c59f3b7f761930f5d1b3c597bf30a130b3d95f53210e695a483005b793a0e04e
b6a58b4c2d65315959c5e8854ffcbea96102dc8313714dcc8b7b7aee12657d7f

This point is also NOT on y^2 = x^3 + 7 (mod m) curve.

from ecsol.

k06a avatar k06a commented on June 8, 2024

Here is proof that arguments were passed correctly https://etherscan.io/address/0x28dcd428e8125990f9e5fe1b82db0e3ed240711c#readContract:

ec

dec2hex(89386970493588142485774255413527382305899003391019828884855784683786446364750) =>
C59F3B7F761930F5D1B3C597BF30A130B3D95F53210E695A483005B793A0E04E
dec2hex(82613429604321748106126205559785003700251151848839269056902677945456773135743) =>
B6A58B4C2D65315959C5E8854FFCBEA96102DC8313714DCC8B7B7AEE12657D7F

from ecsol.

jbaylina avatar jbaylina commented on June 8, 2024

The result gives a denominator that it's not one. If you do the inverse of the denomitator z and multiply by x and y you will see that it gives the right answer.

from ecsol.

k06a avatar k06a commented on June 8, 2024

@jbaylina thanks!

from ecsol.

Related Issues (5)

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.