XOF family

KangarooTwelve

A fast tree-hashing XOF over 12-round Keccak, standardised in RFC 9861

standard 1 variant RFC 9861

Overview

KangarooTwelve (K12) is an extendable-output function from the Keccak team that uses a 12-round Keccak permutation and a tree mode for long inputs. It offers 128-bit security at several times the speed of SHAKE128.

K12 is built on TurboSHAKE128, which is SHAKE128 with the Keccak permutation reduced from 24 to 12 rounds. Inputs up to 8 KiB are hashed directly. Longer inputs are split into 8 KiB chunks; every chunk after the first is hashed independently into a 256-bit chaining value, and these values are appended to the first chunk and hashed in a final node. The chunks can be processed in parallel with SIMD or multiple cores.

K12 was introduced in 2016 and standardised, together with TurboSHAKE and the 256-bit-security KT256, in RFC 9861. It takes an optional customisation string. NextSSL includes KangarooTwelve (KT128). KT128 provides 128-bit security against all attacks, with output of any length. Its speed comes from both the reduced round count and the ability to process several chunks at once using vector instructions.

History

2016–2025
  1. KangarooTwelve published by the Keccak team

  2. Specified in RFC 9861

Security notes

The 12-round Keccak permutation retains a large security margin: the best published attacks on Keccak reach about six rounds. No weaknesses specific to K12 are known.

Typical uses

Fast hashing of large filesParallel or SIMD-accelerated XOF outputProtocols wanting Keccak with better performance

Variants in NextSSL

1
AlgorithmTierSizes (bytes)StandardsAPI
Kangarootwelve
kangarootwelve
standard — RFC 9861 safe

Frequently asked questions

Which KangarooTwelve variants does NextSSL include?

NextSSL registers 1 KangarooTwelve variant: kangarootwelve.