Blockchain technology Principles __ Blockchain

Source: Internet
Author: User
Tags require asymmetric encryption
what the blockchain is.

"Blockchain" technology was originally designed by an alias Satoshi for Bitcoin (a digital currency) and a special database technology, it is based on the cryptographic Elliptic Curve Digital Signature Algorithm (ECDSA) to achieve the central to the design of the peer system. But the role of the blockchain is not confined to Bitcoin alone. Now, people in the use of the word "blockchain", sometimes refers to the data structure, in some cases refers to the database, and sometimes refers to the database technology, but no matter what the meaning, and bitcoin is not necessarily linked.

From a data point of view: Blockchain is a distributed database (or distributed shared General Ledger, Distributedshared Ledger), where "distributed" is not only embodied as distributed storage of data, but also as a distributed record of data (i.e., collectively maintained by system participants). Simply put, a blockchain can achieve a distributed record of global data information (which can be collectively recorded by system participants rather than centrally by a centralized organization) and distributed storage (which can be stored in all nodes participating in record data, rather than centrally stored in a centralized organization node).

From the point of view of effect: Blockchain can generate a set of records of time-sequential, non-tamper, can be trusted database, the database is to be centralized storage and data security can be effectively guaranteed.

Conclusion: Blockchain is a kind of data structure that combines chunks in a chain, which is suitable for storing simple and successively related data which can be verified in the system, which guarantees the non-tamper and non-forgery of data with cryptography. It enables participants to build consensus on the sequence of events and the current state of the entire network transaction.

Today's blockchain technology is a generalization of technologies that collectively maintain a reliable database in a way that is centralized and trusted. In fact, blockchain technology is not a single, completely new technology, but a variety of existing technologies (such as encryption algorithms, peer-to file transfer, etc.) integration results, these technologies and databases cleverly combined together to form a new way of , transmission, storage and presentation. Simply put, blockchain technology is a kind of technology that people participate in recording information and storing information together. In the past, the work of  and storage was given to a centralized organization, while blockchain technology allowed everyone in the system to participate in the recording and storage of data. The blockchain technology constructs a self-organizing network of peer-to-peer by using distributed collective operation method without the centralized control point. With complex validation mechanisms, the blockchain database maintains integrity, continuity, and consistency, even if some of the participants are not able to change the integrity of the blockchain, or tamper with data in the blockchain.

key points involved in blockchain technology include: decentralized, de-trust (trustless), collective maintenance (collectively maintain), reliable database (reliabledatabase), Timestamp (time stamp), asymmetric encryption (asymmetriccryptography), and so on.

Blockchain technology redefined the way credit is generated in the network: In the system, participants do not need to know the background information of other people, and do not require the guarantee or guarantee of the third party organization, the blockchain technology guarantees the system to record, transmit and store the value transfer activity, and its final result must be credible.

The source of blockchain technology principles can be summed up as a mathematical problem: the Byzantine general problem. The Byzantine general question extends to the Internet life, its connotation can be summed up: in the internet background, when the need to engage in value exchange with unfamiliar counterparties, how can people prevent the malicious destruction of those who are not deceived, confused to make the wrong decision. Further extending the question of the Byzantine general to the technical field, its connotation can be summed up as follows: In the absence of a trusted central node and a trusted channel, how each node in the network should reach a consensus. Blockchain technology solves the long-known Byzantine general problem-it provides a way to create a consensus network without trusting a single node.

The essence of blockchain technology is an Internet protocol.

Imagine that if we now want to build a global database in the world of the Internet, there are three issues that need to be addressed, and these three issues are at the heart of designing blockchain technology:

Question one: How to establish a rigorous database, so that the database can store a huge amount of information, but also in the absence of a centralized structure of the system to ensure the integrity of the database.

Question two: How to record and store this rigorous database, so that even if some of the nodes involved in data logging crashes, we can still ensure that the entire database system, the normal operation and information is complete.

Question three: How to make this rigorous and complete storage of the database become trustworthy, so that we can in the Internet without real-name background to successfully prevent fraud.

In response to these three core issues, the blockchain has built a complete and coherent database technology to achieve the goal, and the technology to solve these three problems has become the core of the blockchain three major technologies. In addition, in order to ensure the evolution and expansibility of blockchain technology, blockchain system designers introduce the concept of "script" to realize the programmability of database. We believe that these four technologies form the core technology of the blockchain. Core Technology 1: Block + chain

On the question of how to establish a rigorous database, the blockchain approach is: to innovate the structure of the database, the data into different chunks, each block through the specific information link to the back of the previous block, forward and backward to present a set of complete data, which is the "blockchain" the source of the three words.

Block: In blockchain technology, data is permanently stored in electronic records, which we call "blocks" for storing these electronically recorded documents. Chunks are generated one after the other in chronological order, and each chunk records all value exchange activities that occur during its creation, and all blocks are aggregated to form a record collection.

Block structure (blockstructure): The chunk is recorded in the block generation period of the transaction data, the block body is actually a collection of trading information. The structural design of each blockchain may not be exactly the same, but the large structure is divided into size (header) and block body (body) two parts. The block is used to link to the previous block and provides integrity for the blockchain database, which contains all the records of the validated, value exchange that occurred during block creation.

The block structure has two very important features: first, the transactions recorded on each block are all value-exchange activities that occurred after the previous block was formed and the Block was created, which ensured the integrity of the database. Second, in the vast majority of cases, once the new block is completed and added to the end of the blockchain, the data record of this chunk can no longer be changed or deleted. This feature guarantees the rigor of the database, which cannot be tampered with.

As the name implies, Blockchain is the way the chunks are grouped together in a chain, a database formed in this way is called a blockchain database. Blockchain is a transaction database shared by all nodes in the system, which participates in the blockchain network based on the value exchange protocol.

How does the blockchain work? Since the block size of each chunk contains the value of the transaction information for the previous block, it makes a long chain connected from the Genesis block (the first chunk) to the current block. Since there is no way to generate the current chunk if you do not know the "trade miniature" value of the previous block, each chunk must follow the previous chunk in chronological order. All of these chunks contain the structure referenced by the previous block, allowing the existing chunk collection to form a long chain of data. The data storage structure of the "chunk + chain" is shown in the following figure.

We cite a passage from blockchain: The final of internet finance (Xiaofeng) to summarize the basic structure of the Blockchain: "People package information generated over a period of time (including data or code) into a block, stamped with timestamps, linked to the previous block, and each next chunk of the page capital contains the index data of the previous chunk. , and then write new information on this page, forming a new chunk, connected to the end, and eventually forming a blockchain. "The magic of this structure: chunk (full history) + chain (full validation) = Timestamp

The structure of the "Block + Chain" provides us with a complete history of the database. From the first chunk to the newly generated chunk, the entire system's historical data is stored on the blockchain.

Blockchain provides us with the ability to find every single data in a database. Each transaction data on the blockchain can be verified by a single stroke through the structure of the blockchain.

Chunk + chain = timestamp, which is the largest innovation point of the blockchain database. The blockchain database allows the entire network of loggers to cover a timestamp in each chunk, indicating that this information was written at this time and formed a database that was not tamper-proof and could not be falsified. We believe that timestamps are a great technological innovation in the blockchain, and what it can prove. Core Technology 2: Distributed architecture-open-source, decentralized protocols

After we have the chunk + chain data, we need to consider the recording and storage issues. Who should be involved in the record of the data, and where should we store the timestamp-stamped data? In today's centralized system, data is centrally recorded and stored on a central computer. But this is where the blockchain structure is designed, and it does not agree to record and store the data on one or more of the centralized computers, but rather to record and store all the data in each node that participates in the data transaction.

1. On the issue of how to make all nodes participate in the recording, the blockchain approach is to construct a set of protocol mechanisms that allow each node in the network to participate in the recording and verify the correctness of other nodes ' record results. Only when most nodes (or even all nodes) of the whole network think this record is correct, or if all the nodes participating in the record are passed unanimously, the authenticity of the records can be recognized by the whole network, and the record data is allowed to be written into chunks.

2. With regard to how to store the "blockchain" rigorous database, the blockchain approach is to build a distributed network system that allows all data in the database to be updated in real time and stored in all participating network nodes. This will not affect the data record and information update of the whole database, even if some nodes are damaged or hacked.

According to the open-source and decentralized protocol determined by the system, the blockchain constructs a distributed structure system, which sends the information of value Exchange to the whole network through distributed distribution, determines the content of the information data through the distributed bookkeeping, covers the time stamp and generates block data, and then sends it to each node through distributed propagation to realize distributed storage.

Distributed bookkeeping--Decentralization of accounting responsibility (distributedaccountability)

From a hardware point of view, behind the blockchain is a large network of information record stores (such as computers) that record all the value-exchange activities that occur in the network. Instead of reserving a specific location for professional accounting records, the blockchain designer wants to establish a distributed accounting system that everyone can participate in to record information through voluntary principles, thereby decentralizing accounting responsibilities and documenting them collectively by all participants in the network.

The distribution of each new transaction in the blockchain is distributed, and the message is sent directly from a single node to all the other nodes in the network according to the peer-to layer protocol.

Blockchain technology allows all data in the database to be stored in all computer nodes of the system and updated in real time. The fully-centralized structure setting enables the data to be recorded in real time and updated in each network node participating in the data storage, which greatly improves the security of the database.

Through distributed accounting, distributed communication, distributed storage of the three "distribution" we can find that no one, no organization, and even no country can control the system, the system of data storage, transaction verification, information transmission process is all decentralized. In the absence of a center, large-scale participants reached a consensus to build the blockchain database together. It can be said that this is the first time in human history to build a truly central system of centrality. It can even be said that blockchain technology builds an immortal system--as long as not all the participating nodes in the network collapse at the same time, the database system can continue to run.

Now that we have a rigorous database and the protocols available to record and store the database, then when we apply this database to the real world, we have to address one of the core issues (question three): How to make this rigorous and fully stored database trustworthy, So that we can successfully prevent fraud in the Internet without real-name background. Core Technology 3: Asymmetric encryption algorithm

What is non-symmetric encryption. In short, it allows us to "encrypt" and "decrypt" the process of using two passwords, two passwords have asymmetric features: (1) encryption of the password (known as the "public key" in the blockchain) is publicly visible, all can use their own public key to encrypt a piece of information (the authenticity of information) ; (2) The decryption password (known as the "private key" in the blockchain) is only known to the information owner, and the encrypted information can only be decrypted by the person with the corresponding private key (security of the information).

A simple summary: In the blockchain system, the basis of the ownership verification mechanism is the asymmetric encryption algorithm. The common asymmetric encryption algorithms include RSA, Elgamal, D-h, ECC (elliptic curve encryption algorithm) and so on. In an asymmetric encryption algorithm, if two keys in a "key pair" meet the following two conditions: 1, the information is encrypted with one of the keys, only with the other key to unlock; 2. After one of the keys is exposed, the other cannot be calculated according to the public key, Then we call this key pair an asymmetric key pair, the public key is called the public key, and the private key is known as the secret key. In the blockchain trading, there are two basic usage scenarios for asymmetric keys: 1, the public key encrypts the transaction information, and the private key decrypts the transaction information. After the private key holder is decrypted, the value received can be used. 2, the private key to the information signature, public key authentication signature. The information that is verified by the public key signature is acknowledged as a private key holder.

We can see from the point of view of trust, blockchain is actually the product of mathematical method to solve the trust problem. In the past, people's problem of trust could depend on the "fellow" of the Acquaintance society, "comrade" of the party Society, "Alipay" in the traditional Internet trading platform. and blockchain technology, all the rules in advance in the form of algorithmic procedures, people do not need to know the counterparty is a "gentleman" or "villain", more do not need to help the central third-party institutions to carry out trade endorsement, and only need to trust math algorithm can build trust. Behind the blockchain technology is essentially an algorithm for people to create credit, to reach a consensus endorsement.

Core Technology 4: Scripting

Scripts can be understood as a smart contract that can be programmed. If blockchain technology is just to accommodate a particular transaction, the embedding of the script is not necessary, and the system can directly define the conditions to be fulfilled in order to complete the value exchange activity. However, in a centralized environment, all agreements need to be agreed in advance, and the introduction of the script becomes indispensable. With the script, blockchain technology gives the system the opportunity to deal with unforeseen trading patterns, ensuring that the technology is not obsolete in future applications and adds to the practicality of the technology.

A script is essentially a list of many instructions that record how the recipient of the value exchange (the bearer of value) obtains these values in each value exchange activity, and what additional conditions are required to meet the retention value that you have received. Typically, a script that sends a value to a target address requires the holder of the value to provide the following two conditions before using the value that he received before: a public key, and a signature (the holder of the proof value has the private key corresponding to the public key). The magic of the script is that it has programmability: (1) It can flexibly change the conditions that cost the retained value, for example, the scripting system may require two private keys, or several private keys, or no private keys, etc., (2) It can flexibly add some value to the value of the re-transfer conditions, For example, the scripting system can agree that the value sent out will only be used to pay CITIC securities fees, or pay to the government.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.