Diffie-Hellman Key Exchange Simulation

Parameters

Educational Purpose: This simulation uses small numbers for demonstration. Real implementations use much larger prime numbers (typically 1024-4096 bits) for security.
A prime number greater than 2 and less than 10,000 (public)
Quick select: 23 29 31 37 41 47 53
A number between 2 and p-1 (public)
Note: In real-world systems, g must be a verified primitive root modulo p for security.
Alice's secret number (1 to p-1)
Bob's secret number (1 to p-1)