Authenticated encryption

Gimli

Cross-platform 384-bit permutation in a duplex AEAD; NIST LWC round 2

unverified Root API only
Unverified tier.

Source found and wired, correctness not fully proven. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About Gimli

Gimli is an authenticated encryption (AEAD) scheme. It uses a 32-byte (256-bit) key, a 16-byte nonce and a 16-byte (128-bit) authentication tag. NextSSL lists it in the unverified tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

Gimli is a 384-bit permutation designed to be fast and compact on platforms from 8-bit microcontrollers to vector CPUs and hardware, used here in a duplex authenticated-encryption mode. It was a second-round candidate in the NIST Lightweight Cryptography process.

The Gimli state is a 3x4 matrix of 32-bit words. Each of its 24 rounds applies an SP-box to each column, using shifts, rotations, AND, OR and XOR, followed by occasional small and big swaps of words and a round constant. Gimli-Cipher absorbs data at a 128-bit rate.

NextSSL implements Gimli-24-Cipher with a 256-bit key, 128-bit nonce and 128-bit tag. The submission also defines Gimli-Hash, and the permutation has been used outside the NIST process in lightweight protocol libraries. Second-round candidates were evaluated by NIST on security, hardware and software performance and side-channel properties; ten were chosen as finalists in 2021, and Ascon was selected in 2023.

History

2017–2025
  1. Gimli published

  2. NIST calls for lightweight AEAD and hashing designs

    NIST Lightweight Cryptography project
  3. 56 round-1 candidates accepted; 32 advance to round 2 in August

    NIST Lightweight Cryptography project
  4. Ten finalists announced

    NIST Lightweight Cryptography project
  5. Ascon selected as the lightweight standard

    NIST Lightweight Cryptography project
  6. Ascon published in NIST SP 800-232

    NIST Lightweight Cryptography project

Security notes

Requires unique nonces. Published distinguishers on the full Gimli permutation exist, though they do not translate into practical attacks on Gimli-Cipher as specified.

Typical uses

Cross-platform lightweight softwareResearch on permutation design trade-offs

Sizes

FieldBytesMeaning
key32Secret key
nonce16Nonce / IV
tag16Authentication tag

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'unverified' is reachable from the root API only
key, nonce = root.random(32), root.random(16)
ct = root.call("aead_seal", "gimli", None, key, nonce, b"header", b"secret")[0]   # ct || tag
pt = root.call("aead_open", "gimli", None, key, nonce, b"header", ct)[0]

Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.

Other Gimli variants

1

Frequently asked questions

What is Gimli?

Gimli is an AEAD in the Gimli family. Gimli is a 384-bit permutation designed to be fast and compact on platforms from 8-bit microcontrollers to vector CPUs and hardware, used here in a duplex authenticated-encryption mode.

What are the Gimli sizes?

In NextSSL, Gimli uses: key 32 bytes, nonce 16 bytes, tag 16 bytes.

Who designed Gimli and when?

Gimli belongs to the Gimli family, first published in 2017 by Daniel J. Bernstein, Stefan Kölbl, Stefan Lucks, Pedro Maat Costa Massolino, Florian Mendel, Kashif Nawaz, Tobias Schneider, Peter Schwabe, François-Xavier Standaert, Yosuke Todo, Benoît Viguier. Its origin: NIST LWC round 2.

Is Gimli safe to use?

Gimli is in the unverified tier. Source found and wired, correctness not fully proven. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).

What other Gimli variants are there?

NextSSL also registers gimli24v1-aead in the Gimli family.