> The salt isn't always known... I don't know how an=20
> unprivledged user on a system w/ /etc/shadow could get at it=20
> anyway. I'm sure alot of people would be very anxious to=20
> know if you know of a way to do that...
The salt is known, just not by an unpriveledged user. But if you can =
access
/etc/shadow, then you know the salt and the hashed passwords.=20
The salt is added (dunno where in the original string) to the password =
prior
to hashing. Then the salt is prepended to the hased value and stored
somewhere, in your case, /etc/shadow.=20
For a salt to be usable, you have to know what it is. Secure hashes are =
"one
way" which means that you shouldn't be able to derive the original text
solely from the hash value. To create password: create 2 byte salt from
ASCII -> prepend salt to password -> hash salt+password with MD5 -> =
prepend
salt to hash value -> store it. To check password: get username and =
password
-> lookup hash string using username from /etc/shadow -> get salt from =
hash
value -> hash salt+password with MD5 -> compare value computed hash =
value
from stored hash value -> If match, user authenticated, if not, user not
authenticated.
So if you hash a password with a salt, and then lose the salt, you can =
never
check the password again. You have to know salt.=20
Since the salt is known, it has no effect on the "keyspace" because you
don't have to guess it. If there was no salt, then pre-computing a
dictionary is a much smaller task.=20
mike

Likes:
![Re: [HACKERS] Postgres: pg_hba.conf, md5, pg_shadow, encrypted passwords](https://www.webhostingtalk.nl/images/WHT_rd/misc/dT.png)
Quote
035:4AB0::9455:124B:0A62