Tuesday, November 18, 2014

TRANSPOSITION


Is the position of the characters of the plaintext
1. Rail Fence Technique
In this case will be given plaintext and dept =2 or depth=3
Step 1 : Arrange the alphabets of the plain text diagonally
Step 2 : The cipher text will be read as row –wise
Ex : Dept = 2 , Given text à Come home 
C                             M                            H                             M                                                                                 
                O                             E                              O                             E                                                        
From this case, the cipher text will be C M H M     O E O E 
Depth= 3
C                                                             H                                                                                                                        
                O                             E                              O                             E                                                        
                                M                                                            M                                                         
From this case, the cipher text will be CH OEOE  MM

2. Simple Columnar

In this step will be given Plaintext (PT) and Random number of columns
Step 1 : Arrange the alphabets of the plaintext row-wise in the number of columns decided by the user
Step 2 : Specify the random order of columns.
Step 3 : Write the cipher text alphabets according to the order in step 2

Ex:
Given à Number of columns 1-6 , Plain Text à Come Home Tomorrow
1
2
3
4
5
6
C
O
M
E
H
O
M
E
T
O
M
O
R
R
O
w



So the Chiper text wil be  6,4,3,1, 2,5 oo,eow,mto,cmr,oer,hm or 6,5,4,3,2,1 its random.
In this case the Cipher text can be applied for second time so the plain text can’t be easily read.
1
2
3
4
5
6
O
O
E
O
W
M
T
O
C
M
R
O
E
R
M
H



3. One-time Pad or VERNAM CIPHER

In this case will be given PT and One-time Pad and A=0
Step 1 : Convert the alphabets of the plaintext into their corresponding numerical equivalents.
Step 2 : Convert the alphabets of the one-time pad into their corresponding numerical equivalents.
Step 3 : Add the corresponding numerical equivalents with the numerical equivalents of one-time pad.
Step 4 : Subtract 26 if  the sum is greater than 25
Ex:
PT à  H O W ARE YOU
One-time Pad à N C B T Z Q A R X
Change it into numerical code & add them each
PT
H
O
W
A
R
E
Y
O
U

7
14
22
0
17
4
24
14
20
OTP
N
C
B
T
Z
Q
A
R
X
Step 3
13
2
1
19
25
16
0
17
23
SUM
20
16
23
19
42
20
24
31
43
Step 4




26


26
26

20
16
23
19
16
20
24
5
17
Ciphtxt
U
Q
X
T
Q
U
Y
F
R

Decryption :
In this case will be given One-time pad
Step 1 : Convert the alphabets of the plaintext into their corresponding numerical equivalents.
Step 2 : Convert the alphabets of the one-time pad into their corresponding numerical equivalents.
Step 3 : Subtract one-time pad from cipher text
Step 4 : If the different is negative than add 26 to it.

CT
U
Q
X
T
Q
U
Y
F
R

20
16
23
19
16
20
24
5
17
OTP
N
C
B
T
Z
Q
A
R
X
Step 3
13
2
1
19
25
16
0
17
23
SUM
7
14
22
0
-9
4
24
-12
-6
step 4




26


26
26

7
14
22
0
17
4
24
14
20
PlainText
H
O
W
A
R
E
Y
O
U

No comments:

Post a Comment