Diffie-Hellman starts with public arithmetic parameters. This lesson pins the tiny prime and generator before any secrets appear.
highlighted = computed this step
Why parameters are public
Diffie-Hellman starts with a prime modulus and a generator. These values are public, so both sides can compute in the same arithmetic space.
p,gpublic
Pin p and g
The toy prime is p=23, and the generator is g=5.
p=23,g=5
Why a tiny modulus is inspectable
Because p is small, every modular exponentiation row can be displayed and checked. That makes the toy useful for learning and useless for security.
small p means checkable, not secure
Summary
The public parameters are p=23 and g=5. NOTE: toy-modulus; no-side-channel; no-production; never-roll-your-own. Exact arithmetic on a deliberately tiny toy modulus; real DH uses 2048+ bit groups inside authenticated reviewed protocols.