A Very Simple Explanation on Public Key Cryptography and Mining Cryptocurrency

Do repost and rate:

Welcome to Crypto-4-Beginners, in this guide i'll give a very simplified explanation on public key cryptography and how it applied to mining cryptocurrencies under a Proof of Work consensus algorithm, such as Bitcoin.  

This will be very very simplified for beginners.  

Public Key cryptography is a method of securing transactions, or messages.  It's what's used to keep your bank account safe, as well as other 'transactions', even your crypto.  So what is it exactly?

Cryptography is the method of keeping private messages secret and only revealed to the two parties involved, sender and receiver.  Whether the "item sent" is a 'secret message' or an 'amount of money', public key cryptography is being use.  

In public key cryptography the sender and receiver have what is referred to as "Private Keys".  Combined, the two private keys create a public key, and this public key can be viewed by anyone.  Even though the public key is known, it's extremely difficult to use that data to figure out the private key.s 

The reason for this has to do with Prime numbers.  Prime numbers are numbers that are not divisible by whole numbers other than one and itself.  So for example, 5 is a prime because its not divisible by a whole number other than 1 or 5.  But 9 is not a Prime number because its divisible (9/3 = 3)

Prime numbers are especially useful in cryptography because when you multiply two prime numbers you get a number that isn't easily divisible, and that it is hard to work backwards from the answer to extrapolate its two factors.  

I'll give you an example:

Let's say I give you two Prime numbers, 31 and 41.  31*41 = 1271 

In this example, the private keys are 31 and 41 and the public key is 1271.  

If you only have the public key (1271), there is no algorithm, equation or formula that you can plug in 1271 and have the numbers 31 and 41 output.  

For example, if I gave you the number 7979, could you figure out the two prime numbers that multiply to make the number 7979?  

The only way to solve this is through brute search.  You'd have to do;

7979 divided by 2, 7979 divided by 3, 7979 divided by 5, 7979 divided by 7, etc... until you found the solution.  Now, that you understand there's no backwards extrapolation other than brute search, next we introduce prime numbers that are millions of digits long - thats an absurdly large number, and the amount of time it would take a human to do a brute search is more than a lifetime.  So, instead computers do it, but even the best computers could take incredibly long to do this - Which is what makes public key cryptography so secure (although threatened by quantum computers, thats a whole other topic).  

So what does this have to do with mining cryptocurrencies like Bitcoin.  

Well, what miners, or rather mining rigs do is they somewhat work together to do brute search computation to find public key cryptographic solutions, which in turn maintain the security and validation of transactions.  

Now, this is an incredibly simplistic explanation, and it can get way way more technical, but I think this is a great starting point to have that "ah ha" moment, where you can now start to really grasp whats happening under the hood.  

Hope that helps, and hope I didn't butcher it too much in this simplified version.  

Now, that you got a basic idea, let's try to explain to an intermediate.  This is going to be slightly more technical, but still easy to follow. 

So, when I said they are solving complex cryptographic strings of data, what we really mean is miners are trying to come up with a 64-digit hexadecimal number, also known as a "hash".   

Hashing is generating a "value" from a string of text using a mathematical function.  Hashing, in simple terms, means to take a string of data any size and giving it an output of a fixed length.  Bitcoin used the Sha-256 algorithm and all this means is that it intakes data of any length and transforms it into a 256-bit length.  This process is deterministic, which means that whatever the input to the function is, the output will be the result.  It's difficult to work backwards from the output to find the input, other than doing brute search.  

Ideally, what is really happening is a type of lotto.  The more miners on a network, the more difficult it becomes for a miner to "solve a block".  If there are 100 miners, then they each have a 1/100 chance to solve the block.  If there are 1000, then the rate is 1/1000.  Miners try to increase their potential by using stronger equipment capable of checking millions of 'hashes' per second.  

And that's it, thats the basics of mining. 

Regulation and Society adoption

Events&meetings

Ждем новостей

Нет новых страниц

Следующая новость