FAQ: How Encryption Works And Why People Are So Freaked Out About It

(Photo by Rob Pegoraro/Yahoo Tech)

Encryption has been all over the headlines after recent terrorist attacks, and the discussion can quickly get cryptic. Is “cryptoā€ a fatal weakness of the Internet? An endangered species that must be saved? You can hear heartfelt testimony for either view from both Democratic and Republican politicians.

But ultimately, encryption is just math that, like any other tool, can be used for good or ill. Letā€™s start with some basics about it that often get neglected in all the commentary.

Q. It was my understanding there would be no math in this storyā€¦?

A. Sorry, itā€™s unavoidable: Encryption works by encoding information in such a way that its recipient can decode it (without further help from its sender), but no one else can. To do that scrambling, you need to run the original data through one equation or another.

For example, to encrypt something against the prying eyes of somebody whoā€™s really, really drunk, you could just replace each letter with one 13 places forward (so ā€œAā€ becomes ā€œNā€ and so on). If your eavesdropper is more capable, youā€™ll need something more complicated ā€” but itā€™s still all equations.

Q. Okay. What makes for strong cryptography?

A. Using more complex math in an encryption algorithm only goes so far if the sender and recipient use the same key ā€” that is, if they both plug the same secret set of digits into the encryption formula ā€” to encrypt and decrypt. In that case, if either party loses the key, game over.

The simplified version of how encryption works. (Image: Commons.wikimedia.org)

But you donā€™t have to share the same key. Thatā€™s the insight behind public-key cryptography. You use one key ā€” a public key shared with the person with whom you want to communicate confidentially ā€” to encrypt the message. Then that recipient decrypts it using a different private key originally generated alongside the public key.

Q. Sounds really complex. How do I use this?

A. You already have by reading this story. Your browser and Yahoo Techā€™s site used public-key encryption to secure their connection, based on a standard variously called SSL (Secure Sockets Layer, the original name) and TLS (Transport Layer Security, a more modern moniker). Thatā€™s why the URL in your address bar begins https instead of just http.

(For more details, see this thread at the tech Q&A site StackExchange.)

Q. Can I protect my email this way?

A. You can, but thatā€™s not as easy. While an increasing number of e-mail services ā€” including Gmail, Microsoftā€™s Outlook.com and Yahoo Mail ā€” use encryption to protect messages as they transit the Internet, that doesnā€™t secure them after they arrive.