You are on page 1of 26

CRYPTHOGRAPHY

CRYPTOGRAPHY

❖It is a science of protecting information


by encoding it into unreadable format.
❖Originated from two Greek words such
as “KRYPTO” which means hidden
and “GRAPHENE” which means
writing.
❖It is a method of making and
breaking of secret codes.
CRYPTOGRAPY is a science of encrypting and
decrypting written communication.

• ENCRYPTION
is the process of transforming plain text into
codes form using a certain algorithm.
• DECRYPTIO s the process of
returning/converting back the coded message
into plain text.
CRYPTOGRAPHY

• PLAIN TEXT
• -refers to the original text
• CIPHER TEXT
• - refers to the coded text
• KEY
• - refers to the strings of information
that is used to reveal the encryted
message into readable form
SIMPLE METHODS

• SHIFT CIPHER (CEASAR CIPHER)


• -it is the simple type of
substitution cipher.
• - it uses shift in forming the key of
cryptography
shift cipher

ABCDEFGHIJKLMN

OPQRSTUVWXYZ
shift cipher

• USING SHIFT 3 TO THE LEFT

AB CD E F GH I J K LM

N O P Q R S T U VWX Y Z
shift cipher

• USING SHIFT 5 TO THE RIGHT

ABCD E FGH I J K LM

N O P Q R S T U VWX Y Z
shift cipher

• USING SHIFT 5 TO THE RIGHT

ABCD E FGH I J K LM
VWX Y Z A B C D E F G H
N O P Q R S T U VWX Y Z
I J K L MNO P Q R S T U
shift cipher

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

• USING SHIFT 3 TO THE LEFT,


• ENCRYPT THE WORD
shift cipher

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

• USING SHIFT 5 TO THE RIGHT


• DECRYPT THE CIPHER TEXT
• “BJY DN BJJY”
SIMPLE METHODS

• MODULO OPERATOR
• -the sender of the uses the key K
to encrypt and to decrypt the secret
message.
modulo operator

1.express the letters of the


alphabet from 0-25
2. calculate Y=(C+K)mod 26
3. convert the number Y into a
letter following the order of
the letter of the alphabet
Modulo Operator

ABCD E F GH I J K LM
0 1 2 3 4 5 6 7 8 9 10 11 12

N O P Q R S T U VWX Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25
modulo operator

Encrypt the message


“MMW is fun to learn” let k = 5

A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25
A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25

M M W I S F U N T O L E A R N
modulo operator

M M W I S F U N T O L E A R N

17 17 27 13 23 10 25 18 24 19 16 9 5 22 18
modulo operator

Y = (17 17 27 13 23 10 25 18
24 19 16 9 5 22 18)mod26
Y = (17 17 1 13 23 10 25 18
24 19 16 9 5 22 18)
modulo operator

A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25

17 17 1 13 23 10 25 18 24 19 16 9 5 22 18

R R B N X K Z S Y T Q J F W S
• 1. express the letters of the
alphabet from 0-25
• 2. calculate C=(Y-K)mod 26
• 3. convert the number C into a
letter following the order of the
letter of the alphabet
modulo operator

decrypt the cipher text


“RRBNXKZSYTQJFWS” let k = 5

A B C D E F G H I J K L M

0 1 2 3 4 5 6 7 8 9 10 11 12

N O P Q R S T U V W X Y Z

13 14 15 16 17 18 19 20 21 22 23 24 25
modulo operator

A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25

R R B N X K Z S Y T Q J F W S

17 17 1 13 23 10 25 18 24 19 16 9 5 22 18
modulo operator

M M W I S F U N T O L E A R N

17 17 1 13 23 10 25 18 24 19 16 9 5 22 18

- 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5

12 12 -4 8 18 5 20 13 19 14 11 4 0 17 13
modulo operator

Y = (12 12 -4 8 18 5 20
13 19 14 11 4 0 17
13)mod26
Y = (12 12 22 8 18 5 20
13 19 14 11 4 0 17
13)
A B C D E F G H I J K L M
0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z
13 14 15 16 17 18 19 20 21 22 23 24 25

12 12 22 8 18 5 20 13 19 14 11 4 0 17 13

M M W I S F U N T O L E A R N
modulo operator

A B C D E F G H I J K L M

0 1 2 3 4 5 6 7 8 9 10 11 12
N O P Q R S T U V W X Y Z

13 14 15 16 17 18 19 20 21 22 23 24 25

ENCRYPT
“FATIMA” LET K=7

You might also like