Encrypted Messages
Encrypted Messages
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
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!
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