Nautilus

Diffie-Hellman calculator

Enter any known parameters and the calculator derives the rest. All arithmetic uses BigInt — values of any size are supported.

Examples:

Shared parameters

Large prime shared publicly

Primitive root modulo p (shared publicly)

🦐 Shrimp

Secret; only 🦐 Shrimp knows this

g^a mod p — sent to 🦀 Crab

🦀 Crab

Secret; only 🦀 Crab knows this

g^b mod p — sent to 🦐 Shrimp

Shared secret 🦐 🎉 🦀

B^a mod p = A^b mod p