Is - Unit 3 - Feasel Cipher
Is - Unit 3 - Feasel Cipher
Is - Unit 3 - Feasel Cipher
11
DES – General Structure with Key Generation
12
Step 2: Initial Permutation
• The bits are arranged as
per this table –
• 58th bit of the plaintext will
become 1st bit of the
initially permuted message
Step 3: Dividing the plaintext into two parts
• Initially permuted plaintext is divided into two halves: L0 and R0
Step 4: Function
• The function F(.) represents the heart of the DES algorithm. This function implements
the following operations:
• Expansion: The right 32-bit half-block is expanded to 48 bits using the expansion
permutation (E) table, E(Rn-1).
• Key mixing: The expanded result is combined with a subkey using an XOR operation.
Sixteen 48-bit subkeys (one for each round) are derived from the main key using the
key schedule, Kn + E(Rn-1).
• Substitution: After mixing in the subkeys, the block is divided into eight 6-bit pieces
and fed into the substitution boxes (S-boxes), which implements nonlinear
transformation. Each 6-bit piece uses as an address in the S-boxes where the first and
last bits are used to address the ith row and the middle four bits to address the jth
column in the S-boxes. The output of each S-box is 4-bit length piece. The output of all
eight S-boxes is then combined into 32 bit section.
• Kn + E(Rn-1) = B1B2B3B4B5B6B7B8
• S(Kn + E(Rn-1)) = S1(B1)S2(B2)S3(B3)S4(B4)S5(B5)S6(B6)S7(B7)S8(B8)
• 4-Permutation: The 32 bits outputs from the S-boxes are rearranged using the P-box,
F=P(S(Kn + E(Rn-1)))
Step 4: Function
• Expansion: Right half Ri-1 – is expanded to 48 bits
using an Expansion box
• Key Mixing: These 48 bits are XORed with the
Expansion E-box
subkey – Ki
• S-Box: 48 bits outputs are fed into 8 Substitution
boxes of 6 bits
• From each S-box – 4 bits output are
generated
• All outputs are combined – 32 bits
• Permutation: These 32 bits are rearranged using
P-Box . Output is 32 bits
Step 4: Function –Expansion Box
• Write 32 numbers into 4 columns
and 8 rows
• Add 1 number at the start and
another number at the end of each
row
• 32, 5
• 4, 9
• 8, 13
• 12, 17
• 16, 21
• 20, 25
• 24, 29
• 28, 1
Step 4b: Function (Contd…)
• XOR-ed output of the subkey and pt box
is fed into the S-boxes
23
Strength of DES
25
Is it Unbreakable?
• First challenge in 1997 (thousands of volunteers connected by Internet) :
solved in 96 days (3 months). Message was "The secret message is: Many
hands make light work."
• 1998 EFF (Electronic Frontier Foundation, non-profit organization) machine
(costs $250K): 3 days
• 1999 (distributed.net and Deep Crack, combined): 22 hours and 15 minutes
(Message was “See you in Rome (second AES Conference, March 22-23,
1999)”)
26
Weak Keys
• DES has 4 weak keys (64-bit)
• 01010101 01010101 , FEFEFEFE FEFEFEFE, E0E0E0E0 F1F1F1F1, 1F1F1F1F
0E0E0E0E
• the outcome of the Permuted Choice 1 (PC1) in the DES key schedule leads to
round keys (K1---K16) being either all zeros, all ones or alternating zero-one
patterns.
• Since all the subkeys are identical, and DES is a Feistel network, the encryption
function becomes self-inverting; that is, encrypting twice with a weak key K
produces the original plaintext.
• Weak keys should be avoided at key generation.
DES semi-weak keys
• DES has also semi-weak keys, which only produce two different subkeys, each used
eight times in the algorithm
• We can refer to them as K1 and K2
• They have the property that EK1(EK2(x))=x
• There are six pairs of DES semi-weak keys
An Example