Serpent Explained: 6 Things About the AES Runner-Up

Serpent explained in plain terms means understanding the cipher that came second in the contest to choose AES, and that its designers still consider the safer choice. The central question is whether losing that contest means Serpent is a worse cipher, and the answer is no, it means the judges preferred speed, and Serpent preferred safety, and those are different goals.

Serpent was designed by Ross Anderson, Eli Biham, and Lars Knudsen, published in 1998, and built with twice as many rounds as its designers thought necessary, on purpose. Six things set it apart, and each one is worth knowing, because together they explain why a cipher that lost still has defenders twenty-five years later.

This article works through all six, explains what Serpent is, how it works, and where it hides today.

Key takeaways

  • Serpent is a 128-bit block cipher that reached the AES finals in 2000.
  • It uses 32 rounds, twice as many as its designers thought necessary.
  • It is a substitution-permutation network, not a Feistel cipher.
  • It has never been practically broken in over twenty-five years.
  • It still ships in VeraCrypt and other disk-encryption tools.

What Serpent is

First, the contest. Serpent was one of five finalists in the competition to choose the Advanced Encryption Standard, and it finished second to Rijndael, the design that became AES. The judges praised its security and criticised its speed, and the decision came down to practicality: Rijndael was faster on the hardware of the day, and that mattered more than Serpent’s larger safety margin.

Second, the rounds. Serpent runs 32 rounds, which is more than any other AES finalist, and the number was chosen deliberately: the designers believed 16 rounds would be enough, so they doubled it, on the principle that a cipher should have far more security than anyone can currently break. That margin is the heart of the design, and it is why Serpent has aged so well.

Third, the structure. Serpent is a substitution-permutation network, which means each round passes the block through substitution boxes and then mixes the result with a linear transformation, without splitting the block in half the way a Feistel cipher does. The structure is simple and regular, which makes it easy to analyse, and the analysis is what the designers wanted: a cipher whose security could be argued cleanly.

Fourth, the bitslice design. Serpent was designed to be implemented as bitsliced code, where the processor handles many blocks in parallel by treating them as arrays of bits, and that trick makes it fast in software despite the 32 rounds. On a modern processor, a bitsliced Serpent can encrypt several blocks at once, which closes much of the speed gap with AES.

Fifth, the key schedule. Serpent accepts keys of 128, 192, or 256 bits, and expands them into 33 subkeys, one for each round plus one for the final whitening step. The schedule is simple and fast, and it was designed so that related-key attacks, which had troubled earlier ciphers, would not apply.

Sixth, the record. In over twenty-five years, no practical attack has been found against the full 32-round Serpent, and the best known attacks work only on versions with far fewer rounds. That is a remarkable record for a cipher of its age, and it is the reason its designers still defend the choice to trade speed for margin.

Our guide to AES encryption explains the cipher that won the contest Serpent entered, and our guide to Twofish explains another finalist from the same competition.

How Serpent works

Everything starts with the key schedule, which expands the key into 33 subkeys of 128 bits each. The schedule runs the key through the cipher’s own substitution boxes in a simple pattern, which means the key expansion is as strong as the cipher itself, and the subkeys are ready before the first round begins.

Encryption runs 32 rounds of substitution and mixing. Each round takes the 128-bit block, exclusive-ors it with a round subkey, passes it through 32 copies of a four-bit substitution box, and then mixes the result with a linear transformation that spreads every input bit across the output. The substitution boxes change from round to round, cycling through eight different boxes, which keeps the pattern from repeating.

The linear transformation is where the design shines. It is a carefully chosen bit-mixing step that guarantees every output bit depends on many input bits after only a few rounds, which is what makes the cipher resist differential cryptanalysis, the attack that broke many of its predecessors. The transformation is simple to compute and cheap in both hardware and software.

After the thirty-second round, a final whitening step is applied. The block is exclusive-ored with the last subkey, and the result is the ciphertext, with no final substitution, which is a deliberate choice: the last round’s mixing has already done the work, and the whitening simply hides the output of the final substitution.

Decryption is the same network run backwards. The inverse substitution boxes and the inverse linear transformation undo each round in reverse order, with the subkeys applied in reverse, which means one implementation serves both directions, and the key schedule is the only part that changes.

A dark office desk with a brass padlock glowing green under a lamp, a ring of keys beside it
A dark office desk with a brass padlock glowing green under a lamp, a ring of keys beside it, shows how Serpent works: thirty-two rounds of mixing, twice as many as needed, because a lock should be far stronger than anyone can currently break.

Comparing Serpent with other block ciphers

Serpent is one of several block ciphers a designer can choose, and each was built with a different emphasis. AES is the standard, fast everywhere and analysed by everyone, Twofish is the free alternative with key-dependent tables, and Blowfish is the older sibling with 64-bit blocks, and each approach trades speed for assurance in a different way.

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

Aspect Serpent AES Twofish
Block size 128 bits 128 bits 128 bits
Rounds 32 10, 12, or 14 16
Structure Substitution-permutation Substitution-permutation Feistel
Hardware support None Built into CPUs None
Best for Maximum safety margin Everything Niche and legacy use

The practical result is that Serpent is the right choice where the largest safety margin matters, AES suits everything else, and Twofish fits only niche cases where a second cipher is wanted.

Where Serpent is used

Disk encryption tools are its most visible home. VeraCrypt, the successor to TrueCrypt, offers Serpent as one of its ciphers, and users who want the largest safety margin choose it for their encrypted volumes, accepting slower speed in exchange for thirty-two rounds of conservative design.

Open-source projects use it where choice matters. Because Serpent is unpatented and its reference code is public, projects that must be certain about intellectual property choose it, and the freedom from licensing is worth more than the speed AES would offer.

Legacy systems keep it running. Software written in the early 2000s that chose Serpent before AES was standardised still uses it today, and the cipher’s stability means those systems have never needed to change, which is a quiet endorsement of the design.

Password managers and backup tools have used it as an alternative cipher. Some tools offer Serpent alongside AES so that users can choose, and the existence of the choice is itself a security argument: a system that supports two ciphers is harder to break than one that depends on a single algorithm.

Teaching is its quietest use. Serpent is the standard example in courses of a cipher designed for safety margin rather than speed, and students who implement it learn more about cipher design than they would from the simpler, more regular structure of AES.

Strengths and limits

The greatest strength of Serpent is its safety margin. Thirty-two rounds, twice as many as its designers believed necessary, means that even if cryptanalysis improves dramatically, the cipher has room to absorb it, and that margin is the reason it has never been broken.

It is also a strength that it is free. No patents, no licences, no royalties, and public reference code mean that Serpent can be used anywhere, by anyone, for any purpose, which is a freedom that matters more than it might seem in a field where licensing has killed good designs before.

The limits are real, though, and the biggest is speed. Thirty-two rounds take time, and modern processors accelerate AES in silicon, which makes Serpent slower on the platforms where speed matters most. It is also less studied than AES, which means less confidence, even if the record so far is clean.

Serpent checklist

  • Use AES as the default; choose Serpent only with a reason.
  • Prefer it where the largest safety margin matters most.
  • Use a 256-bit key for maximum security margin.
  • Pair it with an authenticated mode; Serpent alone gives no tamper evidence.
  • Do not use it for new high-performance systems; AES is faster.
  • Keep the implementation reviewed; use a well-known library.
  • Remember it has no hardware acceleration on modern CPUs.
  • Consider it for encrypted volumes alongside AES.
  • Revisit the choice yearly; the field moves on even when ciphers do not.

Frequently asked questions

What is Serpent in simple terms?

It is a free block cipher that reached the finals of the AES competition in 2000, built on a substitution-permutation network with 32 rounds, twice as many as its designers thought necessary.

Why did Serpent lose to AES?

Because Rijndael, the winner, was faster on the hardware of the day. The judges praised Serpent’s security, but speed mattered more than the extra safety margin, and Rijndael won on practicality.

Is Serpent still secure?

Yes. In over twenty-five years, no practical attack has been found, and the best known attacks work only on versions with far fewer rounds than the full cipher uses.

What is bitslicing?

It is a technique that treats many blocks as arrays of bits and processes them in parallel, which lets Serpent encrypt several blocks at once and closes much of its speed gap with AES.

When should I use Serpent?

When you want the largest safety margin available, when you need a second cipher alongside AES, or when maintaining a legacy system that already uses it.

Should new projects choose Serpent over AES?

Almost never. AES is faster, better studied, and hardware-accelerated, and it is the right default. Serpent is the right answer only when a specific reason points to it.

The bottom line

Serpent explained in one line is this: the cipher that came second in the most important contest in cryptography, and stayed unbroken for a quarter of a century afterwards, because it was built with twice the rounds it needed.

It is the cautious, conservative, overlooked alternative to AES, and the reason it still deserves attention is that a safety margin is worth more than speed when the cipher guards something irreplaceable.

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

Latest articles

Scroll to Top