Calculate Hashes in Hardware

Screen-Shot-2013-01-16-at-15.05.36-We recently wrote about BORPH, a Linux version that could launch hardware processes on configurable hardware systems, i.e. FPGAs. The question that always pops up is what kind of process you would like to run in hardware. By pure coincidence, Secworks released a great example yesterday.

They have a great article (in Swedish, Google Translated here), describing the problem and the need in detail. But to summarize, the problem is hash functions. Hash functions ideally convert a linear time look-up to a constant time problem. That is, unless you have a hash sum collision, i.e. two key values generating the same hash value.

The bad and the smart guys know this and they can bring down powerful web servers by generating hash collisions for the trivial hashing functions commonly used today. The answer to this threat is more complex hashing functions, but they require more number crunching power from the servers. To improve performance here, Secworks has implemented a SipHash algorithm using Verilog so that you can run it in configurable hardware. They have released the source on Gitorious as siphash_core. The result – a faster way to generate hashes through an algorithm that makes it as hard to cause collisions on purpose as it would be to read an encrypted mail (it is based on similar maths).

The Gitorious page also contains a great summary of what siphash_core does, in English. The license is BSD, so feel free to start tinkering with it and even include it in your own gizmos.

This entry was posted in FPGA. Bookmark the permalink.