Block and Stream Ciphers Reference Matt Bishop Computer
Block and Stream Ciphers • Reference – Matt Bishop, Computer Security, Addison Wesley, 2003. Block and Stream Ciphers 1
Block Ciphers • Block ciphers break messages into fixed length blocks, and encrypt each block using the same key. • The Data Encryption Standard (DES) is an example of a block cipher, where blocks of 64 bits are encrypted using a 56 -bit key. Block and Stream Ciphers 2
Formal Definition of a Block Cipher • Let E be an encipherment algorithm, and let Ek(b) be the encipherment of the message b with key k. • Let a message m=b 1 b 2. . . where each bi is of a fixed length. • A block cipher is a cipher for which Ek(m) = Ek(b 1)Ek(b 2). . . Block and Stream Ciphers 3
Stream Ciphers • Stream ciphers, like block ciphers, break message into fixed length blocks, but use a sequence of keys to encrypt the blocks. • The Vigenère cipher is an example of a stream cipher. Block and Stream Ciphers 4
Formal Definition of a Stream Cipher • Let E be an encipherment algorithm, and let Ek(b) be the encipherment of the message b with key k. • Let a message m=b 1 b 2. . . where each bi is of a fixed length, and let k = k 1 k 2. . • A stream cipher is a cipher for which Ek(m) = Ek 1 (b 1)Ek 2(b 2). . . Block and Stream Ciphers 5
Synchronous Stream Ciphers • The one-time pad is also a stream cipher, and can be implemented by exclusive-oring each bit of the key with one bit of the message. • A synchronous stream cipher generates the key string from a source other than the message itself. • A source for the key could come from an randomly generated binary sequence. Block and Stream Ciphers 6
Self-Synchronous Stream Ciphers • Self-synchronous stream ciphers obtain a key from the message itself. • An autokey cipher is a self-synchronous cipher that uses the message itself as a key. Block and Stream Ciphers 7
- Slides: 7