

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 3
click for more info
Not enough gems
Cost: 6 gems
1: Stream Ciphers
incomplete
2: Stream Ciphers
incomplete
3: State Ciphers
incomplete
4: State Ciphers
incomplete
This lesson's interactive features are locked, please to keep using them
Stream ciphers are also referred to as "state ciphers" because the encryption and decryption of each character depends on the current state of the cipher.
"Current state" just means the "current progress", that is, how many bytes we've already encrypted or decrypted so far.
For example, let's take the following data for a one-time pad cipher:
plaintext = "010011"
key = "101001"
When the "state" of the cipher is at index 0, we will only have encrypted the first digit:
plaintext = "010011"
key = "101001"
state = index 0
result = "1"
state = index 1
result = "11"
state = index 2
result = "111"
state = index 3
result = "1110"
state = index 4
result = "11101"
state = index 5
result = "111010"