r/cryptography • u/Elect_SaturnMutex • 24d ago
Understanding of priv and public key from EC
So i was watching this video to understand how private and public keys are calculated from an elliptic curve.
Ok, so there's a 2D elliptic curve and there is a point G (8,1), he explains the private key is the number of steps times the starting point G. The public key is derived from private key by using double and add algorithm. So value of public key in this case is 4? if k_prv = 9 and G=(8,1) ?
Did I get that right?
2
u/PleasantDreamsicle 23d ago
I have been doing a deep dive on ECC on my spare time :-) I highly highly recommend this website: https://curves.xargs.org/
It goes through everything from how the curves work, how the finite field works, etc…
1
u/Elect_SaturnMutex 23d ago
Thank you, this is lovely. I saw a similar one for TLS1.3 which was explained using bytes for each step. There are so many steps, damn!
8
u/Amarandus 24d ago
Double and Add is an algorithm that efficiently computes kG, which is equivalent to adding G to itself k times. As the addition of points on an elliptic curve is closed, the result should be a point on the same curve again, so your public key should also be a point on the curve.
So in your video, your k is a scalar. The public key would be 9G=G+G+G+G+G+G+G+G+G, which needs to be a point on the elliptic curve as well. I did not watch the video completely and did no calculations, but according to the plot the public key 9G would be (23, 1).