Git Product home page Git Product logo

Comments (5)

kmackay avatar kmackay commented on May 22, 2024

Make sure that you specified all of the curve parameters correctly. Note that the words should be specified in the code in the opposite order since micro-ecc uses a little-endian convention.

from micro-ecc.

zweib730 avatar zweib730 commented on May 22, 2024

yes, I have convert all params to little-endian convertion. for example

p=fffffffe ffffffff ffffffff ffffffff ffffffff 00000000 ffffffff ffffffff
-->#define Curve_P_6 {0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFE}

Could you please give me your EMAIL? I send the source code that I modified to you?

from micro-ecc.

kmackay avatar kmackay commented on May 22, 2024

[email protected]

from micro-ecc.

kmackay avatar kmackay commented on May 22, 2024

There was a bug in your omega_mult() function. Here is the corrected version:

static void omega_mult(uint32_t *p_result, uint32_t *p_right)
{
    /* Multiply by (2^224 + 2^96 - 2^64 + 1). */
    vli_set(p_result, p_right); /* 1 */
    p_result[3 + NUM_ECC_DIGITS] = vli_add(p_result + 3, p_result + 3, p_right); /* 2^96 + 1 */
    p_result[7 + NUM_ECC_DIGITS] = vli_add(p_result + 7, p_result + 7, p_right); /* 2^224 + 2^96 + 1 */
    if(vli_sub(p_result + 2, p_result + 2, p_right))
    { /* Propagate borrow if necessary. */
        uint i;
        for(i = 2 + NUM_ECC_DIGITS; ; ++i)
        {
            --p_result[i];
            if(p_result[i] != 0xffffffff)
            {
                break;
            }
        }
    }
}

I recommend that you try the "Generalized Mersenne Reduction" method in http://www.isys.uni-klu.ac.at/PDF/2001-0126-MT.pdf (algorithms 5 and 6, on page 356). This should result in code similar to the secpr256r1 version (should be significantly faster).

from micro-ecc.

zweib730 avatar zweib730 commented on May 22, 2024

Yes, my signature passed. Thank you very much for your help, I will try that method later.

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.