CacheHackCacheHack

Porta Cipher

Encode and decode using the Porta cipher. A reciprocal polyalphabetic cipher from the 16th century.

Reciprocal cipher: The same operation encrypts and decrypts. If you encrypt "HELLO" you get ciphertext; encrypt that ciphertext with the same key and you get "HELLO" back.

Porta Tableau

KeyABCDEFGHIJKLM
ABNOPQRSTUVWXYZ
CDOPQRSTUVWXYZN
EFPQRSTUVWXYZNO
GHQRSTUVWXYZNOP
IJRSTUVWXYZNOPQ
KLSTUVWXYZNOPQR
MNTUVWXYZNOPQRS
OPUVWXYZNOPQRST
QRVWXYZNOPQRSTU
STWXYZNOPQRSTUV
UVXYZNOPQRSTUVW
WXYZNOPQRSTUVWX
YZZNOPQRSTUVWXY

Letters N-Z map back reciprocally. The same key letter pair works for both halves.

How Porta Works

  • • Alphabet split into two halves: A-M and N-Z
  • • Key letters pair up: AB, CD, EF... each selects a tableau row
  • • First half letters map to second half (and vice versa)
  • • The mapping is reciprocal: encrypt and decrypt are identical

What is the Porta Cipher?

The Porta cipher is a polyalphabetic substitution cipher invented by Giovanni Battista della Porta in 1563. It is notable for being reciprocal - the same operation both encrypts and decrypts the message.

How It Works

Alphabet Halves

The alphabet is divided into two halves:

  • First half: A B C D E F G H I J K L M
  • Second half: N O P Q R S T U V W X Y Z

Key Pairs

Key letters are grouped in pairs: AB, CD, EF, GH, IJ, KL, MN, OP, QR, ST, UV, WX, YZ. Both letters in a pair use the same tableau row.

The Tableau

Each key pair defines a different mapping between the two halves of the alphabet. The mapping is reciprocal: if A maps to N, then N maps to A.

Reciprocal Property

The key feature of Porta is that encryption equals decryption. To decrypt a message, simply "encrypt" it again with the same keyword.

Porta in Geocaching

This cipher appears in puzzles because:

  • Historical: 16th century cryptography
  • Self-inverse: Interesting mathematical property
  • Visual tableau: Makes an interesting puzzle image
  • Less common: Not as well-known as Vigenere

vs Vigenere Cipher

PortaVigenere
13 tableau rows26 tableau rows
Key pairs (AB, CD...)Each key letter unique
ReciprocalDifferent encrypt/decrypt
Half-alphabet swapFull alphabet shift

Breaking the Cipher

  • Kasiski examination: Find repeating patterns to determine key length
  • Frequency analysis: After determining key length
  • Known plaintext: Helps determine the keyword
  • Short keys: Can be brute-forced