Example
Use the same toy keystream to recover the original nibbles.
highlighted = computed this step
Step 1 — Set up
Set up the exact toy cryptography values.
cipher nibbles, keystream((1, 2, 12), (6, 7, 8))
Step 2 — Decrypt byte 1
Compute the highlighted cryptography value.
index, cipher, key, plain(1, 1, 6, 7)
Step 3 — Decrypt byte 2
Compute the highlighted cryptography value.
index, cipher, key, plain(2, 2, 7, 5)
Step 4 — Decrypt byte 3
Compute the highlighted cryptography value.
index, cipher, key, plain(3, 12, 8, 4)
Final Step — Round trip
Compute the highlighted cryptography value.
decrypted vs originalmatch
cryptography
This lesson shows why both sides must know the same symmetric key stream.