written 6.1 years ago by |
Stream Ciphers
- In Stream Cipher, encryption & decryption are done on one symbol (such as a character or a bit) at a time.
$P=P_1,P_2,P_3, …..$ $C=C_1C_2C_3…$ $K=(K_1, K_2, K_3 …)$
$\phantom{P=}\downarrow$ $\phantom{_1,P_2,P_3, ….. ;...;}\downarrow$ $\phantom{_1,P_2,P_3fgfdghfd}\downarrow$
$C_1=E_{K_1}(P_1)$ $\phantom{asdsa}$$C_2=E_{K_2}(P_2)$ $\phantom{asdsa}$ $C_3=E_{K_3}(P_3)$
The figure below gives the idea behind a stream cipher. Character are fed into the encryption algorithm, one at a time, the ciphertext are also created one at a time
The key stream can be created in many ways, it may be a stream of predetermined values, it may be created one value at a time using an algorithm. The values may depend on the previous key values. - Here the fig. shows the third character in the plaintext stream is being encrypted using 3rd value in the key stream & results in 3rd character ciphertext.