cryptography

Post on 28-Nov-2014

106 Views

Category:

Documents

6 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Cryptography

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

Hello John

Encrypt

Ifmmp KpioInternet

Hello John

Decrypt

Ifmmp Kpio

Cryptographic Techniques

Substitution Techniques. -- Caesar Cipher -- Modified version of Caesar Cipher -- Mono-alphabetic Cipher -- Homophonic Cipher -- Polygram Cipher -- Polyalphabetic Cipher

with a shift of 3

Shift cipher (ceasar cipher)5

monoalphabetic cipher6

Homophonic Cipher

Polygram Cipher

Polyalphabetic cipherVigenère Tableau

9

key: deceptivedeceptivedeceptive plaintext: wearediscoveredsaveyourself ciphertext: ZICVTWQNGRZGVTWAVZHCQYGLMGJ

10

Transposition Techniques. -- Rail Fence Technique -- Single Columnar Transposition

Technique --Single Columnar Transposition

Technique with multiple rounds -- Vernam Cipher(One time pad) -- Book Cipher

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

Columnar Transposition Technique

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.

Cryptographic Mechanisms

Symmetric Key Cryptography Asymmetric Key Cryptography

Symmetric Key Cryptography

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

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

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

Continued..

Alice

Tom

Bob

A=73 mod 11=2

A=78 mod 11=9, B=76 mod 11=4

79 mod 11=8

A=2

A=9

B=8

B=4

AliceTom Bob

Intercept

Intercept

A=2, B=4 A=2, B=8 A=9, B=8

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

MITM attack is also known as: Bucket-brigade attack Fire brigade attack Monkey-in-the-middle attack Session hijacking TCP hijacking TCP session hijacking

Asymmetric Key Cryptography

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

Digital Signature

Message Digest

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

End of Chapter

top related