The Beauty and Power of Elliptic Curves: Message Recovery From a Digital Signature
I posted an article on ECRN (Elliptic Curve Nyberg and Rueppel), and how you could recover a message from a digital signature, and someone asked how it worked, so I will document here. The related article is:
Can I Recover A Message From My Signature?
Wouldn’t it be amazing if I could sign my name on a message, and where my signature contains the details of the…
and where we can recover a message from a signature (r,s).
There’s one simple little equation that protects your online security like no other equation:
y²=x³+ax+b (mod p)
This is the equation of an elliptic curve, and it is beautiful in its simplicity and in its power to protect us when we are online. With this, we define a base point on the curve as G, and then define a scalar value of x. We then multiply G by x, and determine a point:
This is the scalar multiplication of points, and, along with point addition, is the basic operation that we conduct when processing with elliptic curves.
First we convert the message to an integer value:
we first we create a temporary key pair:
Next we take the x-co-ordinate of V_pub to generate the value of r, and where n is the order of the curve:
r=V_x+e (mod n)
And then compute s:
The signature is then (r,s).
We get the base point of the curve G, and use the public key W to get:
We verify the signature if t is equal to e. This works because: