1

The public keys ad the result of scalar multiplication in libsodium is always the U - coordinate of the point of curve25519 (RFC 7748). Is there a method in libsodium that helps to get the V coordinate from the U co-ordinate. Or is there any other library to derive the V co-ordinate?

Edit : While the problem is still unsolved , fortunately, after reworking on my use case , I realised that I do not need to get V co-ordinate for the next primitive.

UchihaItachi
  • 2,602
  • 14
  • 21

1 Answers1

0

The curve equation is v^2 = u^3 + 486662u^2 + u.

So, finding v just means solving the equation.

v = sqrt(u^3 + 486662u^2 + u)

Frank Denis
  • 1,475
  • 9
  • 12
  • The equation is v^2 = u^3 + 486662u^2 + u mod p . Not sure How to take out the sqrt then. – UchihaItachi May 13 '19 at 21:58
  • Though I have realized that I don't need the V coordinate in further primitives. Thanks mate @Frank Dennis – UchihaItachi May 13 '19 at 22:07
  • The Tonelli-Shanks algorithm can be used to compute the modular square root. But if you are using a bignum library that does modular arithmetic, it probably implements this operation already. – Frank Denis May 14 '19 at 00:04