Eliptic scalarmult

hi,its about ScalarMult(x1, y1 *big.Int, k []byte) (x, y *big.Int) ;

for example :

I have one point on the ellipse. ( x , y ).

  1. x1 , y1 := ScalarMult( x , y , g)

  2. gm = big.NewInt(0).ModInverse(g, elliptic.Params().P) //gm = [g -1 Mod P]x2,y2 := ScalarMult(x1 , y1 , gm)

because g * gm mod p = 1; so (x2, y2) should equal to (x , y) , but its not.

could anyone help me ?

What is is instead?

Please show some more code which shows your actual problem. Use the official go playground to create such an example. Please make sure that outputs the values as you get them.

Especially make sure that your code includes ScalarMult()!

tks,everyone ,i got it.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.