BLOCK CIPHER PRINCIPLES
STREAM CIPHER
• Encrypts a digital data stream 1-bit or 1-byte at a time.
BLOCK CIPHER
• Encrypts a block of plaintext to produce a ciphertext block of equal length. • A typical block size is 64-bits. • The vast majority of network-based conventional cryptographic applications make use of block ciphers.
EXAMPLE
Consider 2-bit block
0 1 2 3
0 1 2 3
00 ! 11; 01 ! 10; 10 ! 11; 11 ! 01
BLOCK CIPHER THEORY
• It operates on a plaintext block of n-bits and produces a ciphertext block of n-bits. • There are 2n possible different plaintext blocks. • Each plaintext block must produce a unique ciphertext in order to be reversible.
EXAMPLE
• 4-bit blocks, n = 4. o 24, which is 16 plaintext blocks. o Therefore 16 ciphertext blocks • Fig. 3.4 o The 16 plaintext blocks are 0, 1, 2, 3, 4 …….., 14, 15. o They are (0000), (0001), (0010) …….(1111). • Table 3.1
PRACTICAL PROBLEM
• For small block size, example n = 4, the system is equivalent to a classical substitution cipher. • Vulnerable to a statistical analysis of plain text. • 24 = 16 unique mapping between plaintext and cipher text and make possible 4x16 = 64 mappings • For n = 64, 64x264 = 270 = 1021 mappings. • The mapping itself is the KEY. • Therefore, arbitrary reversible substitution cipher for a large block size is not practical. • Having a very large keyspace increase security but produces different difficulty. • Therefore Feistel Cipher is proposed using diffusion and confusion functions.
Table 3.1 Encryption and Decryption Tables for Substition Cipher of Figure 3.4
Plaintext Ciphertext Ciphertext Plaintext 0000 1110 0000 1110 0001 0100 0001 0011 0010 1101 0010 0100 0011 0001 0011 1000 0100 0010 0100 0001 0101 1111 0101 1100 0110 1011 0110 1010 0111 1000 0111 1111 1000 0011 1000 0111 1001 1010 1001 1101 1010 0110 1010 1001 1011 1100 1011 0110 1100 0101 1100 1011 1101 1001 1101 0010 1110 0000 1110 0000 1111 0111 1111 0101
BLOCK CIPHER PRINCIPLES
DIFFUSION (PLAINTEXT ⇔ CIPHERTEXT)