Current location - Trademark Inquiry Complete Network - Tian Tian Fund - How to ensure the security of blockchain use
How to ensure the security of blockchain use

The blockchain itself solves the problem of large-scale collaboration between strangers, that is, strangers can collaborate with each other without trusting each other.

So how to ensure trust between strangers to realize each other's mutual understanding mechanism?

The centralized system uses credible third-party endorsements, such as banks. Banks are regarded by ordinary people as reliable and trustworthy institutions. People can trust banks and let banks resolve real-life disputes.

But how does a decentralized blockchain ensure trust?

In fact, blockchain uses the basic principles of modern cryptography to ensure its security mechanism.

The knowledge system involved in the field of cryptography and security is very complicated. I will only introduce the basic knowledge of cryptography related to blockchain, including Hash algorithm, encryption algorithm, information digest and digital signature, zero-knowledge proof, quantum cryptography, etc.

You can use this lesson to understand how the blockchain using cryptography technology can ensure its confidentiality, integrity, authentication and non-repudiation.

Basic Course Lesson 7: Basic knowledge of blockchain security 1. Hash algorithm (Hash algorithm) Hash function (Hash), also known as hash function.

Hash function: Hash (original information) = digest information. The hash function can map a binary plaintext string of any length into a shorter (usually fixed-length) binary string (Hash value).

A good hash algorithm has the following four characteristics: 1. One-to-one correspondence: the same plaintext input and hash algorithm can always get the same summary information output.

2. Input sensitivity: Even if there is any slight change in the plain text input, the newly generated summary information will change greatly, which is hugely different from the original output.

3. Easy to verify: both the plaintext input and the hash algorithm are public, and anyone can calculate by themselves whether the output hash value is correct.

4. Irreversible: If there is only the output hash value, it is absolutely impossible to deduce the plaintext from the hash algorithm.

5. Conflict avoidance: It is difficult to find two pieces of plaintext with different contents, but their hash values ??are consistent (collision occurs).

For example: Hash (Zhang San lent 100,000 to Li Si, with a loan period of 6 months) = 123456789012. A record of 123456789012 is recorded in the ledger.

It can be seen that the hash function has four functions: simplifying the information is easy to understand, and the hashed information becomes shorter.

The identification information can use 123456789012 to identify the original information, and the summary information is also called the id of the original information.

The hidden information ledger is a record like 123456789012, and the original information is hidden.

Verification information If Li Si deceives when repaying the loan, saying that Zhang San only lent Li Si 50,000, both parties can use the hash value and the previously recorded hash value 123456789012 to verify the original information Hash (Zhang San lent Li Si

50,000, loan period 6 months) = 987654321098987654321098 is completely different from 123456789012, which proves that Li Si lied, and successfully ensures that the information cannot be tampered with.

Common Hash algorithms include MD4, MD5, and SHA series algorithms. Nowadays, the SHA series algorithms are basically used in mainstream fields.

SHA (Secure Hash Algorithm) is not an algorithm, but a set of hash algorithms.

It was originally the SHA-1 series. Now the mainstream applications are SHA-224, SHA-256, SHA-384, and SHA-512 algorithms (commonly known as SHA-2). Recently, SHA-3 related algorithms have also been proposed, such as those used by Ethereum.

KECCAK-256 belongs to this algorithm.

MD5 is a very classic Hash algorithm, but unfortunately both it and the SHA-1 algorithm have been cracked. The industry considers that its security is not enough to be used in commercial scenarios. It is generally recommended to use at least SHA2-256 or a more secure algorithm.

Hash algorithms are widely used in blockchains. For example, in a block, the next block will contain the hash value of the previous block, and the content of the next block + the hash value of the previous block*

**Same as calculating the hash value of the next block, ensuring the continuity and non-tamperability of the chain.

2. Encryption and decryption algorithms Encryption and decryption algorithms are the core technology of cryptography. They can be divided into two basic types from the design concept: symmetric encryption algorithms and asymmetric encryption algorithms.

They are distinguished according to whether the keys used in the encryption and decryption processes are the same. The two modes are suitable for different needs and form a complementary relationship. Sometimes they can also be used in combination to form a hybrid encryption mechanism.