HOME

TheInfoList



OR:

Threefish is a symmetric-key tweakable block cipher designed as part of the Skein hash function, an entry in the
NIST hash function competition The NIST hash function competition was an open competition held by the US National Institute of Standards and Technology (NIST) to develop a new hash function called SHA-3 to complement the older SHA-1 and SHA-2. The competition was formally ann ...
. Threefish uses no
S-box In cryptography, an S-box (substitution-box) is a basic component of symmetric key algorithms which performs substitution. In block ciphers, they are typically used to obscure the relationship between the key and the ciphertext, thus ensuring Shan ...
es or other table lookups in order to avoid cache
timing attack In cryptography, a timing attack is a side-channel attack in which the attacker attempts to compromise a cryptosystem by analyzing the time taken to execute cryptographic algorithms. Every logical operation in a computer takes time to execute, a ...
s; The paper in which Threefish was introduced. its nonlinearity comes from alternating additions with
exclusive OR Exclusive or or exclusive disjunction is a logical operation that is true if and only if its arguments differ (one is true, the other is false). It is symbolized by the prefix operator J and by the infix operators XOR ( or ), EOR, EXOR, , ...
s. In that respect, it is similar to
Salsa20 Salsa20 and the closely related ChaCha are stream ciphers developed by Daniel J. Bernstein. Salsa20, the original cipher, was designed in 2005, then later submitted to the eSTREAM European Union cryptographic validation process by Bernstein. Ch ...
,
TEA Tea is an aromatic beverage prepared by pouring hot or boiling water over cured or fresh leaves of '' Camellia sinensis'', an evergreen shrub native to East Asia which probably originated in the borderlands of southwestern China and north ...
, and the SHA-3 candidates CubeHash and
BLAKE Blake is a surname which originated from Old English. Its derivation is uncertain; it could come from "blac", a nickname for someone who had dark hair or skin, or from "blaac", a nickname for someone with pale hair or skin. Another theory, presum ...
. Threefish and the Skein hash function were designed by
Bruce Schneier Bruce Schneier (; born January 15, 1963) is an American cryptographer, computer security professional, privacy specialist, and writer. Schneier is a Lecturer in Public Policy at the Harvard Kennedy School and a Fellow at the Berkman Klein Ce ...
, Niels Ferguson, Stefan Lucks, Doug Whiting,
Mihir Bellare Mihir Bellare is a cryptographer and professor at the University of California San Diego. He has published several seminal papers in the field of cryptography (notably in the area of provable security), many of which were co-written with Phillip R ...
, Tadayoshi Kohno,
Jon Callas Jon Callas is an American computer security expert, software engineer, user experience designer, and technologist who is the co-founder and former CTO of the global encrypted communications service Silent Circle.http://www.linkedin.com/in/joncall ...
, and Jesse Walker.


Description of the cipher

Threefish works on words of 64
bit The bit is the most basic unit of information in computing and digital communications. The name is a portmanteau of binary digit. The bit represents a logical state with one of two possible values. These values are most commonly represented a ...
s (unsigned
Little endian In computing, endianness, also known as byte sex, is the order or sequence of bytes of a word of digital data in computer memory. Endianness is primarily expressed as big-endian (BE) or little-endian (LE). A big-endian system stores the most si ...
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the language ...
s). w \in \ is the number of plaintext words and also of key words. The tweak consists of two words. All additions and subtractions are defined modulo 2^.


Key schedule

Threefish encrypts in r rounds and uses \frac + 1 different round keys. After every four rounds, and before the first, w round key words are added to the w data words. To calculate the round keys an additional key word k_w is appended to the original key words k_0, k_1, \dots, k_. Also, an additional tweak word t_2 is appended to the tweak words t_0, t_1. :k_w = C \oplus k_0 \oplus k_1 \oplus \dots \oplus k_; \quad C = \text :t_2 = t_0 \oplus t_1 The purpose of the seemingly arbitrary constant C is to frustrate some attacks that take advantage of the relationship between k_w and the other keywords. The round key words k_ are now defined like this: k_ = \begin k_ & i = 0, \dots, w - 4 \\ k_ + t_ & i = w - 3 \\ k_ + t_ & i = w - 2 \\ k_ + s & i = w - 1 \end Here s = 0, 1, \dots , r/4, where 4s is the number of the round in which the round key word k_ is used.


Mix function

The mix function takes a
tuple In mathematics, a tuple is a finite ordered list (sequence) of elements. An -tuple is a sequence (or ordered list) of elements, where is a non-negative integer. There is only one 0-tuple, referred to as ''the empty tuple''. An -tuple is defi ...
of words (x_0, x_1) and returns another tuple of words (y_0, y_1). The function is defined like this: y_0 = (x_0 + x_1) \bmod 2^ y_1 = (x_1 \lll R_) \oplus y_0 R_ is a fixed set of rotation constants chosen to achieve quick
diffusion Diffusion is the net movement of anything (for example, atoms, ions, molecules, energy) generally from a region of higher concentration to a region of lower concentration. Diffusion is driven by a gradient in Gibbs free energy or chemical p ...
.


Permute

The permutation step swaps the positions of the words according to a constant pattern. Bit-level permutation is not achieved in this step, but this is not necessary since the MIX functions provides bit-level permutations in the form of bitwise rotations. The Permute step and rotation constants in the MIX functions are chosen in such a way that the overall effect is complete diffusion of all the bits in a data block. Because this permutation is fixed and independent of the key, the time needed to compute it does not provide information about the key or plaintext. This is important because on most modern microprocessors performance optimisations can make the time taken to compute an array operation dependent on where the data is stored in memory. In ciphers where array lookup depends on either the key or plaintext (as is the case for the substitution step in AES), it can make the cipher vulnerable to
timing attack In cryptography, a timing attack is a side-channel attack in which the attacker attempts to compromise a cryptosystem by analyzing the time taken to execute cryptographic algorithms. Every logical operation in a computer takes time to execute, a ...
s by examining the time required for encryption. The permutation is therefore deliberately designed to ensure that it should execute in the same fashion independent of the key being used or the data encrypted.


A full Threefish round

* if d\;\bmod\;4 = 0 the round key k_ is added to word i * the mix function is applied to pairs of words, the rotation widths R_ depend on round number d and word pair j\in\ * the words are permutated using a permutation independent from the round number Threefish256 and Threefish512 apply this round r=72 times (d=0,1, \dots,71). Threefish1024 applies it 80 times (d=0,1, \dots,79).


Final operations

After all rounds are applied, the last round key words k_ are added to the words and the words are converted back to a string of bytes.


Security

In October 2010, an attack that combines
rotational cryptanalysis In cryptography, rotational cryptanalysis is a generic cryptanalytic attack against algorithms that rely on three operations: modular addition, rotation and XOR — ARX for short. Algorithms relying on these operations are popular because they ...
with the rebound attack was published. The attack mounts a known-key distinguisher against 53 of 72 rounds in Threefish-256, and 57 of 72 rounds in Threefish-512. It also affects the Skein hash function. This is a follow-up to the earlier attack published in February, which breaks 39 and 42 rounds respectively. In response to this attack, the Skein team tweaked the rotation constants used in Threefish and thereby the
key schedule In cryptography, the so-called product ciphers are a certain kind of cipher, where the (de-)ciphering of data is typically done as an iteration of ''rounds''. The setup for each round is generally the same, except for round-specific fixed val ...
constants for round 3 of the NIST hash function competition. In 2009, a related key
boomerang attack In cryptography, the boomerang attack is a method for the cryptanalysis of block ciphers based on differential cryptanalysis. The attack was published in 1999 by David Wagner, who used it to break the COCONUT98 cipher. The boomerang attack has ...
against a reduced round Threefish version was published. For the 32-round version, the time complexity is 2^ and the memory complexity is 2^; for the 33-round version, the time complexity is 2^ with a negligible memory usage. The attacks also work against the tweaked version of Threefish: for the 32-round version, the time complexity is 2^ and the memory complexity is 2^; for the 33-round version, the time complexity is 2^ with a negligible memory usage.


See also

*
Twofish In cryptography, Twofish is a symmetric key block cipher with a block size of 128 bits and key sizes up to 256 bits. It was one of the five finalists of the Advanced Encryption Standard contest, but it was not selected for standardization. Two ...
*
Blowfish (cipher) Blowfish is a symmetric-key block cipher, designed in 1993 by Bruce Schneier and included in many cipher suites and encryption products. Blowfish provides a good encryption rate in software, and no effective cryptanalysis of it has been found ...


References


External links


"The Skein Hash Function Family"
Homepage of the Skein Hash Function Family. {{Cryptography navbox , block Block ciphers Free ciphers