Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Stream cipher
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Types== A stream cipher generates successive elements of the keystream based on an internal state. This state is updated in essentially two ways: if the state changes independently of the plaintext or [[ciphertext]] messages, the cipher is classified as a ''synchronous'' stream cipher. By contrast, ''self-synchronising'' stream ciphers update their state based on previous plaintext or ciphertext digits. A system that incorporates the plaintext into the key is also known as an [[autokey cipher]] or autoclave cipher. ===Synchronous stream ciphers=== [[File:Lorenz Cipher Machine.jpg|thumb|[[Lorenz cipher|Lorenz SZ cipher]] machine as used by the German military during World War II]] In a '''synchronous stream cipher''' a stream of pseudorandom digits is generated independently of the plaintext and ciphertext messages, and then combined with the plaintext (to encrypt) or the ciphertext (to decrypt). In the most common form, binary digits are used ([[bit]]s), and the keystream is combined with the plaintext using the [[exclusive or]] operation (XOR). This is termed a '''binary additive stream cipher'''. In a synchronous stream cipher, the sender and receiver must be exactly in step for decryption to be successful. If digits are added or removed from the message during transmission, synchronisation is lost. To restore synchronisation, various offsets can be tried systematically to obtain the correct decryption. Another approach is to tag the ciphertext with markers at regular points in the output. If, however, a digit is corrupted in transmission, rather than added or lost, only a single digit in the plaintext is affected and the error does not propagate to other parts of the message. This property is useful when the transmission error rate is high; however, it makes it less likely the error would be detected without further mechanisms. Moreover, because of this property, synchronous stream ciphers are very susceptible to [[Attack (computing)#Phenomenology|active attack]]s: if an attacker can change a digit in the ciphertext, they might be able to make predictable changes to the corresponding plaintext bit; for example, flipping a bit in the ciphertext causes the same bit to be flipped in the plaintext. ===Self-synchronizing stream ciphers=== Another approach uses several of the previous ''N'' ciphertext digits to compute the keystream. Such schemes are known as '''self-synchronizing stream ciphers''', '''asynchronous stream ciphers''' or '''ciphertext autokey''' ('''CTAK'''). The idea of self-synchronization was patented in 1946 and has the advantage that the receiver will automatically synchronise with the keystream generator after receiving ''N'' ciphertext digits, making it easier to recover if digits are dropped or added to the message stream. Single-digit errors are limited in their effect, affecting only up to ''N'' plaintext digits. An example of a self-synchronising stream cipher is a block cipher in [[cipher feedback]] (CFB) [[block cipher modes of operation|mode]].
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)