Blockchain Technology Stack - Cryptographic Algorithms

cryptographic algorithm

  The application of cryptographic algorithms is a very ingenious thing in the blockchain, and it has many applications. We will not introduce the principles of cryptographic algorithms in detail here, but will introduce some key applications.

  First of all, let's review the format of the blockchain ledger. From the above explanation, we already know that the blockchain ledger is the connected blocks, so what is the connection? Friends who have studied data structure know that there is a variable called a pointer in the data structure, which can be used to point to the address of a certain data, so has the block connection been used in this way? There are many examples of address connection in life, such as street signs, house numbers, etc. However, the connection between blocks is often not connected by data addresses, but by a type of data called hash value. Greek value? This is calculated by the hash algorithm in the password algorithm. The hash algorithm can obtain a digest string by calculating a piece of data. This digest string uniquely corresponds to the original data. What does it mean? If the original data is modified, even a little, the calculated hash value will change completely. The blockchain ledger calculates a hash value for each block, called the block hash, and the blocks are concatenated through the block hash. A very good effect here is that if someone tampers with the data of a block in the middle, then the subsequent blocks must be modified. At this time, it is not simply to modify the address of the subsequent block to end, because The following block is pointed to by the block hash. As long as the previous block changes, the block hash is invalid, and the correct block cannot be pointed to.

  Another application of cryptographic algorithms is the Merkle tree structure. The Merkle tree will be explained in detail later. Let’s have a preliminary understanding. Through the above explanation, we know that each block will be calculated with a hash value. In addition to calculating the hash value of the entire block, each transaction data contained in the block will calculate a hash value, called a transaction hash, and each transaction hash can uniquely represent a transaction , after hashing all transactions in a block, a set of transaction hashes can be obtained, and then by processing these transaction hashes, the data structure of a hash tree is finally obtained. At the top is the root of the tree, called the Merkel root. Through this Merkle root, the transactions in the entire block can be bound. As long as there is any change in the transaction in the block, the Merkle root will change, and the integrity of the block data can be guaranteed by using this.

  Of course, the application of cryptographic algorithms in blockchain systems is far more than that, such as creating accounts, addresses, and signing transactions through cryptographic algorithms. These applications will be introduced step by step in the future.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324645677&siteId=291194637