Analysis of Bitcoin’s Technical Principles

Estimated read time 9 min read

In recent times, virtual currencies have been frequently searched for, and various technical terms such as Bitcoin, Ethereum, and Dogecoin have emerged one after another, dazzling everyone. As the saying goes, “Experts watch the door, and laymen watch the excitement .” So today we no longer just watch the excitement, but also look at the door (technical support) in digital currency .

1. The Origin of Bitcoin

  1. Bitcoin was born in a paper in 2008. A person signed by Satoshi Nakamoto proposed a revolutionary idea: ** Let us create a currency that is not controlled by the government or anyone else! **
    There is no asset support behind a string of numbers, and no one is responsible. If you treat it as money and pay it to the other party, how can anyone be willing to accept it? However, the fantasy turned into reality.
    In 2017, Bitcoin experienced explosive growth, rising from US$1,000 at the beginning of the year to a maximum of US$20,000, shocking the whole world.

2. Below I try to help you understand Bitcoin. Putting aside the technical details, it is still easy to explain.

2. Asymmetric encryption

  1. First of all, to understand Bitcoin, you must understand asymmetric encryption. You may have heard of this term, the so-called asymmetric encryption, which is actually very simple. Encryption and decryption require two keys: a public key and a private key.

2.The public key is public and can be obtained by anyone. The private key is kept secret and can only be used by the owner.

3.Others use your public key to encrypt information and then send it to you. You use your private key to decrypt it and get out the information. Conversely, you can also encrypt information with your private key, and others can use your public key to decrypt it, thereby proving that the information was indeed sent by you and has not been tampered with. This is called a digital signature.

4.Now please imagine, ** What would happen if the public key encrypted not ordinary information, but encrypted a sum of money** and sent it to you?

    First, you can unzip the encrypted package and take out the money inside, because the private key is in your hand. Secondly, others cannot steal the money because they do not have your private key. Therefore, the payment can be successful. ——This is how Bitcoin (and other digital currencies) work: **Asymmetric encryption guarantees the reliability of payments**.

    5.Since the money paid must be withdrawn through the private key, it doesn’t matter who you are, what matters is who owns the private key. Only with the private key can you withdraw the money paid to you. (In fact, the real transaction process is slightly different. What the private key guarantees is not to withdraw the money paid to you, but to ensure that only you can pay out the money that belongs to you)

    3. Bitcoin wallet

    1. For Bitcoin, money is not paid to an individual, but to a certain private key. This is the fundamental reason for the anonymity of transactions, because no one knows who the owner is behind those private keys. So, the first thing about Bitcoin transactions is that you must have your own public and private keys.
    2. When you open an account at one of those online Bitcoin exchanges, they will ask you to first generate a Bitcoin wallet: This wallet is not used to store Bitcoins, but to store your public and private keys. The software will generate these two keys for you and put them in your wallet.
      According to the protocol, the length of the public key is 512 bits. This length is not convenient for dissemination, so the protocol also stipulates that a 160-bit fingerprint should be generated for the public key. The so-called fingerprint is a relatively short hash value that is easy to spread. 160 bits are binary, written in hexadecimal, which is about 26 to 35 characters, such as 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2. This string is called the wallet address, and it is unique, that is, the address of each wallet must be different.
    3. When you collect money from others, you only need to tell them your wallet address, and they will pay to this address. Since you are the owner of this address, you will receive the money.
      Since whether you own a certain wallet address is proven by the private key, it is extremely important to protect the private key. If your private key is stolen, your Bitcoins will be gone because Others can impersonate your identity and transfer all the money in your wallet .
      Similarly, when you pay Bitcoin to others, you must not write the wrong wallet address of others, otherwise your Bitcoin will be paid to a different person.

    4. Transaction & Blockchain

    1. How Bitcoin completes a transaction: **A transaction is the transfer of Bitcoins from one address to another**.
    2. How to prevent others from declaring transactions in your name: The Bitcoin protocol stipulates that when reporting a transaction, in addition to the transaction amount, the party transferring Bitcoin must also provide the following data:
    • Hash of last transaction (where did you get these Bitcoins from)
    • The addresses of both parties to this transaction
    • Payer’s public key
    • Digital signature generated by the payer’s private key
    1. To verify whether the transaction is authentic, three steps are required:
    • The first step is to find the previous transaction and confirm the source of the payer’s Bitcoin.
    • The second step is to calculate the fingerprint of the payer’s public key and confirm that it is consistent with the payer’s address, thereby ensuring that the public key is authentic.
    • The third step is to use the public key to decrypt the digital signature and ensure that the private key is authentic.
    1. After confirming the authenticity of the transaction, the transaction is not completed; the transaction data must be written into the **database** before it is established and the other party can actually receive the money.
    2. Bitcoin uses a special database called blockchain
    3. How is Bitcoin written to the database?
    • First, all transaction data is sent to miners. **Miners are responsible for writing these transactions into the blockchain** .
    • According to the Bitcoin protocol, the maximum size of a block is 1MB, and a transaction is about 500 bytes, so ** a block can contain up to more than 2,000 transactions.. The miner is responsible for packaging these more than 2,000 transactions together to form a block, and then calculating the hash of this block ** ** (the process of calculating the hash is called mining, which requires a lot of calculations) ** .
    • Miners are also competing among themselves. Whoever calculates the hash first will be the first to add a new block to the blockchain and enjoy all the benefits of this block, while other miners will get nothing. Once a transaction is written into the blockchain, it cannot be reversed.
    1. The blockchain records every transaction you participate in, how many Bitcoins you have received, and how many Bitcoins you have paid, so you can calculate how much assets you own.
    2. Why would anyone want to be a miner? By the way, let’s talk about the profits of miners:
    • The Bitcoin protocol stipulates that miners who dig new blocks will receive rewards, initially 50 Bitcoins, and then halved every 4 years. This is also the supply increase mechanism of Bitcoin . This is how new Bitcoins in circulation are born. of.
    • You may have noticed that the reward is halved every four years. Since Bitcoin can be divided to eight decimal places, by 2140, miners will not receive any reward and the number of Bitcoins will stop increasing. At this time, the miners’ income depends entirely on transaction fees.
    • The so-called transaction fee is the commission that miners get from each transaction. The specific amount is voluntarily determined by the payer. You can absolutely give nothing to the miners, but in that case, no one will process your transaction, and it will be difficult to write it to the blockchain and get confirmation. Miners always prioritize transactions with the highest fees.

    5. Block expansion & peer-to-peer network

    1. The Bitcoin protocol stipulates that a block is generated every 10 minutes on average. The size of a block is only 1MB, and it can only contain more than 2,000 transactions at most. In other words, the Bitcoin network can only handle a maximum of more than 2,000 transactions every 10 minutes, which translates into a processing speed of 3 to 5 transactions/second. There are so many Bitcoin transactions in the world, but the blockchain can only process up to 5 transactions per second, which has become a bottleneck restricting the development of Bitcoin.
    2. How to improve processing speed? In August 2017, a fork occurred in the blockchain, giving birth to a new protocol called Bitcoin Cash (BCH for short). This new currency is otherwise consistent with Bitcoin, that is, the size of each block is increased from 1MB to 8MB, so the processing speed is increased by 8 times, and the handling fee is much lower.

    3.The Bitcoin network is an open network all over the world. As long as you have a server, you can join this network and become a node. Each node contains the entire blockchain (currently more than 100 GB), and the nodes are constantly synchronizing information.

      • When you make a payment, your node will tell another node about the transaction until it spreads throughout the entire network.
      • Miners collect various new transactions from the Internet and package them into the blockchain. Once the writing is successful, the blockchain of the node where the miner is located will become the latest version, and other nodes will copy the newly added blocks to ensure that the blockchain of the entire network is consistent.
      • Finally, your node has also obtained the latest blockchain, thus knowing that your earlier transaction has been written in it, and the transaction has been confirmed successfully.

      7. Summary

      That’s it for introducing the basic knowledge of Bitcoin. I hope you understand what Bitcoin is all about.

      You May Also Like

      More From Author

      + There are no comments

      Add yours