This is a toy unauthenticated DH transcript, not real TLS breaking.

highlighted = computed this step

Authentication is the missing piece

TLS-style certificate checks bind identity to the transcript, so the public value is not just a bare number.

identity binds the transcript\text{identity binds the transcript}
Honesty boundaryThe DH MitM rows are recomputed before the table is rendered.Honesty boundary - E=9quantityvaluee (Eve secret)10E=g^e mod p9Eve-Alice secret3Alice computes E^a3Eve-Bob secret6Bob computes E^b6real A-B shared never forms2

It is not magic arithmetic

The same small DH math still recomputes. The fix is authenticated protocol design around the math.

authenticate before trusting\text{authenticate before trusting}
Honesty boundaryThe DH MitM rows are recomputed before the table is rendered.Honesty boundary - E=9quantityvaluee (Eve secret)10E=g^e mod p9Eve-Alice secret3Alice computes E^a3Eve-Bob secret6Bob computes E^b6real A-B shared never forms2

Honesty boundary

NOTE: toy-modulus; no-side-channel; no-production; never-roll-your-own. Toy unauthenticated DH only. This is not packet interception mechanics, malware, real TLS breaking, downgrade attacks, certificate bypasses, side channels, production exploit guidance, or real-size DH or ECDH.

toy unauthenticated DH only\text{toy unauthenticated DH only}
Honesty boundaryThe DH MitM rows are recomputed before the table is rendered.Honesty boundary - E=9quantityvaluee (Eve secret)10E=g^e mod p9Eve-Alice secret3Alice computes E^a3Eve-Bob secret6Bob computes E^b6real A-B shared never forms2

Summary

This toy transcript makes the failure visible: Alice shares with Eve, Bob shares with Eve, and Alice and Bob never share with each other.

certificates fix identity, not by magic\text{certificates fix identity, not by magic}
Honesty boundaryThe DH MitM rows are recomputed before the table is rendered.Honesty boundary - E=9quantityvaluee (Eve secret)10E=g^e mod p9Eve-Alice secret3Alice computes E^a3Eve-Bob secret6Bob computes E^b6real A-B shared never forms2