Authenticated encryption

Pyjamask128aeadv1

Masking-friendly block ciphers in OCB mode; 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 Pyjamask128aeadv1

Pyjamask128aeadv1 is an authenticated encryption (AEAD) scheme from the Pyjamask family. It uses a 16-byte (128-bit) key, a 12-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

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
nonce12Nonce / 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(16), root.random(12)
ct = root.call("aead_seal", "pyjamask128aeadv1", None, key, nonce, b"header", b"secret")[0]   # ct || tag
pt = root.call("aead_open", "pyjamask128aeadv1", 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 Pyjamask128aeadv1?

Pyjamask128aeadv1 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 Pyjamask128aeadv1 sizes?

In NextSSL, Pyjamask128aeadv1 uses: key 16 bytes, nonce 12 bytes, tag 16 bytes.

Who designed Pyjamask128aeadv1 and when?

Pyjamask128aeadv1 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.

Is Pyjamask128aeadv1 safe to use?

Pyjamask128aeadv1 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).