Download presentation
Presentation is loading. Please wait.
Published byMelvin Dean Modified over 8 years ago
1
Chapter 9: Algorithms Types and Modes Dulal C. Kar Based on Schneier
2
Algorithm Modes A mode combines the basic cipher with some sort of feedback Electronic Codebook Mode (ECB) –C i = E K (P i ) –Padding needed if there is a short block at the end –No Feedback –Vulnerable at beginning and end of a message (stereotyped beginnings and stereotyped endings) –Block replay attack
3
Cipher Block Chaining Mode (CBC) C i = E k (P i XOR C i-1 ) P i = C i-1 XOR D k (C i ) Initialization vector, padding needed Error propagation Security problems –Mallory can append cipher blocks –Replacing a cipherblock by Mallory affects all subsequent blocks –Very long message can show vulnerable patterns (rare!)
4
Stream Ciphers Convert plaintext to ciphertext 1 bit at a time Simplest implementation example: –Key bits: k 1, k 2,..., k i –Plaintext bits: p 1, p 2,..., p i –Ciphertext bits: c i = p i XOR k i –Decryption: c i XOR k i –Security depends on keystream generator
5
Keystream generator Internal state Output function Next state function Internal StateOutput Function Next State Function Key K
6
Self-Synchronizing Ciphers Each keystream bit is a function of a fixed number of previous ciphertext bits Called as ciphertext auto key (CTAK) Internal state is a function of the previous n ciphertext bits Each message begins with n random header bits Problem –A single bit in error can spoil …. –Security problem: playback attack Output Function Internal State CiCi PiPi
7
Cipher Feedback Mode (CFB) Block cipher implemented as a self synchronizing mode 64-bit CFB or any n-bit CFB Encryption –C i = P i XOR E k (C i-1 ) Decryption –P i = C i XOR E k (C i-1 ) Initialization vector needed (IV must be unique) Error Propagation
8
Synchronous Stream Ciphers Keystream is generated independent of the message stream Called as Key Auto-Key (KAK)
9
Output Feedback Mode (OFB) C i = P i XOR S i ; S i = E k (S i-1 ) P i = C i XOR S i ; S i = E k (S i-1 ) Si: state, independent of either plaintext or ciphertext Initialization vector needed
10
Block Chaining Mode C i = E k (P i XOR F i ); F i+1 = F i XOR C i Pi = F i XOR D k (C i ); F i+1 = F i XOR C i
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.