<<

e-PG Pathshala Information Technology Information security

Module 4: polyalphabetic –Vigenere , Autokey system, One- Time pad, Transposition techniques,

Homophonic substitution ciphers:

 Homophonic maps a character to more than one . For example, “A” could correspond to 3, 15, 23; while for “B” this could be 5, 17, 21.  This type of substitution makes or brute force harder but it doesn’t hide all statistical properties.  With the help of powerful this can be broken in a few seconds.

Polyalphabetic Cipher:

 Monoalphabetic substitution rules are used.  decides which monoalphabetic substitution is to be performed.

Vigenere Cipher:

 P=p0p1p2……pn-1

 K=k0k1k2……km-1

 C=C0C1C2……Cn-1

 C=E(K,P) = E[(k0k1k2……km-1, p0p1p2……pn-1)]

=(p0+k0) mod 26, (p1+k1) mod 26, …(pm-1+km-1) mod 26, (pm+k0) mod 26 … K is of length m. For m letters of , key is used. For the next m letters of plaintext, the key letters are repeated until all plaintext letters are used.

 Pi=(Ci – ki mod m) mod 26

Numeric value for each alphabet: 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

e-PG Pathshala Information Technology Information security

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

Vigenere Cipher:

 Key : mask

 Plaintext : meetmeatfield

:

key 12 0 18 10 12 0 18 10 12 0 18 10 12

plaintext 12 4 4 19 12 4 0 19 5 8 4 11 3

ciphertext 24 4 22 3 24 4 12 19 23 18 16 11 21

Strength of Vigenere Cipher:

 The letter frequency is masked. But key is repeated so for the same plaintext letter and key letter – same ciphertext letter is achieved.

 For meet and me – me generates same ciphertext ye because key is repeated.

Autokey system:

 Periodic nature of the keyword can be overcomed by nonrepeating keyword that is as long as an autokey system.

 Key word is concatenated with plaintext to provide a running key.

 Key : mask meet meatf

e-PG Pathshala Information Technology Information security

 Plaintext : meetmeatfield

 Ciphertext : key 12 0 18 10 12 4 4 19 12 4 0 10 5 plaintext 12 4 4 19 12 4 0 19 5 8 4 11 3 ciphertext 24 4 22 3 24 8 4 13 17 12 4 21 8

VERNAM cipher:

 Cipher works on binary data(bits)

 ci=pi ki

Where

Pi = ith binary digit of plaintext

Ki = ith binary digit of key

ci = ith binary digit of ciphertext

= exclusive – or (XOR) operation

pi=ci  ki One – Time pad:

 The key is used to encrypt and decrypt a single message, then key is discarded.

 Each new message requires a new key of the same length as the new message. Such a scheme, is known as a one-time pad.

 One time pad is unbreakable.

 No statistical relationship to the plaintext.

 Includes space so 27 characters scheme.

One – Time pad Example:

e-PG Pathshala Information Technology Information security

 Plaintext : mr mustard

 key : pxlmvmsydo

 Ciphertext : ANKYODKYUR

 Plaintext : miss scarl

 Key : pftgpmiydg

 Ciphertext : ANKYODKYUR

Cryptanalyst can find keys and can not decide which plaintext is true and which key is correct.

One Time pad – Difficulties in using:

 Practically difficult to generate large quantities of random keys.  How to distribute key and protect them. Because for every message , equal length of key is to be sent to sender and receiver.

One time pad gives perfect secrecy. But limited use . Used only for highly secure low bandwidth channels.

Transposition Techniques. – permutation of plaintext letters :

Rail fence cipher:

Message “ all gather at lawn”.

Rail fence depth 2

a l a h r t a n

l g t e a l W

The encrypted message :

ALAHRTANLGTEALW.

Cryptanalyst can break this.

e-PG Pathshala Information Technology Information security

Transposition Techniques. –– Complex scheme:

 permutation of plaintext letters

 Write the message row by row , read column by column. Permutation is done by order of the column.

 Plaintext : discusstheformulainmeeting

 Key :3214 3 2 1 4  Plaintext d i s c

u s s t

h e f o

r m u l

a i n m

e e t i

n g x y

 Ciphertext : ssfuntxisemiegduhraenctolmiy

 For key 3214, start with column labeled 1- column 3 in table. Write all the letters then column labeled 2 – column 2 in the table. Then column labeled 3 and 4.

 This type of is not secure because letter frequencies in ciphertext are same as plaintext.

 Cryptanalyst can put ciphertext in a and play with column position.

Stegnography:

 Plaintext message is hidden.

e-PG Pathshala Information Technology Information security

 Simple method – An arrangement of words or letters in the message can give real message.

 Text : Driveon Road Open passage.

 Hidden message : First letter of each word - DROP

Stegnography techniques:

 Character Marking – Selected letters are overwritten in pencil and not visible unless hold at an angle to bright light

 Invisible ink – leave no visible trace until heat or some chemical is applied to the paper.

 Pin punctures – pin punctures on selected letters. Not visible unless the paper is held up in light.

Advantage : hide the secret communication

Disadvantage : Lot of overhead to hide few bits of information