Product Code Database
Example Keywords: iphone -second $10-120
   » » Wiki: Keystream
Tag Wiki 'Keystream'.
Tag

Keystream
 (

In , a keystream is a stream of or characters that are combined with a message to produce an encrypted message (the ciphertext).

The "characters" in the keystream can be , , numbers or actual characters like A-Z depending on the usage case.

Usually each character in the keystream is either added, subtracted or with a character in the plaintext to produce the ciphertext, using modular arithmetic.

Keystreams are used in the cipher and in most . can also be used to produce keystreams. For instance, CTR mode is a block mode that makes a block cipher produce a keystream and thus turns the block cipher into a stream cipher.


Example
In this simple example we use the English alphabet of 26 characters from a-z. Thus we can not encrypt numbers, commas, spaces and other symbols. The random numbers in the keystream then have to be at least between 0 and 25.

To encrypt we add the keystream numbers to the plaintext. And to decrypt we subtract the same keystream numbers from the ciphertext to get the plaintext.

If a ciphertext number becomes larger than 25 we wrap it to a value between 0-25. Thus 26 becomes 0 and 27 becomes 1 and so on. (Such wrapping is called modular arithmetic.)

Here the plaintext message "attack at dawn" is combined by addition with the keystream "kjcngmlhylyu" and produces the ciphertext "kcvniwlabluh".

Page 1 of 1
1
Page 1 of 1
1

Account

Social:
Pages:  ..   .. 
Items:  .. 

Navigation

General: Atom Feed Atom Feed  .. 
Help:  ..   .. 
Category:  ..   .. 
Media:  ..   .. 
Posts:  ..   ..   .. 

Statistics

Page:  .. 
Summary:  .. 
1 Tags
10/10 Page Rank
5 Page Refs