How Does UNIX Encrypt Passwords?
UNIX uses an encryption algorithm called Crypt to encrypt its passwords. Crypt is a hash algorithm, which performs a one-way transformation of the password. There is no way to unencrypt a password that has been encrypted with Crypt. To guess a password, an attacker runs a password guess through Crypt and compares the encrypted guess with the encrypted password; if there is a match, the password has been guessed.
Each encrypted password is 11 characters and is combined with a 2-character salt to get a 13-character password. A salt is a random string that is used to randomize the password. Without a salt, two users who have the same password would have the same encrypted password. With a salt, each user has a different ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access