Home>Article> The cryptographic technology of blockchain includes digital signature algorithm and what algorithm

The cryptographic technology of blockchain includes digital signature algorithm and what algorithm

青灯夜游
青灯夜游 Original
2021-06-10 17:10:41 7745browse

The cryptographic technology of blockchain includes digital signature algorithm and hash algorithm. The digital signature algorithm is a subset of the digital signature standard, which represents a specific public key algorithm used only for digital signatures; the hash algorithm is an algorithm that maps binary plaintext of any length into a shorter binary string, and is different from It is difficult to map the plaintext to the same hash value.

The cryptographic technology of blockchain includes digital signature algorithm and what algorithm

The operating environment of this tutorial: Windows 7 system, Dell G3 computer.

Cryptography technology is the core of blockchain technology.The cryptographic technology of blockchain includes digital signature algorithm and hash algorithm.

Digital signature algorithm

The digital signature algorithm is a subset of the digital signature standard, which represents the A specific public key algorithm. The key is run on the message hash generated by SHA-1: to verify a signature, the hash of the message is recalculated, the signature is decrypted using the public key and the results are compared. The abbreviation is DSA.

Digital signature is a special form of electronic signature. So far, at least more than 20 countries have passed laws recognizing electronic signatures, including the European Union and the United States. my country's electronic signature law was adopted at the 11th meeting of the Standing Committee of the 10th National People's Congress on August 28, 2004. . A digital signature is defined in the ISO 7498-2 standard as: “Some data appended to a data unit, or a cryptographic transformation made to the data unit, which allows the recipient of the data unit to confirm the source and origin of the data unit. The integrity of the data unit and protects the data from forgery by a person (e.g. the recipient)”. The digital signature mechanism provides an identification method to solve problems such as forgery, denial, impersonation and tampering. It uses data encryption technology and data transformation technology to enable both parties to send and receive data to meet two conditions: the receiver can identify what the sender claims. Identity; the sender cannot later deny that it sent the data.

Digital signature is an important branch of cryptography theory. It is proposed to sign electronic documents to replace handwritten signatures on traditional paper documents, so it must have 5 characteristics.

(1) The signature is credible.

(2) The signature cannot be forged.

(3) The signature is not reusable.

(4) Signed files are immutable.

(5) The signature is non-repudiation.

Hash algorithm

Hash is to convert input of any length (also called pre-mapping, pre-image) through The hash algorithm converts the data into a fixed-length output, which is the hash value. This transformation is a compressed mapping, where the space of hash values is usually much smaller than the space of inputs. Different inputs may hash to the same output, but the input values cannot be deduced in reverse. Simply put, it is a function that compresses a message of any length into a message digest of a fixed length.

Hash algorithm is a one-way cryptographic system, that is, it is an irreversible mapping from plaintext to ciphertext, with only encryption process and no decryption process. At the same time, the hash function can change an input of any length to obtain a fixed-length output. The one-way characteristics of the hash function and the fixed length of the output data allow it to generate messages or data.

Take the Bitcoin blockchain as a representative, in which secondary hashing is used many times in the workload proof and key encoding process, such as SHA(SHA256(k)) or RIPEMD160(SHA256( K)), the advantage of this method is that it increases the workload or increases the difficulty of cracking if the protocol is not clear.

Represented by the Bitcoin blockchain, the two main hash functions used are:

1.SHA-256, which is mainly used to complete PoW (proof of work) calculations;

2.RIPEMD160, mainly used to generate Bitcoin addresses. As shown in Figure 1 below, the process of generating an address from a public key for Bitcoin.

The cryptographic technology of blockchain includes digital signature algorithm and what algorithm

For more related knowledge, please visit theFAQcolumn!

The above is the detailed content of The cryptographic technology of blockchain includes digital signature algorithm and what algorithm. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn