Echo Pair
PLAYFAIR DIGRAPH CIPHER
Loading audio…
Press play to listen along. The line being read lights up as you go.
Show full transcript
Loading transcript…
Echo Pair moved like a single, flickering shadow across the CipherForge training hall. They were two small swallows, their feathers a blur of grey and white. Quick-eyed and quick-winged, they zipped between students, a flash of motion. Between them, held carefully in tiny claws, was their signature: a small, folded 5x5 grid card. It was handmade, covered in a neat grid of letters. This card was always with them, a constant reminder of their purpose.
They were Echo Pair, and they embodied the Playfair cipher.
Today, they hovered near a group of younger recruits, who were wrestling with a message encrypted by a Caesar shift. The recruits squinted at their frequency charts, counting every 'E' and 'T'. One boy, Pip, sighed loudly. "It's too easy," he muttered. "Once you find one letter, the rest just fall into place."
"That's the point of Caesar," one of the Echo Pair chirped, their voices perfectly synchronized. "It’s a good start."
"But what if you don't want them to fall into place?" Pip asked, looking up. "What if you want to hide the letters better?"
The other twin dipped its head. "Then you stop thinking about single letters," it said. "You start thinking in pairs."
"Letters travel in pairs," both birds announced, a clear, ringing chorus. They landed lightly on Pip's desk, unfolding their grid card. It showed a 5x5 square, twenty-five cells in all. The letters of the alphabet filled it, but not in order.
"We call this a keyword-grid," one twin explained, pointing a tiny claw. "First, you pick a secret word. Let's say... 'SWALLOW'."
"You write that word into the grid first," the other continued, "leaving out any repeated letters. S-W-A-L-O-W. See? The second 'W' is skipped."
Pip watched as the twins, using invisible ink only they could see, seemed to fill in the grid on his own blank paper.
"Then," the first twin added, "you fill the rest of the grid with the remaining letters of the alphabet, in order."
"Except for I and J," the second chimed in. "They share a cell. That way, all twenty-six letters fit into twenty-five spaces."
Pip leaned closer. "Okay, I get the grid. But how does it hide letters better?"
"It's all about how you split your message," Echo Pair said together. "You take your message, your plaintext, and you break it into two-letter chunks. These are called digraphs."
"Like 'H-E' or 'L-L'?" Pip asked.
"Exactly," one twin confirmed. "But there's a trick. If a pair has two of the same letter, like 'L-L', you add an 'X' in between. So 'L-X-L'. And if your message ends with a single letter, you add an 'X' to make a pair there too."
The first twin hopped to a blank spot on Pip's paper. "Let's try 'HELLO'."
The second twin quickly demonstrated. "H-E... L-L becomes L-X... L-O."
"So the message 'HELLO' becomes 'HE LX LO'?" Pip clarified.
"Precisely," Echo Pair affirmed. "Now, for each pair, we use three simple rules, based on our grid."
They pointed to their own grid card, their tiny claws tracing paths.
"Rule one: SAME ROW," one twin began. "If your two letters are in the same row on the grid, each letter shifts one space to the right. If you hit the end of the row, you wrap around to the beginning."
"Rule two: SAME COLUMN," the other added. "If your letters are in the same column, each letter shifts one space down. Wrap around from the bottom to the top."
"Rule three: RECTANGLE," they finished in unison, their voices soft but firm. "This is the most common. If your letters form a rectangle on the grid, each letter takes the letter in its own row but the other column."
Pip looked confused. "Can you show me?"
Echo Pair nodded. "Let's encrypt 'HE' using our 'SWALLOW' grid." They quickly showed him where 'H' and 'E' would be on their example grid. "They form a rectangle. So 'H' becomes the letter in its row, but 'E's column. And 'E' becomes the letter in its row, but 'H's column."
They demonstrated the resulting ciphertext letters. "See? 'HE' became 'BM'."
"Now, let's try 'LL' from 'HELLO'," the first twin said. "Remember, it became 'LX'." They showed where 'L' and 'X' were on the grid. "Another rectangle. 'L' becomes 'O', and 'X' becomes 'P'."
"So 'LX' becomes 'OP'," the second twin concluded.
"And 'LO'?" Pip asked, getting into it.
"Also a rectangle," Echo Pair confirmed. "It becomes 'AN'."
"So 'HELLO' encrypted with Playfair is 'BM OP AN'?" Pip whispered, a light dawning in his eyes. He quickly wrote it down. "That's... that's much harder to break than Caesar!"
"It is," one twin agreed. "Because the same letter, like 'L' in 'HELLO', can become different ciphertext letters depending on its partner. The first 'L' became 'O', but if it had a different partner, it would be something else."
"This means single-letter frequency analysis won't work," the other twin explained, their tone almost triumphant. "You can't just count the 'B's and guess it's an 'E'."
"It introduces the first meaningful resistance to basic frequency attacks," the first twin added, using a slightly more formal phrase. "It's stronger than a monoalphabetic cipher."
Pip nodded slowly. "But... could someone still break it?"
Echo Pair exchanged a glance, a silent communication passing between them. "Yes," they said, their voices a little softer now. "Every cipher level adds a new dimension. But each level is still breakable by a new attack."
"For Playfair," the first twin continued, "people look for common two-letter patterns, or digraph frequencies. Like 'TH' or 'HE' in English. It's harder, but not impossible."
"Our family has always been the village's pair-tradition keepers," one twin shared, a hint of ancient history in its voice. "We come from a twin-bird village. We always traveled in pairs to deliver messages between villages."
"Each one verifying the other's accuracy," the second finished. "Together is the rule. Apart, we're meaningless. Together, we encode pairs through the grid."
They recalled the day Cypher had appointed them. "What is the Playfair cipher?" Cypher had asked.
"Letters in pairs. Grid-based rules. Same row, same column, rectangle. Together is the rule," they had answered, a perfect chorus.
"You are appointed," Cypher had said.
Now, they looked at Pip, who was eagerly trying to encrypt his own name. "It is not hard," Echo Pair said. "It is pairs + grid + three rules. Together is the rule." They watched Pip, knowing he had taken his first step into a deeper world of secrets.
Hear it as an audio drama
A short play starring Echo Pair, from CipherForge. Different voices, same idea. Listen any time after you read.
Loading audio…
Read the drama script
- Narrator: From Spark and Anvil and CipherForge — this is Echo Pair, in chapter 1 of the CipherForge cast.
- Narrator: This drama uses an AI-generated voice. Voiced via Gemini 2.5.
- Narrator: Echo Pair are two small swallows, a flickering shadow. Between their claws, they hold a small 5x5 grid-card.
- Echo Pair: We are Echo Pair. To hide letters better, you must stop thinking about single letters and start thinking in pairs.
- Narrator: The Playfair cipher encodes letters in pairs, called digraphs, using a 5x5 grid arranged with a secret keyword.
- Echo Pair: First, break your message into two-letter chunks. If a pair has two of the same letter, you must add an 'X' between them.
- Echo Pair: Now, for each pair, we use three simple rules, based on their position in our shared grid.
- Echo Pair: Rule one: SAME ROW. If your letters share a row, each shifts one space to the right, wrapping around if needed.
- Echo Pair: Rule two: SAME COLUMN. If your letters share a column, each shifts one space down, wrapping around to the top.
- Echo Pair: Rule three: RECTANGLE. If they form a rectangle, each letter swaps to take the letter in its own row, but the other’s column.
- Narrator: They come from a twin-bird village, a family of messengers. They always traveled in pairs, one verifying the other's accuracy.
- Echo Pair: For us, together is the rule. Apart, we are meaningless. Together, we encode pairs through our shared grid.
- Narrator: When they arrived at the academy, the mentor Cypher asked them just one question about their idea.
- Echo Pair: Letters in pairs. Grid-based rules. Same row, same column, rectangle. Together is the rule.
- Narrator: It is pairs, a grid, and three rules. This resists simple frequency attacks, because the same letter can become different things.
- Narrator: You've been listening to a Spark and Anvil chapter, written by the Spark and Anvil writing team for ages 9 to 14.
- Narrator: Apps stay free forever.
- Narrator: Curriculum aligned to Computer Science Teachers Association standards.
- Narrator: Released under Creative Commons BY-NC-SA 4.0 for educational reuse. Visit Spark and Anvil for the full transcript.
The CipherForge ensemble
Echo Pair is one of the friends in CipherForge. Each friend shows you one idea by how they act; meet them all and you have the whole subject.
-
Caesar
Caesar shift / monoalphabetic shift cipher
-
Mask
Atbash + general monoalphabetic substitution (every letter has a fixed substitute)
-
Vigenère
Vigenère / polyalphabetic keyword cipher (the Caesar-on-a-rotating-keyword pattern)
-
Rail
Rail-fence + columnar transposition ciphers (rearrange letter order without changing the letters themselves)
-
Tally
Number-based codes (A1Z26, ASCII, binary, book ciphers — any mapping that converts letters to numbers)
-
Sift
Frequency analysis + cryptanalysis-by-statistics (the cipher-breaking method, not a cipher itself)
-
Lattice
Modern cryptography fundamentals — XOR, public-key concept, hashing (the irreversible / asymmetric family)
-
Hollow
Hides a secret message inside something ordinary, so nobody even knows there is a message to look for.
-
Tome
Keeps a shared code-book where whole words stand for secret words, so only someone with the same book can read the note.