A picture to understand the block "chain"

15035130:

Many people may think that blockchain is such a novel technology, but it is not. It is nothing but new wine in old bottles. It does not create new technology itself, but combines several mature technologies, which is a fusion innovation.

As a newcomer to the blockchain, I don't have a specific concept in my mind. What is a blockchain?

Blockchain technology "landing"

This is the gate of a community in Shenyang, Liaoning. The owner connected multiple locks in series to form a simple access control system. Anyone who owns a car can lock it, and each lock has a logo. The owner of the community only needs to take the key to open the corresponding lock to open the door. This prevents foreign vehicles from occupying the parking spaces in the community. It has to be said that the masters are among the people.

insert image description here

In this example, what are the characteristics of the blockchain that we all know?

decentralized

Traceable

cannot be tampered with

decentralized

Each lock represents a community owner. They do not need the property company to manage them uniformly. They only need to manage and maintain their own locks to ensure the normal operation of the system.

Traceable

In the access control system, each lock records the relevant information of the owner and is bound to the owner one by one. This allows the owner who breaks the rules to be held accountable under abnormal circumstances, such as forgetting to lock the door and causing foreign vehicles to enter the community. , which reflects the traceability of the system.

cannot be tampered with

This is a concept that is easily confused by beginners. The so-called tampering refers to unauthorized modification, not non-modification.

If social vehicles want to enter the community, they may steal the identity of a certain owner, assign an extra key or add a lock, which is tampering. And as long as it is discovered by the owners' committee, the mistake will be corrected in time, and the social vehicles will be cleared out, so that it cannot be tampered with.

How does the blockchain achieve "non-tamperable"?

By reading "Wen Chu Institute No. 05 | Blockchain Core Technology", we know that cryptography is the core of blockchain. Satoshi Nakamoto said at the beginning of the Bitcoin white paper that Bitcoin is a trustless digital currency based on cryptography.

In the last article, we learned about asymmetric encryption. In this article, I will introduce you to a new encryption algorithm: hash (hash) algorithm.

What is a hash algorithm?

"Hash algorithm is to transform a string of arbitrary length into a string of fixed length."

for example:

The block is obtained after being encrypted by the SHA256 algorithm

AE60964C61D97034CACA8AD7CA2A706ADF7DA5115E2812BB9B68C49BF28900CB

The blockchain is obtained after being encrypted by the SHA256 algorithm

6E3110B33188C7A3056CB91E4C35EFE609E8E565DD560300502403EBDE626196

The core technology of the blockchain is obtained after being encrypted by the SHA256 algorithm

596F3068EC3ABAE66935A15841696BE4C6BDABF97C13F0D9C879723C0567A24E

From the result after encryption, we know that no matter what the length is before encryption, the result is a fixed length.

What are the characteristics of a hash algorithm?

Forward fast, reverse hard, input sensitive

The computer can quickly calculate the data source: the block to obtain a series of ciphertexts, which is forward fast.

Almost all computers cannot restore to the data source block through ciphertext, which is the reverse difficulty.

The encryption results from the block, blockchain, and blockchain core technology are unpredictable and irregular, which is input sensitive.

The use of hash algorithm

Parent block header hash value: the hash value of the previous block.

Block hashing is to perform hash calculation on the block header to obtain the hash value of a certain block. Using this hash value to uniquely determine a certain block is equivalent to setting an ID number for the block.

Blocks are connected in series through this ID number, thus forming a block chain structure.

Such a structure is also one of the technical foundations for blockchain data that is difficult to tamper with.

Summarize

The blockchain has three major characteristics, namely decentralization, traceability, and non-tampering.

Cryptography is at the heart of blockchain.

In addition to asymmetric encryption, there are also hash algorithms.

The hash algorithm has the characteristics of fast forward, difficult reverse, and input sensitive.

The "chain" of the blockchain is that the hash algorithm calculates the hash of each block header and links them together, so it is called a blockchain.

Guess you like

Origin blog.csdn.net/shanke121/article/details/122103704