Lesson plan: Cryptography and Symmetric Encryption

AP Cybersecurity · Unit 5 Securing Applications and Data · Topic 5.3 Protecting Stored Data with Cryptography · Practice set

At a glance

Suggested time
3 class periods (45 min)
Pacing
The only set for Topic 5.3. The CED gives Topic 5.3 four class periods; this plan suggests 3 for this set. It leaves the fourth to the teacher, as a catch-up or review day for the unit's cryptography before Asymmetric Keys. The CED does not divide the topic's periods; that split is this plan's.
Before this set
🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
Skills
2.A Identify security controls, and explain how they mitigate risks.
2.D Implement and log mitigations with and without the support of AI.

The one idea: Encryption combines plaintext with a key to make ciphertext, and it hides what a file says from anyone without the key. Algorithms are sorted two separate ways: by key count (one key is symmetric, two is asymmetric) and by how they take input (fixed-size blocks or a continuous stream). AES is a symmetric block cipher, and a longer key buys security at the cost of time.

Day by day

Day 1 · Keys, and the two ways to sort an algorithm45 min

Day 2 · AES, key length, and OpenSSL45 min

Day 3 · What encryption protects, and what it does not45 min

Differentiation

If students are struggling
Give a two-row card: keys (one key: symmetric; two keys: asymmetric) and input (fixed-size chunks: block; continuous: stream). Project CED Figure 5.3 (Symmetric Encryption Algorithms, printed page 134), which shows one key at both ends. Do Problem 5 🔒 and Problem 7 🔒 together, circling the words in each stem that say which sort the question is about.
Extension
On a lab machine that has OpenSSL, students encrypt a short text file with the lesson's command, decrypt it with the same password, then try a wrong password and note what happens. They then explain in two sentences why the Adobe researcher never needed the key.
Vocabulary support
cryptography, encryption, decryption, plaintext, key, ciphertext, keyspace, symmetric, asymmetric, block, stream, Advanced Encryption Standard (AES), OpenSSL, AES Crypt.

From the course framework

LO 5.3.A Explain how encryption can be used to protect files.

  • 5.3.A.1 The purpose of cryptography is to hide information. A cryptographic algorithm defines a process for encrypting and decrypting information. Encryption is the process of hiding the information, and decryption is the process of reversing the encryption to retrieve the original information.
  • 5.3.A.2 An encryption algorithm defines a process for combining the information to be encrypted with a predefined key. The information to be encrypted is called the plaintext. The output of the encryption algorithm is called the ciphertext.
  • 5.3.A.3 The number of possible keys that can be used in an encryption algorithm is called the keyspace. The larger the keyspace, the longer it will take an adversary to discover the correct key by random chance.
  • 5.3.A.4 Cryptographic algorithms are classified by whether they use one key or two keys. Symmetric encryption algorithms use the same key to encrypt and decrypt information. Asymmetric encryption algorithms use two different keys—one to encrypt information and the other to decrypt information.
  • 5.3.A.5 Cryptographic algorithms are also classified by whether they process information one bit at a time or in fixed-size chunks of bits. Block encryption handles information in fixed-size chunks called blocks, producing an output block for each input block. Stream encryption handles input information continuously, producing output one element at a time.

LO 5.3.B Apply symmetric encryption algorithms to encrypt and decrypt data.

  • 5.3.B.1 Computer-based encryption algorithms operate on binary data. The most common symmetric encryption algorithm is the Advanced Encryption Standard (AES). AES encryption is used to secure Wi-Fi transmissions, internet browsing, file encryption on disks, and hardware-level encryption on processors.
  • 5.3.B.2 AES is a symmetric key block cipher that encrypts data in 128-bit blocks (16 bytes). AES can operate with keys of varying lengths. Longer keys produce more secure encryption but require more time to encrypt and decrypt.
  • 5.3.B.3 Symmetric encryption and decryption can be performed using the command line, specialized software, or web-based tools. On a command line interface, users can encrypt or decrypt with OpenSSL. Specialized software like AES Crypt is an open source tool that can encrypt and decrypt files. There are many web-based tools for encrypting and decrypting files.
  • 5.3.B.4 Using OpenSSL in a CLI, a user can encrypt and decrypt a file using the following commands (note that the encryption key is derived from the password provided): To encrypt a file named test with AES using a 128-bit key, use the command: openssl enc -aes-128-cbc -e -in test -k password -out test.enc To decrypt the encrypted file using the same key, use the command: openssl enc -aes-128-cbc -d -in test.enc -k password -out text

Framework example: EK 5.3.B.4's two commands: openssl enc -aes-128-cbc -e -in test -k password -out test.enc encrypts the file test, and openssl enc -aes-128-cbc -d -in test.enc -k password -out text decrypts it with the same password (the CED prints the output name as text). CED Figure 5.3 (printed page 134) encrypts "The red fox jumps over the blue dog" and decrypts it with the same key at both ends.