I will talk about the security behind Bitcoin addresses and keys, which is called public key cryptography. This includes SHA256And the random number generators(RNGs), Retail Jobs, And the Elliptic curve digital signatures (ECDSA.) If you have other questions, feel free to message me. I’m a mathematician by training, and I have a deep love for it. If you find that you have a new interest in coding as a hobby, there are many people who create crypto algorithms for fun, and their community can come in handy for your trip.
encryption It has been around for thousands of years, and currently has a very strong community of professionals and hobbyists alike. Technology has come a very long way, and enables current iterations of online security that we would be hard pressed to think of.
Let’s start with a concept Public key encryptionSpecifically in the context of Bitcoin. At the most basic level, PKC includes your private keys and the public keys generated from them. PKC uses what is called “trapdoor jobsWhich is easy to solve (it’s easy to generate a public key from a private key), but almost impossible to reverse engineer (look for a private key with a public key.) is due to the use of modular arithmetic, exponential functions, and very large Prime numbers.
Your bitcoin keys will likely be words, but they can also be a very large number. Specifically, when we start coding, your private keys will be converted to a large number or a binary string (a string of ones and zeros) regardless of their initial form. How elegant! This is why people sometimes say that your private keys “represent too many, too many” and that’s why they are secure. While this is technically true in the deterministic/algorithmic sense, it is not necessarily clear why.
Generating private keys is another interesting aspect. Hardware and custodial wallets do it for you, and they may or may not tell you exactly how to do it (open source software vs. closed source software.) This is definitely worth considering when choosing a wallet. The other option is to create your own from scratch. You can roll a fine dice, flip a coin, or use another similar method. There are also online random number generators that have been tested and rated by the professional crypto community. RNGs often use current time as their generator to generate a small initial difference, which, after enough iterations, makes a completely unique number. Choose RNG online at your own risk. Even if the RNG itself is fine, there may be malware on the site. The more you know!
So we have our secret words. Let’s see what happens next.
This is a very simple form of our trapdoor function. “G to the mod n” is our last general key (mod is an acronym for modular arithmetic, which limits our answer to a certain number of numbers, unlike all natural number). But, even if you know G and n, there is no easy way to find a key that is your private key. Computing G to mod n is relatively easy, but you can’t go backwards, thanks separate log problem سجل. N is a large prime number in general because it is not parsable by definition. Also, if you are interested in the relative intricacies of the functions/problems, feel free to consider them time complexity algorithm.
Let’s dig a little deeper, and look at it graphically for a more realistic understanding.
The red line is our curve, which is the exact line that Bitcoin ECDSA uses. G is the point at which we start, “the generator,” if you will. Next, we’ll “add” G to itself (although it’s not an addition in the usual sense – crazy mathematicians like to redefine things. Don’t get me started Structure!). In this case, adding it means we will take shadow line from this point. Wherever this tangent line intersects, the curve will be our next point. We’ll take the tangent again, and find a new point. In practice (on a computer) this is done several thousand, or even millions of times. The bottom line is that even if you know where you started, you don’t know how many times you “added” G to itself in order to get to the end point. How many times we have added is your private key (your private number). Again, this is easy to check given a possible answer, but it’s nearly impossible to check with “brute force”. there he is!
So we have our first imperative (one input gives you one answer) shuffle the information, but it’s not in a fancy format (for now, it’s just an ordered pair (x,y). We now have a public key, derived from a private. Let’s swap that information back and transform it.
We do this via SHA 256, which stands for Secure Hash Algorithm. A hash algorithm is a specific set of steps that are applied to information, which results in a fixed-length encoded data set, regardless of the input length.
Yes, this set of algorithms was developed by the US National Security Agency (NSA), but don’t let that worry you. The beauty of applied sciences – including mathematics, is that discovery and knowledge stand independent of who developed them. This is why we have the proofs. If the evidence is “sound”, it stands on its own feet, and cannot be “hacked” or dealt with. The SHA2 family is common knowledge. You can go online and look at the code, and if you wish Use SHA256 yourself To encrypt some things. You’ll find that even a very small change in the input will have a dramatic effect on the answer. Chaos Theory Nice. But anyway.
Since many people secure billions of dollars with SHA256, they also spent a lot of money testing it to ensure its security. Quantum computing is often put forward by people as a possible way to crack this encryption. However, if quantum computing becomes possible, there is a lot of money that could be stolen by hacking the top five largest banks in the world. I’m sure Bitcoin is at the bottom of the list a lot because once it’s hacked, it will likely drop in value dramatically. All told, if SHA256 becomes less secure in the future, we can always upgrade our Bitcoin encryption methods. Programmable money!
SHA256 is similar to ECDSA in that it is easy to check the answer, but it is very difficult to use brute force – try each answer until you find the right one. SHA256 is so named because it creates a 256-bit string – a string of 256 zeros and 1s. This makes an absurdly large number of possible combinations, more than The number of atoms in the visible universe.
We’ll use a different hash again in order to get a smaller output, making the final address shorter. This hash function is called RIPEMD-160. Once we have that result, we’ll convert it to something called Base58, which is just a more human-readable form, where both the zero (0) and the uppercase O (o) are omitted, so they aren’t. We mistake each other, in addition to omitting the capital letter I (i), so that it is not confused with the number one (1) or the lowercase letter l (L) it omits the number zero (0) ) and the capital letter O (o), so that Do not mistake one for the other, as well as omit the capital letter I (i), so that it is not confused with the number one (1) or lower case letter l (L).
And now we have a public address provably generated (in the formal, mathematical sense) from a unique private address. Even if the seven billion people in the world generate a new public key for bitcoin every day for a thousand years, there are many possibilities that the probability of generating the same key twice is almost zero.
This is all just a process, key generation and verification, and then the average block time of 10 minutes. Ten minutes to the math-guaranteed final settlement is worth it all.
This is another guest post by Nameless. The opinions expressed are their own and do not necessarily reflect the opinions of BTC Inc. or Bitcoin Magazine.