Code Monkey home page Code Monkey logo

Comments (5)

SparkiDev avatar SparkiDev commented on June 12, 2024 1

Hi @a-def

The function doesn't support zero in 5.7.0.

I've put up a PR that fixes this and added a test case to ensure we keep this behavior.

Is this all you need?

from wolfssl.

dgarske avatar dgarske commented on June 12, 2024

Hi @a-def ,

I've re-opened this (it auto closed) as I would like to have your feedback on the PR. Please let us know if this PR resolves the issue or if you see anything else.

Thanks,
David Garske, wolfSSL

from wolfssl.

a-def avatar a-def commented on June 12, 2024

Hi,

Great, thank you for this quick fix. That's all.

from wolfssl.

a-def avatar a-def commented on June 12, 2024

Version

Most recent master

Description

Hello,

I've re-opened this issue as the fix still leads to unexpected behavior.

By setting z to 0, the resulting output would be treated as an invalid point down the line.

For example, testing if the output is on the curve with wc_ecc_point_is_on_curve would fail. Indeed, wc_ecc_is_point would return with ECC_BAD_ARG_E because the z of the output is set to 0 after a multiplication by 0.

Yet, point at infinity is a valid point on the curve. I wonder if it is relevant to set z to 1 and/or add a conditional statement in wc_ecc_is_point to handle the point at infinity.

from wolfssl.

SparkiDev avatar SparkiDev commented on June 12, 2024

Hi @a-def

I've put up a pull request with the change to set z to 1.
I did debate this in my mind but the safe add and double don't use the z so I thought it was safe!

Let me know if this fixes things for you.

Sean :-)

from wolfssl.

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.