TLS begins as an ordered transcript. This toy capstone pins the message order before checking arithmetic.

highlighted = computed this step

Why order matters

TLS is assembled as an ordered transcript. Both sides must feed the same messages to later checks in the same order.

ordered transcript\text{ordered transcript}
Toy TLS orderToy TLS handshake order with pinned transcript values.Toy TLS orderClientServerClientHello seq=4 toy randomServerHello seq=9 toy randomCertificate seq=33 sigServerKeyShare seq=19 DH shareClientKeyShare seq=8 DH shareFinished seq=64 toy checkFinished seq=70 toy check

Pin the hello values

The client hello carries toy value 4, and the server hello carries toy value 9.

CH=4,SH=9CH=4,\quad SH=9
Toy TLS orderToy TLS handshake order with pinned transcript values.Toy TLS orderClientServerClientHello seq=4 toy randomServerHello seq=9 toy randomCertificate seq=33 sigServerKeyShare seq=19 DH shareClientKeyShare seq=8 DH shareFinished seq=64 toy checkFinished seq=70 toy check

Place the key shares

The server sends DH share 19 before the client sends share 8.

B=19,A=8B=19,\quad A=8
Toy TLS orderToy TLS handshake order with pinned transcript values.Toy TLS orderClientServerClientHello seq=4 toy randomServerHello seq=9 toy randomCertificate seq=33 sigServerKeyShare seq=19 DH shareClientKeyShare seq=8 DH shareFinished seq=64 toy checkFinished seq=70 toy check

Summary

The transcript is order first, arithmetic second. NOTE: toy-modulus; no-padding; no-side-channel; no-production; never-roll-your-own. Toy transcript only: not real TLS bytes, not real certificate validation, no AEAD record protection, and no security-size claims.

order is pinned\text{order is pinned}
Toy TLS orderToy TLS handshake order with pinned transcript values.Toy TLS orderClientServerClientHello seq=4 toy randomServerHello seq=9 toy randomCertificate seq=33 sigServerKeyShare seq=19 DH shareClientKeyShare seq=8 DH shareFinished seq=64 toy checkFinished seq=70 toy check