MultiversX Tracker is Live!

Elliptical curve: The fascinating equation that makes crypto possible

All Cryptocurrencies

by COINS NEWS 92 Views

Elliptical curve: The fascinating equation that makes crypto possible

All of us who went to school at some point of time have probably seen all those graphs on coordinate grids, where the y variable somehow depends on x. Consider, for example, the trivial case of y = x:

https://preview.redd.it/7khb102hq0qb1.png?984&format=png&auto=webp&s=c0e5d78c9d175372e0486d2bd6636eb11b375bb0

Easy right?? Now with all the mumbo-jumbo of cryptography, the equation for an elliptic curve is not much different! It has the form of y^2 = x^3 + ax + b. What’s a and b? Just some arbitrary (not really...more of that in the end) constants. Let’s see how it looks with a = 0, b = 7, just like in the Bitcoin curve:

https://preview.redd.it/1jcm62giq0qb1.png?928&format=png&auto=webp&s=5bbd6e1953a226affa18cecdcdc39b82ebcd60a8

Now the REAL POWER OF THIS CURVE IS THE ABILITY TO PERFORM 3 IMPORTANT OPERATIONS: ADDITION/SUBTRACTION, DOUBLING AND INVERSING (MULTIPLYING BY -1), WHILE NOT BEING ABLE TO PERFORM DIVISION AND DIRECT MULTIPLICATION OF TWO POINTS ON THE CURVE.

Let me explain with a few examples:

The elliptic curve is symmetric along the X-axis. It means that for any point on the curve A, we can get its mirror point (INVERSING), called -A, by simply mirroring its y coordinate:

https://preview.redd.it/w4ta8aujq0qb1.png?1608&format=png&auto=webp&s=b8154755c4ea5a0f3f6a17fab65427f1c3d73ef1

If we draw a line through any of two points not lying on a vertical line, it will meet the curve at exactly one more point! Let’s draw a line through the A and B points, and call the third point —C. Then let’s reflect it to get point C and it so happens (if you do the algebra) that this point C = A + B (ADDITION) !!

https://preview.redd.it/bxfpgxtkq0qb1.png?1050&format=png&auto=webp&s=4138156f67c17a7957ed69e8c5757b62e4694a0f

Finally, if we draw a line that just touches any point A lying on a curve (tangent line), it will pass through the curve at exactly one other point. And this point happens to be -2A!! We already know how to get 2A by mirroring it and voila! we have just achieved POINT DOUBLING!!

https://preview.redd.it/hznng1xlq0qb1.png?1040&format=png&auto=webp&s=c7933fafa2630c9f0a03457eed9988fd406e6f59

And thats it! We have just defined 3 fundamental operations that define elliptical curves. The only drawback, for now, is the need to draw it. But of course, there are mathematical formulas for reflecting, addition, and doubling a point...lets not bother with those boring formulas since the concept is all that matters atm.

Now you will say, okay...and why do we care about this exactly??? Hold on...this is where all the fun starts. By using combinations of these 3 fundamental operations, we can choose an arbitrary number k ( our secret 'key') and a random point on the curve G ( called a 'generator point' by crypto geeks) to compute:

K = k × G

Do you see where I am going?? You guessed it right! K is our public key! Now the challenge lies in deciphering k even if you somehow managed to find out what G is. Thats where the magic of elliptical curves manifests...you can add, multiply or reflect points but you cannot divide them by numbers. Now you can brute force it for k = 2/3/4/5... etc. But this approach won't help you for long as my choice of k gets larger and larger. We can multiply a point by any integer, but there is no way to get the integer back! This is the gist of it! And this is what makes the elliptic curves very good for cryptography. This algebra works for infinitely large numbers.

When implementing elliptical curves in practical applications like blockchain security you need to constrain the possible numbers you are allowed to play with. This is necessary to ensure that the integrity and structure of the math is maitained and performance is not compromised. For example, consider a extra-paranoid user who might think of using a private key which has 1000 quadrillion digits. Of course its maximum SAFU but good luck computing the public key. To make things a little more structured, the possible numbers are constrained using a set of allowed numbers. This is known as a finite field. Since cryptographers love prime numbers, these finite fields are usually defined over huge prime numbers. But hey, thats a topic that needs its own post...more of that in the future.

Finally, a parting trivia from a Monero maximalist:

Consider the elliptical curve used by bitcoin which I have discussed above: y^2 = x^3 + 7. Cryptographers call it by the fancy name of Secp256k1. This curve was invented by a company called Certicom (it was acquired by Blackberry in 2009). Now, in terms of security vulnerabilities, experts assign a rigidty to elliptical curves. In their lingo, a fully rigid curve is one where the process of curve generation is completely explained. Take for example the bitcoin elliptical curve above. Why is there a 7? Why not add a - sign before y^2? If the designers of the curve can fully explain why they chose these values, subject to scrutiny by the wider research community then its fully rigid aka safe. Now, the interesting part is, as per this criteria of rigidity assignment, the bitcoin curve is classified as somewhat rigid. Now that translates to 'the curve-generation process is not completely explained, but the unexplained parts do not give the curve generators many bits of control'. In contrast, Monero uses a different elliptical curve called the Twisted Edwards curve (formally known as Curve25519):

https://preview.redd.it/g6ihqxv0r0qb1.png?390&format=png&auto=webp&s=ed333e982d5cd35f001f7d3753b279ec8d07723c

Now the good news is...drumrolls...the Monero curve is fully rigid i.e., the curve generation process is fully open source.

Thats all folks! I'll be back soon with more citizen science of cryptography...

submitted by /u/Nirbhik
[link] [comments]

Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
💰 Install these recommended apps:
💲 SocialGood - 100% Crypto Back on Everyday Shopping
💲 xPortal - The DeFi For The Next Billion
💲 CryptoTab Browser - Lightweight, fast, and ready to mine!
💰 Register on these recommended exchanges:
🟡 Binance🟡 Bitfinex🟡 Bitmart🟡 Bittrex🟡 Bitget
🟡 CoinEx🟡 Crypto.com🟡 Gate.io🟡 Huobi🟡 Kucoin.



Comments