🚪 Porta Cipher — Step-by-Step Example

Welcome, codebusters! The Porta cipher is a polyalphabetic cipher, which means the same letter can be encrypted as different letters depending on where it appears in the message. Let's learn how it works!


🤔 What is the Porta Cipher?

The Porta cipher uses:

  1. A keyword that repeats over the plaintext.
  2. A special Porta Tableau (a big chart) to look up each encrypted letter.

The coolest thing about Porta? Encryption and decryption use the exact same process! This is called being reciprocal — if you encode a message and then encode the result with the same key, you get the original back.


📋 The Porta Tableau

The key letter tells you which row to use. Each pair of letters shares a row (A&B share a row, C&D share a row, etc.).

         A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
         ─────────────────────────────────────────────────────
AB     │ N O P Q R S T U V W X Y Z A B C D E F G H I J K L M
CD     │ O P Q R S T U V W X Y Z N A B C D E F G H I J K L M
EF     │ P Q R S T U V W X Y Z N O A B C D E F G H I J K L M
GH     │ Q R S T U V W X Y Z N O P A B C D E F G H I J K L M
IJ     │ R S T U V W X Y Z N O P Q A B C D E F G H I J K L M
KL     │ S T U V W X Y Z N O P Q R A B C D E F G H I J K L M
MN     │ T U V W X Y Z N O P Q R S A B C D E F G H I J K L M
OP     │ U V W X Y Z N O P Q R S T A B C D E F G H I J K L M
QR     │ V W X Y Z N O P Q R S T U A B C D E F G H I J K L M
ST     │ W X Y Z N O P Q R S T U V A B C D E F G H I J K L M
UV     │ X Y Z N O P Q R S T U V W A B C D E F G H I J K L M
WX     │ Y Z N O P Q R S T U V W X A B C D E F G H I J K L M
YZ     │ Z N O P Q R S T U V W X Y A B C D E F G H I J K L M

How to read the tableau:


📜 The Problem

Encrypt the message: SCIENCE IS FUN Using the keyword: STAR


🕵️ Step-by-Step Encryption

Step 1: Write out the key beneath the plaintext

First, remove spaces from the plaintext and repeat the keyword underneath it:

Plaintext:  S  C  I  E  N  C  E  I  S  F  U  N
Key:        S  T  A  R  S  T  A  R  S  T  A  R

The key STAR repeats over and over until it covers every letter.


Step 2: Encrypt each letter pair

Now, for each plaintext letter, we use the key letter to pick a row from the tableau, then look up the cipher letter.

Letter 1: S with key S

Letter 2: C with key T

Letter 3: I with key A

Letter 4: E with key R

Letter 5: N with key S

Letter 6: C with key T

Letter 7: E with key A

Letter 8: I with key R

Letter 9: S with key S

Letter 10: F with key T

Letter 11: U with key A

Letter 12: N with key R


Step 3: Write the final ciphertext

Plaintext:   S  C  I  E  N  C  E  I  S  F  U  N
Key:         S  T  A  R  S  T  A  R  S  T  A  R
Ciphertext:  F  Z  V  Z  A  Z  R  D  F  C  H  U

Ciphertext: FZVZA ZRDFC HU

(We can group in sets of 5 for readability, or put spaces back: FZV ZAZR DFCHU)


🔓 Now Let's Decrypt It!

Here's the magic of Porta: decryption is the exact same process!

Given:

Step 1: Write the key under the ciphertext

Ciphertext:  F  Z  V  Z  A  Z  R  D  F  C  H  U
Key:         S  T  A  R  S  T  A  R  S  T  A  R

Step 2: Look up each letter using the same tableau

Letter 1: F with key S

Letter 2: Z with key T

Letter 3: V with key A

(Continue for all 12 letters...)

Step 3: Read the result

Ciphertext:  F  Z  V  Z  A  Z  R  D  F  C  H  U
Key:         S  T  A  R  S  T  A  R  S  T  A  R
Plaintext:   S  C  I  E  N  C  E  I  S  F  U  N

Plaintext: SCIENCE IS FUN 🎉


🧠 Key Things to Remember

  1. The key letter pair determines the row. A and B share a row, C and D share a row, etc.
  2. Porta is reciprocal — encoding and decoding use the same steps!
  3. The keyword repeats to cover the entire message.
  4. Spaces are removed before encrypting, then you can add them back later.
  5. The same plaintext letter can encrypt differently depending on which key letter is above it (notice E → Z with key R, but E → R with key A).

🎯 Practice Problem

Decrypt this message using the keyword SUN:

UVGGBQK
Click to reveal the answer
Ciphertext:  U  V  G  G  B  Q  K
Key:         S  U  N  S  U  N  S

Using the Porta tableau:

Plaintext: HIDDENX → HIDDEN (the X is padding)

Happy decoding! 🕵️‍♂️🔍