Authenticated encryption

Grain-128aead

LFSR/NLFSR stream cipher with an integrated MAC; NIST LWC finalist

research Root API only
Research tier.

Experimental or unclassified. Root API only. Reach it with NextSSL(root=True) in Python or the nextssl_root_* functions in C.

About Grain-128aead

Grain-128aead is an authenticated encryption (AEAD) scheme. It uses a 16-byte (128-bit) key, a 12-byte nonce and an 8-byte (64-bit) authentication tag. Its registry entry cites Grain-128AEAD round-2 (v1) (NIST LWC). NextSSL lists it in the research tier and exposes it through the root API only (NextSSL(root=True) in Python, nextssl_root_* in C).

Overview

Grain-128AEAD is an authenticated stream cipher from the Grain family, combining a 128-bit LFSR and 128-bit NLFSR keystream generator with an accumulator-based MAC. It was a finalist in the NIST Lightweight Cryptography process.

The keystream generator produces two interleaved streams: even bits encrypt the plaintext and odd bits feed a shift-register-and-accumulator MAC that authenticates the data. This lets hardware implementations reach very small area while processing one or more bits per clock.

NextSSL includes the round 2 (v1) version with a 128-bit key, 96-bit nonce and 64-bit tag. A revised specification, Grain-128AEADv2, was published for the final round. The Grain family began with the eSTREAM portfolio cipher Grain v1, and Grain-128a added optional authentication before Grain-128AEAD was submitted to NIST.

History

2018–2025
  1. NIST calls for lightweight AEAD and hashing designs

    NIST Lightweight Cryptography project
  2. Grain-128AEAD published

  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

Nonce reuse leaks plaintext and allows key-stream and state recovery. The 64-bit tag gives limited forgery resistance per attempt.

Typical uses

RFID and very low-area hardwareBit-serial hardware designs

Sizes

FieldBytesMeaning
key16Secret key
nonce12Nonce / IV
tag8Authentication tag

Use it

from nextssl_demo import NextSSL

root = NextSSL(root=True)   # tier 'research' is reachable from the root API only
key, nonce = root.random(16), root.random(12)
ct = root.call("aead_seal", "grain-128aead", None, key, nonce, b"header", b"secret")[0]   # ct || tag
pt = root.call("aead_open", "grain-128aead", 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.

Frequently asked questions

What is Grain-128aead?

Grain-128aead is an AEAD in the Grain-128AEAD family. Grain-128AEAD is an authenticated stream cipher from the Grain family, combining a 128-bit LFSR and 128-bit NLFSR keystream generator with an accumulator-based MAC.

What are the Grain-128aead sizes?

In NextSSL, Grain-128aead uses: key 16 bytes, nonce 12 bytes, tag 8 bytes.

Who designed Grain-128aead and when?

Grain-128aead belongs to the Grain-128AEAD family, first published in 2019 by Martin Hell, Thomas Johansson, Alexander Maximov, Willi Meier, Jonathan Sönnerup, Hirotaka Yoshida. Its origin: NIST LWC finalist.

Which standards define Grain-128aead?

Grain-128aead is referenced by Grain-128AEAD round-2 (v1) (NIST LWC).

Is Grain-128aead safe to use?

Grain-128aead is in the research tier. Experimental or unclassified. Root API only. It is only reachable through the root API (NextSSL(root=True) in Python, nextssl_root_* in C).