Diffie-Hellman key exchange

Diffie-Hellman key exchange uses powers to find a shared secret.

One has to choose a generator base b for the power (usually 2, 3, or 5) and a safe prime number N to be the modulus, the (mod N) part. Typically this is done using a program like openssl dhgen -text 16 which for instance tells me to use N=35963 and b=2 for 16 bits of security (can be broken in much less than a second; real world uses 2048 bits).

You try

(Let a computer or government agency carefully) publicly choose parameters:
b=, N=

Secretly and randomly choose a value for A=
Possible values of A are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

A=1 + 2 + 4, so you'll want to find 21, 22, 24 (mod 11).

Secretly compute:
21 = (mod 11)
22 = (mod 11)
24 = (mod 11)

Now tell you “friend” your final number
bA = 27 = 21 × 22 × 24 = (mod 11).

Your friend publicly tells your their final number is
c=.

Secretly compute:
41 = (mod 11)
42 = (mod 11)
44 = (mod 11)

So that means your shared secret number is
cA = 47 = 41 × 42 × 44 = (mod 11).