117 reputation
3
bio website
location Manchester, United Kingdom
age 26
visits member for 2 years, 10 months
seen Oct 22 '12 at 14:35

Hi there


Sep
24
awarded  Autobiographer
Feb
15
awarded  Teacher
Feb
15
comment Why are hash functions one way? If I know the algorithm, why can't I calculate the input from it?
I think we are misunderstanding each other. I am using the word 'invert' in the mathematical sense - i.e., 'find the input of a function given its output' (and I am using 'reverse' as a synonym). A brute force method is just one way of doing this - it doesn't matter that we generate lots of other outputs of the function in the process - most algorithms produce useless junk along the way. The OP asked why the password can't be obtained given the hash and the algorithm - and the answer is that it can be - it is just computationally difficult, though in LanMan's case, not difficult enough.
Feb
15
comment Why are hash functions one way? If I know the algorithm, why can't I calculate the input from it?
I really don't understand the distinction you are trying to make. The whole point of a brute force algorithm is to invert the hash. It has exactly the same inputs and outputs as any other (correct) method of inverting the function. It isn't even necessarily the slowest method. If you are pointing out that - if the hash function is multivalued - it cannot be inverted in the strict mathematical sense (because it isn't an injection) - then I agree but that isn't really relevant: a hash function can be injective, in fact it is desirable for collisions to be rare.
Feb
15
comment Why are hash functions one way? If I know the algorithm, why can't I calculate the input from it?
It answers part of the question - Mucker specifically asked about LanMan, in which it is quite easy to find a matching password given a hash. The point is that this particular algorithm has weaknesses (splitting the password into two parts, and converting lower case letters to upper case) that make it very easy to brute force. Can you explain the distinction you are making between inverting the hash function and brute forcing it - I would call the latter a special case of the former?
Feb
15
answered Why are hash functions one way? If I know the algorithm, why can't I calculate the input from it?
Feb
15
comment Why are hash functions one way? If I know the algorithm, why can't I calculate the input from it?
As explained in other answers, cryptographic hash functions are difficult to reverse because they are designed in such a way that reversing them is computationally very expensive - not because there are multiple possible answers. In your example, although it is impossible to be certain exactly what the original password was, it is trivial to narrow it down to a relatively small set of passwords, which is a massive security flaw in addition to the one explained by Neil G.
Feb
14
comment Why are hash functions one way? If I know the algorithm, why can't I calculate the input from it?
+1 for not being horribly misleading...
Feb
14
awarded  Supporter