Week 5- Cryptography -- Block Ciphers
Week 5- Cryptography -- Block Ciphers
DES
Week 5
Overview
• terms and principles
• Claude Shannon
• Feistel cipher
• DES
A few terms
• block cipher
• block of plaintext is treated as a whole & used to
produce a ciphertext block of equal length
• typical size: 64 bits
• most modern ciphers are block ciphers
• stream cipher
• digital data is encrypted one bit (or one unit) at a time
Li = Ri-1
Ri = (Li-1 XOR F(Ri-1 , Ki))
Li = Ri-1
Ri = (Li-1 XOR F(Ri-1 ,Ki))
One DES Round
<----32 bits------> <----32 bits------>
Li-1 Ri-1
exp/perm to 48
--- 48 bits
Ki
xor
--- 48 bits
S-box
--- 32 bits
permutation
--- 32 bits
xor
Li Ri
Encryption (Round) (cont.)
32 1 2 3 4 5
4 5 6 7 8 9
8 9 10 11 12 13
12 13 14 45 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
Encryption (Round) (cont.)
F
S-box
[1
]
S-box(values in binary)
Key length in DES
DES Key generation
Key Generation (cont.)
• Original Key: Key0
• Permuted Choice One: PC_1( )
• Permuted Choice Two: PC_2( )
• Schedule of Left Shift: SLS( )
•
•
•
( C 0 , D0 ) PC _ 1( Key 0 )
( Ci , Di ) SLS ( Ci 1 , Di 1 )
Keyi PC _ 2( SLS ( Ci 1 , Di 1 ))
Decryption
• The same algorithm as
encryption.
• Reversed the order of key
(Key16, Key15, … Key1).
• For example:
• IP undoes IP-1 step of
encryption.
• 1st round with SK16
undoes 16th encrypt round.
[1
]
Key property
• avalanche
• small change in plaintext or in key produces
significant change in ciphertext
• test for avalanche
• encrypt two plaintext blocks that differ only in one bit
• about half the (ciphertext) bits will differ
DES controversy
• DES choice was intensely criticized:
• original LUCIFER key length was 128 bits, and DES
used 56 bit key (to fit on chip, they said)
• critics feared brute force attacks
• design criteria for the S-boxes was classified, so users
not sure that internal structure was free of hidden weak
points that might let NSA break cipher
DES status
• no weak points have surfaced
• DES is widely used
• 1994, NIST reaffirmed DES for federal use
• NIST recommends DES use for all except classified
information
• generally considered a sound standard
• Need more security: use Triple DES
• Future: Adv. Encryption Standard (AES)
Cryptanalysis of DES
• increased computing speed has made a 56 bit key
susceptible to exhaustive key search
• demonstrated breaks:
• 1997 – taking a few months, a large network of
computers broke DES
• 1998 – Electronic Frontier Foundation broke DES in a
few days on dedicated hardware
• 1999 – break accomplished in 22 hours
• in practice DES is used, and works
1997 break
• RSA Laboratories issued reward of $10,000 for finding a
DES key, given cipher text for known and unknown plaintext
• solution found in 96 days – involved 70,000 computers on
the Internet
• an embarrassingly parallel problem – just divide the key
space being searched (brute force) each time a new
computer joins in
• found the key after searching 1/4 key space
References & Detailed readings