Chaskey PRF implementation in C#
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Chaskey.Tests Minor changes Jul 16, 2016
.gitignore Added .NET Core project and benchmark results Aug 7, 2016
LICENSE Initial commit Jul 18, 2015

Chaskey (C#)

Chaskey PRF implementation in C#. The code is in public domain, free for anyone to use.

Chaskey is a PRF heavily based on SipHash, but targeting limited 32-bit platforms, like microcontrollers etc.


The C# code has been heavily optimized both for short and long messages.


Below are the results of a benchmark (processing 10 GiB in 4 KiB chunks) I ran on laptop i7 3630QM (Turbo Boost enabled) on Win8.1:

Runtime Mode Speed
.NET 4.6.1 64 bit 630 MiB/s
.NET 4.6.1 32 bit 575 MiB/s
.NET Core RC 2 64 bit 1 022 MiB/s
.NET Core RC 2 32 bit 575 MiB/s

Please note that 64-bit .NET Core Preview 2 JIT supports bit rotation idioms, while the 32-bit .NET Core JIT and the full .NET framework JITs still translate rotations into a series of SHIFTs, MOV and OR instructions (which is the reason for massive performance difference).