11.07.2015 Views

Cryptography - Sage

Cryptography - Sage

Cryptography - Sage

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTERSIXStream CiphersA stream cipher enciphers individual characters, usually bits, of a plaintext message oneat a time, with a cipher that varies with time. Block ciphers are memoryless, in the sensethat the same function is used to encipher successive blocks. Stream ciphers, in contrast,must have memory. As such they are state functions because the current state S i of thefunction is recorded in a memory buffer. We saw how various modes of operation (CFB,OFB) turn a memoryless block cipher into a state function by feedback buffer. A keystreamis a sequence of characters generated from the key and the current state, as input to thestream cipher.6.1 Types of Stream CiphersIn a synchronous stream ciphers the keystream is generated independently of theplaintext message (or ciphertext). Given a key K, if the initial state is designated S 0 ,then, for each cycle i = 0, 1, 2, . . . , the following equations describe the generation of thekeystream, ciphertext, and next state:Key stream function: k i = g K (S i )Output function: c i = h(k i , m i )Next state function: S i+1 = f K (S i )An additive binary stream cipher is defined to be a synchronous stream cipher in whichh = XOR.A self-synchronizing or asynchronous stream cipher is a stream cipher in which thekeystream is a function of the key and a fixed number of previous ciphertext characters.Given a key K and initial state S 0 = (c −t , . . . , c −1 ), the keystream and ciphertext aregenerated for each cycle i = 0, 1, 2, . . . as for a synchronous stream cipher:Key stream function: k i = g K (S i )Output function: c i = h(k i , m i )with the next state set to S i+1 = (c i+1−t , . . . , c i ).49

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!