Encrypt, authenticate, and decrypt a tiny GET request after the toy handshake. This is toy arithmetic only, not deployable security.
Example
Encrypt, authenticate, and decrypt a tiny GET request after the toy handshake.
highlighted = computed this step
Step 1 — Request setup
Set up the exact toy cryptography values.
toy GET code nibbles, enc_key, mac_key((7, 5, 4), 15, 1)
Step 2 — Encrypt byte 0
Compute the highlighted cryptography value.
index, plain, key, cipher, decrypt(0, 7, 15, 8, 7)
Step 3 — Encrypt byte 1
Compute the highlighted cryptography value.
index, plain, key, cipher, decrypt(1, 5, 0, 5, 5)
Step 4 — Encrypt byte 2
Compute the highlighted cryptography value.
index, plain, key, cipher, decrypt(2, 4, 1, 5, 4)
Step 5 — Request tag
Compute the highlighted cryptography value.
(sum(cipher)+mac_key) mod 16((8, 5, 5), 1, 3)
Final Step — Decrypt verdict
Compute the highlighted cryptography value.
server tag check, plaintext(match, (7, 5, 4))
cryptography
This lesson follows a tiny HTTPS-like protocol sequence so every value can be checked by hand.