You are on page 1of 9

Substitution technique 

is a classical encryption technique where the characters


present in the original message are replaced by the other characters or
numbers or by symbols. If the plain text (original message) is considered as the
string of bits, then the substitution technique would replace bit pattern of plain text
with the bit pattern of cipher text.

Substitution Technique:
1. Caesar Cipher
2. Monoalphabetic Cipher
3. Playfair Cipher
4. Hill Cipher
5. Polyalphabetic Cipher
6. One-Time Pad

Transposition technique is an encryption method which is achieved by


performing permutation over the plain text. Mapping plain text into cipher text
using transposition technique is called transposition technique

Transposition Techniques
1. Rail Fence Transposition
2. Columnar Transposition

Substitution Technique:

We convert our plain text into cipher text

1) Caesar Cipher :

C=(P+K)/26
c-> Cipher text

P-> Plain Text


K-> Key

For Example :

Plain Text : Today is Friday

K=4

What is the cipher text of Above Plain text USING ceaser cipher ?

Alphabet Number
A 0
B 1
C 2
D 3
E 4
F 5
G 6
H 7
I 8
J 9
K 10
L 11
M 12
N 13
O 14
P 15
Q 16
R 17
S 18
T 19
U 20
V 21
W 22
X 23
Y 24
Z 25
C= (P+K)/26

C=(T+K)/26

=(19+4)/26
C=23

C=O+4

=14+4

=18

C=18

CIPHER TEXT : XSHECMWJVMHEC

P=(C-K)/26

Playcipher Techniques

A B C D E
F G H I,J K
L M N O P
Q R S T U
V W X Y Z

For example :

Using playfair technique encrypt the sentence : Computer through key : network

N E T W O
R K A B C
D F G H I,J
L M P Q S
U V X Y Z

PLAIN TEXT : BALLOON

KEY: NETWORK

CIPHER TEXT: CB PU SN NE
PLAIN TEXT : BA LX LO ON

Vignenere Cipher
Vigenere Cipher is a method of encrypting alphabetic text. It
uses a simple form of polyalphabetic substitution . A
polyalphabetic cipher is any cipher based on substitution,
using multiple substitution alphabets .The encryption of the
original text is done using the Vigenère square or Vigenère
table.
  
Encryption 
 
 The table consists of the alphabets written out 26 times
in different rows, each alphabet shifted cyclically to the
left compared to the previous alphabet, corresponding to
the 26 possible Caesar Ciphers.
 At different points in the encryption process, the cipher
uses a different alphabet from one of the rows.
 The alphabet used at each point depends on a
repeating keyword.
Example: 
 
Input : Plaintext : HITECH COLLEGE
Keyword : AYUSH
Output : Ciphertext :
For generating key, the given keyword is repeated
in a circular manner until it matches the length of
the plain text.
The keyword "AYUSH" generates the key
"AYUSHAYUSHAYU"
The plain text is then encrypted using the process
explained below.
Plain text :H I T E C H C O L L E G E
 KEY AYUSHAYUSHAYU
H G N
Table to encrypt

Plain Text
Key
HILL CIPHER :

C=(KP)mod26

C1 K11 K12 K13 P1


C2 K21 K22 K23 P2
C3 K31 K32 K33 P3

Plain text = pay more money

K= 17 17 5
21 18 21
2 2 19

C=

17 17 5
21 18 21
2 2 19

15
0
24
TRANSPOSITION TECHNIQUE

RAIL FENCE

Plain text = TODAY WE HAVE PARTY

Key =2

T D Y E A E A T
O A W H V P R Y

ENCRYPTED TEXT

TDYEAEATOAWHVPRY

Columnar Transposition :

Example :

Plain Text: Hitechcollege

Key: cubes

Solution

C U B E S
2 5 1 3 4
H I T E C
H C O L L
E G E

Plain text: hitechcollege Cipher Text: TCEHCLEEOGIHL


CIA Model or TRIAD for network security

C= Confidentially

I=Integrity

A= Availability

You might also like