Block Cipher¶
Definition¶
Design Principles¶
Security:
- Diffusion: each ciphertext bit should depend on all plaintext bits
- Confusion: complex relationship between key and cipher texts
- Key length: should be large to preclude exhaustive key search
Efficiency:
- Simplicity
- High rate
- Suitability for both hardware and software
AES(Advanced Encryption Standard)¶
SPN(Substitution-permutation network) network¶
Definition of AES¶
SPN and:
- permutation consists of two linear transformation
- all operations are byte oriented
- block size is 128 bits
- round key is 128 bits, generated by a key schedule.
- AES's key can be three lengths:
- 128 bits → 10 rounds
- 192 bits → 12 rounds
- 256 bits → 14 rounds
Plaintext are formed into 4 * 4 bytes block.
Round Operations¶
-
Add round Key(Key mixing)
-
Substitute Bytes
-
Shift rows
-
Mix column
$$ \begin{bmatrix}b_0\b_1\b_2\b_3\end{bmatrix} = \begin{bmatrix}2&3&1&1\1&2&3&1\1&1&2&3\3&1&1&2\end{bmatrix} \cdot \begin{bmatrix}a_0\a_1\a_2\a_3\end{bmatrix} $$ (bitwise exclusive or)
Encryption function¶
Key scheduler¶
DES(Data Encryption Standard)¶
Overview¶
Block size 64 bits, key size 56 bits, 16 rounds of operation
Initial Permutation¶
Key scheduling algorithm¶
Component function¶
Expansion table & Permutation:
S-Box: (Non-linear part)
Problems¶
- Key Space is too small, can be exhausted.
- Block size is small: collusion
Save attempts: Multiple DES¶
Attack on double DES: met in middle
Triple DES: attack takes \(2^{112}\) steps