CRP2
CRP2
IDEA:
P1 P2 P3 P4
K1
Round - 1
K6
K7
Round - 2
K12
K43
Round - 8
K48
K49
Output Transformation
K52
CT 64 bit
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 2/29
UNIT-II BLOCK CIPHER ALGORITHMS
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 3/29
UNIT-II BLOCK CIPHER ALGORITHMS
Summary:
✓ IDEA is a strong encryption algorithm
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 4/29
UNIT-II BLOCK CIPHER ALGORITHMS
BLOWFISH:
Features:
✓ Fast: Encryption rate on 32 bit microprocessor is 26 clock
cycles/sec
✓ Compact: Can execute in less than 5 kb of memory
✓ Simple: Uses only primitive operations i.e. Addition XOR and
table lookup
✓ Secure: Having Variable key length up to maximum of 448 bits
✓ Suitable for the applications where the key remains constant for
a long interval of time
Working:
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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:
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 7/29
UNIT-II BLOCK CIPHER ALGORITHMS
Features of AES:
Working:
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 8/29
UNIT-II BLOCK CIPHER ALGORITHMS
Designed to be:
✓ resistant against known attacks
✓ speed and code compactness on many platforms
✓ Decryption algorithm different than the encryption
1 2 3 4
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 13/29
UNIT-II BLOCK CIPHER ALGORITHMS
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 14/29
UNIT-II BLOCK CIPHER ALGORITHMS
M - Modulus m>0
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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)
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 16/29
UNIT-II BLOCK CIPHER ALGORITHMS
Cyclic Encryption:
EDE
DTi Date
,Time + EDE
Vi+1 Seed
Value
+ EDE
Vi Seed Value
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 17/29
UNIT-II BLOCK CIPHER ALGORITHMS
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 18/29
UNIT-II BLOCK CIPHER ALGORITHMS
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 19/29
UNIT-II BLOCK CIPHER ALGORITHMS
RC4 Algorithm:
RC4 Initialization of S:
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 20/29
UNIT-II BLOCK CIPHER ALGORITHMS
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 24/29
UNIT-II BLOCK CIPHER ALGORITHMS
C D
Shifted E
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 25/29
UNIT-II BLOCK CIPHER ALGORITHMS
D F
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 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
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 27/29
UNIT-II BLOCK CIPHER ALGORITHMS
A=A+S[0]
B=B+S[1]
For i=1 to r
A=((A XOR B) <<< B)+S[2i]
B=((B XOR A) <<< A)+S[2i+1]
Next i
For I = r to 1 step-1
Next I
B= B-S [1]
A= A-S [0]
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 28/29
UNIT-II BLOCK CIPHER ALGORITHMS
Question:
Compiled by: MS. VIBHA PANDEY. of Computer Science & Engg,SSTC ,BHILAI 29/29