9
$\begingroup$

I've had lots of practice adding points for my crypto class. However I've run into a situation where I need to subtract two points for decryption:

Pm + kPb - nb(kG) = Pm

Where Pm is the plaintext, Pb is participant b's public key, nb is participant b's private key, G is a base point in the elliptic group Ep(a,b), and k is a random positive integer chosen by participant a.

I am able to compute nb(kG) and kPb, but I'm unsure how to subtract the two. How is this done?

$\endgroup$
  • $\begingroup$ Adding the inverse of nbkG, i.e., -nbkG, to the point (Pm+kbP)? $\endgroup$ – DrLecter Oct 27 '13 at 0:25
  • $\begingroup$ How do I calculate an inverse point? $\endgroup$ – ConditionRacer Oct 27 '13 at 1:02
  • $\begingroup$ You may use this as a strating point for arithmetics on elliptic curves. $\endgroup$ – DrLecter Oct 28 '13 at 8:43
12
$\begingroup$

The inverse of a point $P = (x_P,y_P)$ is its reflexion across the $x$-axis : $P' = (x_P,-y_P)$.

If you want to compute $Q-P$, just replace $y_P$ by $-y_P$ in the usual formula for point addition.

$\endgroup$
  • $\begingroup$ Thanks! Should -yp be taken mod P? $\endgroup$ – ConditionRacer Oct 29 '13 at 15:20
  • 1
    $\begingroup$ ConditionRacer: Yes. You should take -yp mod P. $\endgroup$ – Thorkil Værge Jan 15 '18 at 0:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.