Archive for February, 2011

New Erlang SHA-2 Implementation

February 20th, 2011  |  Published in code, erlang, performance  |  Bookmark on

A few years ago I wrote a pure Erlang version of the SHA-2 hash algorithms (SHA-224, SHA-256, SHA-384, SHA-512). They were kinda slow but they worked fine, and a number of people used them.

I’ve now rewritten the functions in a new Erlang library application named erlsha2, available at github. The erlsha2 implementation uses Erlang NIFs, making it significantly faster than the original. The original Erlang implementations are still there too, but they’re automatically overridden by the NIF library when it loads.

Compared to the original module, the exported functions in this module have been renamed; they used to have names like hexdigest224 but they now have shorter names like sha224 to more closely match the Erlang crypto module. I also implemented the init/update/final function groups for each hash algorithm to allow data to be incrementally hashed, also to match the crypto module.

Speaking at QCon London

February 5th, 2011  |  Published in conferences  |  Bookmark on

Speaking at QCon 2011QCon London is coming up fast, March 9-11, and I’ll be running the “Functional Web” track there and also speaking in the “When Things Break” track.

You’ll save £100 if you use my promotion code, VINO100, when you register for the conference, and in doing so you’ll also help me cover my travel costs since the conference will give me an extra £100 when you use my code. (By default the conference covers some, but not all, speaker travel expenses, and my employer doesn’t contribute at all to my travel expenses).