Mickey Explained: 7 Facts About the Cipher That Clocks Itself

Mickey explained in plain terms means understanding a stream cipher built from two shift registers that take turns telling each other when to move, a trick that makes the cipher both tiny and hard to predict. The central question is how two registers clocking each other can be trusted at all, and the answer is that the mutual clocking tangles the keystream so thoroughly that no attacker has learned to untangle it.

Mickey is a stream cipher designed by Steve Babbage and Matthew Dodd, submitted to the eSTREAM project in 2005 and chosen for its hardware portfolio in 2008 as Mickey 2.0. It takes an 80-bit key and an 80-bit initialisation vector, keeps its state in two registers of 100 bits each, and produces a keystream one bit at a time for the smallest hardware that needs encryption.

This article gives you seven facts about Mickey, explains what it is, how it works, and where it already runs.

Key takeaways

  • Mickey is a stream cipher built from two 100-bit shift registers.
  • It uses an 80-bit key and an 80-bit initialisation vector.
  • It was selected for the eSTREAM hardware portfolio in 2008.
  • Its two registers clock each other, which is its signature trick.
  • It is built for tiny hardware, not for general-purpose software.

What Mickey is

Mickey is a cipher that encrypts data as a continuous stream rather than in fixed-size blocks, generating a long sequence of pseudo-random bits from a short key and combining that sequence with the message. The keystream must never be reused with the same key and initialisation vector, because reusing it would let an attacker recover the plaintext by combining two ciphertexts, which is the one rule every stream cipher shares.

Its signature feature is the mutual clocking of its two registers. The first register is linear, which is fast and predictable on its own, and the second is nonlinear, which is harder to predict, and each register decides whether the other one moves at every step, which means the pattern of movement itself depends on the secret state.

The design was a reaction to the needs of tiny hardware. Radio tags, sensor nodes, and embedded controllers have almost no spare logic, and a cipher for them must be measured in hundreds of gates rather than thousands, so Mickey’s designers built the smallest stream cipher they could that still resisted the attacks they knew about, and the two-register design was their answer.

It became one of the best-known results of the eSTREAM contest, the European project that searched for new stream ciphers after the early 2000s. eSTREAM split its winners into software and hardware portfolios, and Mickey was chosen for the hardware side alongside Trivium and Grain, which gave it the scrutiny that a cipher needs before anyone trusts it with real data.

Its most famous property is the second version. The first Mickey showed a weakness during the contest, and the designers revised it into Mickey 2.0, which is the version that won selection, and that willingness to fix the design in public is part of why the cipher is trusted, because it was tested hard before it was ever deployed.

Our guide to Trivium explains another tiny hardware cipher from the same contest, and our guide to Grain explains the two-register cipher that shares Mickey’s niche.

How Mickey works

Everything starts with the two registers, each 100 bits long, which together hold 200 bits of state. The key fills the first register, the initialisation vector fills the second, and the remaining bits are filled with a fixed pattern that stops the state from ever being all zeroes, which would produce a useless stream of nothing.

Each step decides, for each register, whether it moves or stays still. The decision comes from control bits taken from the other register, so the linear register is clocked under the control of the nonlinear one and the nonlinear register is clocked under the control of the linear one, which means neither register moves in a pattern an attacker can predict in advance.

The linear register’s feedback is a simple combination of its own bits, which is fast and easy to build in hardware, while the nonlinear register’s feedback mixes its bits through AND gates, which makes its behaviour much harder to predict, and the two registers also exchange influence through the output function that builds the keystream.

Once the setup finishes, each step produces one bit of keystream, taken from a combination of bits from both registers. That bit is XORed with one bit of plaintext to make one bit of ciphertext, and the receiver, running the same cipher with the same key and initialisation vector, generates the same keystream and reverses the process to recover the message.

The security of the design rests on the mutual clocking and the nonlinear register, which together stop an attacker from treating Mickey as a linear system. A purely linear cipher could be solved with algebra, but the irregular movement of the registers and the AND gates in the nonlinear register make the relationship between the key and the keystream a puzzle that has resisted nearly twenty years of analysis.

Decryption is identical to encryption, because XORing twice with the same keystream returns the original bits. That symmetry is typical of stream ciphers, and it means Mickey needs no separate decryption routine, which saves even more space on the tiny hardware it was built for.

A dark workbench with a small circuit board and two glowing green chips, a laptop and a notebook beside it
A dark workbench with a small circuit board and two glowing green chips, a laptop and a notebook beside it, shows how Mickey works: two registers clock each other in turn until a keystream emerges, bit by bit.

Comparing Mickey with other stream ciphers

Mickey is one of several stream ciphers, and each was built with a different emphasis. Trivium aims for tiny hardware with three linear registers and nonlinear feedback, Grain targets the same tiny hardware niche with a linear register paired with a nonlinear one, and the RC4 cipher that once ruled the web was fast but turned out to be fragile, while Mickey trades simple clocking for mutual control, and each approach trades something for something else.

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

Aspect Mickey Trivium Grain
Designed for Tiny hardware Tiny hardware Tiny hardware
Key size 80 bits 80 bits 80 bits
Internal state 200 bits 288 bits 160 bits
Clocking Irregular, mutual Regular Regular
Best for Tags and sensors Tags and sensors Tags and sensors

The practical result is that Mickey is the right choice for tiny hardware that values irregular clocking, Trivium suits the same niche with a larger state, and Grain fits the same niche with a smaller state.

Where Mickey is used

Radio tags use it where they use cryptography at all. RFID tags carry tiny chips with almost no spare logic, and a cipher that fits in a few hundred gates can protect the data on the tag without changing its cost or its power budget, which is why Mickey was designed for tags in the first place.

Sensor networks use it in devices that measure and report. A temperature sensor on a pipeline or a soil sensor on a farm has a small battery and a small processor, and it still needs to send its readings without letting anyone nearby listen in or forge false data, which is exactly the job a tiny stream cipher is built for.

Embedded controllers use it to protect firmware updates. A device that receives new software over the air needs to check that the update is genuine, and a small cipher can encrypt the channel or authenticate the payload without demanding a bigger chip, which keeps the device cheap and the update safe.

Researchers use it as a benchmark for new designs. When someone proposes a new lightweight cipher, Mickey is one of the first comparisons they make, because its size and speed are well understood and its security has been tested in public for years, which makes it a useful yardstick for the whole field.

Teaching uses it to show how irregular clocking works. Students can read the whole specification in an afternoon and implement it in a weekend, which is rare for a serious cipher, and that accessibility has made Mickey a favourite example in cryptography courses and in textbooks about lightweight design.

Strengths and limits

The greatest strength of Mickey is its size. A cipher that needs so little hardware can go where other ciphers cannot, and its two-register design is easy to understand, easy to build, and easy to test, which is worth more than cleverness in a field where hidden complexity usually means hidden flaws.

It is also a strength that the design has survived so much scrutiny. Nearly twenty years of published attacks have found only theoretical weaknesses that need unrealistic amounts of data, and the authenticated revisions of the contest era kept the design current for applications that need more than encryption alone.

The limits are real, though, and the biggest is that Mickey is slow in software. Producing one bit per step means encrypting a megabyte takes millions of steps, which is fine on dedicated hardware but wasteful on a general-purpose processor, and that is why nobody uses Mickey to encrypt a hard drive or a video stream.

Mickey checklist

  • Never reuse a key and initialisation vector pair for two messages.
  • Always run the full setup process before using the keystream.
  • Use Mickey on hardware where size matters, not on general software.
  • Generate the initialisation vector randomly for every message.
  • Remember Mickey encrypts but does not authenticate on its own.
  • Add a message authentication code if tampering is a concern.
  • Test the implementation against published test vectors first.
  • Keep the key secret and as random as the 80 bits allow.
  • Consider a modern authenticated cipher if you need more than encryption.

Frequently asked questions

What is Mickey in simple terms?

It is a stream cipher that makes a long pseudo-random keystream from a short key, using two shift registers that take turns telling each other when to move.

Why does Mickey use two registers?

The linear register is fast and cheap, the nonlinear register is hard to predict, and letting each one control the other’s clocking makes the keystream much harder to attack.

What is Mickey 2.0?

It is the revised version of Mickey, published after the first version showed a weakness during the eSTREAM contest, and it is the version that was selected for the hardware portfolio.

How is Mickey different from Trivium?

Both are tiny hardware stream ciphers from the eSTREAM contest, but Mickey clocks its two registers irregularly under each other’s control, while Trivium shifts three registers regularly.

Can Mickey run in software?

It can, but it is slow there, producing one bit per step, so software usually chooses a cipher designed for processors instead.

When should I use Mickey?

When your hardware is tiny, your power budget is small, and you need encryption on a chip where a bigger cipher simply will not fit.

The bottom line

Mickey explained in one line is this: a stream cipher that proves two small registers can do the work of a much larger design, by letting each one decide when the other moves until the result cannot be predicted at all.

It is the quiet partner of Trivium and Grain in lightweight cryptography, and the reason it still matters is that the world keeps adding tiny connected devices, and every one of them needs security that fits.

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

Latest articles

Scroll to Top