This is a maintenance fork of a C implementation of the SipHash algorithm
 
 
Go to file
JP Aumasson 8bdd0a4385 Merge pull request #7 from dchest/halfvectors
Update test vectors for HalfSipHash
2017-01-06 07:21:00 +01:00
.gitignore Initial commit 2014-03-23 02:51:00 -07:00
LICENSE Initial commit 2014-03-23 02:51:00 -07:00
README.md experimental 2016-12-16 09:05:05 +01:00
halfsiphash.c halfsiphash: 4 byte chunks, not 8, so compute leftover correctly 2016-12-21 21:12:46 +01:00
makefile autogen vectors, tweaked hsiphash 2016-12-17 14:14:22 +01:00
siphash.c autogen vectors, tweaked hsiphash 2016-12-17 14:14:22 +01:00
test.c autogen vectors, tweaked hsiphash 2016-12-17 14:14:22 +01:00
vectors.h Update test vectors for HalfSipHash 2017-01-05 17:50:37 +01:00

README.md

SipHash

Reference implementation of SipHash, a family of pseudorandom functions optimized for speed on short messages.

SipHash was designed as a mitigation to hash-flooding DoS attacks. It is now used in the hash tables implementation of Python, Ruby, Perl 5, etc.

SipHash was designed by Jean-Philippe Aumasson and Daniel J. Bernstein.

Usage

Running

  make

will build tests for

  • SipHash-2-4, the default version of SipHash returning 64-bit tags
  • SipHash-2-4 with doubled tag size, i.e. 128-bit tags
  • HalfSipHash-2-4, an experimental version of SipHash working with 32-bit words and returning 32-bit tags by default
  • HalfSipHash-2-4 with doubled tag size, i.e. 64-bit tags
  ./test

verifies 64 test vectors, and

  ./debug

does the same and prints intermediate values.

The code can be adapted to implement SipHash-c-d, the version of SipHash with c compression rounds and d finalization rounds, by tweaking the lines

#define cROUNDS 2
#define dROUNDS 4

Obviously, if the number of rounds is modified then the test vectors won't verify.

Intellectual property

The SipHash reference code is released under CC0 license, a public domain-like licence.

We aren't aware of any patents or patent applications relevant to SipHash, and we aren't planning to apply for any.

References

The SipHash page includes

  • a list of third-party implementations and modules
  • a list of projects using SipHash
  • references to cryptanalysis results