Skein is a cryptographic hash function and one of five finalists in the NIST hash function competition. Entered as a candidate to become the SHA-3 standard, the successor of SHA-1 and SHA-2, it ultimately lost to NIST hash candidate Keccak.[1]

Threefish Mix Function

The name Skein refers to how the Skein function intertwines the input, similar to a skein of yarn.[2]



Skein was created by Bruce Schneier, Niels Ferguson, Stefan Lucks, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas and Jesse Walker.

Skein is based on the Threefish tweakable block cipher compressed using Unique Block Iteration (UBI) chaining mode, a variant of the Matyas–Meyer–Oseas hash mode,[3] while leveraging an optional low-overhead argument-system for flexibility.

Skein's algorithm and a reference implementation was given to public domain.[4]



Skein supports internal state sizes of 256, 512 and 1024 bits, and arbitrary output sizes.[5]

The authors claim 6.1 cycles per byte for any output size on an Intel Core 2 Duo in 64-bit mode.[6]

The core of Threefish is based on a MIX function that transforms 2 64-bit words using a single addition, rotation by a constant and XOR. The UBI chaining mode combines an input chaining value with an arbitrary length input string and produces a fixed size output.

Threefish's nonlinearity comes entirely from the combination of addition operations and exclusive-ORs; it does not use S-boxes. The function is optimized for 64-bit processors, and the Skein paper defines optional features such as randomized hashing, parallelizable tree hashing, a stream cipher, personalization, and a key derivation function.



In October 2010, an attack that combines rotational cryptanalysis with the rebound attack was published. The attack finds rotational collisions for 53 of 72 rounds in Threefish-256, and 57 of 72 rounds in Threefish-512. It also affects the Skein hash function.[7] This is a follow-up to the earlier attack published in February, which breaks 39 and 42 rounds respectively.[8]

The Skein team tweaked the key schedule constant for round 3 of the NIST hash function competition, to make this attack less effective, even though they believe the hash would still be secure without these tweaks.[2]

Examples of Skein hashes


Hash values of empty string.


Even a small change in the message will (with overwhelming probability) result in a mostly different hash, due to the avalanche effect. For example, adding a period to the end of the sentence:

Skein-512-256("The quick brown fox jumps over the lazy dog")
Skein-512-256("The quick brown fox jumps over the lazy dog.")
Skein-512-512("The quick brown fox jumps over the lazy dog")
Skein-512-512("The quick brown fox jumps over the lazy dog.")


  1. ^ "NIST Selects Winner of Secure Hash Algorithm (SHA-3) Competition". NIST. 2012-10-02. Retrieved 2012-10-02.
  2. ^ a b Ferguson; et al. (2010-10-01). "The Skein Hash Function Family" (PDF). Archived from the original (PDF) on 2014-08-24. Retrieved 2010-12-15. {{cite journal}}: Cite journal requires |journal= (help)
  3. ^ Archived 2014-08-24 at the Wayback Machine p. 6
  4. ^ Archived 2016-06-10 at the Wayback Machine on, skein.c "Implementation of the Skein hash function. Source code author: Doug Whiting, 2008. This algorithm and source code is released to the public domain."
  5. ^ "Now From Bruce Schneier, the Skein Hash Function". Slashdot. 2008-10-31. Retrieved 2008-10-31.
  6. ^ "Paper describing the hash function, Version 1.3 (2010-10-01)" (PDF). Archived from the original (PDF) on 2014-08-24. Retrieved 2010-12-15.
  7. ^ Dmitry Khovratovich; Ivica Nikolic; Christian Rechberger (2010-10-20). "Rotational Rebound Attacks on Reduced Skein". Cryptology ePrint Archive.
  8. ^ Dmitry Khovratovich & Ivica Nikolić (2010). "Rotational Cryptanalysis of ARX" (PDF). University of Luxembourg. Archived from the original (PDF) on 2013-01-26. Retrieved 2010-10-25. {{cite journal}}: Cite journal requires |journal= (help)