Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: scripted iptables-restore
Date: Mon, 14 Oct 2013 20:31:28
Message-Id: 525C5495.70804@gmail.com
In Reply to: Re: [gentoo-user] Re: scripted iptables-restore by Michael Orlitzky
1 On 14/10/2013 21:17, Michael Orlitzky wrote:
2 > On 10/14/2013 02:49 PM, Martin Vaeth wrote:
3 >>
4 >>> Hiding the salt would just be security through obscurity.
5 >>
6 >> And yet it is stupid if you do not do it and give away a
7 >> huge constant factor for no advantage.
8 >>
9 >
10 > (I'll just agree to disagree about the rest.)
11 >
12 > Keeping the salt secret makes your application more complex. Rather than
13 > "SELECT hash, salt FROM users WHERE...", you now have to "SELECT hash
14 > FROM users WHERE..." and then pull the salt from somewhere else. (Where?
15 > The filesystem? Do you encrypt that? How?)
16 >
17 > What's stupid is going to all that effort for a 2x improvement when you
18 > could twiddle a bit and get a 340282366920938463463374607431768211456x
19 > improvement.
20 >
21 >
22
23
24 Keep in mind the actual original purpose of a salted hash.
25
26 If two users happen to use the same password[1], the hashes are the same
27 and this is revealed to anyone who can read /etc/passwd[2] i.e everyone.
28 Salt obscures this 1-to-1 mapping and does it in a way that it is not
29 computationally worth while to try get around it for the general
30 case[3]. It's not quite the same thing as security by obscurity - that
31 is hiding something in a place you think no-one will think of looking
32 but usually turns out to be viable to try and guess. Salt works because
33 brute force now doesn't need just one expensive calculation, it needs
34 many thousands of expensive calculations.
35
36 If the actual problem is that salt is inadequate, the solution is not to
37 try and hide it, but to use a more complex hashing algorithm with larger
38 salt. It's a race between white and black hats - they build bigger and
39 better rainbow tables, we implement bigger and better hashes. The
40 constraint is how much cpu grunt is available for purchase at a
41 realistic cost.
42
43
44 [1] This is not uncommon. The domain size of all possible passwords for
45 a implementation is very very large. Human psychology says that the
46 actual domain size of passwords people will pick is a tiny fraction of
47 the whole. Hence salt.
48
49 [2] Nowadays we use shadow, but the development of salt pre-dates shadow
50
51 --
52 Alan McKinnon
53 alan.mckinnon@×××××.com

Replies

Subject Author
Re: [gentoo-user] Re: scripted iptables-restore Michael Orlitzky <michael@××××××××.com>