アート
美容とウェルネス
工芸
文化と歴史
エンターテインメント
環境
食品と飲料
リバースエンジニアリング
科学
スポーツ
テクノロジー
ウェアラブル
Rail Fence Cipher
Pixel

作成者

Pixel

21. 8月 2026FI
0
0
0
0
0

Rail Fence Cipher

Every other cipher in this catalogue REPLACES letters. This one keeps all of them and simply changes the order. Write the message diagonally down and up across an imaginary set of rails, then read off each rail in turn — the letters are unchanged but scattered. That difference matters more than it sounds: a frequency count of the ciphertext matches ordinary English exactly, so the counting attack that opens substitution ciphers gives nothing at all. The weakness lies elsewhere. With only a handful of plausible rail counts, an analyst simply tries each in turn. Transposition is ancient, and the Spartan scytale worked the same way with a strip of leather wound round a rod.
初心者
45 minutes

手順

1

Write the message on rails

The zigzag is the entire mechanism.

  1. Rule three horizontal lines on your paper — the rails.
  2. Write your message one letter per column, moving diagonally down to the bottom rail, then back up to the top, and so on.
  3. Read each rail left to right, top rail first, to get the ciphertext.
Use graph paper and keep one letter per square. The commonest mistake is drifting out of column alignment, which corrupts the message in a way that is tedious to find later.

このステップの材料:

Graph PaperGraph Paper1 pad
Graphite Pencil SetGraphite Pencil Set1 セット
2

Decipher it — the harder direction

You must rebuild the fence before you can read it.

  1. Count the ciphertext letters and mark out the zigzag pattern for your rail count.
  2. Count how many letters fall on each rail.
  3. Fill the rails IN ORDER with that many letters each.
  4. Read the message off by following the zigzag.
Deciphering needs the letter counts per rail worked out first, which is why transposition ciphers feel lopsided in use — enciphering is trivial, deciphering is bookkeeping. That asymmetry is a genuine operational cost in the field.
3

Show that frequency counting fails completely

The direct comparison against the substitution family.

  1. Encipher a long passage on the rails and tally letter frequencies.
  2. Tally the frequencies of the ORIGINAL passage.
  3. Compare the two charts.
They are identical, because not a single letter was changed. The counting method that opens a Caesar or a Vigenère has nothing to work on. This is why serious cipher systems later combined BOTH operations — substitute to break the frequencies, transpose to break the patterns — rather than choosing between them.

このステップの材料:

Cardstock Assorted Pack (50 Sheets)Cardstock Assorted Pack (50 Sheets)1 パック
4

Find its actual limit

State the boundary honestly by walking into it.

  1. Hand a friend a rail-fence ciphertext WITHOUT telling them the rail count.
  2. Have them try 2 rails, then 3, then 4, and so on.
  3. Record how many tries it took.
The message falls out within a few attempts, because the rail count is the only secret and a long message cannot use many rails. The key space is tiny — that is the limit, and it is a property of the key, not of transposition itself. Columnar transposition with a keyword has a vastly larger key space using the same underlying idea.
5

History and context

Transposition is one of the two fundamental operations in classical cryptography, alongside substitution. The Spartan scytale, described by Plutarch, is the oldest form: a strip of parchment wound round a rod of a particular diameter, written across the turns, then unwound so the letters read as nonsense until re-wound on a rod of matching thickness. The rod's diameter is the key, and the mechanism is a transposition.

The rail fence appears in the American Civil War, used by both sides for short field messages precisely because it needs nothing but paper and can be taught in a minute. Its region of use is the same as the Playfair's: messages whose value expires before an analyst can get round to them.

Why it matters far beyond its own strength: the two operations combine. Substitution flattens the letter frequencies; transposition destroys the letter adjacencies. Modern block ciphers still do both, many times over — the substitution-permutation network at the heart of AES is exactly this pairing, iterated. Understanding why a frequency count fails here is understanding why that pairing was worth building.

An honest comparison: against the ciphers in this catalogue, the rail fence is the weakest by key space and the strongest against frequency analysis. That combination is the useful lesson — a method's weaknesses and strengths sit on different axes, and comparing two approaches on one axis alone will mislead you.

材料

3

関連ブループリント

これらのブループリントは知識を共有しています — 技術、材料、原理

CC0 パブリックドメイン

このブループリントはCC0で公開されています。許可を求めずに、自由にコピー、修正、配布、あらゆる目的で使用できます。

メイカーを応援するには、ブループリント経由で製品を購入してください。メイカーには メイカーコミッション がベンダーにより設定されています。または、このブループリントの新しいイテレーションを作成し、自分のブループリントにコネクションとして含めて収益を共有できます。

ディスカッション

(0)

ログイン してディスカッションに参加

コメントを読み込み中...