ArticleslgStudy

science

Threefish

Threefish is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Threefish rather than just read about it. In short: 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; its nonlinearity comes from alternating additions with exclusive ORs.

Threefish — main illustration
Threefish — illustration

Key takeaways

  • Threefish belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Threefish to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Threefish from memory before moving on to harder problems.

Reference excerpt

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; 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 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. "Threefish is unpatented, and the source code is uncopyrighted and license-free; it is free for all uses."

Description of the cipher Threefish works on words of 64 bits (unsigned Little endian integers). 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 modulo 2 64 {\displaystyle 2^{64}} .

Key schedule Threefish encrypts in r {\displaystyle r} rounds and uses r 4 + 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 the w {\displaystyle w} data words. To calculate the round keys an additional key word k w {\displaystyle k_{w}} is appended to the original key words k 0 , k 1 , … , k w − 1 {\displaystyle k_{0},k_{1},\dots ,k_{w-1}} . Also, an additional tweak word t 2 {\displaystyle t_{2}} is appended to the tweak words t 0 , t 1 {\displaystyle t_{0},t_{1}} .

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}}}

t 2 = t 0 ⊕ t 1 {\displaystyle t_{2}=t_{0}\oplus t_{1}}

The purpose of the seemingly arbitrary constant C {\displaystyle C} is to frustrate some attacks that take advantage of the relationship between k w {\displaystyle k_{w}} and the other keywords. The round key words k s , i {\displaystyle k_{s,i}} are now defined like this:

… excerpt ends here. Continue reading the full article.

Illustrations

Threefish illustration
Threefish: Threefish Mix Function
Threefish Mix Function

Worked examples

Example 1 — a first encounter with Threefish

Start with the simplest possible case. Write down what Threefish claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Threefish before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Threefish ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Threefish

In research
Threefish appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Threefish in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Threefish is common in secondary-school and first-year university syllabi. It links to neighbouring topics Block ciphers, Free ciphers, so understanding it makes those chapters shorter.
In everyday life
Look for Threefish outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Threefish in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Threefish means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Threefish out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Threefish in simple terms?

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; its nonlinearity comes from alternating additions with exclusive…

Why does Threefish matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Threefish?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Threefish.

Tags

  • Block ciphers
  • Free ciphers

Keep exploring