Home▸Cybersecurity▸SSH Key Exchange & Host Key Verification (2D)

SSH Key Exchange & Host Key Verification (2D)

2D Canvas SSH lab: real Diffie-Hellman key exchange with BigInt modular exponentiation, an adjustable modulus size, and a man-in-the-middle attack that a host-key fingerprint check catches live.

Cybersecurity2DModerate60 FPS⇄ 3D version
2d-ssh-key-exchange-host-key-verification ↗ Open standalone

This 2D companion drives the exact same cryptographic protocol as the 3D version — real Diffie-Hellman key exchange computed with BigInt modular exponentiation, not a scripted animation — on a flat top-down canvas built for reading the numbers rather than orbiting a scene. A side panel lets you pick between three real modulus sizes, run a normal connection to watch the client and server converge on an identical shared secret hex value, or trigger a man-in-the-middle attack and watch the client's saved host-key fingerprint catch the forged one, exactly as OpenSSH's "WARNING: HOST KEY HAS CHANGED" does on a real terminal.

⚙ Under the hood

2D Canvas SSH protocol lab with real BigInt Diffie-Hellman modular exponentiation, a trust-on-first-use host-key store, and a man-in-the-middle attack scenario that a fingerprint mismatch check blocks live.

diffie-hellmansshhost key verificationman-in-the-middlecryptographykey exchange

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)