Tuesday, September 13, 2022

A Beginner’s Guide To Cryptography




Cryptography is used all around us. But what is cryptography? In this article, I'll explain what cryptography is, and how it's used to protect your personal information.


The History of Cryptography


The history of cryptography goes back way beyond the advent of the computer – or any machine, for that matter.

Clay tablets from Mesopotamia, from around 1500 BC, show signs of encryption being used to protect information. The tablets record a craftsman’s formula for pottery glaze. It is believed the tablets were encrypted to protect the potter’s formula from being stolen for commercial reasons.

Hebrew scholars are also known to have made use of a simple alphabetical substitution cipher around 500 to 600 BC. An alphabetical substitution cipher is a simple code where a letter in the alphabet is replaced by a different letter. For example: A = Y, B = W, C = G, etc. More about this later.


Wartime Use of Cryptography


Cryptography came into its own in times of war. During the American Revolutionary War, which took place in the late 1700s, British forces used various forms of cryptography to communicate between generals.

Using ciphers, the British army could encode messages to be delivered to generals on the battlefield with no fear that the plans might fall into enemy hands or that a messenger might read it and leak the information to the other side.

The cipher used to encode the messages was shared with only the most trusted members of the British military, keeping the information safe from being stolen by the opposing army.

While the British successfully used a particular cipher for an extended period of time, American forces were eventually able to crack the cipher being used, allowing them to learn of British attack plans.

By the time of the Second World War, mechanical and electromechanical cipher machines were being used widely by all of the major participants in the conflict.

Perhaps the best-known cipher machine used during World War II was one used by the Germans in various versions: an electro-mechanical rotor cipher machine known as the Enigma machine.

The country used the device to encode their battle plans and other sensitive communications for much of the war.

Modern Uses of Cryptography


Stepping forward to more modern times, cryptography is used by banks, credit unions, and other financial institutions to encrypt data sent between banks, credit card companies, their customers, and other businesses.

Cryptography protects the data both during transmission and when it is saved in large databases.

When you swipe your credit card at a grocery store to pay for your food purchase, the information stored on the card’s magnetic strip or embedded chip is encrypted.

The encrypted information is transferred to the payment processor, who checks to make sure your credit card limit hasn’t been reached (with another encrypted transmission) and then replies with an encrypted approval code.

How Does Cryptography Work?


In this section, I’ll be taking a look at how cryptography works. I’ll demonstrate how a plaintext message is encrypted and stored as ciphertext data. I’ll then explain how ciphertext is decrypted back into plaintext when that step is required.

Before we begin, let me go over key vocabulary, so that we’re all on the same page.

Encryption is the process of making a plaintext (readable) message into a ciphertext (unreadable) message, which is a message that is unintelligible to outsiders who don’t possess the secret “key” to “unscramble” the message.

Decryption is the process of using a secret key to “unscramble” ciphertext and turn the information into readable plaintext once more.

A cipher is an algorithm used to encrypt and decrypt a message.

To demonstrate how everything works, I’ll use a simple encoding method many of us may have used in our younger days to send and receive “secret” messages from our friends.

The encryption method I’ll demonstrate is a simple letter shift cipher, where each letter of the alphabet is replaced by another letter.

A letter shift cipher is known as “Caesar’s cipher,” named for Julius Caesar, who was the first recorded person to use it.

My example will remind older readers of the code card they received when they joined the “Supermen of America” club from the back of Superman and Action Comics magazines.

Polymorphism


If you wanted to throw that nosy 8-year-old off your scent, you could apply another layer of encryption to the message, which is called “polymorphism.”

While the subject goes much deeper than I’ll dig in this section, it’s important to understand in order to understand modern cryptographic methods. Simply put, polymorphism is a cipher that changes itself every time it is used.

So, if we took our coded message and ran it through our encryption algorithm again, shifting by one letter once again, then the word “bat” in our plaintext message, which was encoded to “cbu” in our encrypted message, would be changed to “dcv” the second time around.

Only a user with the knowledge that the message had a polymorphic cipher applied to it would be able to decrypt the message back to its original form. Now we’re talking about at least the brainpower of a 9-year-old to be able to successfully decrypt the message.

Okay, I was a bit simplistic in that explanation, but I wanted to explain how cryptography worked in the simplest way possible.

In the next sections of this article, we’ll see that the actual encryption ciphers used to protect your data in today’s hacker-heavy world are much more complicated and tougher to decode.

Why Is Cryptography Important?


Cryptography is arguably the best method available today for protecting security-sensitive data.

The unique “code/key/calculations” combination required to encrypt and decrypt data makes the technique an efficient method for keeping information protected from prying eyes.

The heavy usage of the internet for business and personal communications makes encryption a must for any sensitive data.

Without cryptography, any message you send on the internet could be intercepted and read. Everything from a private message to your spouse to the information about your bank account would be open to public examination.

Encrypt Your Computer or Mobile Device


While your Windows or Mac computer might be protected with a login password, did you know that data can still be retrieved from its hard drive if you haven’t encrypted it?

Luckily, there are applications available on both platforms that use AES encryption to encrypt your drive, keeping them safe from anyone who doesn’t know the decryption password.

Be sure to use a password you can remember, or put the password in a safe place – such as a password manager app on your mobile device – because if you forget the password, you are royally screwed.

No comments:

Post a Comment