Popularity
6.3
Stable
Activity
0.0
Stable
15
4
3

Monthly Downloads: 31
Programming language: Haskell
License: MIT License
Tags: Data     Hwsl2    
Add another 'hwsl2' Package

README

Hashing with SL2 Build Status

An algebraic hash function, inspired by the paper Hashing with SL2 by Tillich and Zemor.

The hash function is based on matrix multiplication in the special linear group of degree 2, over a Galois field of order 2127, with all computations modulo the polynomial x127 + x63 + 1.

This construction gives some nice properties, which traditional bit-scambling hash functions don't possess, including it being composable. It holds:

hash (m1 <> m2) == hash m1 <> hash m2

Following that, the hash function is also parallelisable. If a message m can be divided into a list of chunks cs, the hash of the message can be calculated in parallel:

mconcat (parMap rpar hash cs) == hash m

All operations in this package are implemented in a very efficient manner using SSE instructions.

diagram