I need a secure (cryptographic) hash function with the following properties:
- Can be coded in as few lines as possible (in R5RS Scheme). Hopefully under 50.
- Memory and CPU performance within reason for password-length data. (e.g. it does not have to be super efficient or create hashes for millions of bytes of data)
Most secure hash functions I can find are designed with speed/memory efficiency in mind and are complex to code as a result.
The current candidate is Mash-1 (or Mash-2): Handbook of applied cryptography. Google Books
Thanks.
Edit: Thank you all for your answers so far. Please forgive me if the following comes off as rude, I just want to be clear. Please trust me that I have done my homework and considered the "standard" options. I know the easiest thing to do is use one of those, but that's not what I'm looking for.
The single question I am trying to answer is: What cryptographically secure hash algorithm can be implemented in the smallest amount of "readable" code?
I have already posted the best candidate I could find. Any suggestions about something simpler, or commentary about Mash-1/2 would be most helpful.