Alice, Bob, Eve, and Mallory in Cryptography

What These Placeholder Names Mean in Security Examples
Alice, Bob, Eve, Mallory, and Trudy are placeholder names used in cryptography, networking, and security examples. This post explains what each role means, where the naming convention came from, and why these names still make complex security ideas easier to follow.
Alice Bob Eve Mallory and other cryptography placeholder names

Alice, Bob, Eve, Mallory, and Trudy are placeholder names used in cryptography, networking, and security examples. They make technical scenarios easier to explain because each name usually represents a role: Alice sends a message, Bob receives it, Eve listens, Mallory attacks, and Trudy intrudes.

If you have searched for “Alice Bob Mallory” or “Alice Bob Eve”, you are usually looking at the cast of characters used to explain secure communication. The names are not random. They give security examples a shared language.

What Do Alice and Bob Mean?

Alice and Bob are the standard names for two parties communicating in a technical example. Alice is often the sender or initiator. Bob is often the receiver or intended participant.

The convention became well known through cryptography writing, especially explanations of public-key cryptography. Instead of saying “user A sends a message to user B”, authors can say “Alice sends a message to Bob.” That small change makes the example easier to read.

Who Are Eve, Mallory, and Trudy?

Eve, Mallory, and Trudy usually represent threats around Alice and Bob’s communication.

NameUsual roleWhat it means in a security example
AliceSender or first participantThe person or system starting the communication
BobReceiver or second participantThe intended recipient or communication partner
EveEavesdropperA passive listener who can observe messages
MalloryMalicious attackerAn active attacker who may modify, block, or impersonate messages
TrudyIntruderSomeone trying to break into or interfere with the system
TrentTrusted third partyA trusted service such as a certificate authority
PeggyProverA party trying to prove a claim
VictorVerifierA party checking whether the claim is true

So, in the common Alice, Bob, and Trudy examples, Trudy is usually the intruder. In Alice, Bob, and Eve examples, Eve is usually the eavesdropper. In Alice, Bob, and Mallory examples, Mallory is usually the active attacker.

Alice Bob Eve Mallory: A Simple Example

Imagine Alice wants to send Bob a private message.

  1. Alice writes the message.
  2. Bob is the intended reader.
  3. Eve can see that messages are moving but should not be able to read the private content.
  4. Mallory tries to change the message or pretend to be Bob.
  5. Trudy tries to break into the system around the communication.

This simple cast helps explain encryption, authentication, digital signatures, man-in-the-middle attacks, and trust models without inventing new names in every example.

Where Did Alice and Bob Come From?

The Alice and Bob naming convention became popular in cryptography because it made formal communication examples easier to follow. A common historical reference is the 1978 RSA paper by Rivest, Shamir, and Adleman, which used Alice and Bob to describe secure communication between two parties.

The pattern stayed because it is practical. Readers can track the story quickly: Alice sends, Bob receives, Eve listens, Mallory attacks, and Trent is trusted.

Why Security Examples Use These Names

Security writing can become abstract very quickly. Placeholder names keep the scenario readable.

  • They make roles memorable. Eve sounds like eavesdropper, and Mallory suggests malicious behavior.
  • They reduce clutter. A short name is easier to follow than repeated labels like “the sender” and “the receiver.”
  • They work across examples. The same cast can explain encryption, identity, certificates, and protocol attacks.
  • They avoid real identities. The example stays neutral and does not imply a real person or company.

These names are useful because they turn security diagrams into small stories. The story is not the point, but it helps the technical idea stick.

How This Differs From Foo, Bar, and Baz

Alice and Bob are usually used when a technical example needs people, systems, or communication roles. Foo, bar, and baz are more common when a programming example needs generic variables, functions, or objects.

I covered that related convention in What Foo Bar Baz Means in Programming.

Conclusion

Alice, Bob, Eve, Mallory, and Trudy are part of the shared language of cryptography and security. They help explain who is communicating, who is listening, who is attacking, and who is trusted.

The next time you see Alice sending Bob a message while Eve listens or Mallory interferes, read the names as roles. They are a compact way to explain security behavior without burying the reader in abstract labels.


Work Behind The Writing

This article comes from real-world AI and DevOps engineering work.

If the thinking here is useful, explore the projects behind it or get in touch about a similar technical problem.
comments powered by Disqus