fbpx
Wikipedia

Threefish

Threefish is a symmetric-key tweakable block cipher designed as part of the Skein hash function, an entry in the NIST hash function competition. Threefish uses no S-boxes or other table lookups in order to avoid cache timing attacks;[1] its nonlinearity comes from alternating additions with exclusive ORs. In that respect, it is similar to Salsa20, TEA, and the SHA-3 candidates CubeHash and BLAKE.

Threefish
General
DesignersBruce Schneier, Niels Ferguson, Stefan Lucks, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas, Jesse Walker
First published2008
Related toBlowfish, Twofish
Cipher detail
Key sizes256, 512 or 1024 bits
(key size is equal to block size)
Block sizes256, 512 or 1024 bits
Rounds72 (80 for 1024-bit block size)
Speed6.1 cpb on Core 2.[1]
Best public cryptanalysis
In October 2010, an attack that combines rotational cryptanalysis 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.[2]

Threefish and the Skein hash function were designed by Bruce Schneier, Niels Ferguson, Stefan Lucks, Doug Whiting, Mihir Bellare, Tadayoshi Kohno, Jon Callas, and Jesse Walker.

Description of the cipher edit

Threefish works on words of 64 bits (unsigned Little endian integers).   is the number of plaintext words and also of key words. The tweak consists of two words. All additions and subtractions are defined modulo  .

Key schedule edit

Threefish encrypts in   rounds and uses   different round keys. After every four rounds, and before the first,   round key words are added to the   data words. To calculate the round keys an additional key word   is appended to the original key words  . Also, an additional tweak word   is appended to the tweak words  .

 
 

The purpose of the seemingly arbitrary constant   is to frustrate some attacks that take advantage of the relationship between   and the other keywords.

The round key words   are now defined like this:

 

Here  , where   is the number of the round in which the round key word   is used.

Mix function edit

 
Threefish Mix Function

The mix function takes a tuple of words   and returns another tuple of words  . The function is defined like this:

 

 

  is a fixed set of rotation constants chosen to achieve quick diffusion.

Permute edit

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.[citation needed] 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.[citation needed]

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 attacks 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.[citation needed]

A full Threefish round edit

  • if   the round key   is added to word  
  • the mix function is applied to pairs of words, the rotation widths   depend on round number   and word pair  
  • the words are permutated using a permutation independent from the round number

Threefish256 and Threefish512 apply this round   times ( ). Threefish1024 applies it 80 times ( ).

Final operations edit

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

Security edit

In October 2010, an attack that combines rotational cryptanalysis 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.[2] This is a follow-up to the earlier attack published in February, which breaks 39 and 42 rounds respectively.[3] In response to this attack, the Skein team tweaked the rotation constants used in Threefish and thereby the key schedule constants for round 3 of the NIST hash function competition.[1]

In 2009, a related key boomerang attack against a reduced round Threefish version was published. For the 32-round version, the time complexity is   and the memory complexity is  ; for the 33-round version, the time complexity is   with a negligible memory usage. The attacks also work against the tweaked version of Threefish: for the 32-round version, the time complexity is   and the memory complexity is  ; for the 33-round version, the time complexity is   with a negligible memory usage.[4]

See also edit

References edit

  1. ^ a b c Ferguson; et al. (2010-10-01). (PDF). Archived from the original (PDF) on 2014-08-24. Retrieved 2010-12-15. {{cite journal}}: Cite journal requires |journal= (help) The paper in which Threefish was introduced.
  2. ^ a b Dmitry Khovratovich; Ivica Nikolic; Christian Rechberger (2010-10-20). "Rotational Rebound Attacks on Reduced Skein". Cryptology ePrint Archive.
  3. ^ Dmitry Khovratovich & Ivica Nikolić (2010). (PDF). University of Luxembourg. Archived from the original (PDF) on 2013-01-26. Retrieved 2010-02-18. {{cite journal}}: Cite journal requires |journal= (help)
  4. ^ Jiazhe Chen; Keting Jia (2009-11-01). "Improved Related-key Boomerang Attacks on Round-Reduced Threefish-512". Cryptology ePrint Archive.

External links edit

  • "The Skein Hash Function Family" 2021-04-01 at the Wayback Machine Homepage of the Skein Hash Function Family.

threefish, this, article, relies, excessively, references, primary, sources, please, improve, this, article, adding, secondary, tertiary, sources, find, sources, news, newspapers, books, scholar, jstor, november, 2008, learn, when, remove, this, message, symme. This article relies excessively on references to primary sources Please improve this article by adding secondary or tertiary sources Find sources Threefish news newspapers books scholar JSTOR November 2008 Learn how and when to remove this message Threefish is a symmetric key tweakable block cipher designed as part of the Skein hash function an entry in the NIST hash function competition Threefish uses no S boxes or other table lookups in order to avoid cache timing attacks 1 its nonlinearity comes from alternating additions with exclusive ORs In that respect it is similar to Salsa20 TEA and the SHA 3 candidates CubeHash and BLAKE ThreefishGeneralDesignersBruce Schneier Niels Ferguson Stefan Lucks Doug Whiting Mihir Bellare Tadayoshi Kohno Jon Callas Jesse WalkerFirst published2008Related toBlowfish TwofishCipher detailKey sizes256 512 or 1024 bits key size is equal to block size Block sizes256 512 or 1024 bitsRounds72 80 for 1024 bit block size Speed6 1 cpb on Core 2 1 Best public cryptanalysisIn October 2010 an attack that combines rotational cryptanalysis 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 2 Threefish and the Skein hash function were designed by Bruce Schneier Niels Ferguson Stefan Lucks Doug Whiting Mihir Bellare Tadayoshi Kohno Jon Callas and Jesse Walker Contents 1 Description of the cipher 1 1 Key schedule 1 2 Mix function 1 3 Permute 1 4 A full Threefish round 1 5 Final operations 2 Security 3 See also 4 References 5 External linksDescription of the cipher editThreefish works on words of 64 bits unsigned Little endian integers w 4 8 16 displaystyle w in 4 8 16 nbsp 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 64 displaystyle 2 64 nbsp Key schedule edit Threefish encrypts in r displaystyle r nbsp rounds and uses r 4 1 displaystyle frac r 4 1 nbsp different round keys After every four rounds and before the first w displaystyle w nbsp round key words are added to the w displaystyle w nbsp data words To calculate the round keys an additional key word k w displaystyle k w nbsp is appended to the original key words k 0 k 1 k w 1 displaystyle k 0 k 1 dots k w 1 nbsp Also an additional tweak word t 2 displaystyle t 2 nbsp is appended to the tweak words t 0 t 1 displaystyle t 0 t 1 nbsp k w C k 0 k 1 k w 1 C 0x1BD11BDAA9FC1A22 displaystyle k w C oplus k 0 oplus k 1 oplus dots oplus k w 1 quad C text 0x1BD11BDAA9FC1A22 nbsp t 2 t 0 t 1 displaystyle t 2 t 0 oplus t 1 nbsp The purpose of the seemingly arbitrary constant C displaystyle C nbsp is to frustrate some attacks that take advantage of the relationship between k w displaystyle k w nbsp and the other keywords The round key words k s i displaystyle k s i nbsp are now defined like this k s i k s i mod w 1 i 0 w 4 k s i mod w 1 t s mod 3 i w 3 k s i mod w 1 t s 1 mod 3 i w 2 k s i mod w 1 s i w 1 displaystyle k s i begin cases k s i bmod w 1 amp i 0 dots w 4 k s i bmod w 1 t s bmod 3 amp i w 3 k s i bmod w 1 t s 1 bmod 3 amp i w 2 k s i bmod w 1 s amp i w 1 end cases nbsp Here s 0 1 r 4 displaystyle s 0 1 dots r 4 nbsp where 4 s displaystyle 4s nbsp is the number of the round in which the round key word k s i displaystyle k s i nbsp is used Mix function edit nbsp Threefish Mix Function The mix function takes a tuple of words x 0 x 1 displaystyle x 0 x 1 nbsp and returns another tuple of words y 0 y 1 displaystyle y 0 y 1 nbsp The function is defined like this y 0 x 0 x 1 mod 2 64 displaystyle y 0 x 0 x 1 bmod 2 64 nbsp y 1 x 1 R d mod 8 j y 0 displaystyle y 1 x 1 lll R d bmod 8 j oplus y 0 nbsp R d j displaystyle R d j nbsp is a fixed set of rotation constants chosen to achieve quick diffusion Permute edit 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 citation needed 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 citation needed 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 attacks 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 citation needed A full Threefish round edit if d mod 4 0 displaystyle d bmod 4 0 nbsp the round key k d 4 i displaystyle k d 4 i nbsp is added to word i displaystyle i nbsp the mix function is applied to pairs of words the rotation widths R d mod 8 j displaystyle R d bmod 8 j nbsp depend on round number d displaystyle d nbsp and word pair j 0 w 2 1 displaystyle j in 0 cdots w 2 1 nbsp the words are permutated using a permutation independent from the round number Threefish256 and Threefish512 apply this round r 72 displaystyle r 72 nbsp times d 0 1 71 displaystyle d 0 1 dots 71 nbsp Threefish1024 applies it 80 times d 0 1 79 displaystyle d 0 1 dots 79 nbsp Final operations edit After all rounds are applied the last round key words k r 4 i displaystyle k r 4 i nbsp are added to the words and the words are converted back to a string of bytes Security editIn October 2010 an attack that combines rotational cryptanalysis 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 2 This is a follow up to the earlier attack published in February which breaks 39 and 42 rounds respectively 3 In response to this attack the Skein team tweaked the rotation constants used in Threefish and thereby the key schedule constants for round 3 of the NIST hash function competition 1 In 2009 a related key boomerang attack against a reduced round Threefish version was published For the 32 round version the time complexity is 2 226 displaystyle 2 226 nbsp and the memory complexity is 2 12 displaystyle 2 12 nbsp for the 33 round version the time complexity is 2 352 17 displaystyle 2 352 17 nbsp 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 222 displaystyle 2 222 nbsp and the memory complexity is 2 12 displaystyle 2 12 nbsp for the 33 round version the time complexity is 2 355 5 displaystyle 2 355 5 nbsp with a negligible memory usage 4 See also editTwofish Blowfish cipher References edit a b c 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 a href Template Cite journal html title Template Cite journal cite journal a Cite journal requires journal help The paper in which Threefish was introduced a b Dmitry Khovratovich Ivica Nikolic Christian Rechberger 2010 10 20 Rotational Rebound Attacks on Reduced Skein Cryptology ePrint Archive Dmitry Khovratovich amp Ivica Nikolic 2010 Rotational Cryptanalysis of ARX PDF University of Luxembourg Archived from the original PDF on 2013 01 26 Retrieved 2010 02 18 a href Template Cite journal html title Template Cite journal cite journal a Cite journal requires journal help Jiazhe Chen Keting Jia 2009 11 01 Improved Related key Boomerang Attacks on Round Reduced Threefish 512 Cryptology ePrint Archive External links edit The Skein Hash Function Family Archived 2021 04 01 at the Wayback Machine Homepage of the Skein Hash Function Family Retrieved from https en wikipedia org w index php title Threefish amp oldid 1180514488, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.