Authenticated encryption

Pyjamask-96

Masking-friendly block ciphers in OCB mode; NIST LWC round 2

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 Pyjamask-96

Pyjamask-96 is one of 2 Pyjamask variants in the NextSSL registry, an authenticated encryption (AEAD) scheme. It uses a 16-byte (128-bit) key, an 8-byte nonce and a 12-byte (96-bit) authentication tag. Its registry entry cites Pyjamask (NIST LWC round 2). 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

Pyjamask is a lightweight authenticated cipher that pairs masking-friendly block ciphers with OCB mode. It was a second-round candidate in the NIST Lightweight Cryptography process.

The Pyjamask-96 and Pyjamask-128 block ciphers minimise the number of nonlinear AND operations per round, since that count dominates the cost of higher-order masking against side-channel attacks. Linear layers use binary circulant matrices. The AEAD mode is OCB, giving a parallelisable single-pass scheme.

NextSSL includes Pyjamask-128-AEAD and Pyjamask-96-AEAD under the pyjamask family and as version 1 builds. Unmasked, Pyjamask is slower than ciphers optimised for raw speed; its advantage appears only when several masking shares are required.

History

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

    NIST Lightweight Cryptography project
  2. Pyjamask 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

Requires unique nonces, as with OCB. The 96-bit instance has a lower birthday bound. Pyjamask's unmasked performance is low; its value lies in masked implementations.

Typical uses

Devices requiring higher-order maskingSide-channel research

Sizes

FieldBytesMeaning
key16Secret key
nonce8Nonce / IV
tag12Authentication 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(8)
ct = root.call("aead_seal", "pyjamask-96", None, key, nonce, b"header", b"secret")[0]   # ct || tag
pt = root.call("aead_open", "pyjamask-96", 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 Pyjamask variants

1

Frequently asked questions

What is Pyjamask-96?

Pyjamask-96 is an AEAD in the Pyjamask family. Pyjamask is a lightweight authenticated cipher that pairs masking-friendly block ciphers with OCB mode.

What are the Pyjamask-96 sizes?

In NextSSL, Pyjamask-96 uses: key 16 bytes, nonce 8 bytes, tag 12 bytes.

Who designed Pyjamask-96 and when?

Pyjamask-96 belongs to the Pyjamask family, first published in 2019 by Dahmun Goudarzi, Jérémy Jean, Stefan Kölbl, Thomas Peyrin, Matthieu Rivain, Yu Sasaki, Siang Meng Sim. Its origin: NIST LWC round 2.

Which standards define Pyjamask-96?

Pyjamask-96 is referenced by Pyjamask (NIST LWC round 2).

Is Pyjamask-96 safe to use?

Pyjamask-96 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).

What other Pyjamask variants are there?

NextSSL also registers pyjamask in the Pyjamask family.