ArticleslgStudy

science

Two-square cipher

Two-square cipher is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Two-square cipher rather than just read about it. In short: The Two-square cipher, also called double Playfair, is a manual symmetric encryption technique. It was developed to ease the cumbersome nature of the large encryption/decryption matrix used in the four-square cipher while still being slightly stronger than the single-square Playfair cipher.

Key takeaways

  • Two-square cipher belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Two-square cipher to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Two-square cipher from memory before moving on to harder problems.

Reference excerpt

The Two-square cipher, also called double Playfair, is a manual symmetric encryption technique. It was developed to ease the cumbersome nature of the large encryption/decryption matrix used in the four-square cipher while still being slightly stronger than the single-square Playfair cipher. The technique encrypts pairs of letters (digraphs), and thus falls into a category of ciphers known as polygraphic substitution ciphers. This adds significant strength to the encryption when compared with monographic substitution ciphers, which operate on single characters. The use of digraphs makes the two-square technique less susceptible to frequency analysis attacks, as the analysis must be done on 676 possible digraphs rather than just 26 for monographic substitution. The frequency analysis of digraphs is possible, but considerably more difficult, and it generally requires a much larger ciphertext in order to be useful.

History Félix Delastelle described the cipher in his 1901 book Traité élémentaire de cryptographie under the name damiers bigrammatiques réduits (reduced digraphic checkerboard), with both horizontal and vertical types. The two-alphabet checkerboard was described by William F. Friedman in his book Advanced Military Cryptography (1931) and in the later Military Cryptanalysis and Military Cryptanalytics series. Friedman's co-author on Military Cryptanalytics, Lambros D. Callimahos described the cipher in Collier's Encyclopedia in the Cryptography article. The encyclopedia description was then adapted into an article in The Cryptogram of the American Cryptogram Association in 1972. After this, the cipher became a regular cipher type in ACA puzzles. In 1987, Noel Currer‐Briggs described the double Playfair cipher used by Germans in World War II. In this case, double Playfair refers to a method using two Polybius squares plus seriation. Even variants of Double Playfair that encipher each pair of letters twice are considered weaker than the double transposition cipher.

... by the middle of 1915, the Germans had completely broken down British Playfair. At the same time they recognised its flexibility and simplicity, and decided they could make it more secure and adapt it for their own use. Instead of using one 5 x 5 square and dividing the clear text into bigrams in the way I have just described, they used two squares and wrote the whole message out in key-lengths on specially prepared squared message forms arranged in double lines of a given length. Other slight variants, also incorporating seriation, are described in Schick (1987) and David (1996). The two-square cipher is not described in some other 20th century popular cryptography books e.g. by Helen Fouché Gaines (1939) or William Maxwell Bowers (1959), although both describe the Playfair cipher and four-square cipher.

Using two-square The two-square cipher uses two 5x5 matrices and comes in two varieties, horizontal and vertical. The horizontal two-square has the two matrices side by side. The vertical two-square has one below the other. Each of the 5x5 matrices contains the letters of the alphabet (usually omitting "Q" or putting both "I" and "J" in the same location to reduce the alphabet to fit). The alphabets in both squares are generally mixed alphabets, each based on some keyword or phrase. To generate the 5x5 matrices, one would first fill in the spaces in the matrix with the letters of a keyword or phrase (dropping any duplicate letters), then fill the remaining spaces with the rest of the letters of the alphabet in order (again omitting "Q" to reduce the alphabet to fit). The key can be written in the top rows of the table, from left to right, or in some other pattern, such as a spiral beginning in the upper-left-hand corner and ending in the center. The keyword together with the conventions for filling in the 5x5 table constitute the cipher key. The two-square algorithm allows for two separate keys, one for each matrix. As an example, here are the vertical two-square matrices for the keywords "example" and "keyword":

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

Algorithm Encryption using two-square is basically the same as the system used in four-square, except that the plaintext and ciphertext digraphs use the same matrixes. To encrypt a message, one would Follow these steps:

Split the payload message into digraphs. (help me obi wan kenobi becomes he lp me ob iw an ke no bi) For a vertical two-square, the first character of both plaintext and ciphertext digraphs uses the top matrix, while the second character uses the bottom. For a horizontal two-square, the first character of both digraphs uses the left matrix, while the second character uses the right. Find the first letter in the digraph in the upper/left text matrix. E X A M P L B C D F G H I J K N O R S T U V W Y Z K E Y W O R D A B C F G H I J L M N P S T U V X Z

Find the second letter in the digraph in the lower/right plaintext matrix. E X A M P L B C D F G H I J K N O R S T U V W Y Z K E Y W O R D A B C F G H I J L M N P S T U V X Z

A rectangle is defined by the two plaintext characters and the opposite corners define the ciphertext digraph. E X A M P L B C D F G H I J K N O R S T U V W Y Z K E Y W O R D A B C F G H I J L M N P S T U V X Z

Using the vertical two-square example given above, we can encrypt the following plaintext:

Plaintext: he lp me ob iw an ke no bi Ciphertext: HE DL XW SD JY AN HO TK DG

Here is the same two-square written out again but blanking all of the values that aren't used for encrypting the digraph "LP" into "DL"

- - - - - L - - D - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - L - - P - - - - - -

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Two-square cipher

Start with the simplest possible case. Write down what Two-square cipher claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Two-square cipher before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Two-square cipher ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Two-square cipher

In research
Two-square cipher appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Two-square cipher in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Two-square cipher is common in secondary-school and first-year university syllabi. It links to neighbouring topics Classical ciphers, so understanding it makes those chapters shorter.
In everyday life
Look for Two-square cipher outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Two-square cipher in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Two-square cipher means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Two-square cipher out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Two-square cipher in simple terms?

The Two-square cipher, also called double Playfair, is a manual symmetric encryption technique. It was developed to ease the cumbersome nature of the large encryption/decryption matrix used in the four-square cipher while still being slightly stronger than the single-square Playfair cipher.

Why does Two-square cipher matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Two-square cipher?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Two-square cipher.

Tags

  • Classical ciphers

Keep exploring