shuklaayush / noir-bigint

BigInt library for Aztec's noir language
MIT License
30 stars 11 forks source link

Update ecdsa_secp256k1.nr with a `test` #12

Closed skaunov closed 9 months ago

skaunov commented 9 months ago

Greetings!

I feel like this test should pass, but it fails! Could you, pls, indicate the cause of failure? Maybe I just got something wrong. =(

shuklaayush commented 9 months ago

The points are represented as jacobian coordinates and not usual projective coordinates.

You can check that it works if you change it to this

    let g_projective_z_doubled = Point{
        x: curve.gen.x.mul(two).mul(two),
        y: curve.gen.y.mul(two).mul(two).mul(two),
        z: two,
    };
skaunov commented 9 months ago

Thank you for the link and sorry for bothering!

Should I just close the PR or is it better to add a corrected version of the test that you posted so that future reader won't fall into the same misunderstanding?

shuklaayush commented 9 months ago

We can add a test. Can you fix it?

skaunov commented 9 months ago

yeah, of course I'll update this one!