Rail
TRANSPOSITION — *rearrange the letters; keep all of them.* The cryptography primitive of *transposition ciphers — changing letter order without changing letter identity.*
Listen along — Rail
Loading audio…
Press play to listen along. The line being read lights up as you go.
Show full transcript
Loading transcript…
Chapter 5 — Rail and the Fence-Pattern Card
Rail stepped to the front of the CipherForge workshop, her small frame radiating an organized energy. She was a cat-tween, her soft grey, cream, and warm russet fur neatly groomed. Her quick, observant eyes scanned the room, taking in every detail, every student, with a practiced gaze. She liked things precisely arranged, a habit visible in her neat attire. A small, folded card, its edges softened by use, peeked from her vest pocket. This was her transposition cipher card, a visual guide to the zig-zagging lines and grids that defined her craft.
“Good morning,” she said, her voice clear and steady. “Today, we’re going to talk about something profoundly different.” She picked up a handful of wooden letter blocks from a nearby tray. “Last week, we explored substitution ciphers. Remember how those worked?”
A few heads nodded in unison. A student named Pip, known for his quick answers, called out, “Like Caesar! Changing ‘A’ to ‘D’ and so on.”
“Exactly,” Rail confirmed, a faint, dry smile touching her lips. “You substitute one letter for another. The letters themselves change identity. This ‘A’ block,” she held it up, “becomes a ‘D’.”
She paused, allowing the previous lesson to settle in their minds. “But what if the letters don’t change?” She tapped the ‘A’ block with a claw. “What if ‘A’ stays ‘A’, and ‘B’ stays ‘B’?”
The students exchanged puzzled glances. “Then it’s not a cipher,” Pip said, sounding genuinely confused. “It’s just… the message.”
Rail’s smile widened slightly. “Not quite. What if we simply rearrange them?”
She took the letter blocks, carefully spelling out a simple word: “SECRET.” S-E-C-R-E-T. Then, with quick, precise movements, she rearranged them into a new sequence: “T-E-C-R-E-S.”
“All the original letters are still here,” she pointed out, gesturing to the jumbled blocks. “Every single one. But their order is entirely new. This, friends, is the fundamental principle of a transposition cipher.”
She pulled out a small, portable whiteboard from beneath the desk. On its surface, two horizontal lines were drawn, resembling a simple diagram. “Imagine these lines are rails on a fence,” she explained. “A rail-fence. We write our message, zig-zagging up and down across these rails.”
She demonstrated with the message “ATTACKATDAWN,” writing it carefully: A. . A. . A. . A. . N . T. C. K. T. D. W .
“Now,” Rail continued, her finger tracing the lines, “to encrypt this message, we read across each rail, row by row.” She pointed to the top line, then the bottom.
“A A A A N,” a student murmured, following her lead. “T C K T D W,” another finished, piecing it together.
Rail wrote the resulting ciphertext on the board: “AAAAN TCKTDW.” She looked expectantly at the students. “Did any letter change its identity during this process?”
“No!” they chorused, a new understanding dawning.
“Precisely,” she affirmed. “The ‘A’s remain ‘A’s. The ‘T’s remain ‘T’s. This fact holds significant implications for how we attempt to break such a code.”
“Think back to substitution ciphers,” Rail urged, her gaze sweeping the room. “If ‘A’ always becomes ‘D’, and ‘E’ always becomes ‘H’, what powerful tool can we use to uncover the original message?”
Pip, ever ready, immediately offered, “Frequency analysis! We count how often each letter appears. ‘E’ is the most common letter in English, so if ‘H’ is the most common in the cipher, ‘H’ is probably ‘E’!”
“Excellent, Pip,” Rail praised. “But with transposition, all the letters retain their original identities. If we count the letters in ‘AAAAN TCKTDW’, we will find the exact same number of A’s, T’s, C’s, K’s, D’s, W’s, and N’s as in the original message. Therefore, frequency analysis fails completely against a pure transposition cipher.”
She let that statement hang in the air. The students murmured, some looking genuinely surprised by this unexpected twist.
“So, how do we attack it then?” a quiet girl named Wren asked, her brow furrowed.
Rail tapped her chin thoughtfully. “We employ what we call anagram and word-pattern attacks. If you have a relatively short ciphertext, you can try rearranging the letters until they form recognizable words. You look for common patterns, like ‘THE’ or ‘AND’, and try to build from there.”
She glanced at her small card, then back at the class. “It’s like having a jumbled pile of stage props. A substitution cipher would transform the props entirely—turn a gleaming sword into a dusty broom. A transposition cipher simply moves the sword to a different, less obvious spot on the stage. The sword itself remains a sword.”
“Another common type of transposition is columnar transposition,” Rail explained. She quickly drew a grid on the whiteboard. “You write the message row by row into this grid, then reorder the columns based on a secret keyword.”
She briefly demonstrated with the message “HELLO WORLD” and a keyword like “KEY,” showing how the columns would be rearranged to create a new, jumbled sequence of letters.
“Again,” she emphasized, “same letters, new order. The identity of each letter is preserved. Only its position within the message changes.”
Rail leaned against the desk, a thoughtful expression on her face. “My family, back in the village, were the stage-arrangers,” she shared. “We set up all the seasonal plays. Every prop, every backdrop, each piece had its exact, designated spot. Move a single chair, and the entire scene’s meaning shifted. A king’s throne placed centrally conveyed power. That same throne, pushed into a dark corner, suggested something else entirely.”
She looked around the room, making eye contact with each student. “That’s what transposition does. It rearranges the elements, and that rearrangement changes the message’s meaning—or, in our case, hides it.”
”
The CipherForge ensemble
Rail is part of CipherForge's distributed-narrative cast. Each character embodies a different curricular primitive; together they teach the full 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)
-
Echo Pair
Playfair digraph cipher (letters encoded in pairs through a 5×5 grid)
-
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.