Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Cryptography - Basic
1. HYBRID PLAYFAIR - CAESAR
SYMMETRIC KEY CRYPTOGRAPHY
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY. 1Tuesday, April 17, 2018
2. PRESENTED BY
PAPER – VII-B
AKASH DEY
SOUVIK SARKAR
ROLL NO- 318111103969 ROLL NO- 318111103974
RAJESH PAL
ROLL NO- 318111103966
Under the guidance of
TUMPA CHAKRABORTY
Dept. of Computer ScienceHYBRID PLAYFAIR - CAESAR SYMMETRIC KEY 2Tuesday, April 17, 2018
3. CONTENTS
INTRODUCTION (4-9)
PLAYFAIR CIPHER (10-16)
CAESAR CIPHER (17-22)
COMBINATION OF PLAYFAIR & CAESAR CIPHER (23-28)
RESULT (29–32)
ADVANTAGES (33)
FUTURE SCOPE (34)
RESOURCES (35)
CONCLUSION (36)
3
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
4. WHAT IS CRYPTOGRAPHY
Cryptography
* Cryptography is the science of using mathematics to encrypt
and decrypt data.
* Cryptography enables us to store sensitive information or
transmit it across secure networks so that it can not be read by
anyone except the intended recipient.
Cryptanalysis
* The study of methods for obtaining the meaning of encrypted
information without accessing the secret information.
4
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
6. SECURITY SERVICES OF CRYPTOGRAPHY
6
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
7. SECURITY ATTACKS
Passive Attacks
* Obtain message contents
* Monitoring traffic flows
Active Attacks
* Masquerade of one entity as some other
* Replay previous messages
* Modify messages in transmit
* Add, delete messages
* Denial of service
7
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
8. BASIC TERMS
Plain Text: The original message
Cipher Text: The coded message
Encryption: The method of converting plain text to cipher text.
Decryption: The method of re-converting cipher text to plain text.
Key: Information used in cipher known only to sender/receiver.
Cryptographers: People who do cryptography.
Cryptology: The field of both cryptography and cryptanalysis.
8
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
10. WHAT IS CIPHER
Cipher is an algorithm for transforming original message to coded
message.
Example of cipher:
* Caesar Cipher
* Playfair Cipher
* Shift Cipher
* Additive Cipher
* Multiplicative Cipher
* Affine(Additive + Multiplicative) Cipher
10
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
11. PLAYFAIR CIPHER
Playfair cipher was invented by Wheatstone on 26 March 1854,but it
was promoted by Lord Playfair.
The Playfair cipher is a dual alphabetic substitution cipher.
The cipher uses a key consisting of a string of unique characters.
11
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
12. PLAYFAIR CIPHER
The Playfair cipher operates on pair of letters. The key is a 5x5 matrix
consisting of every letter except ‘J’.
Before encrypting, the plain text must be transformed:
* Replace all J’s with I’s
* Write the plain text in pair of letters
* Identical letters which occur in a pair must be separated by an ‘X’
* If the number of letters is odd, add a ‘Z’ to the end.
* Replace the spaces with ‘Z’
12
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
13. PLAYFAIR KEY MATRIX
A 5x5 matrix of letters based on a keyword.
Fill in letters of keyword (no duplicate letters).
Fill the rest of the matrix with remaining letters
Eg. Using the keyword KEYWORD
13
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
K E Y W O
R D A B C
F G H I L
M N P Q S
T U V X Z
Tuesday, April 17, 2018
14. RULES FOR
ENCRYPTION & DECRYPTION
Letters appear on the same row:
Replace them with the letters to their immediate right respectively
(left for decryption)
Letters appear on the same column:
Replace them with the letters immediately below respectively
(top for decryption)
Neither on the same row nor on column:
Replace them with the letters on the same row respectively but at
the other pair of corners of the rectangle defined by the original pair.
14HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
K E Y W O
R D A B C
F G H I L
M N P Q S
T U V X Z
Tuesday, April 17, 2018
15. ENCRYPTION PROCESS
Plain text: SECRET MESSAGE
After space remove: SECRETZMESSAGE
Separate into pair: SE CR ET ZM ES SA GE
Encryption Process: SE=NO CR=RD ET=KU ZM=TS ES=ON SA=PC
GE=ND
Cipher Text: NORDKUTSONPCND
15HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
Tuesday, April 17, 2018
16. DECRYPTION PROCESS
Cipher Text: NORDKUTSONPCND
Decryption Process: NO=SE RD=CR KU=ET TS=ZM ON=ES
PC=SA ND=GE
Plain Text: SECRETMESSAGE
After replacing ‘Z’ with space: SECRET MESSAGE
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY 16Tuesday, April 17, 2018
17. CAESAR CIPHER
The Caesar Cipher is earliest known Substitution cipher.
It was invented by Julius Caesar.
Each letter is replaced with a letter at certain distance away
from that letter.
17
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
18. WHAT IS CAESAR CIPHER
Caesar Cipher is used to encrypt messages using a very
simple algorithm, which could be easily decrypted if the key is
known.
Each letter of the alphabet is replaced with a letter at certain
distance away from that letter. At the end, wrap back around to
the beginning.
Example with a shift of 3 :
18
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
Tuesday, April 17, 2018
19. PROCESS OF
ENCRYPTION & DECRYPTION
When we use a Caesar Cipher , we assign each letter to an index starting
from 0.
Rules for encryption:
c=(p+k) mod 26
Rules for decryption:
p=(c-k) mod 26
This will give us the index of the encrypted letter!
19
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
20. ENCODING PROCESS
Let’s have a 5 letter alphabet with only the letters A-E
First, we assign each letter an index, starting from 0.
We then have to choose a key. For this example, we’ll use 2.
Let’s try encoding the word CADE using the formula for the previous slide.
The index of the letter D is 3. The key is 2. The modulus is 5, since the
alphabet has 5 letters.
Let’s use the algorithm: (3+2) = 5. 5 mod 5 = 0. The index of A is 0, so D
would become the letter A.
Using algorithm on each letter, we can encode the word to:ECAB
20HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY Tuesday, April 17, 2018
21. HOW DOES MOD WORK
The mod is used for wrapping back around once we reach at the end
of the alphabet.
When converting the letter D using the key 2, we first add 3 + 2,
which gives us 5. As we can see, the index 5 is beyond the scope of
this alphabet. When we do 5 mod 5, we get the remainder of 0, which
is how much we need to go back and count from the beginning of the
alphabet.
21
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
Tuesday, April 17, 2018
22. DECODING PROCESS
To decode, we do the following:
(cipher letter index – key) mod (total number of letters)
Here the key is 2 and the encoded text is ECAB
The index of the letter E is 4. The modulus is 5, since the alphabet has 5
letters.
Let’s use the algorithm: (4-2) = 2. 2 mod 5 =2 . The index of C is 2, so E
would become the letter C.
Using algorithm on each letter, we can decode the word to:CADE
22
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
Tuesday, April 17, 2018
23. COMBINATION OF
PLAYFAIR & CAESAR CIPHER
This is a combine method of PLAYFAIR and CAESAR Ciphers.
We combine these two methods to encode and decode a
message to provide better and stronger security.
23
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
Tuesday, April 17, 2018
24. PROCESS FOR ENCRYPTION & DECRYPTION
At first the plain text is encoded using PLAYFAIR Cipher.
Then the encoded text is again encoded using CAESAR Cipher.
Then the caesar text is decoded by CAESAR Cipher.
Finally the decoded text is again decoded by PLAYFAIR Cipher to
get back the original text.
24HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
Tuesday, April 17, 2018
25. PROCESS OF ENCODING
CAESAR ENCODING:
The plain text (playfair encrypted text) is: NORDKUTSONPCND
The key is : 3
The caesar encrypted text is :QRUGNXWVRQSFQG
25
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
26. PROCESS OF DECODING
CAESAR DECRYPTION:
The text for decryption is: QRUGNXWVRQSFQG
The key is: 3
The caesar decrypted text is: NORDKUTSONPCND
26
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
27. PROCESS OF DECODING
PLAYFAIR DECRYPTION :
The text for decryption is: NORDKUTSONPCND
The key matrix is:
The playfair decrypted text is: SECRETZMESSAGE
The plain text is: SECRET MESSAGE
27HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY
K E Y W O
R D A B C
F G H I L
M N P Q S
T U V X Z
Tuesday, April 17, 2018
32. ADVANTAGES
OF THIS METHOD
A brute force attack on a playfair cipher is very difficult
The encipherment hides the single letter frequency of the characters
A strong large key is very difficult to crack
The combination of these two methods provide better and stronger
security
to the messages
32
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018
33. FUTURE SCOPE
Though the brute force attack on this cipher is very difficult, the other
attacks can crack the cipher easily
One method to avoid this problem in future is to use a large size of
matrix instead of 5X5 matrix, consisting of only 25 characters
Another method is to use a large and strong key to provide stronger
security
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY 33Tuesday, April 17, 2018
34. RESOURCES
Regarding this project, we gather basic ideas and information from
various books, pdfs and Wikipedia. This resources are following:
Cryptography and Network Security - Behrouz A. Forouzan
Cryptography and Network Security - William Stallings
Internet Resources – i) www.stackexchange.com
ii) www.youtube.com
iii) www.techopedia.com
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY 34Tuesday, April 17, 2018
35. CONCLUSION
Cryptography is the study and practice of hiding information and
private messages.
It can be done by using any of these techniques discussed previous.
By using the encryption techniques a fair unit of confidentiality,
authentication,
integrity, access control and availability of data is maintained.
35
HYBRID PLAYFAIR - CAESAR SYMMETRIC KEY
CRYPTOGRAPHY Tuesday, April 17, 2018