Everything Bitcoin in Baby Language by Rodney Ossai - HTML preview

PLEASE NOTE: This is an HTML preview only and some elements such as links or page numbers may be incorrect.
Download the book in PDF, ePub, Kindle for a complete version.

 TECHNICAL OVERVIEW OF BITCOIN AND HOW IT WORKS

 What "difficult mathematical problem" is being computed?

 After writing this article I gave it to a friend of mine to read and he asked this question after reading. What "difficult mathematical problem" is being computed and why is it been computed?

 The answer below will not be in baby language as per say but I will try to explain it in an understandable way for a non-technical person.

 A FIRST COURSE ON CRYPTOGRAPHY-101

 Encryption - is the conversion of data (readable plain text) into random, non-understandable data (unreadable ciphered text). Its meaningless form ensures that it looks useless to everyone for whom it is not intended.

 The only way to transform ++the data back into understandable form is to reverse the encryption (known as decryption). Public Key Cryptography encryption and decryption is performed with Public and Private Keys

 Public/Private Key Pair - The Public and Private key pair comprises of two uniquely mathematically related, cryptographic keys (it is basically long random numbers)

 Anything the public key signs (encrypts) can be decrypted only with the private key; anything a private key signs can only be verified by its matching public key.

 A string - in computer science a string is of a set of characters (any letter, number, space, punctuation mark, or symbol that can be typed on a computer).

 A hash function - is a mathematical function that takes a string of any possible length of characters as input and transforms it into an output of a fixed length of characters.

 Note that

1. The same input will always produce the same output.

 2. Multiple separate inputs should not produce the same output.

 3. It is not possible to go from the output to the input.

 4. The slightest modification to a given input results in drastic change to the hash output value.

 5. Computer sees data as 0 and 1 only which means that data can also be hashed.

 Hashing acts as a kind of "signature" for the data provided, because a person knowing the "hash value" is unable to know the original message, but only the person who knows the original message can prove the "hash value" is created from that message.

Bitcoin address is actually a public-private key pair. The private key is known only to you or your bitcoin wallet app and it is used to digitally sign transactions. The public key (your bitcoin address) is shared with the network and is used by its members to verify the authenticity of a transaction . Bitcoin addresses are created by first picking a random number (for the all-important key) and creating a public/private key pair with them using the Elliptic Curve Digital Signature Algorithm. This operation alone generates the private key

 Bitcoins - Remember that the coins are not stored inside your address they only have kind of tags indicating that they are owned by a particular address and all that info is stored inside the blockchain. The blockchain has made it possible for everybody to know about every transaction that has ever happened on the bitcoin network so everybody will know what every other persons account balance should be by simple plus and minus. Example bitcoin account 1FdPFc6bWdPiz2UP18jorvbuP6sZZ31LU2 has received only 3 bitcoins in its entire history and has sent out 1 bitcoin in his entire history so his balance must be 2 bitcoins. Everyone on the bitcoin network knows this.

 Bitcoin Transaction - To send bitcoins to an address, a message is broadcast from the sending address to the network that *** amount of coins from that address now belong to the new address. The senders private key signs this message before the public key (bitcoin address) broadcasts this message that *** amount bitcoins now belongs to the new address. TECHNICALLY, a bitcoin transaction is a broadcast message that comprise of two columns, an input column and an output column. The input column contains information about the origins and current owner of the bitcoins, while the output column contains information about where to send the bitcoins of a transaction.

 If you don’t have enough bitcoins tied to your bitcoin address (account number) the entire network doesn’t honor your message because the entire network knows how many bitcoins are tied to your address

Now it is clear that a transaction message must contain the origin of the bitcoins that wants to change ownership in the input column. This origin message is an entire history of every one who has ever owned the coins involved in the transaction. The ultimate origin of every coin is the address of the miner rewarded for mining it.

 Transaction Order and Double Spend Attempts As we explain earlier a transaction is a network broadcast message announcing that some coins have changed ownership and this gets to the whole network by travelling from node to node on the peer to peer network until it gets to everyone.

 Every second, transactions are happening on the bitcoin network on different nodes and due to factors like poor internet on some nodes, many nodes that reside far away from the node that sent a transaction message will not receive the transaction message in the order that they happened.

 This is where double spending fraud comes in. Imagine A has 1 bitcoin. He sends a transaction to B, paying him that 1 bitcoin. Immediately, he sends a second transaction to C, He pays C with the same 1 Bitcoin. Due to different network capacities, that some nodes would receive the "double-spend transaction” to C before they receive the one to B.

 There is no way for the network to prove which transaction was issued first so the network would reach disagreement on whether its B or C that rightfully owns the 1 bitcoin.

 Blocks and Blockchain– Nodes that are participating in the mining operation bundle all the transactions that they receive around the same time span into a block and they now broadcast this block to the network as a suggestion for it to be the next block to be included into the block chain. There is usually a lot of suggestions from a lot of other of other miners so the entire network agrees on a way to decide which block will be the next on the block chain.

 The almighty MATHEMATICAL PROBLEM – When we said that, bitcoin mining is the process by which some users put their computers to work and make them do mathematical calculations for the Bitcoin network to confirm transactions. This is where that context comes to play. The network will ask the miners to find the answer to a special mathematical problem and one of the blocks contains the answer to the mathematical problem. That block that contains the answer is chosen as the next block to be put into the block chain. Solving this problem is like rolling a dice so processors involved in mining try random values (Hash Values) until the answer is found

 This is the reason processors with higher hash rates are more efficient in mining because they can guess more values in less time. The bitcoin network was design to reach a consensus to accept the first solved block as the next block to be put into the blockchain and award 25 bitcoins to the address of the miner that found the block.

 Finally, the answer to the question - What "difficult mathematical problem" is being computed?

I previously explained that hashing involves taking a string of any possible length of characters as input and transforming it into an output of a fixed length of characters. I also stated that; data can also be hashed because basically what your computer sees data as is 0 and 1. I will like to add that; the method your computer uses to transform this data is known as Algorithm and there are two very popular algorithms namely md5 and sha-256.

 I will also like to introduce the word nonce– A nonce is a randomly generated letter or number added to the input datawhen it’s about to be hashed to make the output result unpredictable. Bitcoin uses the sha-256 cryptographic hash function as its hashing method.

 Remember The same input will always produce the same output but the slightest modification of a given input results in drastic change to the hash output value

 The Difficult Mathematical Problem that the network poses to miners simply put is this. I have added an unknown nonce to the input so what is the output result of the hash?

 Technically –>

 Input = Hash Value of previous block + Current Block + nonce

Perform A SHA-256 Hash twice in my input and give me an output that starts with *** number of zeros in front.

The processors solve this problem by simply guessing. Hashing thousands of times per second with different nonce until they get the output that the network requested.

 They output hash of a block looks like this00000000000000001419c4b20fbb7b7df8607356c0b31bd1bc0cbd8925c1a5ca

 Hashing is complex math for humans but easy for processors but when they are made to perform sha-256 twice and continuously you need specialized processors. You can hash blocks with pen and paper.

Network Difficulty The required computational power to solve the problem increases greatly as the number of leading zeros is set higher and decreases greatly also as the number of leading zeros is set lower. The network always tries to set the network difficulty in such a way that the entire network takes exactly 10 minutes to solve the problem

 

 

 Please tips would be highly appreciated as I am in dire need of coins.

 BITCOIN : 1FdPFc6bWdPiz2UP18jorvbuP6sZZ31LU2

LITECOIN : LSWjWJPEYEGEL9QVvRtV2V8f3p5BGo6ZAe

DOGECOIN : D878Bv5pUsbLf1ZNQUiS64QV2sDozJ6F9d

 THANK YOU

RODNEY OSSAI

You may also like...