Message authentication codes

Chaskey

A lightweight ARX permutation-based MAC for 32-bit microcontrollers (ISO/IEC 29192-6)

standard Safe API

About Chaskey

Chaskey is a message authentication code. It uses a 16-byte (128-bit) key and a 1–16-byte authentication tag. It takes the parameter out_len (default 16). Its registry entry cites Chaskey-12 (ISO/IEC 29192-6), reference C. NextSSL lists it in the standard tier and exposes it through the safe API.

Overview

Chaskey is a message authentication code designed in 2014 by Nicky Mouha and colleagues for 32-bit microcontrollers. It is built on a 128-bit ARX permutation in an Even–Mansour style construction and is standardised in ISO/IEC 29192-6.

Chaskey derives two subkeys from its 128-bit key by doubling in GF(2^128), as in CMAC. Message blocks of 128 bits are XORed into the state and the permutation is applied after each; the final block is XORed with one of the subkeys depending on padding, then the permutation is applied, and the key is XORed in at the end. The permutation uses four 32-bit words and SipHash-like rounds of additions, rotations and XORs.

The original Chaskey used 8 rounds. After cryptanalysis reduced its margin, the 12-round Chaskey-12 became the recommended version and is the one standardised; NextSSL carries Chaskey-12 from the reference C code. Its round function closely resembles SipHash's. Chaskey can be implemented in a few hundred bytes of code and runs fast on ARM Cortex-M processors, where AES-based MACs are much slower without hardware support.

History

2014–2014
  1. Chaskey published

Security notes

Chaskey-12 has no known practical attacks. Like other 128-bit Even–Mansour constructions it is limited by birthday-bound data complexity, so the designers recommend limiting the number of messages per key.

Typical uses

Message authentication on 32-bit microcontrollersLightweight sensor and IoT protocols

Sizes

FieldBytesMeaning
key16Secret key
tag1 – 16Authentication tag

Parameters

NameTypeRangeDefaultRequired
out_len u64 1 – 16 16 no

Parameters are passed as a string, for example nextssl_mac("hmac", "hash=sha512", …). Omitted parameters take their declared default.

Use it

from nextssl_demo import NextSSL

ns = NextSSL()              # safe API: safe and standard tiers
key = ns.random(16)
tag = ns.call("mac", "chaskey", None, key, b"message", 0)[0]
ok  = ns.check("mac_verify", "chaskey", None, key, b"message", tag)

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

Frequently asked questions

What is Chaskey?

Chaskey is a MAC in the Chaskey family. Chaskey is a message authentication code designed in 2014 by Nicky Mouha and colleagues for 32-bit microcontrollers.

What are the Chaskey sizes?

In NextSSL, Chaskey uses: key 16 bytes, tag 1 to 16 bytes.

Who designed Chaskey and when?

Chaskey belongs to the Chaskey family, first published in 2014 by Nicky Mouha, Bart Mennink, Anthony Van Herrewege, Dai Watanabe, Bart Preneel, Ingrid Verbauwhede. Its origin: ISO/IEC 29192-6.

Which standards define Chaskey?

Chaskey is referenced by Chaskey-12 (ISO/IEC 29192-6), reference C.

Is Chaskey safe to use?

Chaskey is in the standard tier. Standardised and sound. Reachable from the safe API. It can be called from the safe API.