Skip to content
Cipherloom密码织机

CIPHER/POLYALPHABETIC/PORTA CIPHER

Porta Cipher

Published 8 Oct 2026 · · 7 min read

Giovanni Battista della Porta published this tableau in 1563 and solved a problem that had annoyed cryptographers for a century: he built a polyalphabetic cipher that is its own inverse. Encipher and decipher use the same procedure with the same key, so a field clerk could not get the direction wrong.

Era
Renaissance
Type
Polyalphabetic
Key space
26^k, 13 rows
Level
Field
Cipher loom plate: Porta Cipher
plate porta-cipher · Polyalphabetic

IPhenomenon

The tableau has thirteen rows, and each row is keyed by a pair of letters: row one by A or B, row two by C or D, and so on to row thirteen by Y or Z. This halves the key alphabet and makes each row an involution.

Each row works by splitting the alphabet in half. Letters A-M are the first half, N-Z the second. In row one, A maps to N, B to O, and so on; N maps back to A, O back to B. Applying the row twice returns the original letter, which is the property that makes the cipher reciprocal.

Key pairA maps toN maps toCipher of A then N
AB (row 1)NAround trip
CD (row 2)OMround trip
EF (row 3)PLround trip

A worked example with key PORTA on the plaintext LOOM:

PosPlainKeyRowCipher
1LP8A
2OO8Y
3OR9C
4MT10D

Note the first two letters used the same row because P and O are both in row eight's key pair range; the last two rows differ. That is the mechanism: a key of length k gives 13^k distinct row sequences rather than 26^k, but buys reciprocity in exchange.

IIKey space

For a key of length k the row-sequence space is 13^k. A six-letter key gives about 4.8 million row sequences — a factor of 64 smaller than Vigenere's 26^6, and the price paid for reciprocity.

That is a real reduction but not a fatal one for its time. Porta's genuine weakness was the same as Vigenere's: the key repeats, and a repeating key is measurable with Kasiski examination.

Reciprocity is an operational feature, not a security feature. Making a cipher easier to use does not make it harder to break; it only means the users will make fewer mistakes.

In fairness, fewer mistakes is worth something. A cipher used correctly with a 13^6 key space is more useful to an army than one used incorrectly with 26^6, and Porta evidently made that judgement deliberately.

IIIEnciphering

  • Write the keyword without spaces. Pair its letters mentally: A and B are row 1, C and D are row 2, and so on.
  • Write the plaintext in capitals underneath, repeating the keyword as needed.
  • For each position, determine the row from the key letter, using only the pair index: (letter number / 2), rounded down.
  • Look up the plaintext letter in that row. Letters A-M map into the second half of the alphabet; letters N-Z map into the first.
  • Write the resulting letter. Do not change procedure at any point — Porta has one procedure.
  • Group the output in fives for transmission.

IVDeciphering

  • Reconstruct the key schedule exactly as the sender did. Because the cipher is an involution, there is nothing else to set up.
  • For each ciphertext letter, find its row from the key letter.
  • Read the plaintext letter from the same row. The mapping is symmetric, so no inverse table is needed.
  • Rejoin the words from context. Porta, like all polyalphabetic ciphers, does not preserve word boundaries on its own.
  • If the result is nonsense, verify the key: a single wrong key letter corrupts exactly one plaintext letter, so errors are localised and easy to find.
  • For an unknown key, run Kasiski examination on repeats in the ciphertext, find the period, and solve each stream as a thirteen-row substitution.

VWeakness

Key repetition. The cipher is polyalphabetic only for the length of the key. Beyond that, the row sequence repeats and the standard period-finding attacks apply exactly as they do to Vigenere.

Only 13 rows. With half the rows of a full tableau, each row is used roughly twice as often, so the statistics settle faster and the analyst needs less text.

Reciprocity reduces the key space. 13^k rather than 26^k — a factor of 2^k reduction, which for a ten-letter key is a thousandfold.

It leaks the same way every polyalphabetic cipher does. Repeated plaintext phrases at distances that are multiples of the key length produce repeated ciphertext, and the greatest common divisor of those distances gives the key length away.

VIPractice

Ciphertext

AAAANZSVJFWOPY

Hint: Key PORTA. Rows are chosen by pairing key letters: AB is row 1, CD is row 2, and so on.

Reveal the answer

Plaintext

PORTA KEEPS HALF

This entry is historical and educational. It is not guidance for circumventing the security of any system in use today, and it is not professional advice.

·History note

Giambattista della Porta published the tableau in De Furtivis Literarum Notis in 1563, a work that also catalogued a large number of earlier ciphers and discussed cryptanalysis at length. The Porta cipher was used in Italy and, in modified forms, in later European diplomatic traffic. Its principal historical importance is the reciprocal design: it demonstrated that a polyalphabetic cipher need not require two different procedures, an innovation that made mechanical and later electrical cipher machines considerably simpler to design.

·Further reading

Porta's contribution tends to be undervalued because his cipher was broken, but the design instinct was right and it keeps winning: modern authenticated encryption modes are also reciprocal in the sense that the same key and nonce drive both directions, and modern field equipment is designed so that a tired operator cannot select the wrong mode.

The Porta tableau also has a property that matters for teaching: because each row is built from half-alphabet pairs, you can generate the entire table from one rule rather than memorising 676 entries. Compression of a key schedule into a rule is the same idea behind modern key derivation.

Next on the loom: cardan-grille — a transposition with a physical mask, and a very different notion of what a key can be.

+Weave into