Encrypt tiny nibbles by XORing each one with a deterministic toy keystream. This is toy arithmetic only, not deployable security.

Example

Encrypt tiny nibbles by XORing each one with a deterministic toy keystream.

highlighted = computed this step

Step 1 — Set up

Set up the exact toy cryptography values.

plain nibbles, first key((7, 5, 4), 6)\begin{array}{c|c}\text{plain nibbles, first key}&\text{((7, 5, 4), 6)}\end{array}

Step 2 — XOR byte 1

Compute the highlighted cryptography value.

index, plain, key, cipher(1, 7, 6, 1)\begin{array}{c|c}\text{index, plain, key, cipher}&\hlmath{\text{(1, 7, 6, 1)}}\end{array}

Step 3 — XOR byte 2

Compute the highlighted cryptography value.

index, plain, key, cipher(2, 5, 7, 2)\begin{array}{c|c}\text{index, plain, key, cipher}&\hlmath{\text{(2, 5, 7, 2)}}\end{array}

Step 4 — XOR byte 3

Compute the highlighted cryptography value.

index, plain, key, cipher(3, 4, 8, 12)\begin{array}{c|c}\text{index, plain, key, cipher}&\hlmath{\text{(3, 4, 8, 12)}}\end{array}

Final Step — Ciphertext

Compute the highlighted cryptography value.

cipher nibbles(1, 2, 12)\begin{array}{c|c}\text{cipher nibbles}&\hlmath{\text{(1, 2, 12)}}\end{array}
cryptography This lesson uses fixed toy nibbles so every symmetric-encryption value can be checked by hand. Later, the toy HTTPS chapter derives a key; here the first key is fixed to isolate the XOR operation.