Giter Club home page Giter Club logo

Comments (10)

kmackay avatar kmackay commented on July 26, 2024

Looks like you should be able to just use:

recid = p[curve->num_bytes] & 0x01

at uECC.c:1200 (in the current revision).

Technically you also need to account for overflow mod n, but that will basically never happen.

from micro-ecc.

doc-hex avatar doc-hex commented on July 26, 2024

Thanks! Do you want a pull request which does that? The problem is I have to change the API.

from micro-ecc.

kmackay avatar kmackay commented on July 26, 2024

Try it out and see if it works for you locally first. I'll think about whether/how to do an API change.

from micro-ecc.

doc-hex avatar doc-hex commented on July 26, 2024

Hmm. Didn't work. Still gets wrong answer about 50% of the time. I wonder if the "side channel" protection stuff is a factor here.

from micro-ecc.

kmackay avatar kmackay commented on July 26, 2024

OK, I'll look into it in more detail

from micro-ecc.

kmackay avatar kmackay commented on July 26, 2024

My mistake, it should be:

recid = p[num_words] & 0x01;

from micro-ecc.

doc-hex avatar doc-hex commented on July 26, 2024

Yes. Works great! I should have noticed that.

from micro-ecc.

mengguang avatar mengguang commented on July 26, 2024

+1 for this feature. It's great to have recovery ID.

from micro-ecc.

Arachnid avatar Arachnid commented on July 26, 2024

It would be great to see this small feature integrated into the API!

from micro-ecc.

JiapengLi avatar JiapengLi commented on July 26, 2024

For those who need recid and pubkey recovery feature.
try this trezor's library out, it is btc/eth blockchain friedly.
https://github.com/trezor/trezor-firmware/tree/master/crypto

from micro-ecc.

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.