Pyjamask-96
Masking-friendly block ciphers in OCB mode; NIST LWC round 2
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–2025NIST calls for lightweight AEAD and hashing designs
NIST Lightweight Cryptography projectPyjamask published
56 round-1 candidates accepted; 32 advance to round 2 in August
NIST Lightweight Cryptography projectTen finalists announced
NIST Lightweight Cryptography projectAscon selected as the lightweight standard
NIST Lightweight Cryptography projectAscon 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
Sizes
| Field | Bytes | Meaning |
|---|---|---|
| key | 16 | Secret key |
| nonce | 8 | Nonce / IV |
| tag | 12 | Authentication 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]
nextssl_root_aead_seal("pyjamask-96", NULL, key, nonce, aad, pt, out); /* writes ct || tag */
nextssl_root_aead_open("pyjamask-96", NULL, key, nonce, aad, ct, out);
use nextssl_core::Params;
use nextssl_registry::{self as reg, Policy};
let alg = reg::new_aead_in(reg::all(), Policy::Any, "pyjamask-96", &Params::new())?;
let ct = alg.seal(&key, &nonce, b"header", b"secret")?;
let pt = alg.open(&key, &nonce, b"header", &ct)?;
Calls follow the NextSSL C ABI and its language bindings. Buffer sizes are validated against the sizes above.
Other Pyjamask variants
1Similar names
Looking for something else?More authenticated encryption
All 392Frequently 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.
Related families
Leakage-resilient permutation-based AEAD designed against DPA; NIST LWC finalist
SKINNY-AEADTheta-CB3 (OCB-style) mode on the SKINNY tweakable block cipher; NIST LWC round 2
SpookLeakage-resistant AEAD on Clyde-128 and the Shadow permutation; NIST LWC round 2
SKINNY-HashThe hash functions of the SKINNY-AEAD submission, built from the SKINNY block cipher