[Haskell-cafe] SHA1 again

Malte Milatz malte at gmx-topmail.de
Sun Jul 15 14:56:54 EDT 2007

See the following link for a purely functional and straight-forward
implementation of SHA1.  Disclaimer: Please be kind to me, I haven't
done much Haskell (yet).  And I know nothing about SHA1 except its


It performs better than the SHA1 algorithm in Crypto:  It is faster by a
factor of approximately e. ;-)  It is also competitive (regarding time)
with the »unsafe« SHA1 implementation posted here some days ago,
although it uses considerably more memory.  Of course, you may safely
forget it if you're interested in performance near a C implementation
such as GNU sha1sum.

I'd heartily welcome any comments or suggestions for improvement, as
well as benchmark results, especially if they differ from mine. I'm
using the standard ghc -O2, by the way.


More information about the Haskell-Cafe mailing list