KangarooTwelve Explained: The Parallel Hash That Outruns SHAKE

KangarooTwelve explained in plain terms means understanding the parallel hash that outruns SHAKE with half the rounds, a design from 2016 that splits its input into chunks and hashes them all at once. The central question is why a hash would halve its rounds when more rounds mean more safety, and the answer is that twelve rounds of Keccak are already far beyond any known attack, so KangarooTwelve trades spare margin for real speed, and that trade is the whole point of the design.

KangarooTwelve is a fast extendable-output function created by the Keccak team with Ronny Van Keer and Benoît Viguier, built on the twelve-round Keccak-p permutation. It turns a message of any length into as many output bytes as the caller asks for, and it is built on the idea that a hash should use every core it is given, which means the design hashes in parallel through a tree, and that parallelism is what makes it unlike the hashes of its era.

This article makes the case for KangarooTwelve, explains what it is, how it works, and where its ideas still earn their keep.

Key takeaways

  • KangarooTwelve is a parallel hash from 2016, by the Keccak team.
  • It uses Keccak-p with 12 rounds instead of 24.
  • It splits input into 8192-byte chunks hashed in parallel.
  • It is an XOF, so the caller picks the output length.
  • It claims 128-bit security and runs near 0.55 cycles per byte.

What KangarooTwelve is

KangarooTwelve is a hash that turns a message into as many bytes as you ask for, and that flexibility is what makes it unusual among hashes. A fixed hash returns one size, but KangarooTwelve squeezes out any length, which means the same function serves fingerprints, keys and streams, and because the output is prefix-consistent, a short result is just the start of a longer one.

Its signature feature is the tree. Most hashes absorb their input in one long chain, but KangarooTwelve cuts the input into 8192-byte chunks and hashes each on its own, which means a multicore machine can work on many chunks at once, and because the chunks only meet at the end, the design scales with the hardware.

The design was a reaction to the cost of the full SHA-3 rounds. SHAKE runs 24 rounds of Keccak on every block, so the Keccak team asked whether half the rounds would do, because twelve rounds already resist every known attack, and that practicality is what made KangarooTwelve worth publishing.

It became one of the best-known fast hashes in the world, and it is named in every discussion of the field. KangarooTwelve runs at about 0.55 cycles per byte on a Skylake CPU, it was standardised as IETF RFC 9861 in 2025, and it is still the first example engineers meet when they learn that a tree can hash, which means the design survives as a tool even though it is not part of FIPS.

Its most famous property is its speed on small inputs. For messages under 8192 bytes, KangarooTwelve skips the tree entirely and runs a single fast sponge, which means short inputs pay no parallelism overhead, and because most hashed data is short, that shortcut is where the speed is won.

Our guide to SHA-3 explains the sponge hash that became the standard, and our guide to Grøstl explains the other sponge-based finalist of the SHA-3 competition.

How KangarooTwelve works

Everything starts with the message and the customization string, which are joined into one string. KangarooTwelve takes its input and its optional customization, appends the length of the customization, which means the starting string depends on both, and because the length is encoded in the string, two customizations can never collide by accident.

Each step begins with the chunks, which are cut every 8192 bytes. KangarooTwelve splits the joined string into pieces, which means fresh data arrives at every leaf, and because the pieces are independent, the hash can process them in parallel.

The leaf hash is what makes the design work as a whole. Each chunk after the first passes through TurboSHAKE128, the twelve-round sponge, which means the value is scrambled thoroughly, and because the leaves run the same function, the design needs no special machinery for the tree.

The final node spreads the effect further. The first chunk, the leaf digests and the leaf count all feed into one last sponge, which means the digest depends on the whole message, and because the final node is sequential, it is the only part that cannot run in parallel.

The squeezing is what turns the state into output. After the final node absorbs everything, KangarooTwelve squeezes out as many bytes as the caller asked for, which means the result is any length whatever the input, and because the squeezing uses the same sponge, the design needs no extra machinery.

The output comes from the final node, read out a block at a time. KangarooTwelve squeezes 168 bytes per permutation call, which means long outputs stream out steadily, and that rate is exactly what a key-derivation function needs for its output.

A dark office desk with a laptop showing a glowing green cipher diagram, a brass key and a notebook beside it
A dark office desk with a laptop showing a glowing green cipher diagram, a brass key and a notebook beside it, shows how KangarooTwelve works: input chunks take turns being hashed in parallel, chunk after chunk, until a digest emerges.

Comparing KangarooTwelve with other sponge hashes

KangarooTwelve is one of several sponge hashes built on Keccak, and each was built with a different emphasis. SHA-3 is the sponge hash that became the standard, Grøstl is the other sponge finalist with a wide state, and KangarooTwelve is the one built for parallel speed, while each approach trades something for something else.

The table below sets out the main contrasts between the leading approaches.

Aspect KangarooTwelve SHA-3 Grøstl
Output size Arbitrary 224 to 512 bits 224 to 512 bits
Construction Sponge and tree Sponge, Keccak-f Sponge, AES-like
Parallel Yes, tree hashing No No
Year 2016 2008 2008
Best for Fast parallel hashing General hashing Wide-state hashing

The practical result is that KangarooTwelve is the right choice for fast parallel hashing, SHA-3 suits general hashing, and Grøstl fits wide-state hashing instead.

Where KangarooTwelve is used

Standards use it as the fast Keccak option. IETF RFC 9861 defines KangarooTwelve for protocols that need speed, because it is twice as fast as SHAKE, and that listing is the reason it appears in real specifications rather than only in papers.

Key derivation uses it to stretch secrets quickly. A system that derives many keys from one secret needs a hash that is both fast and flexible, because a slow derivation becomes the bottleneck, and that speed is the reason KangarooTwelve earns its keep in key management.

Hashing uses it to fingerprint large files. A tool that hashes gigabytes wants a hash that uses every core, because a single-threaded hash wastes the machine, and that parallelism is the reason KangarooTwelve appears in data systems.

Benchmarking uses it as a parallel-speed reference. Engineers still quote KangarooTwelve when they discuss how fast a hash can run, because it is the clearest example of tree hashing paying off, and that number shapes how new hashes are measured.

Teaching uses it as the tree-hashing example. Courses introduce KangarooTwelve when they explain that a hash can be parallel, because it is the clearest case of the idea in a real design, and a student who understands KangarooTwelve understands why chunks matter in hash design.

Strengths and limits

The greatest strength of KangarooTwelve is its speed. A hash that runs at half a cycle per byte gives programs faster fingerprints for free, and that strength is real, measured in open benchmarks and confirmed by the standard that adopted it.

It is also a strength that the design is flexible. An XOF that returns any length serves many jobs at once, and that flexibility is worth more than cleverness in a field where a hash that only returns one size is a hash that needs replacing.

The limits are real, though, and the biggest is that it is not FIPS. KangarooTwelve is not part of the SHA-3 standard, which means a system that must use FIPS functions cannot choose it, and a project with that requirement must use SHAKE instead.

KangarooTwelve checklist

  • Use KangarooTwelve for fast hashing, never as a FIPS substitute.
  • Remember it uses 12 Keccak rounds, not 24.
  • Note the chunks are 8192 bytes and hash in parallel.
  • Compare it with SHAKE to see two kinds of sponge.
  • Study the tree, which is what makes it parallel.
  • Check the output length, since any length is allowed.
  • Keep real secrets behind standard hashes for signatures.
  • Read RFC 9861 to see how the function is specified.
  • Choose SHAKE when a FIPS function is required.

Frequently asked questions

What is KangarooTwelve in simple terms?

It is a 2016 fast hash that turns any input into any length of output by splitting it into chunks and hashing them in parallel.

Who designed KangarooTwelve?

The Keccak team, Guido Bertoni, Joan Daemen, Michaël Peeters and Gilles Van Assche, with Ronny Van Keer and Benoît Viguier.

How is KangarooTwelve different from SHAKE?

Both are Keccak XOFs, but KangarooTwelve uses 12 rounds and tree hashing while SHAKE uses 24 rounds in a single chain.

Is KangarooTwelve still secure?

Yes, it claims 128-bit security and no practical attack is known, though it is not part of the FIPS SHA-3 standard.

Where is KangarooTwelve used?

In IETF standards, in key derivation, in large-file hashing, in benchmarking, and in teaching about tree hashing.

When should I use KangarooTwelve?

When you need the fastest Keccak hash, when you hash in parallel, or when you study tree-based hash design.

The bottom line

KangarooTwelve explained in one line is this: the parallel hash, a 2016 design that halved the rounds and split the input into a tree and taught the field that a hash can use every core.

It is proof that parallelism is a design goal, and the reason it still matters is that every fast hash designed since has been judged partly by the lesson KangarooTwelve taught.

This article is general information about how KangarooTwelve works, not advice about choosing encryption for a particular device or system.

Latest articles

Scroll to Top