The concept of blockchain can be said to be very popular. At the online financial summit, no one said that blockchain technology is out. What is blockchain technology?
Blockchain technology can be an open classification (anyone can see it) or a licensed network (only licensed people can see it), which solves the challenge of supply chain. Because it is an unchangeable record, it is shared among network participants and updated in real time.
Blockchain technology-data layer: data structure of design account book
Core technology 1, block _ _; Chain:
Technically, a block is a data structure for recording transactions, which reflects the capital flow of transactions. The transaction blocks that have been reached in the system are connected to form the main chain, and all the nodes participating in the calculation record the main chain or a part of the main chain.
Each block is composed of a block header and a block, and the block is only responsible for recording all transaction information in the previous period, mainly including the number and details of transactions. The block header includes the current version number, the address of the previous block, the time stamp (recording the time when the block was generated, accurate to the second), the random number (recording the answer value of the related mathematical problem to decrypt the block), the target hash value of the current block, the root value of Merkle number and other information. Structurally, Most functions of the block chain are realized by the block header.
Core technology 2. Hash function:
.
Hash function can convert data of any length from a hash algorithm to a code of fixed length. The principle is a one-way hash function based on cryptography, which is easy to verify, but difficult to interpret. The industry usually expresses it in the form of y=hash(x). This Hash function realizes the operation of the hash value of X.
Commonly used hash algorithms are MD5, SHA-1, SHA-256, SHA-384, SHA-512, etc. Take SHA256 algorithm as an example, if any data is input into SHA256, a 256-bit hash value (hash value) will be obtained. Features: the same data input will get the same result. Input. 1 becomes ), you will get completely different results, and the results will be measured. Forward calculation (the corresponding Hash value of data is calculated) is very simple. Reverse calculation is extremely difficult, which is considered impossible under the current scientific and technological conditions. < P > Core technology 3. Merkle tree:
Merkle tree is a hash binary tree, which can quickly verify the integrity of large-scale data. In the block chain network, Merkle_ Huangiliu Mifu Nbsp trees.
Core technology 4. Asymmetric encryption algorithm:
Asymmetric encryption algorithm is a key security method, which requires a key and a key. Public key and private key are a pair. If data is encrypted with a public key, it can only be decrypted with the corresponding private key, and the corresponding data value can be obtained. If data is signed with a private key, the signature can only be verified with the corresponding public key, and the sender of the verification information is the owner of the private key.
Because encryption and decryption use two kinds. This algorithm is called asymmetric encryption algorithm, while symmetric encryption uses the same key in the process of encryption and decryption.
Blockchain technology-network layer: realizing the centralization of charging nodes
Core technology 5, P2P network:
P2P network (peer-to-peer network) is also called peer-to-peer technology, which is an Internet system without a central server and user groups exchanging information. Unlike the central network system with a central server, each client of a peer-to-peer network is a node. It also has the function of a server. domestic Thunderbolt software adopts P2P technology. P2P network has the characteristics of centralization and reinforcement.
Blockchain technology-* * * knowledge layer: allocate the task load of charging nodes.