Anubis Explained: The Involution Cipher From Egypt’s God

Anubis explained in plain terms means understanding a cipher that reads the same forwards and backwards, a design where encryption and decryption are the same operation wearing different keys. The central question is why anyone would build a cipher that works in both directions, and the answer is that it halves the work of building one, and halves the places where a mistake can hide.

Anubis is a block cipher designed by Vincent Rijmen and Paulo Barreto and submitted to the European NESSIE project in 2000. It encrypts 128-bit blocks with keys from 128 to 320 bits, runs for 12 rounds with a 128-bit key and more with longer keys, and it is built as an involution, which means the same structure encrypts and decrypts.

This article explains what Anubis is, how it works, and where it already runs.

Key takeaways

  • Anubis is a block cipher designed by Rijmen and Barreto in 2000.
  • It encrypts 128-bit blocks with keys from 128 to 320 bits.
  • It is an involution, so encryption and decryption share one design.
  • It runs for 12 rounds with a 128-bit key, more with longer keys.
  • It was submitted to the European NESSIE project.

What Anubis is

Anubis is a cipher that encrypts data in 128-bit blocks using a substitution-permutation network, passing the block through layers of substitution, mixing, and key addition. Each round substitutes every byte through an S-box, mixes the bytes together with a linear transformation, and adds a round key, and the layers repeat until the block has been transformed beyond recognition.

Its signature feature is the involution, the property that makes encryption and decryption the same operation. In Anubis, every layer is its own inverse, so running the cipher backwards with the round keys in reverse order decrypts the message, which means a device needs only one implementation for both directions, and that saves space on small hardware.

The design was a reaction to the needs of constrained devices. Smart cards and embedded chips have little room for code, and a cipher that needs two implementations, one to encrypt and one to decrypt, costs twice the space, so Rijmen and Barreto built Anubis as an involution to fit those devices, and the same idea had already shaped Rijndael, which Rijmen had co-designed.

It became one of the best-known submissions to NESSIE, the European project that searched for new cryptographic standards after the AES contest. Anubis was not selected, but it was studied closely and praised for its elegance, and its involution design influenced later ciphers that took code size as seriously as raw strength.

Its most famous property is the name. Anubis is the Egyptian god of the dead, the jackal-headed guardian who weighs souls, and the name fits a cipher that weighs data in both directions, and it has stuck through two decades of study, which is a reminder that cryptographers still enjoy a name with a story behind it.

Our guide to Camellia explains Japan’s national block cipher, and our guide to Serpent explains another cipher built for careful analysis.

How Anubis works

Everything starts with the key schedule, which expands the master key into the round keys each round needs. The key is stretched through a series of operations that produce a different round key for every round, and the schedule is designed so that the round keys look random even when the master key is simple, which stops an attacker from working backwards from the round keys to the key.

Each round begins with substitution, passing every byte of the block through the S-box. The S-box is built from mathematical operations rather than from an arbitrary table, which means its properties can be analysed and proven, and because every byte passes through the same box, a small change in the input spreads quickly through the whole block.

The linear transformation is what makes the round work as a whole. After substitution, the bytes are mixed together with a transformation based on maximum distance separable codes, so that a change in one byte affects many others, and because the transformation is applied in every round, a single changed bit spreads across the whole block within a couple of rounds.

The key addition step mixes the round key into the state. The block is XORed with the round key, which means the key influences the data in every round, and because the round keys change from round to round, the cipher’s behaviour evolves as the rounds progress rather than repeating itself.

The involution property comes from choosing every layer to be its own inverse. The S-box, the linear transformation, and the key addition are all designed so that applying them twice returns the original data, which means decryption is simply encryption run backwards with the round keys reversed, and that symmetry is the design’s defining achievement.

Decryption runs the same rounds in reverse, starting with the final round key and working backwards through the rounds. The receiver applies the same operations in the opposite order, and the plaintext comes back out, which means the same small code can encrypt and decrypt without a second implementation, and that saves space on small devices.

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 Anubis works: bytes take turns through substitution and mixing, round after round, until the block is transformed in either direction.

Comparing Anubis with other involution ciphers

Anubis is one of several ciphers built around involutions, and each was built with a different emphasis. Rijndael is the AES standard whose decryption mirrors its encryption, Serpent is the conservative design with 32 rounds and a wide safety margin, and Anubis is the pure involution built to make both directions identical, while each approach trades something for something else.

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

Aspect Anubis Rijndael Serpent
Block size 128 bits 128 bits 128 bits
Key size 128 to 320 bits 128 to 256 bits 128 to 256 bits
Rounds 12 to 18 10 to 14 32
Involution Full Partial No
Best for Small devices General use High assurance

The practical result is that Anubis is the right choice for small devices, Rijndael suits general use everywhere else, and Serpent fits high assurance instead.

Where Anubis is used

Research uses it as a case study in involution design. Cryptographers still cite Anubis when they discuss ciphers that encrypt and decrypt with the same code, because it is the clearest example of a full involution in a serious cipher, and that lesson shapes how new lightweight ciphers are judged today.

Teaching uses it to show how substitution-permutation networks work. Anubis is clean enough to explain in a lecture and well documented enough to implement in an afternoon, which makes it a favourite example in cryptography courses that cover the ciphers of the NESSIE era and the design ideas that shaped them.

Benchmarks use it to measure involution designs. When someone builds a new library or a new piece of hardware, Anubis is one of the designs they test, because its involution exercises different parts of a processor than one-way ciphers do, and a platform that runs Anubis well is likely to run most ciphers well.

Implementation research uses it to study code size. Because Anubis needs only one implementation for both directions, it is a useful test case for measuring how small a cipher can be, and researchers use it to compare the cost of encryption and decryption on devices where every byte of code matters.

Standards history uses it to mark the NESSIE era. Anubis was part of the European search for new standards that followed the AES contest, and it represents the involution path that search explored, which means historians of the field return to it whenever they ask what European cryptography might have looked like.

Strengths and limits

The greatest strength of Anubis is its involution. A cipher that encrypts and decrypts with the same code halves the implementation cost, which matters on smart cards and embedded chips, and that economy is worth more than cleverness in a field where code size is a real constraint.

It is also a strength that the design is mathematically grounded. An S-box built from operations rather than from an arbitrary table can be analysed with proofs rather than with guesswork, and that grounding gives reviewers a confidence that arbitrary tables cannot, which is why the design earned respect even from its critics.

The limits are real, though, and the biggest is adoption. Anubis was not selected by NESSIE and never found a large deployment, which means smaller communities of implementers, fewer independent reviews in recent years, and less tooling than global ciphers enjoy, and a system that must interoperate will usually choose AES instead.

Anubis checklist

  • Use Anubis for study and research, not for new systems.
  • Remember it is an involution, so one code path does both directions.
  • Study its layers to understand substitution-permutation design.
  • Compare it with Rijndael to see the involution trade-off.
  • Note its 12 to 18 rounds when benchmarking.
  • Test against published test vectors before trusting any implementation.
  • Keep keys random and protect them as carefully as with any cipher.
  • Use a proper mode of operation, never raw block encryption.
  • Choose AES for any system that needs real protection today.

Frequently asked questions

What is Anubis in simple terms?

It is a block cipher that encrypts 128-bit blocks with keys up to 320 bits, built as an involution, so the same design encrypts and decrypts.

What is an involution?

It is an operation that is its own inverse, so applying it twice returns the original data, which means a cipher built from involutions decrypts by running encryption backwards.

How is Anubis different from Rijndael?

Both are substitution-permutation ciphers, but Anubis is a full involution with the same code for both directions, while Rijndael only partly mirrors its decryption.

Is Anubis still secure?

No practical attack against the full cipher has been published, but it was never standardised, so it is studied as research rather than used for new systems.

Why is it named Anubis?

After the Egyptian god of the dead, a fitting name for a cipher that weighs data in both directions, chosen by designers who enjoyed a name with a story.

When should I use Anubis?

When you study involution design, when you research code size on small devices, or when you want a cipher elegant enough to teach in a lecture.

The bottom line

Anubis explained in one line is this: the cipher that reads both ways, a 128-bit design from Rijmen and Barreto that proved encryption and decryption could share a single soul.

It is proof that elegance is a design goal, and the reason it still matters is that every small device built since has been judged partly by the lesson Anubis taught.

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

Latest articles

Scroll to Top