Problems

Age
Difficulty
Found: 9

The key of the cipher, called the “swivelling grid”, is a stencil made from a square sheet of chequered paper of size \(n \times n\) (where \(n\) is even). Some of the cells are cut out. One side of the stencil is marked. When this stencil is placed onto a blank sheet of paper in four possible ways (marked side up, right, down or left), its cut-outs completely cover the entire area of the square, where each cell is found under the cut-out exactly once. The letters of the message, that have length \(n^2\), are successively written into the cut-outs of the stencil, where the sheet of paper is placed on a blank sheet of paper with the marked side up. After filling in all of the cut-outs of the stencil with the letters of the message, the stencil is placed in the next position, etc. After removing the stencil from the sheet of paper, there is an encrypted message.

Find the number of different keys for an arbitrary even number \(n\).

A message is encrypted by replacing the letters of the source text with pairs of digits according to some table (known only to the sender and receiver) in which different letters of the alphabet correspond to different pairs of digits. The cryptographer was given the task to restore the encrypted text. In which case will it be easier for him to perform the task: if it is known that the first word of the second line is a “thermometer” or that the first word of the third line is “smother”? Justify your answer. (It is assumed that the cryptographic table is not known).

To transmit messages by telegraph, each letter of the Russian alphabet () ( and are counted as identical) is represented as a five-digit combination of zeros and ones corresponding to the binary number of the given letter in the alphabet (letter numbering starts from zero). For example, the letter is represented in the form 00000, letter -00001, letter -10111, letter -11111. Transmission of the five-digit combination is made via a cable containing five wires. Each bit is transmitted on a separate wire. When you receive a message, Cryptos has confused the wires, so instead of the transmitted word, a set of letters is received. Find the word you sent.

Try to decipher this excerpt from the book “Alice Through the Looking Glass”:

“Zkhq L xvh d zrug,” Kxpswb Gxpswb vdlg, lq udwkhu d vfruqixo wrqh, “lw phdqv mxvw zkdw L fkrrvh lw wr phdq – qhlwkhu pruh qru ohvv”.

The text is encrypted using the Caesar Cipher technique where each letter is replaced with a different letter a fixed number of places down in the alphabet. Note that the capital letters have not been removed from the encryption.

Find one way to encrypt letters of Latin alphabet as sequences of \(0\)s and \(1\)s, each letter corresponds to a sequence of five symbols.

Using the representation of Latin alphabet as sequences of \(0\)s and \(1\)s five symbols long, encrypt your first and last name.

Decipher the following quote from Alice in Wonderland:
Lw zrxog eh vr qlfh li vrphwklqj pdgh vhqvh iru d fkdqjh.
The same letters correspond to the same in the phrase, different letters correspond to different. We know that no original letters stayed in place, meaning that in places of e,r,h there was surely something else.

After mastering the Caesar shift cypher one may wonder how to generalize it. One possible way is to use Affine cypher. The difference between these two methods can be described as follows:

  • In case of Caesar cypher we took a letter with position \(n\) from \(1\) to \(26\) and added to its position a number \(d\) obtaining the number \(n+d\), then we compute its residue modulo \(26\).

  • In case of affine cypher we take a letter with position \(n\) and consider a number \(nx + d\) modulo \(26\).

To decipher such code we need to know values \(x\) and \(d\), then if we have a letter in the code with position \(m\), we can find \(n\) as \(n= (m-d)x^{-1}\) modulo \(26\). Here we have to explain what is \(x^{-1}\): for a number \(x < 26\) we are looking for such a number \(y\), that \(26\) divides \(xy-1\).

  • Does there always exist a number \(x^{-1}\) modulo \(26\) for any \(x\)?

  • Using data \(x=3\), \(d=8\) encrypt the word "SOLUTION".