Elliptic curve digital signature algorithm is mainly used in the process of generating bitcoin public key and private key, and it is the cornerstone of bitcoin system. SHA-256 hash algorithm is mainly used for workload proof mechanism of bitcoin.
The principle of bitcoin is the special solution produced by complex operation, and mining is the process of finding the special solution. However, the total number of bitcoins is only 2 1 10,000, and with the continuous mining of bitcoins, it will be more difficult to generate bitcoins in the future, and the cost of acquiring bitcoins may be higher than the price of bitcoin itself.
The block of Bitcoin consists of a block header and a transaction list contained in the block. The size of the block header is 80 bytes, which consists of 4 bytes of version number, 32 bytes of hash value of the previous block, 32 bytes of Merkle root hash value, 4 bytes of timestamp (current time), 4 bytes of current difficulty value and 4 bytes of random number. A block header with a fixed length of 80 bytes is an input string used to prove the workload of Bitcoin. Constantly change the value of the random number nonce in the block header. After each change, double SHA256 operation is performed on the block header, and the result value is compared with the target value of the current network. If it is less than the target value, the problem is successfully solved and the workload certificate is completed.
The essence of bitcoin is actually the unique solution of a set of equations generated by a bunch of complex algorithms. Bitcoin is the first distributed virtual currency in the world, and there is no specific distribution center. Bitcoin's network is composed of all users, because there is no center to ensure the security of data.