Example
Derive tiny application keys from the shared secret and both randoms.
highlighted = computed this step
Step 1 — Inputs
Set up the exact toy cryptography values.
shared, client_random, server_random(2, 4, 9)
Step 2 — Encryption key
Compute the highlighted cryptography value.
(shared + client_random + server_random) mod 1615
Step 3 — MAC key
Compute the highlighted cryptography value.
(shared * client_random + server_random) mod 161
cryptography
This lesson follows a tiny HTTPS-like protocol sequence so every value can be checked by hand.