Gimli (cipher)
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.[src] 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.[src] It has been submitted to the second round of the NIST Lightweight Cryptography Standardization Process.[src]
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.[src] 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.[src] It has been submitted to the second round of the NIST Lightweight Cryptography Standardization Process.[src] ==Algorithm== Gimli has a 384-bit state represented by a 3×4 matrix of 32-bit words.[src] A column is represented by 3×32 = 96 bits while a row is represented by 4×32 = 128 bits.[src] Each round, each of the 4 columns is separately split into 3 32-bit words x, y and z.[src] Those are then transformed according to the following 3 steps in parallel.[src] Step 1: x \gets x \lll 24 y \gets y \lll 9 Step 2: x \gets x \oplus (z \ll 1) \oplus ((y \land z) \ll 2) y \gets y \oplus x \oplus ((x \lor z) \ll 1) z \gets z \oplus y \oplus ((x \land y) \ll 3) Step 3: x \gets z z \gets x After every fourth round starting from the first round, the first and second word and the third and fourth word are swapped.[src] This is called "Small-Swap".[src] After every fourth round starting from the third round, the first and third word and the second and fourth word are swapped.[src] This is called "Big-Swap".[src] The round number decrements starting from 24 and when it reaches 24, 20, 16, 12, 8 or 4, the round number or is xored into the first word of the state.[src] The magic constant is chosen to be the upper 3 bytes of , which would be , where is the golden ratio (as a nothing-up-my-sleeve number) An implementation of the core permutation in C/C++ appears below.[src] include define ROTL(x, b) (b == 0 ?[src] x : ((x > (32 - b)))) void gimli(uint32_t *state) { uint32_t x, y, z; for (int round = 24; round > 0; --round) { for (int column = 0; column ==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.[src] ==References==[src]
19 sentences · 19 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Gimli (cipher)." encyclopegia.org, 2025, https://encyclopegia.org/wiki/gimli-cipher. Accessed 06 December 2026.
Chicago
"Gimli (cipher)." encyclopegia.org. Accessed December 6, 2026. https://encyclopegia.org/wiki/gimli-cipher.
APA
encyclopegia.org. (2025). Gimli (cipher). Retrieved December 6, 2026, from https://encyclopegia.org/wiki/gimli-cipher
Accessed December 6, 2026 · CC BY-SA 4.0 · citation page · JSON