1
$\begingroup$

I was reading the article about the SHA1 hashing function (I know it is not secure anymore) and I've found a pseudocode implementation on Wikipedia.

I can see that there are a lot of mathematical operations, and what I wanted to know is the justification of each step in this hashing function. I want to know, for example, how each part increases the security of the function. How do we know that these operations are gonna produce a drastic change in the output when a minimum change is made in the input?

Is there a book about the theory behind hashing function? Maybe a book that explains mathematical functions or operations that maps the input to a very large output space such that is very hard to do the inverse way.

Is there a very simple hashing function that can be studied and that are examples of attacks? Is there some paper that explains the evolution of these functions and the justification for some math operations in this?

$\endgroup$
3
  • 1
    $\begingroup$ Please focus your question to one: do you want a reference? Do you want an explanation of SHA1? Do you want a simple example of a hash that's easy to break? Pick one and trim your post; you can easily post the others on their own. $\endgroup$
    – Raphael
    Sep 11 '14 at 10:18
  • $\begingroup$ Regarding "where does security come from?", it's unlikely that there is some line in the code that "makes it secure" or that you could say "this line adds 10% security, that one 20%" (what would that even mean?). Inspecting the pseudocode may not be very instructive: most likely there's some mathematical (number theoretic?) property that is being exploited, and the code just "does the numbers". But I'll let crypto experts answer that in more detail. $\endgroup$
    – Raphael
    Sep 11 '14 at 10:19
  • $\begingroup$ @Raphael that's it: I need to know about these mathematical properties! $\endgroup$ Sep 11 '14 at 20:10
2
$\begingroup$

I recommend you spend some time with some crypto textbooks, in particular the Handbook of Applied Cryptography and Antoine Joux's Algorithmic Cryptanalysis. They explain some of the details of hash functions. You might also try reading some of the questions on Crypto.SE; there's a lot written there.

In addition, do some self-study about unbalanced Feistel networks. They are part of the core of SHA1. You can find information about them on Wikipedia and in the cryptographic literature.

You might also like to read the submissions to the SHA3 competition. Every one came with a detailed technical document that explains the design criteria and security analysis of the hash function.

$\endgroup$
1
  • $\begingroup$ That's exactly the answer I needed. Thank you so much! $\endgroup$ Sep 12 '14 at 21:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.