Cipher methods Polyalphabetic
Porta cipher
Polyalphabetic cipher with thirteen involutive tables. Each key-letter pair picks a distinct mirror mapping.
- Family :
- Polyalphabetic
- Difficulty :
- Advanced
- Era :
- 1563, Giambattista della Porta
- Inventor :
- Giambattista della Porta
Also known as : Della Porta cipher · Porta table
The Porta cipher was described by the Neapolitan scholar Giambattista della Porta in De furtivis literarum notis in 1563. It is involutive (encryption and decryption are the same operation) and relies on thirteen mirror tables instead of Vigenère’s twenty-six shifted alphabets.
Principle
The alphabet is split in two halves: A-M (letters 0-12) and N-Z (letters 13-25). Each pair of key letters (AB, CD, EF, …, YZ) selects one of the thirteen tables.
In each table:
- a plain letter in the first half is replaced by a letter in the second half,
- and vice versa.
For table t (indexed 0 through 12), the rule is:
If P < 13 : C = 13 + ((P − t) mod 13) ∈ {N..Z}
If P ≥ 13 : C = ((P − 13 + t) mod 13) ∈ {A..M}
Since the transformation is a symmetric swap, applying the same rule twice gives back the plaintext: Porta is involutive.
Example
Plaintext CIPHERCHRONICLE with key KEY (cycled KEYKEYKEYKEYKEY). The key pairs are KL → t=5, EF → t=2, YZ → t=12.
C (K, t=5) → X H (K, t=5) → P R (K, t=5) → G
I (E, t=2) → T E (E, t=2) → P C (E, t=2) → S
P (Y, t=12) → B R (Y, t=12) → D H (E, t=2) → S
R (Y, t=12) → D
N (E, t=2) → C L (E, t=2) → W
I (Y, t=12) → W E (Y, t=12) → S
C (K, t=5) → X
Result: XTBPPDXSDGCWXWS.
Variants
- Disjoint Porta — variant with two sets of 13 different permutations rather than strict mirrors.
- Slidefair — modern derivative operating on digrams instead of single letters.
- Vigenère / Beaufort — other repeated-key polyalphabetics, but non-involutive (Vigenère) or differently involutive (Beaufort).
Weaknesses
Porta shares the vulnerabilities of repeated-key ciphers:
- Kasiski to recover key length.
- Index of coincidence to confirm it.
- Once the period is known, each column is a fixed-key Porta table — only 13 possibilities, exhaustively testable.
Its strong signature is that A-M and N-Z always swap: if a ciphertext has an A-M letter where the plaintext should have A-M, you’re not facing Porta.
In CipherChronicle
Porta is a graphically interesting cipher: the 13 tables can be rendered as a geometric fresco. Grids built on it can play with involution — clicking the same key twice restores the text.
Grid
- 1
Ciphertext
Flat distribution, like Vigenère — but no first-half plain letter ever self-encrypts.
- 2
Key observation
Plain A-M always becomes cipher N-Z (and vice versa). A Porta signature.
- 3
Hypothesis: key « KEY » (length 3)
Each key letter selects one of 13 mirror tables.
- 4
Involutive application
The same table, applied twice, yields the original text.
- 5
Message revealed
The plaintext returns once the same tables are reapplied.