You are on page 1of 14

Cryptography

The study of methods to write and solve secret codes.

Encryption
The process of encoding messages through secret codes.

Caesar Cipher
It is the first cryptosystem and a.k.a Caesar Code
Used by Julius Caesar in sending messages to his troops.
A B C D E F G H I J K L MNO P Q R S T U VWX Y Z
D E F G H I J K L MNO P Q R S T U VWX Y Z A B C

How are the messages sent?

First, compose a message or information which he intends to transmit to a


receiver called a plaintext.
Second, convert the message to a coded form using an algorithm. The
result is called a ciphertext.

Third, the coded message is sent to the receiver.


Finally, convert the message back to plaintext. This process of decoding
is called decryption.
A B C D E F G H I J K L MNO P Q R S T U VWX Y Z
D E F G H I J K L MNO P Q R S T U VWX Y Z A B C

Message WE ARE CLOSE TO VICTORY.


Replace the letters
ZH DUH FORVH WR YLFWRUB
of the message with
the letters in the (The encrypted message)
second row.
A B C D E F G H I J K L MNO P Q R S T U VWX Y Z
D E F G H I J K L MNO P Q R S T U VWX Y Z A B C

Message HAKUNA MATATA

Replace the letters


of the message with
KDNXQD PDWDWD
the letters in the (The encrypted message)
second row.
A B C D E F G H I J K L MNO P Q R S T U VWX Y Z
D E F G H I J K L MNO P Q R S T U VWX Y Z A B C

Message WKH ZRUOG LV EHDXWLIXO.


Replace the letters
of the message THE WORLD IS BEAUTIFUL.
with the letters in (The decrypted message)
the second row.
A B C D E F G H I J K L MNO P Q R S T U VWX Y Z
D E F G H I J K L MNO P Q R S T U VWX Y Z A B C

Message JR WKH GLVWDQFH


Replace the letters
of the message GO THE DISTANCE
with the letters in (The decrypted message)
the second row.
Decimation Cipher
Encrypts a message by multiplying each value of the encrypted
message by a fixed number, p (key).

Each letter in the message is replaced by its position in the alphabet


(A → 0, B → 1, C → 2,…, Z → 25 )

Decimation cipher multiplies the position values by an encryption


value and it is done modulo 26.
A B C D E F G H I J K L M N
0 1 2 3 4 5 6 7 8 9 10 11 12 13
O P Q R S T U V W X Y Z
14 15 16 17 18 19 20 21 22 23 24 25
Steps using decimation cipher.
1. Assign the 26 letters and the numbers 0 to 25 in order
2. Select an odd integer p between 3 and 25 except 13. p and 26
must have no common prime divisors.
3. Replace a letter in the message with position value I with the
letter of numerical value pi mod26
Encryption Value Decryption Value
(p) (i)
3 9
5 21
7 15
9 3
Decimation Cipher
11 19
Decryption Values
15 7
17 23
19 11
21 5
23 17
25 25
Example
STEPS SOLUTION
Message T I M E I S G O L D
Position 19 8 12 4 8 18 6 14 11 3
Position x 5 95 40 60 20 40 90 30 70 55 15
(p = 5)
0, 26, 52, 78, 104,…
New Position 17 14 8 20 14 12 4 18 3 15
(pi mod 26)
Replace with the R O I U O M E S D P
corresponding
letter The encrypted message.
STEPS SOLUTION

Message C R Y P T O G R A P H Y
Position 2 17 24 15 19 14 6 17 0 15 7 24
p= 3 6 51 72 45 57 42 18 51 0 45 21 72
positionx3
0, 26, 52, 78, 104,…
New 6 25 20 19 5 16 18 25 0 19 21 20
Position
(pi mod 26)
Replace with
the G Z U T F Q S Z A T V U
corresponding
letter The encrypted message.
Steps: SOLUTION
Message H S M U M A H U H U P
New 7 18 12 20 12 0 7 20 7 20 15
Position
P=5
New position x 21
147 378 252 420 252 0 147 420 147 420 315
(see table 1)

0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, 338, 364, 390, 416,…

Position
(use mod26)
17 14 18 4 18 0 17 4 17 4 3
Replace all values
by their
R O S E S A R E R E D
corresponding
letters
Steps Solution
Message X A S K N A G A D A D A
New Position 23 0 18 10 13 0 6 0 3 0 3 0

P=7 345 0 270 150 195 0 90 0 45 0 45 0


x 15

0, 26, 52, 78, 104, 130, 156, 182, 208, 234, 260, 286, 312, 338, 364, 390, 416,…

Position 7 0 10 20 13 0 12 0 19 0 19 0
(use mod26)

Replace all values H A K U N A M A T A T A


by their
corresponding
letters
1. Encrypt PHILIPPINES using a Caesar
Code.

Assignment 2. Encrypt SEMESTRAL BREAK using the


decimation cipher with the key 9

3. Decrypt CFZANSMZ FVYNSC with p = 3

You might also like