Uninvertible passwd encryption (was: Re: Kmem security)

Noam Mendelson c60b-1eq at e260-1c.berkeley.edu
Wed Mar 20 16:18:13 AEST 1991


In article <1991Mar19.231715.28594 at comp.vuw.ac.nz> duncan at comp.vuw.ac.nz (Duncan McEwan) writes:
>Exactly why is the Unix password encryption algorithm
>uninvertible?  It seems to me that the fact that several passwords can
>have the same encrypted form is irrelevent -- the cracker simply has to
>find any *one* password results in a given encrypted string and they are
>in.
>Is it to do with the fact that Unix encrypts a constant string using the
>password as a key -- so it *is* possible to work back to that constant string,
>but you still know nothing about the password?

Yes, UNIX encrypts a constant string repeatedly using the password as
the key.  Another key, known as the salt, is included so as to skew the
encryption process, making it harder to crack.  The salt is a two-character
key which can contain the characters a-z, A-Z, and 0-9, and it is chosen
randomly by UNIX.  If you look at an /etc/passwd entry, the first two
characters of the password field make up the salt, and the remaining
characters make up the password.
I don't see the logic in trying to "work back" to the constant string.
If one were to crack passwords they would attempt to encrypt strings
and compare the result to the /etc/passwd entry (since they know the salt).

===============================================================
Noam Mendelson                       | "I haven't lost my mind,
c60b-1eq at web.Berkeley.EDU            |  it's backed up on tape
University of California at Berkeley |  somewhere."



More information about the Comp.unix.admin mailing list