Unit 2 CNS
Unit 2 CNS
IDEA:
Idea is reversible like DES i.e. same algorithm can be used for
P1 P2 P3 P4
K1
Round - 1
K6
K7
Round - 2
K12
K43
Round - 8
K48
K49
Output Transformation
K52
CT 64 bit
1/29
UNIT-II BLOCK CIPHER ALGORITHMS
Each sub key consists of 16-bit and are applied on four input
blocks from p1 to p4
2/29
UNIT-II BLOCK CIPHER ALGORITHMS
3/29
UNIT-II BLOCK CIPHER ALGORITHMS
Summary:
IDEA is a strong encryption algorithm
4/29
UNIT-II BLOCK CIPHER ALGORITHMS
BLOWFISH:
cryptographic algorithm
Features:
cycles/sec
table lookup
Suitable for the applications where the key remains constant for
a long interval of time
Working:
5/29
UNIT-II BLOCK CIPHER ALGORITHMS
32bit 32bit
P1 (32bit)
XOR F XOR
P2 (32bit)
XOR F XOR
13 – More Rounds
P16 (32bit)
XOR F XOR
6/29
UNIT-II BLOCK CIPHER ALGORITHMS
2. for I = 1 to 16
XL = XL XOR P(i)
XR = f(XL) XOR XR
SWAP XL, XR
Next i
3. SWAP XL, XR
4. XL = XL XOR P18
5. XR = XR XOR P17
TWO FISH:
7/29
UNIT-II BLOCK CIPHER ALGORITHMS
Features of AES:
Working:
8/29
UNIT-II BLOCK CIPHER ALGORITHMS
Designed to be:
resistant against known attacks
1 2 3 4
9/29
UNIT-II BLOCK CIPHER ALGORITHMS
Sbox
In this step first row is untouched the other three rows are shifted by a
variable amount as shown below
A B C D A B C D
E F G H Shift H E F G
I J K L Rows K L I J
M N O p N O P M
In this step 4 bits of every column is mixed in linear fashion, its not
possible to depict
10/29
UNIT-II BLOCK CIPHER ALGORITHMS
Each Key byte is XORed with the corresponding input byte and result
become CT for this round
A B C D A B C D
E F G H E F G H
I J K L I J K L
M N O p M N O P
XOR
Input Key
A B C D
E F G H Output
I J K L
M N O P
11/29
UNIT-II BLOCK CIPHER ALGORITHMS
CAST:
CAST takes its name from the initials of its designers- Carlisle
Adams and Stafford Tavares
They allow the royalty free uses of the cipher to any one
CAST
12/29
UNIT-II BLOCK CIPHER ALGORITHMS
XOR two cipher texts obtained with the same key stream to
obtain the XOR of the plaintexts –enough to know about the
structure of the files to effectively attack them
13/29
UNIT-II BLOCK CIPHER ALGORITHMS
14/29
UNIT-II BLOCK CIPHER ALGORITHMS
M - Modulus m>0
15/29
UNIT-II BLOCK CIPHER ALGORITHMS
Cryptographic Generators
Cyclic Encryption:
C
Computer with
Period N
C+1
Master Key Km
Encryption
Algorithms
Xi=EKm(C+1)
master key.
16/29
UNIT-II BLOCK CIPHER ALGORITHMS
Cyclic Encryption:
EDE
DTi Date
,Time + EDE
Vi+1 Seed
Value
+ EDE
Vi Seed Value
they make use of the same pair of 56 bit key which must be kept
17/29
UNIT-II BLOCK CIPHER ALGORITHMS
18/29
UNIT-II BLOCK CIPHER ALGORITHMS
19/29
UNIT-II BLOCK CIPHER ALGORITHMS
RC4 Algorithm:
RC4 Initialization of S:
20/29
UNIT-II BLOCK CIPHER ALGORITHMS
21/29
UNIT-II BLOCK CIPHER ALGORITHMS
RC5 Algorithm:
Working:
1. Basic Principles:
Word size (PT block size) in bits: RC5 encrypts two word
blocks at a time and they are of 16, 32, 64 bits
Output resulting from the RC5 i.e. CT has same size as the
input plaintext
r- No. of rounds
22/29
UNIT-II BLOCK CIPHER ALGORITHMS
RC5-32/16/16 means
2. Principle of operation:
Increment I by 1
Call F as C
(i.e. C=F)
Check
is I>r?
Call H as D
(i.e. H=D)
Stop
23/29
UNIT-II BLOCK CIPHER ALGORITHMS
First two sub keys s[0] and s[1] are added to A and B and
produces C & D
Now the rounds will begin and in each round there are following
operations
1. Bitwise XOR
2. Left Circular Shift
3. Addition with the next sub key for both C and D
Original PT
A A
A A
S [0] + + S [1]
C C
24/29
UNIT-II BLOCK CIPHER ALGORITHMS
C D
Shifted E
25/29
UNIT-II BLOCK CIPHER ALGORITHMS
D F
26/29
UNIT-II BLOCK CIPHER ALGORITHMS
Shifted G
In this step we check to see if all the rounds are over or not for
this we perform the following steps
Increment I by 1
Check to see if i<r perform following
I=i+1
If i<r
Call F as C again
Call H as D again
Go back to step1
Else
Stop
End if
27/29
UNIT-II BLOCK CIPHER ALGORITHMS
A=A+S[0]
B=B+S[1]
For i=1 to r
Next i
For I = r to 1 step-1
Next I
B= B-S [1]
A= A-S [0]
28/29
UNIT-II BLOCK CIPHER ALGORITHMS
Question:
29/29