For my fifth application today, I tested my first asymmetric key encryption algorithm. The algorithm I am testing is the elliptic curve public key encryption algorithm. This algorithm is fundamentally based on an elliptic curve. It is the set of points that satisfy a specific mathematical equation. Shown below is the typical equation of an elliptic curve:
y2 = x3 + ax + b
The equation above doesn’t exactly represent what the curves used for cryptography look like. For that, we restrict ourselves to whole numbers in a fixed range. When we compute the formula for the elliptic curve (shown above), we use the trick of rolling numbers when we hit the maximum. If the maximum is a prime number, the elliptic curve is called a “prime curve” and has excellent cryptographic properties.
When we plot the curve as whole numbers in a fixed range, you get random points on a curve. You get representation of what points look like on a scatterplot. We now have a new curve representation. With this new curve representation, you can take messages and represent them as points on the curve. We would take a message and set it as the x coordinate and solve for y to get a point on the curve.
In an actual elliptic curve cryptosystem, you can pick the prime number as a maximum, a curve equation, and a public pint on the curve. The private key is a number say 6 and the public key is the public point dotted with itself 6 times. Computing the private key from the public key in this kind of cryptosystem is called the Elliptic Curve discrete logarithm function.
ECC (Elliptic Curve Cryptography) uses smaller keys to get the same levels of security. Small keys are now more important because more cryptography is done on less powerful devices like a mobile phone.
While multiplying two prime numbers together is easier than factoring the product into its component parts, once the prime numbers get extremely long doing such computation becomes extremely difficult on a low powered device.. While you could continue to keep RSA more useful by increasing the key length, it can come with a problem of slower cryptographic performance on the user. Luckily, ECC appears to offer a better tradeoff: high security with short, fast keys.
Here are the results of my ECC algorithm run:
Computing Alice’s public key … ok (elapsed 3240464 us)
Generate random k/f for Alice … elapsed 3242344 us
As you can see from the results above, there is a public key, a private key, and a shared secret. All of this falls under public key encryption.