Here’s the first problem:
Using Shamir’s secret sharing scheme with the parameter , we get
What is the shared secret ?
-
What is Shamir’s secret sharing scheme?
I read Adi Shamir’s How to Share a Secret, and was able to get a decent understanding of the scheme he proposed.This is a scheme proposed for sharing secrets, not encrypting them. We basically divide our secret into parts, such that we only require parts to recover the secret. Even if an adversary is able to steal parts, they will not be able to read our secret. This is done by constructing a - degree polynomial (so it will have coefficients) such that and . Therefore, we can obtain the value of all the coefficients in the polynomial (and hence the secret ) only if we are able to write or more equations (that is, we must have at least of the s). All these values are computed modulo a prime number that is chosen such that it is bigger than .
Since , our polynomial is linear:
where , the shared secret and . So we have,
Upon solving this system of equations, we get and .
Here’s the last problem from my assignment:
Let be a point on the elliptic curve . What is the point on the elliptic curve?
These two videos (this one and this one) helped me understand the basic idea behind doubling a point on an elliptic curve.
The derivative of the curve will give us the slope of the tangent at a point:
At , the slope of the tangent is . The equation of the tangent at will be:
Finding the point at which it intersects the elliptic curve,
Here’s a quick python script I wrote that will help us find the real roots of the above cubic equation:
x = 0
roots = []
for _ in range(3):
while (x**3 - x**2 + 5*x - 3) % 23 != 0: x+=1
if x%23 not in roots: roots.append(x%23)
x+=1
print(roots)
[6, 9]
We already know that the line is tangent to the elliptic curve at . The other point at which it intersects the curve seems to be . The point that we are looking for is which is the mirror image of this point about the x-axis i.e. or .
These final two problems were especially interesting! I still need to read about these concepts in depth, however.
Anyways, the “solving a mystery” approach is really great. I was able to expose myself to a wide variety of cryptography concepts over the past five days without being bored for a single second thanks to it. I believe this approach is very similar to the Feynman technique for learning. I was able to identify gaps in my learning when I wrote them out like this, and then, with the help of the internet, fill those gaps. I believe that this approach can help me learn new programming concepts as well. You can probably expect blog posts to be more frequent than before.