[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Hash salt (was Re: BCRYPT - Why not using it?)



On 04/06/2011 10:40 PM, Boyd Stephen Smith Jr. wrote:
In<[🔎] 4D9D1B22.2010608@cox.net>, Ron Johnson wrote:
On 04/06/2011 08:19 PM, Aaron Toponce wrote:
First, if you don't have the salt, but you do have the hash, then a
rainbow table attack is completely pointless.

The OS must store the salt somewhere, in order to correctly authenticate
the user when he logs in.  But I've never heard of /etc/hashsalt so what
am I misunderstanding?

The value stored in /etc/shadow is both the salt + the encrypted
salt+password.  This allows a process with read access to /etc/shadow to
easily read the shadow, encrypt the salt + provided password, and compare the
result to the encrypted salt+password.  The salt is randomly generated each
time the password is set, and it (usually) different for each entry in
/etc/shadow.


Is the salt just bits that are either pre- or suffixed to your password before being run through the hashing function?

This increases the size of a rainbow table by a factor of 2^(bits in salt),
effectively stopping the attack for all but the most high-profile target with
just an 8-bit salt.  I'm not sure how many bits are used in a modern salt, but
I think it is somewhere between 48-bits and 64-bits.

The first 3 characters of every hash in my /etc/shadow are the same. That's what, 24 bits?


Salted MD5 is still considered secure, even with the known attacks against
MD5.  Salted SHA1 has no attacks more effective than brute-force.  I'd like to
believe that shadow passwords will more to SHA3 within 2-3 releases after SHA3
is finalized.  At the current rate of attack improvements against MD5, that
should be plenty of time.

But if you're machine is rooted then (besides having lots of other problems) the attacker has your system-wide salt. (But the rainbow table would still be unimaginably huge...)

--
"Neither the wisest constitution nor the wisest laws will secure
the liberty and happiness of a people whose manners are universally
corrupt."
Samuel Adams, essay in The Public Advertiser, 1749


Reply to: