Download - Cryptography
![Page 1: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/1.jpg)
Cryptography
![Page 2: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/2.jpg)
Cryptography
Cryptography is the art of achieving security by encoding messages to make them non readable.
Plain Text
Cipher Text
Encryption
Decryption
Key cryptography - study of encryption principles/methods cryptanalysis (code breaking) - the study of
principles/ methods of deciphering cipher text without knowing key
cryptology - the field of both cryptography and cryptanalysis
![Page 3: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/3.jpg)
Hello John
Encrypt
Ifmmp KpioInternet
Hello John
Decrypt
Ifmmp Kpio
![Page 4: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/4.jpg)
Cryptographic Techniques
Substitution Techniques. -- Caesar Cipher -- Modified version of Caesar Cipher -- Mono-alphabetic Cipher -- Homophonic Cipher -- Polygram Cipher -- Polyalphabetic Cipher
![Page 5: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/5.jpg)
with a shift of 3
Shift cipher (ceasar cipher)5
![Page 6: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/6.jpg)
monoalphabetic cipher6
![Page 7: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/7.jpg)
Homophonic Cipher
![Page 8: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/8.jpg)
Polygram Cipher
![Page 9: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/9.jpg)
Polyalphabetic cipherVigenère Tableau
9
![Page 10: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/10.jpg)
key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ
10
![Page 11: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/11.jpg)
Transposition Techniques. -- Rail Fence Technique -- Single Columnar Transposition
Technique --Single Columnar Transposition
Technique with multiple rounds -- Vernam Cipher(One time pad) -- Book Cipher
![Page 12: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/12.jpg)
Rail Fence Cipher
M e m a t r h t g p r y e t e f e t e o a a t MEMATRHTGPRYETEFETEOAAT
Write message on alternate rows, and read off cipher row by row
![Page 13: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/13.jpg)
Columnar Transposition Technique
![Page 14: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/14.jpg)
Vernam Cipher
Translate each plain text alphabet in to corresponding Number(i.e. A=0, B=1,…,Z=25)
Do same for each character input cipher text
Add plain text and one time pad
If the sum thus produced is greater than 26,subtract 26 from it.
![Page 15: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/15.jpg)
Cryptographic Mechanisms
Symmetric Key Cryptography Asymmetric Key Cryptography
![Page 16: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/16.jpg)
Symmetric Key Cryptography
![Page 17: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/17.jpg)
Diffie-Hellman Key Exchange Algorithm
P Q
Prime number ‘n’
Random number ‘x’ Calculate A as :- A=gx mod n
Computes the key K1 as:-
K1=Bx mod n
Prime number ‘g’
Random number ‘y’
Calculate B as:- B=gy mod n
Computes the key K2 as:-
K2=Ay mod n
Exchangen and g
ExchangeA and B
K1=K2
![Page 18: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/18.jpg)
For Example
P Q n=11
x=3 Calculate A as :-
A=73 mod 11
=343 mod 11
= 2
Computes the key K1 as:- K1=43 mod 11
= 64 mod 11
=9
g=7
y=6 Calculate B as:- B=76 mod 11 =117649 mod 11 =4
Computes the key K2 as:-
K2=26 mod 11 =64 mod 11 =9
Exchangen and g
ExchangeA and B
K1=K2
![Page 19: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/19.jpg)
Man in the Middle Attack(MITM)
Alice
Tom
Bob
n=11,g=7 x=3
n=11,g=7 x=8,y=6
n=11,g=7 y=9
![Page 20: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/20.jpg)
Continued..
Alice
Tom
Bob
A=73 mod 11=2
A=78 mod 11=9, B=76 mod 11=4
79 mod 11=8
![Page 21: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/21.jpg)
A=2
A=9
B=8
B=4
AliceTom Bob
Intercept
Intercept
A=2, B=4 A=2, B=8 A=9, B=8
![Page 22: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/22.jpg)
Continued..
Alice
Tom
Bob
A=2 , B=4
K1=43 mod 11=9
A=2, B=8
K1=88 mod 11=5
K2=26 mod 11=9
A=9 , B=8
K2=99 mod 11=5
![Page 23: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/23.jpg)
MITM attack is also known as: Bucket-brigade attack Fire brigade attack Monkey-in-the-middle attack Session hijacking TCP hijacking TCP session hijacking
![Page 24: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/24.jpg)
Asymmetric Key Cryptography
![Page 25: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/25.jpg)
RSA Algorithm
Choose two large prime numbers P and Q Calculate N=PxQ Select Public key E as not a factor of (P-
1)x(Q-1) Select Private key D as (DxE) mod (P-
1)x(Q-1)=1 For Encryption, CT=PTE mod N Send CT to the receiver For Decryption, PT=CTD mod N
![Page 26: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/26.jpg)
Digital Signature
![Page 27: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/27.jpg)
Message Digest
![Page 28: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/28.jpg)
MD5
Steps:1.) Padding2.) Append Length3.) Divide the input into 512-bit blocks4.) Initialize chaining variables5.) Process Blocks 5.1> copying chaining variables 5.2> Divide current 512 block into sub-
blocks 5.3> perform 4 rounds
![Page 29: Cryptography](https://reader033.vdocuments.us/reader033/viewer/2022061200/54782eafb4af9fcc788b457f/html5/thumbnails/29.jpg)
End of Chapter