History: Encryption

Published: 04-Jan-2022

With basic communications working once again over enet instead of fake IPX, it was time to step up the game a bit. Even though this is just some lame game server, things like passwords shouldn't be sent in the clear. But how do you manage that and still let people read your source code? You can't hide keys or obscure what you're doing if it's open to the world.

Enter the Diffie Hellman key exchange. This genius little bit of math allows two parties to determine a shared key without sending anything sensitive over the wire. As a bonus, it's pretty simple to implement and uses very little CPU time.

Now that we've got a shared key, we can use any symmetric encryption algorithm our little old DOS machines can handle. Wrap it all up in a nice API to make it easy to use, and we're off!

Back...