Keyword cipher

Porta Cipher Practice: Swap Letters with a Keyword

A keyword cipher that swaps letters in pairs. Every step is its own undo: the same move that locks a letter also unlocks it.

Porta uses a keyword the way Vigenère does, repeating it along the message. The difference is the table. Porta has only 13 alphabets, one for each pair of key letters: A and B, C and D, E and F, and so on up to Y and Z. A key letter and its partner (say K and L) use exactly the same row. It is named after Giovan Battista della Porta, an Italian polymath who described it in 1563.

Cipher Munch Porta puzzle: a card at the top reading Keyword: NORTH, a Keyword box to type it into, and a quote in cipher letters with an empty shaded box above each letter
Porta puzzleThe keyword is on the card; type it in to switch on the key row and decoder
The Porta Options sheet in Cipher Munch with switches for Show decoder table, Highlight errors when complete and Auto fill letters, plus the on-screen keyboard and Text Size
Porta OptionsDecoder table, error highlighting, Auto fill and Print / share

How it works

The table has a header row, A to M, and one row for each key pair. Each row holds the letters N to Z in a different rotation. The pair A,B starts with N, C,D starts with O, E,F starts with P, and so on. Here are three of the rows, under the header:

A B C D E F G H I J K L M (header)
A,B: N O P Q R S T U V W X Y Z
K,L: S T U V W X Y Z N O P Q R
Y,Z: Z N O P Q R S T U V W X Y

To encode a letter from A to M, find it in the header and read the letter below it in the key pair's row. To encode a letter from N to Z, find it in the row and read the letter above it in the header. The swap goes both ways, so Porta is reciprocal: running the ciphertext through the same table with the same keyword gives the message back. Encoding and decoding are one procedure.

Take MEET ME AT NOON with the keyword LOCK:

Key: LOCK LO CK LOCK
Plain: MEET ME AT NOON
Cipher: RYSB RY OB IHAI

The first letter, M, has key L. L belongs to the pair K,L, so we use that row. M is the last letter in the header, and the letter under it in the K,L row is R. To decode, find R in the K,L row, and the letter above it in the header is M.

What makes it easier than Vigenère

With only 13 alphabets it is weaker than a full Vigenère, but it is much quicker to do by hand. There is no adding and subtracting, just one lookup. And because a letter in the top half always maps to the bottom half and back, you never have to wonder which direction to read.

In the app

Every Porta puzzle shows its keyword on the card at the top. Tap the Keyword box and type it in, and the key letters appear above every cipher letter. Tap a cell and use the decoder table strip under the puzzle: the top row is the header (A to M) and the row below is the Porta row for that key letter's pair. The answer is highlighted in colour. Cells with the same key pair and cipher letter light up together, and with Auto fill letters on one answer fills them all. Options has three Display switches: Show decoder table, Highlight errors when complete and Auto fill letters. Turn the decoder table off as you learn the table by heart. There are no letter-frequency options for Porta, because with 13 alphabets counting letters does not help. Print / share makes a worksheet with a box above each cipher letter for the key letter and a box below for your answer.

Science Olympiad Codebusters

Porta is on the 2027 Codebusters list for Division C. At the Regional level the question is to decrypt ciphertext given the key. At State and National there is also a cryptanalysis of Porta with a crib of at least 3 plaintext characters. The exam packet includes a resource sheet with the Porta table, so you do not have to memorise it, but you do have to be fast at using it. Practise with the decoder table on, then off, then on paper. For the full competition picture, see Codebusters practice in the app and team practice.

Practise away from the board

In Reference & Flashcards, the Letters & Numbers deck drills A = 0 up to Z = 25, which helps you see the 13-letter halves that Porta is built on. Use Flashcards (tap to flip, swipe right for Know and left for Still learning) or the multiple-choice Test. The printable Reference Sheet includes the full Porta table, the same one used on the Codebusters resource sheet. Once decoded letters start forming words, the English letter frequencies and common small words on page 2 of the sheet help you finish.

Practise Porta before test day

Cipher Munch is free on iOS and Android, with a free Starter pack for every cipher, no ads, no account, and it works offline.