HareInWeed / gec

elliptic curve cryptography with GPU acceleration
MIT License
13 stars 3 forks source link

Strange output #7

Closed realhaik closed 2 months ago

realhaik commented 2 months ago

when I ran this code:

int main() {

    Secp256k1 p1;
    std::cout << p1 << std::endl;      

    Secp256k1::mul(p1, 3, GEN);     

    std::cout << p1 << std::endl; 
    }

this is the output that I see:


{0x0000000000000000 0000000000000000 0000000000000000 0000000000000000,
 0x0000000000000000 0000000000000000 0000000000000000 0000000000000000,
 0x0000000000000000 0000000000000000 0000000000000000 0000000000000000}

{0x019fa59f6f459fc6 748fa0a875006844 fc39bed026e15b27 69cd0e0931000a12,
 0xf03f524e8729a2d6 70f5f5be0a33eedc 2fc8d898b67b2802 b68ef68395abd131,
 0xc2c26ed3e5be9201 db856e0c5e96b76d 5d182c134369ed8e cd3f6a303370697b}

whereas the expectation is to see this:

_PointJacobi__coords = {
43150999984920195402721557287970751909215378357684930847008742850115047381891,
59926971897449277329076473160900726794672445021794582518265033533443990978073,
24812014379610181492537499413510995242366288494600126160509686236072294602767}

what am I missing?