CAE - Basic Cryptography Concepts (Lesson)

Basic Cryptography Concepts

How to Improve Security with Cryptography

In this lesson, you will learn the basic cryptography concepts and how various cryptography methods have been used from ancient history to the modern day to protect vital information.

Let’s begin with cryptography terminology!

  • Cryptography refers to scrambling data so that it looks like babble to anyone except those who know the trick to decoding it.
  • Algorithm (aka Cipher) is a precise set of instructions that tells programs how to scramble and unscramble data.
  • Plaintext refers to decrypted or unencrypted data.
  • Ciphertext refers to data that has been encrypted.
  • Cryptanalysis is attempting to break a cryptographic system and return the encrypted message to plaintext.
  • Encryption is a process of converting information or data into a code, especially to prevent unauthorized access.

Encryption Methods Presentation

Caesar Cipher

Caesar Cipher (c. 100 BC), also known as a shift cipher, uses an algorithm and a key. The algorithm consists of offsetting the alphabet either to the right (forward) or to the left (backward). The key is how many letters the offset should be.

Caesar Cipher

This cipher uses a Shift 2 backward key. Here is how it works:

Plaintext: BEAD

Ciphertext: ZCYB

The shift cipher is one of the most basic algorithms.  It is often known as the Rot 13 cipher because of the popular usage of shifting 13 letters.  However, there is no restriction on how many letters to shift – and, in fact, that is the secret key!

Cipher Wheel

Cipher Wheel is a tool to encrypt/decrypt shift ciphers.

Cipher Wheel

Cipher Wheel Practice Activity

Substitution Cipher Presentation

One-Time Pad (OTP) Encryption Method

One-Time Pad (OTP) is an encryption method in which the pre-shared key is used only once. Capturing or stealing the key is useless since it will not be used again to encrypt.

Pros:

  • This method is unbreakable.

Cons:

  • It is dependent on random pad generation.
  • It requires both parties to have an identical pad and start from the same point in the pad.
  • It is impractical for most common applications.
  • It requires large pads.
  • It is hard to generate truly random numbers.
  • It is hard to get the pads to both parties.

This concept was used by the Enigma machines in WWII!

Enigma Machine

Transposition Encryption Method

In the transposition method, the order of the letters is changed.

Example:

Ciphertext:  AXD WLNA IOI MLSRVUIINTINNFTHNEEE  G
Key = 6

Cipher and decipher by reordering the letters and spaces into 6 columns.
A X D W L
N A I O I
M L S R V
U I I N T I
N N F T H N
E E E G

What did you get?

Solution: The original plaintext was AN UNEXAMINED LIFE ISN’T WORTH LIVING.

Remember the Spartans who would do this using ribbon and a cylinder? This is a Scytale cipher. They would do this by wrapping a ribbon around a cylinder and writing the message across. It was deciphered by using a cylinder of the exact same diameter as the original.

In our example, the “cylinder” was six columns. If you try to decipher the text using five columns or seven columns, it will not work! Cool, huh?

Ciphertext Practice

Vigenère Cipher

One of the first polyalphabetic ciphers was invented by Giovan Battista Bellaso in 1553. However, the invention was incorrectly attributed to Blaise de Vigenère, and the name stuck. Vigenère cipher is an example of polyalphabetic ciphers, where substitution is based on multiple alphabets, using a system to switch between them.

Steps for Vigenère Encoding:

  1. Create an alphabet grid

Plaintext Columns

  1. Plaintext = SCHOOLS, Password= LEARN
Match plaintext to password:
S C H O O L S
L E A R N L E

4)

Column S and Row L = D
Column C and Row E = G
Column H and Row A = H
Column O and Row R = F
Column O and Row N = B
Column L and Row L = W
Column S and Row E = W

  • Let’s Practice! Encode your first name with Vigenère Cipher.

Reflection and Wrap-up

In this lesson, you have learned about various types of encryption ciphers and how to use them to protect secure information. Cryptographic algorithms play a crucial role in enhancing security by ensuring the confidentiality, integrity, and authenticity of data. They encrypt sensitive information, making it accessible only to authorized parties with the decryption key, thus protecting it from unauthorized access or tampering.

[CC BY-NC-SA 4.0 Links to an external site.] UNLESS OTHERWISE NOTED | IMAGES: LICENSED AND USED ACCORDING TO TERMS OF SUBSCRIPTION - INTENDED ONLY FOR USE WITHIN LESSON.