<<

Symmetric

Week 9

Stallings: Ch 3 & 6 Stallings: Ch 4

CNT-4403: 19.March.2015 1 Today’s Class

. Symmetric Ciphers . Multiple Encryption . Modes of Operation

CNT-4403: 19.March.2015 2 Symmetric

Encryption Decryption Key

Plaintext Encryption Decryption Algorithm = Algorithm

CNT-4403: 19.March.2015 3 Symmetric Ciphers

. Stream Ciphers . Block Ciphers

CNT-4403: 19.March.2015 4 Stream Ciphers

. Encrypt one bit (byte) at a time . Example: Vigenere, Vernam . Length of key = length of (clear/cipher) text . Hard to between sender and receiver

Bit-stream Bit-stream Key (K) Key (K) generator generator

Key ki Key ki Plaintext Plaintext

Pi Ci Pi Plaintext Plaintext

CNT-4403: 19.March.2015 5 Block Ciphers

. Encrypt one block of text at a time . 64-128 bit long . Encryption key = Decryption key Focus: Block Ciphers! . Shared by sender and receiver

64 bits 64 bits Key (K)

Encryption Algorithm

Plaintext Ciphertext

CNT-4403: 19.March.2015 6 Principles

. n bit input to n bit output . 2n possible inputs . Each must produce a unique cipertext . Otherwise encryption is not reversible . No decryption possible

CNT-4403: 19.March.2015 7 Ideal Block Cipher

Need 2n table to encrypt!

CNT-4403: 19.March.2015 8

. Introduced by Horst Feistel . 16 + 1 rounds

Plaintext What is F ? LE0 RE0

F K1

Li = Ri–1 LE1=RE0 RE1 Ri = Li–1  F(Ri–1, Ki)

CNT-4403: 19.March.2015 9 Feistel Cipher Structure

CNT-4403: 19.March.2015 10 (DES)

. Most widely used block cipher in world . Adopted in 1977 by NBS (now NIST) . As FIPS PUB 46 . Encrypts 64-bit data using 56-bit key . Has been considerable controversy over its security

CNT-4403: 19.March.2015 11 DES History

. IBM developed Lucifer cipher . Team led by Feistel in late 60’s . Used 64-bit data blocks with 128-bit key . Redeveloped as a commercial cipher with input from NSA and others . 1973: National Bureau of Standards (NBS) issued request for proposals for a national cipher standard . IBM submitted their revised Lucifer which was eventually accepted as the DES

CNT-4403: 19.March.2015 12 DES Controversy

. DES standard is public . Considerable controversy over design . Choice of 56-bit key (vs Lucifer 128-bit) . Design criteria were classified . Subsequent events and public analysis show in fact design was appropriate . Use of DES has flourished . Especially in financial applications . Still standardised for legacy application use . To be replaced by AES

CNT-4403: 19.March.2015 13 DES Encryption

CNT-4403: 19.March.2015 14 Initial Permutation (IP)

. First step of the data computation . IP reorders the input data bits . Even bits to LH half, odd bits to RH half . Quite regular in structure (easy in h/w)

. Example:

IP(675a6967 5e5a6b5a) = (ffb2194d 004df6fb)

CNT-4403: 19.March.2015 15 DES “Round” Structure

. Uses two 32-bit L & R halves . Feistel cipher:

Li = Ri–1 Ri = Li–1  F(Ri–1, Ki)

CNT-4403: 19.March.2015 16 DES Structure: Function F

F takes 32-bit R half and 48-bit subkey:

. Expands R to 48-bits using perm E . Adds to subkey using XOR . 8 S-boxes to get 32-bit result . Finally permutes using 32-bit perm P

CNT-4403: 19.March.2015 17