Welcome: Hunan Intelligent Applications Tecgnology CO.,ltd.-HNIAT.com
Language: Chinese ∷  English

Basic knowledge

Detailed analysis of Bitcoin's cryptography

Satoshi Nakamoto, the inventor of Bitcoin, left a paper on Bitcoin algorithms. This article analyzes this thesis and introduces the cryptographic foundation of Bitcoin.

Bitcoin is one of the most noticeable phenomena of internet financial innovation in recent years. Bitcoin does not require third-party credit support, and directly establishes the credit foundation of P2P on top of cryptographic protocols. In economics, it implements the idea proposed by Hayek: the currency in circulation should be decisive by the market, and the fittest. In cryptography, it solves the problem of repeated payment of digital currencies. In sociology, it has begun to form a global Internet financial ecosystem. In futurology, it provides us with the following possibilities and development opportunities: a “super-sovereign” currency system for global trade may be formed through the Internet P2P, and deflationary digital currency rescue may occur in some countries with abnormally high inflation. Significantly reduce the cost of credit for global trade.

When Satoshi Nakamoto created Bitcoin, he needed to address three core issues:

First, transaction confirmation, using the Internet's P2P protocol, to prevent repeated payment of currencies (that is, to prevent counterfeit coins).

Second, the issuance of Bitcoin.

Third, protect the Bitcoin system from malicious attacks. By studying Satoshi's document "Bitcoin: A Peer-to-Peer Electronic Cash System", we can find that Satoshi designed by Satoshi Accounting and computing power protection, thus "three birds with one stone" to solve the above three core problems.

According to Professor Wang Xiaoyun, a cryptographic expert at Tsinghua University, the issuance of bitcoin (commonly known as "mining") is based on the SHA-256 cryptosystem. SHA is an abbreviation of Secure Hash Algorithm, which means an encryption system based on a hash function algorithm. In the following, we analyze the SHA-256 cryptography system to analyze and show Nakamoto's methods and ideas for solving the problem.

A hash function is an encryption algorithm, which is generally written as: h = hash (m), where h is the hash value, and m is the solution corresponding to the hash value (message). The characteristics of the hash function: First, given m, it is easy to verify its corresponding hash value h by h = hash (m), but the reverse is difficult, because the known hash value requires a corresponding solution m. difficult. Because of the asymmetry or irreversibility of such operations, the hash function is particularly suitable for cryptography. For example, the hash value is suitable as the encrypted "public key" and can be fully disclosed, but even if people get the public key, it is almost impossible to calculate its "private key" at once, which is the solution m of the hash function. But on the other hand, if we know the private key m, it is easy to verify that the corresponding public key is the hash value h, which is the so-called "asymmetric encryption algorithm".

The second "valuable" feature of the hash function is that if the "solution" (that is, the private key) is slightly different, its corresponding hash value will be very different, which is called the avalanche effect. This excellent feature of the hash function guarantees that different private keys (even if there are only a few differences) will not be confused with the corresponding public keys! Further we can understand: SHA-256 is a hexadecimal-based encryption system, that is, sixteen bitcoin different information is allowed on each digit, which is generally expressed by ten Arabic numbers and the first six English letters, that is, 0,1,2,3,4,5,6,7,8,9, a, b, c, d, e, f. So if you see such a hexadecimal hash

Value: Hash: 00000000000000004cf3aa249551432fa84da4de05e9cfc3e6d95a5ce8bed5f7, this is the bitcoin world 2014-02-08T 03:06:30 Eastern time, the hash value corresponding to a bitcoin block just mined, don't be surprised!

The reason why it is called SHA-256 is that its hash value has 64 bits, and each bit has 16 bits, which is the second power of four, so that the total hash value can have 2 powers of 256. Bits.

What an astronomical figure! Satoshi Nakamoto chose the SHA-256 encryption algorithm as Bitcoin's mining algorithm, because for every zero added to the hash value, the difficulty of finding its solution m will increase by a factor of four. Because SHA-256 has not been cracked like Professor Wang Xiaoyun's SHA-1, any 64-bit hash value has no fixed algorithm to find its solution m, and can only rely on random hash collisions by the computer. How many hash collisions a miner can do per second is the representative of its "computing power". The unit is written as hash / s, which is the so-called Proof of Work (POW).

It is a hexadecimal-based encryption algorithm based on SHA-256. Satoshi Nakamoto wrote in his original Bitcoin paper: "The proof-of-work process involves scanning how many zeroes of SHA-256 begin with Every time a zero is added, the average workload will increase exponentially, which is the fourth power of two. How many zeros are added is how many second powers are multiplied by multiples. These will solve a problem. The hash number (that is, the process of mining a Bitcoin block) is proven. "

The Bitcoin system controls the total amount of mining coins by adding zeros to the hash value of the mining. No matter how the computing power of the entire network increases, you can ensure that each zone averages every ten minutes by adding zeros in front of the hash value. At present, only 25 coins can be mined (the first four years were 50 coins per ten minutes). In this way, establishing a miner will naturally solve the second problem, namely the issue of Bitcoin.

So how does Bitcoin use a cryptographic mining system to prevent repeated payments? It is by relying on these "mining" computer computing power to "account" and time stamp at the same time. A block is mined every ten minutes, and the entire network of bitcoin transactions must be recorded for each ten minutes and given to each one. The transaction is time stamped, and each transaction must be confirmed six times by the node that generates the block across the network to be considered a legitimate transaction. Such a large bookkeeping and time stamping system ensures that it is not feasible to repeat payments. (Because each timestamp must be checked before these Bitcoins have been paid before they are re-transacted, they will be stamped, which also ensures that the original Bitcoin holders can no longer pay to third parties outside this transaction. ) Therefore, the "mining" of the entire Bitcoin system guarantees both the normal issuance of Bitcoin and its bookkeeping, thereby avoiding the possibility of repeated payments. The so-called "miners" should also be called bookkeepers, especially when most of Bitcoin has been mined in 2040, and the miners' work rewards are mainly based on charging "transaction fees", they should be called "rememberers" Accountant ".

The third question

That is, how does Satoshi Nakamoto design the problem of protecting the Bitcoin system from malicious attacks? In fact, "miners" also have an important function for the bitcoin world is "protection". According to Satoshi Nakamoto's original Bitcoin system protocol, people who have 51% of the computing power of the entire network can attack the Bitcoin system. And cause duplicate payments (that is, counterfeit coins). According to veterans of bitcoin mining, the current cost of computing power requires about 240 yuan per year to maintain 1G hash / s. That is, the annual cost of bitcoin's entire network computing power is $ 960 million, which is the basic strength to protect the bitcoin system. Is also the support of its existing value

ChainChain is also a type of Bitcoin. All the characteristics of Bitcoin, ChainChain CCT also. ChainChain, as a responsible company, hopes to generate value through social interaction. Currently, there are tens of millions of users. Success is not achieved overnight, and every drop of water together can become a piece of the sea. The letter tomorrow will be better.

CONTACT US

Contact: Manager Xu

Phone: 13907330718

Tel: 0731-22222718

Email: hniatcom@163.com

Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province

Scan the qr codeClose
the qr code