Stream cipher

cosmos 6th July 2017 at 1:28pm
Cipher

intro. A stream cipher encrypts bits individually

For the iith bit:

encrypt: yi=e(xi)=xi+si mod2y_i = e(x_i) = x_i + s_i ~\mathrm{mod}2

decrypt: xi=d(yi)=yi+si mod2x_i = d(y_i) = y_i + s_i ~\mathrm{mod}2

why it works, because mod(2) addition and substraction are the same operation! (it is also the same as XOR (see Modulo 2 arithmetic)

how do we generate the key, which has to be shared between sender and receiver (Symmetric cryptosystem). They should be random, using a Random number generator


The One time pad is an Unconditionally secure stream cipher