Many years ago, while browsing the US Airforce website, I’ve stumbled across an intriguing recruiting ad. Before reading any further, please have a look at it on YouTube.

In the previous episode, Alice and Bob used sound cryptographic tools like strong symmetric encryption and they encrypted the ephemeral symmetric key with an RSA public key to provide secrecy of their private data exchange. Furthermore, they used digital signatures to reliably detect tampering. Still, despite all their efforts to come up with a rock solid scheme, Mallory was able to easily impersonate Alice and Bob with a simple man-in-the-middle attack.

In a previous post, I described how to use the openssl tool to encrypt and decrypt files using strong symmetric ciphers like Triple DES or AES. This form of encryption is typically used for making encrypted backups, but it lacks some key features like digital signatures that are only available if we make use of open key cryptography. In this post, I’ll show how Alice and Bob can exchange public keys over an insecure channel, in order to preserve secrecy and integrity of their communications. But if not used carefully, public key algorithms can still be abused by man-in-the-middle attacks.

Can you imagine going to court to sue… yourself?

Such a silly idea wouldn’t cross the mind of any even mildly intelligent person. How about a corporation? Would it ever sue itself? Unlikely, you say? After all, with all the collective intelligence of their highly educated management, such a costly and pointless move could never happen.

Never? Well, probably… unless you’re the well-known bank Wells Fargo.