Passwords Stored in linux must be encrypted. in linux, encryption algorithms are used to generate encrypted password data. Currently, there are two main encryption algorithms in linux:
DES: this is a traditional encryption algorithm used by unix. It only supports password data within eight characters. If the password length exceeds eight characters, it will only match the first eight characters, the subsequent characters can be ignored. This algorithm is relatively less secure.
MD5: this algorithm is generally used in common linux systems and supports password data of 255 characters. Relatively high security.
DES and MD5 are hash algorithms, and they are mathematical algorithms with all the following conditions:
The input length can be unfixed, but the output length must be fixed;
The input and output remain unchanged: the input and output change;
The output cannot calculate the input value.
Another type of MD5 algorithm is to generate a random number with a fixed length, and hand over the random number together with the original password to a one-way hash algorithm to calculate the hash value between the password and the random number.
Author: Desert Snow Wolf