ArticleslgStudy

computer science

Gimli (cipher)

Gimli (cipher) is a computer 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 Gimli (cipher) rather than just read about it. In short: Gimli is a 384-bit cryptographically secure pseudorandom permutation that can be used to construct a hash function or stream cipher by using it in a sponge construction. One stated design goal is the ability to deliver high speeds on many different platforms from 8-bit AVR CPUs to 64-bit desktop CPUs while still maintaining high security.

Key takeaways

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

Reference excerpt

Gimli is a 384-bit cryptographically secure pseudorandom permutation that can be used to construct a hash function or stream cipher by using it in a sponge construction. One stated design goal is the ability to deliver high speeds on many different platforms from 8-bit AVR CPUs to 64-bit desktop CPUs while still maintaining high security. It has been submitted to the second round of the NIST Lightweight Cryptography Standardization Process.

Algorithm Gimli has a 384-bit state represented by a 3×4 matrix of 32-bit words. A column is represented by 3×32 = 96 bits while a row is represented by 4×32 = 128 bits. Each round, each of the 4 columns is separately split into 3 32-bit words x, y and z. Those are then transformed according to the following 3 steps in parallel. Step 1:

x←x⋘24 y←y⋘9 Step 2:

x←x⊕(z≪1)⊕((y∧z)≪2) y←y⊕x⊕((x∨z)≪1) z←z⊕y⊕((x∧y)≪3) Step 3:

x←z z←x

After every fourth round starting from the first round, the first and second word and the third and fourth word are swapped. This is called "Small-Swap". After every fourth round starting from the third round, the first and third word and the second and fourth word are swapped. This is called "Big-Swap". The round number decrements starting from 24 and when it reaches 24, 20, 16, 12, 8 or 4, the round number or 0x9e377900 is xored into the first word of the state. The magic constant 0x9e377900 is chosen to be the upper 3 bytes of ⌊232⁄𝜙⌋, which would be 0x9e3779b9, where 𝜙 is the golden ratio (as a nothing-up-my-sleeve number) An implementation of the core permutation in C/C++ appears below.

Implementation and usage The reference implementation provided with the specification libhydrogen: a cryptographic library that constructs all primitives using Gimli and Curve25519 liblithium: like libhydrogen and maintained by Tesla

See also Keccak: another permutation.

References

Worked examples

Example 1 — a first encounter with Gimli (cipher)

Start with the simplest possible case. Write down what Gimli (cipher) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer 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 Gimli (cipher) 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 Gimli (cipher) 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 Gimli (cipher)

In research
Gimli (cipher) appears in computer 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 Gimli (cipher) 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
Gimli (cipher) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptographic hash functions, Cryptographically secure pseudorandom number generators, Cryptography stubs, so understanding it makes those chapters shorter.
In everyday life
Look for Gimli (cipher) 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Gimli (cipher)” →

How to study Gimli (cipher) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gimli (cipher) 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 Gimli (cipher) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gimli (cipher) in simple terms?

Gimli is a 384-bit cryptographically secure pseudorandom permutation that can be used to construct a hash function or stream cipher by using it in a sponge construction. One stated design goal is the ability to deliver high speeds on many different platforms from 8-bit AVR CPUs to 64-bit desktop CP…

Why does Gimli (cipher) matter?

Because it connects several computer 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 Gimli (cipher)?

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 Gimli (cipher).

Tags

  • Cryptographic hash functions
  • Cryptographically secure pseudorandom number generators
  • Cryptography stubs
  • Permutations
  • Stream ciphers

Keep exploring