Chain engineer Erik Rykwalder explains some of the complicated math behind Bitcoin in “Ripemd 160 bitcoin chart Math Behind Bitcoin”. Get Trading Recommendations and Read Analysis on Hacked. Bitcoin it means an ECDSA key pair. These keys are mathematically linked and can be used to encrypt and decrypt data.
Bitcoin needs a bit more than just ECDSA key pairs to transfer ownership of bitcoins, however. As nullc mentions, Erik does a great job explaining ECDSA, but let’s take a look at how it fits into Bitcoin. An algorithm is a process or a procedure for making calculations. They’re not always intimidating scribblings mapped across multiple chalkboards in college classrooms.
It’s not very intimidating at all. Data goes in, and the algorithm does some work, and data comes out. He does a great job of defining the math. In practical terms, we’re drawing a big squiggly line on a graph within certain limits. Also practically, the finite field is a graph or cartesian plane. Points that fall outside the size of the graph wrap around until they do. To create a new key pair the elliptic curve is plotted across the finite field.
A line is drawn across the curve such that it intersects three points on the curve. Bitcoin defines the formula for the curve and the parameters of the field so that every user has the same graph. The parameters used in Bitcoin’s elliptic curve, and finite field are defined as secp256k1. The spot where the line originates on the graph is the base point. Multiply the base point by the private key and you have a public key. The base point does not change, one public key maps to one private key.
Bitcoin has an enormous field. 82 atoms in the universe. At that size, each cell in your body takes up the space of 1,150,000,000 Bitcoin key pairs. Trying to brute force every private key would be like mapping out every 300 square atom block in the universe. Yeah, that’s a silly thing to do. There’s something called Landauer’s principle that talks about the theoretical smallest amount of energy required to store a bit of data.
There’s a lot more of math involved, and I’m pretty sure the laws of thermodynamics come into play. How many Bitcoin Addresses are there? The address is not a public key. An Address is an RIPEMD-160 hash of an SHA256 hash of a public key. SHA256 and RIPEMD-160 are also algorithms.
Unlike ECDSA, which is used to generate key pairs, RIPEMD-160 generates a hash. Think of an algorithm like a machine. Every letter has a value of its position in the alphabet. Of course, RIPEMD is much more sophisticated. RIPEMD uses your public key to create a hash.
A bitcoin address is smaller than a public key. That introduces another term, collisions. When two unique inputs give the same output in a hash algorithm, it’s called a collision. Using an enormous numbers, and a strong algorithm reduces collisions.
But for Bitcoin it’s because we’re turning large numbers in to smaller numbers. For Bitcoin, there are so many possible keys that collisions are astronomically unlikely. Furthermore, since there are only 21M bitcoins only a very miniscule fraction of keys can even claim a balance. Your private key is kept secret. This is the key that unlocks funds owed to you in the Bitcoin block chain. Bitcoin has a scripting system that is used to define the parameters necessary to spend bitcoins.