Skip to content
wernerd edited this page Oct 4, 2011 · 5 revisions

Skein and Threefish Software Suite

This software suite brings you Skein and Threefish functions for Java, C, and go. Some notable features of this software suite are:

  • All three state sizes of Skein and Threefish: 256, 512, and 1024 bits
  • Support of Skein MAC
  • Variable length of hash and MAC - even in numbers of bits
  • Support of the full message length as defined in the Skein paper (2^96 -1 bytes, not just a meager 4 GiB :-) )
  • Tested with the official test vectors that are part of the NIST CD (except Tree hashes)
  • The Java interface uses the well known Bouncy Castle lightweight mechanisms, thus easy to use for Java programmers.
  • The C API follows in general the lower level openSSL model
  • The Go API supports the hash.Hash interface and provides a simple-to-use interface. An application can use the full features of Skein if it uses the native Go Skein interface.

Please refer to the Skein information site to get the latest specifications, feature descriptions and the latest news about Skein.

I used some open source and public domain sources to implement and compile this suite. Most notably are the Skein C reference and Skein C optimized implementations of the Skein team and a very well written C# implementation from Alberto Fajardo.

Skein features and how they influence the Skein API

Skein offers some novel features not found in current hash algorithms. These features influenced the API design and its usage.

Skein supports variable length hash output

Skein hashes can be as small as 1 bit and can go up to a large number of bits.

Current hash algorithms provide only fixed length hashes and sometimes a truncated variant. For example SHA256 hash algorithm supports 256 bit (32 bytes) hashes and truncated 224 bit (28 bytes) hashes for SHA224. Thus the first 224 bit of SHA256 are the same as for the SHA224.

Skein uses the requested hash length (number of bits) and includes this length information into the hash. Thus a 256 bit Skein hash and a 224 bit Skein hash are completely different.

Skein supports different internal state lengths

Skein API User's guide

These Wiki pages describe the various interfaces and how an application can use Skein (Hash and MAC) and Threefish. I'll set-up the pages step-by-step, thus please be patient.