Introduction to 1. Algorithm
Algorithm, also known as hash algorithm, also known as hash algorithm and hash algorithm, refers to input data of arbitrary length and output data of fixed length. The same input data always get the same output, and different input data try to get different outputs. Its function is not to complete data encryption and decryption, but an important technology to check data integrity, and the operation result is irreversible.
2. Summarize the characteristics of the algorithm.
No matter how long the input information is, the length of the calculated summary is always fixed. As long as the input messages are different, the summarized messages generated after summarization will be different; But the same input will produce the same output.
The message digest function is a one-way function, that is, the information can only be summarized forward, but no message can be recovered from the summary, and even no information related to the original information can be found at all. Although "collision" definitely exists, in a good summary algorithm, no one can or it is extremely difficult to find "collision".
3. Application of abstract algorithm
Software file verification, when downloading files or software on the network, the summary value of the corresponding downloaded file is usually attached, which is usually MD5 or SHA 1 value. The purpose of this is to ensure the correctness and completeness of the file or software. If the calculated summary value is not equal to the summary value on the website, we should consider the downloaded file untrustworthy and delete it.
Digital signature, digital signature is the realization of signature and seal in real society in digital world. However, the process of digital signature is very time-consuming, so generally, digital signature is not applied to the whole message content, but the abstract value of the message content is taken first and the abstract value is digitally signed.
Information verification: the information summarization algorithm negotiated by both parties performs the same summarization operation to obtain the summarization value m', and then decrypts the signature data with a key to obtain the summarization m of the sender; If M'=M, it means that the inspection has passed and the received data is arbitrary.