Web Crypto 101, Part 1: Basic Encryption

Source (xkcd)

What Is Encryption?

Wikipedia says:

Master cryptographer right here

Ciphers and Keys

One of the simplest ciphers is the Caesar cipher, in which Alice and Bob would have to establish a special number, replace each letter in their message with a letter occurring that number of characters later in the alphabet. For example, with a number of 4, they would replace A with E, B with F, C with G, etc. In this case, the number 4 serves as the encryption key.

Emoji are absolutely essential to this spreadsheet

A Few Steps Forward to Good Encryption

If Alice and Bob want their secret notes to not be easily discovered, they will need to get a lot more clever. Their Caesar cipher won’t be enough — it can only have 25 different keys, so checking all of them is trivial. To make it less trivial they will need a cipher with many more possible keys: billions, trillions, or more.

The Problem with AES

AES and similar ciphers have one big common problem. They are symmetric ciphers. That means they use the same key for both encrypting and decrypting information. That is not inherently a problem, but it does present a question: how can Alice give Bob the key safely?

Artist’s rendition of Alice and Bob



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store