DES

You should Know First

1.Symmetric cipher 

Symmetric cipher is a kind of cipher which use the same key when assuming encryption and decryption(The opposite is Asymmetric cipher). It includes Block cipher and Stream cipher

2.Block cipher 

Symmetric cipher operating on fixed length groups of bits called blocks.(the opposite is Stream cipher, which encrypts plaintext on each bit continuously)

3.Cyclic shift

Operation on bitstring blocks. Denote by b<

4.Parity bit

A bit added to a string of binary code to ensure that the total number of 1-bits in the string is even or odd.

5. Permutation

Confusion and Diffusion

The design of block cipher aims to provide confusion and diffusion.

Confusion means that each bit of the ciphertext should depend on several parts of the key, obscuring the connections between the two.

Diffusion means that if we change a single bit of the plaintext, then (statistically) half of the bits in the ciphertext should change.

Overview structure 


1.Apply Initial Permutation(IP) on  plaintext block(64bits) 

2.Split block to two 32bit-blocks,denoted by,.

3.Compute  for 16 rounds.(F is festial function,Ki is 48-bit subkey derived from main key via keys schedule. In other words, we compute 16 different subkeys from main key).

4.Final Permutation(FP),the inverse of IP. 

Key schedule 

The 64 bit key is actually 56-bit key plus 8 parity bits.

1.Apply a permutation PC-1 which removes the parity bits. This results in 56 bits.

2.Split result into half to obtain

3.For each rounds , we compute 

        where 

4.Join Ci and Di together , and apply a permutation PC-2 which produce a 48 bit output. We can obtain 16 different 48-bit subkeys.

Feistel function 


Feistel function

1.Expansion permutation: Expand 32-bit message half block to 48-bit block by doubling 16 bits and permuting them.

2.Compute xor of this 48-bit block with round key Ki

3.S-box:Split 48 bit into eight 6-bit blocks. Each of them is given as input to eight substitution boxes, which substitute 6-bit block by 4-bit block 

4.P-box:Combine these eight 4-bit blocks to 32-bit block and apply another permutation.

Security

The design of DES aims to provide confusion and diffusion.

1.Confusion means that each bit of the ciphertext should depend on several parts of the key, obscuring the connections between the two.

2.Diffusion means that if we change a single bit of the plaintext, then (statistically) half of the bits in the ciphertext should change.

DES is secure in theory, but as it only 56 bit keys, it has only 2^56 security, which is easy to compromise using ordinary computer.

"2DES" is not significantly more secure than DES(No more than 2^57) 

meet-in-the-middle attack: We use "C=K1(K2(M))". First, try all 2^56 possible keys on K2 and store all the K2(M). Sort them in order.(2^56 work).Then, try all the 2^56 possible keys on K1 and compute the decryption on C with K1. Compare the result with stored K2(M).That is also 2^56 work for checking. 

你可能感兴趣的:(DES)