Vous êtes sur la page 1sur 5

Encrypted messages

1. Simple Transposition code


Delete the punctuation. Write the text on two (or 3, or 4) lines of equal length
(alternate the letters), forming a grid. Then paste the lines one after the other.
Example:
Step 1.
MEMASNONEIDHODHRHIAEHMSBILATLN
ETETUDWBHNTELCUC!HVTEOTRLINPA!
TIKR
HNE
Step 2.
MEMASNONEIDHODHRHIAEHMSBILATLNETETUDWBHNTELCUC!H
VTEOTRLINPA!
TIKRHNE
Task 1: write a 48 letters message and encrypt it using the transposition code. How
many ways can you do it, if the lines have the same length?
Task 2. : You intercept the following message:
ASNEFOELBCVYNAWEEEOONASRNUTIYIEIDMT. Based on the number of
letters, how many ways of encoding it are there? Decode the message!
Task 3: Decipher this text:
tqcrnxmoraadhukofjpvttzoeibwousehlyg
Task 4. How many ways can you code a message of 37 letters? In order to code a
message with a prime number of letters you have to add dummy letters. Would 1
dummy letter be enough in this case? How about 2 letters?
2. The ATBASH code
The name ATBASH comes from Hebrew. It is an abbreviation of the Hebrew letters
Alef, Taw, Bet, and Shin. Alef is the first letter from the Hebrew alphabet, Taw the last.
Bet and Shin are the second and the second to the last letters. The name already shows

how you encrypt and decrypt texts with ATBASH; you substitute A with Z, B with Y,
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
Z Y X W V U T S R Q P O N M L K J I H G F E D C B A

Task: Encrypt your favourite theorem using the Atbash code!


3. The Caesar code
A substitution code is one in which letters are replaced by other letters. During Julius
Caesar's time, the Caesar cipher was thought to be unbreakable, which explains why he
used it. Remarkable is that in all of Caesar's encrypted texts he moved the alphabet by 3
places. For anyone who could have known this, it would have been easy as cake to read
his messages, but apparently that didn't bother anyone. Another very common method is
to move letters by 7 positions, as shown below:
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

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

Task 1: Decipher the following message, if the number of places in the shift is the square
of an even prime.
Xli Geiwev gshi ger fi qehi qsvi gsqtpmgexih fc lezmrk e hmjjivirx wlmjx jsv
hmjjivirx pixxivw
Task 2: Write a paragraph (5 lines) about your hobbies and encrypt it. The number used
for encoding should be the first even number bigger than the number of countries taking
part in AIMS.
Task 3: How many ways are there for coding this way?
Task 4: If the coded alphabet is not in the same order, then we have a substitution code.
How many different substitution ciphers can you find for an alphabet with only 3 letters?
For 4 letters? 5 letters? How about for our 26 letters alphabet?
4. The Vigenere code
The Vigenre cipher is a method of encrypting alphabetic text by using a series of
different Caesar ciphers based on the letters of a keyword. It is a simple form of
polyalphabetic substitution. For a long time it was considered a very strong code and it
was used during the American Civil War. It also has an interesting algebraic
interpretation: in order to cipher a text, take the first letter of the message and the first
letter of the key, add their value (letters have a value depending on their rank in the

alphabet, starting with 0). The result of the addition is divided by 26, and the remainder
of the division gives the rank of the ciphered letter.
In order to encrypt or decrypt a message in a simpler way, you need a key word. In order
to encrypt using Vigenere method, the easiest way is to have a double entry grid, such as
this one.

Example: Let the key be KEY, and the plain text DCODE.
One locates the first letter of the plain text message in the first line of the table and the
first letter of the key on the left column. The cipher letter is at the intersection.
One locates the letter D on the first row, and the letter K on the first column, the ciphered
letter is the intersection cell N.
One continues with the next letter of the plaintext, and the next letter of the key. When
arrived at the end of the key, go back to the first letter of the key.
NGMNI is the ciphered text.
To decode, do the opposite: locate the first letter of the key in the left column, and
locates on the row the first letter of the ciphered message. Then go up in the column to
read the first letter, it is the corresponding plain letter.
Task: Decode the following text using the key AIMS
Ocd hrwvwcb uk tpq teaf an btw wwddd!

5. The Pigpen Cipher


The pigpen cipher is a geometric simple substitution cipher,
which exchanges letters for symbols which are fragments of a
grid. The Pigpen cipher has been used in several works of
popular culture including Dan Brown's 2009 novel The Lost
Symbol. The example key shows one way the letters can be
assigned to the grid.
With this key, the message X marks the spot becomes

Task1: Fill in the blanks and encrypt the message:


A .is a number with just 2 divisors. The only .prime number is 2.
Task 2 Decode this message:

6. The Affine code


A multiplicative cipher codes each letter by multiplying its rank in the alphabet by a key
number A. A shift code adds a key number B to the rank of each letter, like the Caesar
code. The affine code is a combination of both. If the rank of a letter is x, the coder will
calculate a value y, resulting of the affine function y = A*x+B mod 26 (with 26 is the
alphabet size).
For example, for A=5 and B=3
For D (x=3), y = A*3+B = 5*3+3 = 18, so D is coded to S (position 18).
For O (x=14), y = A*14+B = 5*14+3 = 73 = 21 mod 26, so O is coded to letter V
(position 21).
Task 1: Find the affine function in the graph

Task 2: Using this function, encrypt the name of the famous mathematician who left us
a theorem on right triangles. Start with A=0
Task 3: Decode: Cbixamoloe (Hint: he said Eureka!)

Solutions
Simple Transposition code
Task 1. There are 8 possible grids: 2x24, 3x16, 4x12, 6x8, 8x6, 12x4, 16x3 and 24x2
Task 2. 35 letters, so 2 possible grids: 5x7 and 7x5, the good one is 7x5. The message is:
ALWAYS BE SINCERE EVEN IF YOU DON NOT MEAN IT
Task 3. The quick brown fox jumps over that lazy dog.
Task 4. The minimum number of letters in order to have more than one grid is 3.
The Caesar code
Task 1. The Caesar code can be made more complicated by having a different shift for
different letters
Task 3. 26 ways
Task 4. for 3 letters there are 3 ways, for 4 letters 24, for 5 letters 120 possibilities. For
26 letters the number is 1x2x3xx26=26!
The Vigenere code
Task Our project is the best in the world
The Pigpen Cipher
Task 2 THE ROOM IN WHICH THE MURDER WAS COMMITED HAS A
ROOM NUMBER
The Affine code
Task 1. f(x)=3x+2
Task 2. Vwhxcusbce
Task 3. Archimedes

Vous aimerez peut-être aussi