Prepared by:
U n d e r su p e rv isio n o f:
P ro f. D r/ F a w zy Ib ra h im
Security
C I A
Confidential Integrity Authenticati
ity on
Example to solve the Enciphering
Algorithm using Key length 128 bits :
(K)
Key
Enciphering Sequence Deciphering
Algorithm Algorithm
Cipher Key
Sequence Sequence Plain
+ +
m1 Memory C1
… less …
mL Device Cn
Transform each block of plain data into another block of cipher data
(C) under the control of the secret key.
Round
Mix Columns Inverse Mix Columns
1
.. ..
.. ..
. .
Substitute bytes Inverse Substitute bytes
Round 2
Round 9
w [36, 39]
Add round key Add round key
Round 1
Shift rows Inverse Shift rows
•
AES (Advanced Encryption Standard)
(Cont.)
Ø Example:
•
Using S-Box
E for Row & A for
Column
Ø S-BOX:
•
AES (Advanced Encryption Standard)
(Cont.)
Ø Inverse S-BOX:
•
AES (Advanced Encryption Standard)
(Cont.)
• 3. Shift Rows:
•
As it is (without any
• shift)
• One byte shift left
•
Two bytes shift left
•
•
Three bytes shift
left
•
• The Inverse shift row transformation performs the circular shift in the
opposite direction for each of the last three rows, with a one byte circular
right shift for the second row, and so on.
•
AES (Advanced Encryption Standard)
(Cont.)
• 4. Mix Column:
• This transformation can be defined by the following matrix
multiplication on state:
•
•
AES (Advanced Encryption Standard)
(Cont.)
W0 K0 K1 K2 K3
AES (Advanced Encryption Standard)
(Cont.)
• EA D2 73 21 B5 8D BA D2 31 2B F5 60 7F 8D 29 2F
•
• Then the first 4 bytes (first column) of the round key for round 9 are
calculated as follows:
•
•
2 . D E S ( D a ta E n cry p tio n S ta n d a rd )
Issued by Federal Information Processing Standard (FIPS) as a publication 46
January 15, 1977.
•
It designed to encipher and decipher blocks of data consisting of 64 bits under
control of 64 bit key.
Selects 56 bits and permuted those (8 bits in positions 8, 16, 24, 32, 40, 48, 56, 64 one for
parity.
check … Odd parity = 1, and Even parity = 0) (parity check for each byte as we have 8 bytes).
For Permuted Choice 1 we delete the parity check, so we will have 56 bits only.
•
For Permuted Choice 2 we put 56 bits except the following numbers (9, 18, 22, 25, 35, 38, 43,
54), so we will have 48 bits only.
27 49 41 33 25 17 9 14 17 11 24 1 5
1 58 50 42 34 26 18 3 28 15 6 21 10
10 2 59 51 43 35 27 23 19 12 4 26 8
19 11 3 60 52 44 36 16 7 27 20 13 2
63 55 47 39 31 23 15 41 52 31 37 47 55
7 62 54 46 38 30 22 30 40 51 45 33 48
14 6 61 53 45 37 29 44 49 39 56 34 53
21 13 5 28 20 12 4 46 42 50 36 29 32
Number of Left Shifts in Iterations:
• Iteration Number of Left
• Number
1 Shifts
1
• 2 1
•
3 2
•
4 2
•
5 2
•
• 6 2
• 7 2
• 8 2
• 9 1
• 10 2
• 11 2
• 12 2
• 13 2
• 14 2
• 15 2
• 16 1
•
•
Initial Permutation (IP) & Inverse Initial permutation (IP-1 ):
Initial Permutation (IP) Inverse Initial Permutation (IP-1 )
58 50 42 34 26 18 10 2 40 8 48 16 56 24 64 32
60 52 44 36 28 20 12 4 39 7 47 15 55 23 63 31
62 54 46 38 30 22 14 6 38 6 46 14 54 22 62 30
64 56 48 40 32 24 16 8 37 5 45 13 53 21 61 29
57 49 41 33 25 17 9 1 36 4 44 12 52 20 60 28
59 51 43 35 27 19 11 3 35 3 43 11 51 19 59 27
61 53 45 37 29 21 13 5 34 2 42 10 50 18 58 26
63 55 47 39 31 23 15 7 33 1 41 9 49 17 57 25
•Calculations of f (R, K):
E bit-selection Table
32 1 2 3 4 5
4 5 6 7 8 9
8 9 10 11 12 13
12 13 14 15 16 17
16 17 18 19 20 21
20 21 22 23 24 25
24 25 26 27 28 29
28 29 30 31 32 1
Permutation P: permute of 32 bits:
•
• Permutation 32
bits
16 7 20 21
29 12 28 17
1 15 23 26
5 18 31 10
2 8 24 14
32 27 3 9
19 13 30 6
22 11 4 25
Example:
10 1101
First two bits are Row & the other 4 bits are Column.
10 = 2 & 1101 = 13
So the hex number is 10 which describe in 4 bits as 1010
Disadvantages:
•
•Key length of DES = 56 bits + 8 bits parity = 64 bits (small Block size).
•Number of trails to deduce this key = 264 = 1020 trails
•Key length is not enough.
•Require key > 64 bits, so we make to triple DES.
•Slow in software.
3 . Triple DES ( Data Encryption Standard )
Key length •for DES 64 bits (56 bits + 6 parity •128 bits / 192 bits / 256 bits
check)
•for Triple DES 168 bits (3 X 56 bits)
Designers • USA Cryptographers Dr. Joan Daemen & Dr. Vincent Rijmen =
•
(Rijndael)
From Belgium