Polybius square

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search

The Polybius square, also known as the Polybius checkerboard, is a device invented by the Ancient Greeks Cleoxenus and Democleitus, and made famous by the Ancient Greek historian and scholar Polybius[1]. The device is used for fractionating plaintext characters so that they can be represented by a smaller set of symbols, which is useful for telegraphy steganography, and cryptography. The device was originally used for fire signalling, allowing for the coded transmission of any message, not just a finite amount of predetermined options as was the convention before[1].

Basic form[edit]

According to Polybius' Histories, the device was invented by Cleoxenus and Democleitus, and further developed by Polybius himself. The device partitioned the alphabet into five tablets with five letters each (except for the last one with only four). There are no surviving tablets from antiquity and modern recreations present the device as a 5 x 5 square as shown below. The Polybius square is a method of fractionating the alphabet using a small set of numbers[1]. Letters are represented by two numbers that are part of the set {1, 2, 3, 4, 5}, allowing the representation of 25 characters with only 5 numeric symbols.

The original square used the Greek alphabet:

1 2 3 4 5
1 Α Β Γ Δ Ε
2 Ζ Η Θ Ι Κ
3 Λ Μ Ν Ξ Ο
4 Π Ρ Σ Τ Υ
5 Φ Χ Ψ Ω

With the modern Latin alphabet, this is the typical form:

1 2 3 4 5
1 A B C D E
2 F G H I/J K
3 L M N O P
4 Q R S T U
5 V W X Y Z

Each letter is then represented by its coordinates in the grid. For example, "BAT" becomes "12 11 44". The 26 letters of the Latin/English alphabet do not fit in a 5 × 5 square, two letters must be combined (usually I and J as above, though C and K is an alternative). Polybius had no such problem because the Greek alphabet has 24 letters. Alternatively, a 6 × 6 grid may be used to allow numerals or special characters to be included as well as letters.

A 6 × 6 grid may also be used for the Cyrillic alphabet (the most common variant has 33 letters, but some have up to 37), or used with the Japanese hiragana (see cryptography in Japan).

A key could be used to reorder the alphabet in the square, with the letters (without duplicates) of the key being placed at the beginning with the rest of the alphabet following it in regular order[2]. For example, the key phrase "polybius cipher" would lead to the reordered square below.

1 2 3 4 5
1 P O L Y B
2 I/J U S C H
3 E R A D F
4 G K M N Q
5 T V W X Z

Applications[edit]

Telegraphy[edit]

In his Histories, Polybius outlines the need for effective signalling in warfare, leading to the development of the square. Prior to the Polybius square, fire-signalling was useful only for expected, predetermined messages, with no way to convey novel messages about unexpected events[1]. According to Polybius, in the 4th century BCE, Aeneas Tacticus devised a hydraulic semaphore system consisting of matching vessels with sectioned rods labelled with different messages such as "Heavy Infantry", "Ships", and "Corn" [1]. This system was slightly better than the basic fire-signalling, but still lacked the ability to convey any needed message. The Polybius square as he had devised it, was used to aid in telegraphy, specifically fire-signalling. To send a message, the sender would initially hold up two torches and wait for the recipient to do the same to signal that they were ready to receive the message[1]. The sender would then hold up the first set of torches on his left side to indicate to the recipient which tablet (or row of the square) was to be consulted. The sender would then raise a set of torches on his right side to indicate which letter on the tablet was intended for the message[1]. Both parties would need the same tablets, a telescope (a tube to narrow view, no real magnification), and torches[1].

Diagram of a fire signal using the Polybius Cipher

The Polybius square has also been used in the form of the "knock code" to signal messages between cells in prisons by tapping the numbers on pipes or walls[2]. It is said to have been used by nihilist prisoners of the Russian Czars and also by US prisoners of war during the Vietnam War[3].

Arthur Koestler describes the code being used by political prisoners of Stalin in the 1930s in his anti-totalitarian novel Darkness at Noon. (Koestler had been a prisoner-of-war during the Spanish Civil War.) Indeed, it can be signalled in many simple ways (flashing lamps, blasts of sound, drums, smoke signals) and is much easier to learn than more sophisticated codes like the Morse code. However, it is also somewhat less efficient than more complex codes.

Steganography[edit]

The simple representation also lends itself to steganography. The figures from one to five can be indicated by knots in a string, stitches on a quilt, contiguous letters before a wider space or many other ways[3].

Cryptography[edit]

The Polybius square is also used as a basic cipher called the Polybius Cipher. This cipher is quite insecure by modern standards, as it is a substitution cipher with characters being substituted for pairs of digits, which is easily broken through frequency analysis[2].

Adaptations[edit]

The Polybius square and the Polybius cipher can be combined with other cryptographic methods such as the ADFGVX cipher[2], Homophonic cipher [2] and more.

Hybrid Polybius Playfair Cipher[edit]

The Playfair cipher is a polyalphabetic substitution cipher invented by Charles Wheatstone and promoted by Lyon Playfair based on a 5 x 5 square which accommodates the alphabet in a manner similar to the Polybius Square. The letters in the square are arranged by first inserting the letters of a key (without repetition), before the remaining letters (which appear subsequently in normal alphabetical order). A message is divided into pairs of letters, with a filler letter "x" inserted at the end if the message was of odd length. A filler "x" is also used if both letters of pair are same, then a filler x is inserted in between, to compensate for this, an extra x is inserted at the end of the message. Each pair of letters are then encrypted using the Playfair key Table through "mapping rules".[citation needed]

The mapping rules are:

1. If the letters of the pair appear in the same row of table, replace them with letters to their immediate right respectively (if the letter of the original pair is the rightmost element in the row, wrap around to left of the row).

2. If the letters of the pair appear in the same column of the key table, replace them with the letters immediately below respectively (if a letter in the original pair is on the bottom of the column, wrap around to the top side the column).

3. If the letters of the pair are not on the same row or column, replace them with the letters on the same row of the letter and corresponding column of the other letter of the pair. The order here is important, thus the first letter of the encrypted pair is the one that lies on the same row as the first letter and the column of the second letter of the plaintext pair.

Table for a Playfair Cipher using key 'playfair'
P L A Y F
I/J R B C D
E G H K M
N O Q S T
U V W X Z


Plain Text Message:  HELLO WORLD

Playfair message:  HE  LX  LO  WO  RL  DX

Playfair Cipher:  KG  YV  RV  VQ  GR  ZC

The decryption rules are the same as the encryption. The cipher message is mapped with the same Playfair matrix for decryption, and gives the plain text message back.

For a hybrid Polybius - Playfair Cipher, a new and bigger table is used, with messages being encrypted and decrypted twice. The plaintext is encrypted using the Playfair cipher first, and then using the Polybius Cipher.

Table for a hybrid cipher with key 'playfair'
1 2 3 4 5
1 P L A Y F
2 I/J R B C D
3 E G H K M
4 N O Q S T
5 U V W X Z

Plain Text Message:  HELLO WORLD

Playfair message:  HE  LX  LO  WO  RL  DX

Playfair Cipher:  KG  YV  RV  VQ  GR  ZC

Polybius Cipher:  3432  1452  2252  5243  3222  5524  

See also[edit]

References[edit]

  1. ^ a b c d e f g h "Polybius • Histories — Book 10". penelope.uchicago.edu. Retrieved 2020-04-13.
  2. ^ a b c d e Salomon, D. (David), 1938- (2011). Data privacy and security : encryption and information hiding. Springer. ISBN 978-1-4419-1816-1. OCLC 752480143.CS1 maint: multiple names: authors list (link)
  3. ^ a b Daniel Rodriguez-Clark. "Cryptography Worksheet — Polybius Square" (PDF). Crypto Corner. pp. 1–3. 

External links[edit]