Current location - Quotes Website - Personality signature - Why can't hash encryption be cracked?
Why can't hash encryption be cracked?
Hash is simply to generate a unique fixed-length data from any piece of data through some algorithm. Also called abstraction. In order to ensure that data A is not accidentally or intentionally (maliciously) modified, this piece of data A is usually used to generate hash data, which is sent and received together.

Hash, generally translated as "hash" or directly transliterated as "hash", is to convert an input of any length (also known as the previous image) into an output of a fixed length through a hash algorithm, and the output is a hash value. This transformation is a kind of compressed mapping, that is, the space of hash value is usually much smaller than that of input, and different inputs may be hashed into the same output, so it is impossible to uniquely determine the input value from hash value.

Simply put, it is the function of compressing messages of any length into message digests of fixed length.

Hash algorithm is mainly used for encryption algorithm in the field of information security. It converts some information with different lengths into 128 bits of gibberish, which is called hash value. In other words, hashing is to find the mapping relationship between data content and data storage address.

Knowing the basic definition of hash, we can't help but mention some famous hash algorithms. MD5 and SHA 1 can be said to be the most widely used hash algorithms at present, both of which are designed based on MD4. So what do they all mean?

Here's a short statement:

1) MD4

MD4(RFC 1320) was designed by Ronald L. Rivest of MIT in 1990, and MD is the abbreviation of message digest. It is suitable for high-speed software implementation on processors with word length of 32 bits-it is implemented based on bit operation of 32-bit operands.

2) MD5

MD5(RFC 132 1) is an improved version of MD4 made by Rivest in 199 1. Its input is still grouped by 5 12 bits, and its output is a cascade of four 32-bit words, which is the same as MD4. MD5 is more complex and slower than MD4, but it is safer and performs better in anti-analysis and anti-discrepancy.

3) SHA 1 etc.

SHA 1 is designed by NIST NSA for DSA. It generates a hash value with the length of 160bit for the input with the length less than 264, so it is more resistant to brute force cracking. SHA- 1 is designed based on the same principle as MD4 and imitates the algorithm.

So what are these hash algorithms for?

The application of hash algorithm in information security is mainly reflected in the following three aspects:

1) file verification

We are familiar with parity and CRC. Neither of these checks has the ability to resist data tampering. They can detect and correct channel errors in data transmission to a certain extent, but they cannot prevent malicious destruction of data.

The "digital fingerprint" feature of md5 hash algorithm makes it the most widely used file integrity checksum algorithm at present, and many Unix systems provide commands to calculate MD5 checksum.

2) Digital signature

Hash algorithm is also an important part of modern cryptography. Because of the slow operation speed of asymmetric algorithm, one-way hash function plays an important role in digital signature protocol. Digitally signing the hash value, also known as "digital digest", can be considered as equivalent to digitally signing the file itself. There are other benefits to such an agreement.

3) Authentication protocol

The following authentication protocol is also called "challenge authentication mode": when the transmission channel can be intercepted but cannot be tampered with, it is a simple and safe method.

The above is some basic preparatory knowledge about hash and its related. So what exactly does he do in an electric donkey?

What is the hash value of the file?

As we all know, emule is based on P2P (short for Peer-to-Peer), and it adopts MFTP (Multi-Source File Transfer Protocol). In the protocol, a series of transmission, compression, packaging and integration standards are defined. Emule has an algorithm setting of md5-hash for each file, which makes the file unique and traceable in the whole network.

The digital digest of MD5 hash file is calculated by hash function. No matter how long the file is, the result of hash function calculation is a fixed length number. Different from encryption algorithm, this hash algorithm is an irreversible one-way function. When using high security hash algorithms (such as MD5 and SHA), it is almost impossible for two different files to get the same hash result. Therefore, once the file is modified, it can be detected.

When our file is published in emule, emule will automatically generate the hash value of this file according to the hash algorithm. This hash value is the unique identity of this file, which contains the basic information of this file, and then submit it to the connected server. When someone wants to download this file, this hash value can let others know whether the file he is downloading is what he wants. This value is especially important after other attributes of the file, such as name. ) have been changed. Moreover, the server also provides the address and port of the user where the file is currently located, so that emule knows where to download it.

Generally speaking, we want to search a file. After obtaining this information, emule will send a file request with the same hash value to the added server. The server returns the information of the user who owns the file. In this way, our client can directly communicate with the user who owns the file to see if we can download the required file from him.

The hash value of the file in emule is fixed and unique, which is equivalent to the information summary of this file. No matter whose machine the file is on, its hash value is constant, and no matter how long it takes, this value is consistent. When we download and upload files, emule uses this value to determine the files.

So what is userhash?

For the same reason. When we first use emule, emule will automatically generate a value, which is also unique. This is our symbol in the electric donkey world. As long as you don't uninstall or delete config, your userhash value will never change. The integral system works with this value. This value is used for saving and identifying points in emule, regardless of your id and user name. In fact, he is also a summary of information, but it is not file information, but the information of each of us.

So what is a hash file?

We often see emule hashing files in emule. The following is the file verification function of hash algorithm. Some of these functions have been mentioned in the article. In fact, this part is a very complicated process. At present, this basic principle is used in ftp, bt and other software. In emule, files are transmitted in blocks, so each transmitted block should be compared and verified. If there is an error, it will be downloaded again. In the meantime, relevant information will be written into the met file until the whole task is completed. At this point, the part file will be renamed, and then it will be transferred to the incoming file by using the move command, and then the met file will be automatically deleted. So sometimes we will encounter the failure of the hash file, which means that the information in met is wrong and can't match the part file. In addition, sometimes you have to have a crazy hash when you open your mobile phone. There are two situations: one is when you use it for the first time, when you need to have a hash to extract all the file information, and the other is when you shut it down illegally last time, when you need to check and debug it.