Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

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

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.

share|improve this answer
Thanks! Should -yp be taken mod P? – ConditionRacer Oct 29 '13 at 15:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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