✖

Turning grille (Fleissner grille): steps and converter

A turning grille is a square of paper or cardboard with a few windows cut out. It is laid on a sheet of paper, the first letters of the message are written into the windows, the grille is turned by a quarter turn, and you keep writing. After four turns the square under it is full of letters. It is also called the Fleissner grille, and in Czech often the Cardan grille, although that is not quite right historically (see the end of the article). The letters are only shuffled, so this is a transposition cipher, like the rail fence cipher.

How to encrypt with a turning grille

Take a 4 × 4 grille, that is 16 cells, and cut windows in cells 1, 2, 3 and 6 (we number the cells row by row from left to right). The orange dot in the corner shows where the top of the grille is. It turns with the grille, so it always tells us which position is coming up.

On the left a 4 × 4 grille with numbered cells and windows in cells 1, 2, 3 and 6, on the right the same grille laid on paper, with the letters U, T, O, C in red in the windows On the left a 4 × 4 grille with numbered cells and windows in cells 1, 2, 3 and 6, on the right the same grille laid on paper, with the letters U, T, O, C in red in the windows

We will encrypt the message “útoč za svítání” (Czech for “attack at dawn”) without spaces and accents, that is UTOCZASVITANI. We lay the grille on squared paper and write the first four letters U, T, O, C into the windows, row by row, as in a book.

Then we turn the grille a quarter turn clockwise. The windows now lie over other, still empty cells, and Z, A, S, V go into them. After the next turn comes ITAN, and for the fourth position only I is left, so we fill the remaining three windows with the letter X (it is rare in Czech, so the receiver easily recognises it as padding). Finally we take the grille away. The windows in the individual positions lie like this:

position windows over cells letters
1st 1, 2, 3, 6 U, T, O, C
2nd 4, 7, 8, 12 Z, A, S, V
3rd 11, 14, 15, 16 I, T, A, N
4th 5, 9, 10, 13 I, X, X, X

The grille on the paper turns clockwise into each of its four positions and letters are written into its windows: in the first position UTOC in red, in the second ZASV in blue, in the third ITAN in green, in the fourth I in orange and XXX in grey; finally the grille disappears, leaving the square UTOZ, ICAS, XXIV, XTAN The grille on the paper turns clockwise into each of its four positions and letters are written into its windows: in the first position UTOC in red, in the second ZASV in blue, in the third ITAN in green, in the fourth I in orange and XXX in grey; finally the grille disappears, leaving the square UTOZ, ICAS, XXIV, XTAN

We read the finished square row by row: UTOZ, ICAS, XXIV, XTAN. The cipher is UTOZICASXXIVXTAN. A longer message is split into groups of 16 letters, and each group gets its own square.

Here the key is the grille itself, that is, where its windows are. The sender and the receiver must know it, nobody else. At camp each group can make two identical grilles, keep one at home and give the other to the messenger.

Turning grille converter

Type in a message and the numbers of the cells with windows. For a 4 × 4 grille these are four numbers from 1 to 16, for a 6 × 6 grille nine numbers from 1 to 36. The numbers apply to the grille with the dot at the top, and the converter then turns it clockwise. It drops spaces, punctuation and Czech accents, writes in lower case and pads the message with the letter x to whole squares.

How to make a turning grille for camp

The windows can’t go just anywhere. If after a turn a window landed on a cell we had already written in, we would overwrite a letter and some other cell would stay empty.

When the grille turns, the corners take each other’s places: each one moves to the position of the other three. The four cells in the middle circulate in the same way, and the remaining eight cells along the edges form two more groups of four. The cells of a 4 × 4 grille therefore fall into four groups of four:

A 4 × 4 square with the numbers 1 to 16: the corners 1, 4, 13, 16 are red, cells 2, 8, 9, 15 blue, cells 3, 5, 12, 14 green, the middle cells 6, 7, 10, 11 orange; cells 1, 2, 3 and 6 have a thick border A 4 × 4 square with the numbers 1 to 16: the corners 1, 4, 13, 16 are red, cells 2, 8, 9, 15 blue, cells 3, 5, 12, 14 green, the middle cells 6, 7, 10, 11 orange; cells 1, 2, 3 and 6 have a thick border

A window from one group of four passes over all four of its cells as the grille turns. We therefore cut out exactly one cell from each group of four. Our grille 1, 2, 3, 6 meets this: 1 is red, 2 blue, 3 green and 6 orange.

Steps for camp:

  1. Draw a 4 × 4 square on squared paper and number the cells.
  2. Colour them in groups of four as in the diagram. For another size there is a simple rule: a cell in row r and column s moves, after a clockwise turn, to row s and column n + 1 − r, where n is the size of the grille. The four cells that take turns this way get the same colour.
  3. Choose one cell of each colour and cut it out. Cardboard makes it sturdier.
  4. Draw a mark in one corner to show where the top is.
  5. Test it: after four positions, every cell must have been written in exactly once.

For longer messages a 6 × 6 grille is useful: it has 36 cells, so 9 groups of four and 9 windows. With an odd size, say 5 × 5, the middle cell stays in place as the grille turns; it is usually left empty or filled with padding.

How many different grilles are there?

From each group of four we choose one of four cells, independently of the others. A 4 × 4 grille has 4 groups of four, so the number of different grilles is

4⋅4⋅4⋅4=44=256.

For a 6 × 6 grille there are nine groups of four, so there are 49 = 262,144 grilles (powers grow fast). An 8 × 8 grille already has over four billion.

For a rail fence cipher with 13 letters you only need to try 11 keys, so the grille stands up to key guessing much better.

How to decrypt and break a turning grille

A receiver who has the grille writes the cipher row by row into a 4 × 4 square, lays the grille on it with the dot at the top and reads the letters from the windows, again row by row: U, T, O, C. They turn it clockwise and keep reading: Z, A, S, V. After four positions they have the whole message UTOCZASVITANIXXX and simply cross out the padding at the end.

A codebreaker without the grille has a harder time. Frequency analysis tells them that the letters have been shuffled: the cipher has as many E, A, O as ordinary Czech. Then they try which letters could sit next to each other in the square and build words from them.

Where the Cardan and Fleissner grilles come from

The Italian physician and mathematician Gerolamo Cardano described, around 1550, a card with windows, but a non-turning one: a secret message was written through it into an innocent-looking letter. It was more a hiding place for a message than a cipher. The turning grille was attributed to Cardano in 1809 by the German author Johann Ludwig Klüber, which is where the inaccurate name Cardan grille comes from. It was made famous by the Austrian officer Eduard Fleissner von Wostrowitz, who described it in 1881 in his handbook of cryptography. The German army put it to use at the end of 1916 in the First World War, but withdrew it after about four months as not secure enough.