The recovered exponent computes the peer shared value.

highlighted = computed this step

Use x on the peer public value

If the peer public value is 19, the recovered exponent can compute the shared secret.

19xmodp19^x\bmod p
Recovered shared secretThe recovered exponent is used against the peer public value.Recovered shared secret - 19^6 mod 23stepbitpriorsquaremultiplyresult01111919111916552052skip2

The shared value appears

The ladder computes 19 to x=6 modulo 23 and gets 2.

196mod23=219^6\bmod{}23=2
Recovered shared secretThe recovered exponent is used against the peer public value.Recovered shared secret - 19^6 mod 23stepbitpriorsquaremultiplyresult01111919111916552052skip2

It matches legitimate DH arithmetic

The same value 2 is the toy DH shared secret for this pinned exchange.

shared=2\text{shared}=2
Recovered shared secretThe recovered exponent is used against the peer public value.Recovered shared secret - 19^6 mod 23stepbitpriorsquaremultiplyresult01111919111916552052skip2

Summary

In a tiny group, brute force recovers the exponent and then the shared secret.

shared secret=2\text{shared secret}=2
Recovered shared secretThe recovered exponent is used against the peer public value.Recovered shared secret - 19^6 mod 23stepbitpriorsquaremultiplyresult01111919111916552052skip2