As the world becomes ever more connected, data encryption—once a topic so unsexy it almost seemed taboo—has slowly turned into a hot topic that we’ve come to rely on more and more. With your phone spouting off your credit card number and with people logging into Facebook at every public computer they can find, data about us is everywhere and it’s valuable. Data encryption is how programmers can make sure that our data doesn’t fall into places where it wasn’t intended to go. But how does it work?
Encryption was born out of cryptography, the science of secret codes. Just like if you wrote a note with a cipher and only someone with the same cipher could decode it, encryption requires a key. Quality encryption always has one common feature: the algorithm (aka the process to encrypting something) can be public, but the key will always be private. Even the smartest hackers in the world can’t break into encrypted data if they don’t know the key.
Encryption ciphers of today fall into one of two categories: secret key and public key. Secret key is also known as symmetric cryptography because both people (or computers) must have the same key, and it is usually used for sensitive or private data. Data Encryption Standard (or DES) was one of the strongest secret-key algorithms when it was first made available for public use in the 1970s.
Public-key, or asymmetric, algorithms use a pair of keys: one public key that’s to be shared with other people and one private key that’s kept in secret by its owner. This way, anyone can send the owner encrypted data by using the public key, but only the owner can decode those messages using the private key.
Secret-key ciphers are either stream or block ciphers. Stream ciphers encrypt data one bit at a time by writing a long string of bits with no repeats and hiding the message within it. One common example of this type of cipher is the RC4 (Ron Rivest’s Cipher #4), which is used by a large number of e-commerce stores. Other uses for stream ciphers include cellphone traffic and satellite TV signals.
Block ciphers, on the other hand, encrypt data in blocks of multiple bits. This results in an encrypted data block that is the same size as the original data block. For example, DES takes 64-bit blocks and returns another 64-bit block using a 56-bit key.
Other examples of block cipher encryption methods are Blowfish and AES. Blowfish was introduced by Bruce Schneier and uses huge keys. Its block size is 64 bits and it provides a good encryption rate with variable key length of from 32 bits up to 448 bits. AES, on the other hand, accepts keys of 128, 192 or 256 bits and uses 128-bit blocks—double the size of Blowfish and DES. AES replaced the aging DES in the 1990s as the standard symmetric encryption algorithm for the US government.
Data encryption is a big topic and encompasses the fields of mathematics, computer science, and cryptography. In its simplest form, encryption is just a way of changing information that makes it unreadable by anyone except those in possession of the key, which is what allows them to change the information back to its original form. Because the amount of data the world creates will likely never fail to increase and because that data must be protected from increasingly more sophisticated hackers, data encryption will continue to be a hot topic.