# Elliptic Curve Cryptography

## Calculate kP on NIST Curves - recommended curves according to the Suite B standard

Solution that can be used for demonstrating Diffie-Hellmann key exchange

Select NIST Curve over Prime Field

-the curve selection gives you your basepoint G, values for p, values for a and b

type in k:

resulting point Q :

Qx =

Qy =

Then k would be your private key and Q your public key

## Calculate kP for point you recieve from others

Will only work if the point is on curve - e.g. calculated from above
Example: You recieve a point from another person (by email for instance)  that with this system calculated his public key, a point we could call R.
You send him your public key Q (by email for instance)
Your shared secret key you would then be able to calculate as kR
He could calculate the same shared secret key by using his secret key and multiply this with your pulic key Q
Be sure to agree on curve selection.

type in k:

type in  a point P that you know are on curve:
Px =

Py =

resulting point S:
Sx =

Sy =

S would be your shared secret

The point at infinity is represented by 0,0

disclaimer: implementation is not rock solid industrial strength. Only for educational and illustrational purpose.
contact: c h r i s t e l @ c h r i s t e l . d k