Introduction to Security · Cryptography and Network Security

Transposition Techniques

Watch lectures

Transposition Techniques

1. Transposition = Move Letters, Keep Identity

A transposition (permutation) cipher reorders plaintext symbols; every letter keeps its identity, only positions change. Formally C=π(P)C = \pi(P) for a permutation π\pi of block positions; decrypt with π−1\pi^{-1}. Frequency analysis (Topic 7's killer) fails — letter counts are identical — but anagramming and position statistics break it.

Substitution:  H E L L O → K H O O R  (letters change, positions same)
Transposition: H E L L O → O L L E H  (letters same, positions change)

2. Rail Fence and Row–Column Ciphers

Rail fence (depth 2): write zigzag on 2 rails, read row by row. "MEET ME AFTER THE TOGA PARTY" (strip spaces: MEETMEAFTERTHETOGAPARTY): rail 1 = MEMATRHTGPY? Standard textbook example with depth 2 gives ciphertext "MEMATRHTGPRYETEFETEOAAT". Decrypt: split into halves, interleave. Depth 3+ strengthens slightly; still hand-breakable.

Row transposition: write row-wise into rectangle of width = key length, read column-wise in key order. Key 3415234152 (width 5), P=P = "ATTACK POSTPONED UNTIL TWO AM" padded with X:

Key order: 3 4 1 5 2
Row 1:      A T T A C
Row 2:      K P O S T
...
Read col 3 first, then col 4, ... → "TTNAAPTMTSUOAODWCOIXPETZQ" style output

Numeric-check habit: count letters — transposition never changes length or multiset, so length mismatch means dropped padding.

3. Double Transposition and Keyed Variants

Single columnar transposition falls to anagramming (try column orders against English digram scores). Double transposition (two passes with different keys, e.g. K1=4312K_1 = 4312, K2=2413K_2 = 2413) was a field-grade WWII cipher (US Army, VIC) — hand cryptanalysis needs ~1000+ letters. Modern view: transposition alone gives diffusion without confusion (Shannon terms — Module 2 Topic 7): spreads plaintext influence but adds no substitution complexity. DES/AES therefore pair transposition-like permutations (DES IP, AES ShiftRows) with S-box substitution every round.

Keyed columnar details for exams: key word e.g. HACK (alphabetical order 2,1,3,42,1,3,4 → read col 2 first); Myszkowski variant handles repeated key letters with unique numbering; padding with nulls (Q, X, Z) must be stripped on decrypt — forgetting padding is the classic numerical error.

4. Recognizing and Breaking Transpositions

  • Ciphertext letter frequencies ≈ English → substitution unlikely, suspect transposition.
  • Length = plaintext length (no expansion); double letters ("EE") survive as digrams — in substitution they'd map to one symbol pair too, but positions of high-frequency E's scatter.
  • Break: guess period (rectangle width) via Index of Coincidence per column, then anagram columns greedily.

Exam Points

  • Definition C=π(P)C = \pi(P) + substitution-vs-transposition contrast line — 2-mark opener.
  • Rail-fence zigzag trace and keyed column read-order numerical — standard 5-marker.
  • Double transposition as diffusion-only; link to Shannon confusion/diffusion.
  • Padding/width bookkeeping; frequency-unchanged recognition test.
Free AppAndroid App

Coursify Android App

Generate AI courses, take quick quizzes between classes, and master complex engineering concepts on the go.

← All Cryptography and Network Security modules