Blockchain circle

One stop hot information platform

About us:

Blockchain circle provides the latest information about blockchain, digital currency, digital wallet, exchange, metauniverse, bitcoin, Ethereum, contract, financial management and so on, and always pays attention to the latest market...

Blockchain, blocking principle,Block hash value, blockchain Foundation: what is hash?

Time : 05/08/2021 Author : dt3yg5 Click : + -
        Hashing is the process of programmatically encrypting an input of any length with a fixed length output. Hash is not the same as encryption method, because the hash value cannot be decrypted to obtain the original data. In fact, hash is a single encryption function. With the hash function, data on the Internet can be saved in the form of fixed length strings. One method is SHA-256 (secure hash algorithm -256 bits). SHA-256 is the successor of SHA-1, and the output of SHA-1 is 160 bits. It has three characteristics:. We can only calculate the long data into a short hash. We can't deduce the hash from the original data. Many people are curious about how the blockchain is formed. For example, after the block is packaged, the block will be calculated into a hash, and the hash will be stored in the next block. The hash in the next block will lock the previous block. This is the traditional hash locking, The immutability of the blockchain comes from this. Because the previous block is changed, the hash in the later block cannot correspond. Therefore, the blockchain is the content locking of each block to the previous block, which is hash locking.
 
        The uniqueness of hash is that we turn a long data into a hash data, and each long data turns into a unique hash data corresponding to it. But this sentence is problematic, because turning a long data into a short data, or turning a long file into a short hash, in science, it has a certain probability of forming the same hash, but the probability is very low, This is how hashes are unique. Discreteness refers to our two very similar files, or a long data with only one digit difference between us. The hash value we calculate is very different, and there is no similarity. The discreteness of hash is mainly to avoid some characteristic attacks.
 
        If the difference between your two files is only one throw, if the calculated hash is also very similar, it is more vulnerable to attack, so the normal hash has these three characteristics. The length of the hash is 32 bytes, and each byte is eight digits. Now the general hash is 256 digits, and the hash value is the 256 power of 0-2. How big is the 256 power of 2, which is more than the number of atoms in the universe. Hash can be understood as a fingerprint of long data or large data. I have summarized three uses of hash:. And verify the efficiency of our state number in the blockchain.
 
        For example, in the Ethereum account, the amount of money left in each of our accounts is displayed in the account. If the results of each node are consistent, it is troublesome to compare them consistently. If we compare them by generating hashes, it is very simple to verify. It is very complicated to encrypt large files and large data directly, so we directly calculate a hash of the large data and files, and then I sign the hash. After signing, I get a digital signature. Then you can use my public key to unlock the digital signature, and he can get the corresponding hash, and then compare it with the hash of the previous signature, You can know that I made this signature.
 
        When applied to mining, we take bitcoin as an example. Everyone knows that the block data stored in each node is the same, and the hash of the same block is the same. In this case, there is no way to confirm who will get the reward. In each block, it controls a small space. You can fill in the data by yourself. The hash calculated by everyone is different. Because the hash is discrete, the principle of mining is that the system stipulates that if the hash you calculate is within a certain range, you can obtain the block weight. Our mining machine is constantly modifying the value of our block and constantly calculating the hash, Then try to make the calculated hash meet the requirements of the system, so as to obtain the block right and return to Sohu to see more.
 
        
Previous:Blockchain information 20211112 | the accelerated implementation of block chain applications in the whole region of Yibao
Next:No more

Related articles:



© 2005-2032 | Blockchain Circle & & All Rights Reserved    Sitemap1 Sitemap2 If there is infringement, please contact us at: