![]() | In my last post, I gave a non-technical introduction to elliptical curves which form the backbone of security for all the cryptocurrencies we love. This is the second post in the series which I will henceforth call ‘Cryptography for Everyone: A Citizen Science Journey’. It is meant for all those non-technical noobs like me out there. We often find ourselves overwhelmed by the constant bombardment of heavy jargon by those geeky cryptographers. Guess what…we’ve had enough! Let’s dive in… To briefly TLDR my last post, elliptical curves are formed by simple equations in 2D (i.e., x and y). Using high school algebra (or geometry as I illustrated), here is what we can do:
More importantly, here is what we cannot: reverse the multiplication of a point with an integer. In the context of cryptography, if k is your secret key and P is a fixed point on the curve (more about P later), you can compute the public key as K = kP. But even if you know K and P, you cannot get back k since division (K/G) is not defined for elliptical curves. Furthermore, look how successive points P, 2P, 3P etc. jump around seemingly randomly on the curve (even though they are generated by a well-defined point addition rule, as I explained in my previous post): Figure1: Point addition in elliptical curves: this is how public keys are generated This irreversibility of the public key generation process is the crux of the security delivered by all elliptic curves. In cryptography, this is formally known as the elliptical curve problem (ECP). So far, nobody has solved it (and we hope it remains that way). But wait, this is always true right…right? Ideally, yes. [But malicious designers (read NSA/NIST) can and have been known to build in weaknesses to elliptical curve standards](https://miracl.com/blog/backdoors-in-nist-elliptic-curves/). In other words, a cunning design of the curve can put in ‘backdoors’ that enable the designer to identify the secret key even without having to solve the ECP. Think of it this way: I might not have the key to enter your house, but if I were its builder, I could have just made one of its walls weak… So, what is a safe elliptical curve? We are in luck. In 2014, Daniel Bernstein and Tanja Lange [(the same guys who envisioned post-quantum cryptography)](https://www.nature.com/articles/nature23461) came up with a [comprehensive list of criteria for safe curves](https://safecurves.cr.yp.to/index.html). Based on these, we can find an elliptical curve that is not safe enough for use in our next rug pull shitcoin (…just kidding). Before you rush to look up the list, we need to get through a ton of cryptographic jargon so that we can understand what criteria really mean. In the end, we will see to what extent the two most used elliptical curves in our favorite coin list satisfy these criteria. Let’s begin:
This number m (in our example m = 13) is defined as the order of the base point. So, what should be a safe m? You guessed it…it must be prime. You might ask why should it be prime? Let’s consider the bitcoin curve again (y^2 = x^3 + 7). Say we have a generator point P of the order of m = 23 (which is prime). Here is how the points P, 2P, 3P, 4P…22P will likely be distributed: But if the order of P is 22 (which is not a prime), then the points might be distributed as: Do you notice how they tend to cluster? Now the attacker (who is ironically the curve designer in this case) knows where to look for your secret key (which is merely one of the points through which P cycles through). NIST…you sneaky b**tard! To summarize, now we know that safe elliptical curves have a prime field (i.e., there are a unique collection of q-1 points where q is a prime). Moreover, the generator point P (used for producing the public key from the private key) should also be of the order of a prime number m. Now the ratio of the order of the curve to the order of the base point (p/l) is known as the cofactor of the curve. Ideally the cofactor should be 1 (i.e., q = m). This means that starting from the generator, it should be possible to cycle through all points on the curve before returning back to it. Now that we know the 3 important parameters (field size, order of the generator and the cofactor) of elliptical curves, lets look at how the two most popular curves in cryptocurrency are named:
Now lets have a look at which of the top 30 cryptos (by market cap as of now) uses which curve: Figure 5: Crypto and their curves. As you can see around 1/3rd of the coins use Ed25519 while the rest use secp256k1, although the data is biased due to the presence of a number of tokens on the Ethereum chain which itself uses secp256k1. Finally, lets have a look at how each of our curves fair with respect to the ‘safety checks’ we have defined so far: Figure 6: Curve wars. Stats so far. So far so good…but wait we are only getting started. It gets way more interesting than this. But that’s a story for another day… That’s all folks…stay safe and only trust primes! [link] [comments] |

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