Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Threefish

From Wikipedia, the free encyclopedia
Block cipher
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.1cpb onCore 2.[1]
Best publiccryptanalysis
In October 2010, an attack that combinesrotational cryptanalysis with therebound attack was published. The attack mounts aknown-key distinguisher against 53 of 72 rounds in Threefish-256, and 57 of 72 rounds in Threefish-512. It also affects theSkein hash function.[2]

Threefish is asymmetric-keytweakable block cipher designed as part of theSkein hash function, an entry in theNIST hash function competition. Threefish uses noS-boxes or other table lookups in order to avoid cachetiming attacks;[1] its nonlinearity comes from alternating additions withexclusive ORs. In that respect, it is similar toSalsa20,TEA, and the SHA-3 candidatesCubeHash andBLAKE.

Threefish and the Skein hash function were designed byBruce Schneier,Niels Ferguson,Stefan Lucks, Doug Whiting,Mihir Bellare, Tadayoshi Kohno,Jon Callas, and Jesse Walker. "Threefish is unpatented, and the source code is uncopyrighted and license-free; it is free for all uses."[3]

Description of the cipher

[edit]

Threefish works on words of 64bits (unsignedLittle endianintegers).w{4,8,16}{\displaystyle w\in \{4,8,16\}} is the number of plaintext words and also of key words. The tweak consists of two words. All additions and subtractions are defined modulo264{\displaystyle 2^{64}}.

Key schedule

[edit]

Threefish encrypts inr{\displaystyle r} rounds and usesr4+1{\displaystyle {\frac {r}{4}}+1} different round keys. After every four rounds, and before the first,w{\displaystyle w} round key words are added to thew{\displaystyle w} data words. To calculate the round keys an additional key wordkw{\displaystyle k_{w}} is appended to the original key wordsk0,k1,,kw1{\displaystyle k_{0},k_{1},\dots ,k_{w-1}}. Also, an additional tweak wordt2{\displaystyle t_{2}} is appended to the tweak wordst0,t1{\displaystyle t_{0},t_{1}}.

kw=Ck0k1kw1;C=0x1BD11BDAA9FC1A22{\displaystyle k_{w}=C\oplus k_{0}\oplus k_{1}\oplus \dots \oplus k_{w-1};\quad C={\text{0x1BD11BDAA9FC1A22}}}
t2=t0t1{\displaystyle t_{2}=t_{0}\oplus t_{1}}

The purpose of the seemingly arbitrary constantC{\displaystyle C} is to frustrate some attacks that take advantage of the relationship betweenkw{\displaystyle k_{w}} and the other keywords.

The round key wordsks,i{\displaystyle k_{s,i}} are now defined like this:

ks,i={k(s+i)mod(w+1)i=0,,w4k(s+i)mod(w+1)+tsmod3i=w3k(s+i)mod(w+1)+t(s+1)mod3i=w2k(s+i)mod(w+1)+si=w1{\displaystyle k_{s,i}={\begin{cases}k_{(s+i){\bmod {(}}w+1)}&i=0,\dots ,w-4\\k_{(s+i){\bmod {(}}w+1)}+t_{s{\bmod {3}}}&i=w-3\\k_{(s+i){\bmod {(}}w+1)}+t_{(s+1){\bmod {3}}}&i=w-2\\k_{(s+i){\bmod {(}}w+1)}+s&i=w-1\end{cases}}}

Heres=0,1,,r/4{\displaystyle s=0,1,\dots ,r/4}, where4s{\displaystyle 4s} is the number of the round in which the round key wordks,i{\displaystyle k_{s,i}} is used.

Mix function

[edit]
Threefish Mix Function

The mix function takes atuple of words(x0,x1){\displaystyle (x_{0},x_{1})} and returns another tuple of words(y0,y1){\displaystyle (y_{0},y_{1})}. The function is defined like this:

y0=(x0+x1)mod264{\displaystyle y_{0}=(x_{0}+x_{1}){\bmod {2}}^{64}}

y1=(x1R(dmod8),j)y0{\displaystyle y_{1}=(x_{1}\lll R_{(d{\bmod {8}}),j})\oplus y_{0}}

Rd,j{\displaystyle R_{d,j}} is a fixed set of rotation constants chosen to achieve quickdiffusion.

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 functionsprovides bit-level permutations in the form of bitwise rotations.[citation needed] The Permute step and rotation constantsin the MIX functions are chosen in such a way that the overall effect is complete diffusion of all the bitsin 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 totiming attacks by examining the time requiredfor encryption. The permutation is therefore deliberately designed to ensure that it should execute in the same fashionindependent of the key being used or the data encrypted.[citation needed]

A full Threefish round

[edit]

Threefish256 and Threefish512 apply this roundr=72{\displaystyle r=72} times (d=0,1,,71{\displaystyle d=0,1,\dots ,71}). Threefish1024 applies it 80 times (d=0,1,,79{\displaystyle d=0,1,\dots ,79}).

Final operations

[edit]

After all rounds are applied, the last round key wordskr/4,i{\displaystyle k_{r/4,i}} are added to the words and the words are converted back to a string of bytes.

Security

[edit]

In October 2010, an attack that combinesrotational cryptanalysis with therebound attack was published. The attack mounts aknown-key distinguisher against 53 of 72 rounds in Threefish-256, and 57 of 72 rounds in Threefish-512. It also affects theSkein hash function.[2] This is a follow-up to the earlier attack published in February, which breaks 39 and 42 rounds respectively.[4] In response to this attack, the Skein team tweaked the rotation constants used in Threefish and thereby thekey schedule constants for round 3 of the NIST hash function competition.[1]

In 2009, a related keyboomerang attack against a reduced round Threefish version was published. For the 32-round version, the time complexity is2226{\displaystyle 2^{226}} and the memory complexity is212{\displaystyle 2^{12}}; for the 33-round version, the time complexity is2352.17{\displaystyle 2^{352.17}} with a negligible memory usage. The attacks also work against the tweaked version of Threefish: for the 32-round version, the time complexity is2222{\displaystyle 2^{222}} and the memory complexity is212{\displaystyle 2^{12}}; for the 33-round version, the time complexity is2355.5{\displaystyle 2^{355.5}} with a negligible memory usage.[5]

See also

[edit]

References

[edit]
  1. ^abcFerguson, Niels; Lucks, Stefan; Schneier, Bruce; Whiting, Doug; Bellare, Mihir; Kohno, Tadayoshi; Callas, Jon; Walker, Jesse (October 1, 2010),The Skein Hash Function Family(PDF), archived fromthe original(PDF) on 2014-08-24 The paper in which Threefish was introduced.
  2. ^abKhovratovich, Dmitry; Nikolic, Ivica; Rechberger, Christian (2014)."Rotational Rebound Attacks on Reduced Skein".Journal of Cryptology.27 (3):452–479.doi:10.1007/S00145-013-9150-0.
  3. ^Schneier, Bruce (January 17, 2023)."Threefish - Schneier on Security".Schneier on Security. RetrievedDecember 12, 2024.
  4. ^Khovratovich, Dmitry; Nikolic, Ivica (2010)."Rotational Cryptanalysis of ARX". In Hong, Seokhie; Iwata, Tetsu (eds.).Fast Software Encryption, 17th International Workshop, FSE 2010, Seoul, Korea, February 7–10, 2010, Revised Selected Papers. Lecture Notes in Computer Science. Vol. 6147. Springer. pp. 333–346.doi:10.1007/978-3-642-13858-4_19.
  5. ^Chen, Jiazhe; Jia, Keting (2010)."Improved Related-Key Boomerang Attacks on Round-Reduced Threefish-512". In Kwak, Jin; Deng, Robert H.; Won, Yoojae; Wang, Guilin (eds.).Information Security, Practice and Experience, 6th International Conference, ISPEC 2010, Seoul, Korea, May 12–13, 2010. Proceedings. Lecture Notes in Computer Science. Vol. 6047. Springer. pp. 1–18.doi:10.1007/978-3-642-12827-1_1.
Common
algorithms
Less common
algorithms
Other
algorithms
Design
Attack
(cryptanalysis)
Standardization
Utilization
General
Mathematics
Retrieved from "https://en.wikipedia.org/w/index.php?title=Threefish&oldid=1263534488"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2026 Movatter.jp