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
- Mini-lesson (20 min)Teach Cryptography and Symmetric Encryption, from the opening through "Blocks". Project the four account rows and stop at "Work out what rows like these give away"; take answers before reading the next paragraph. Under "Blocks", stop at "predict its first block" and take predictions before showing the figure. Leave "AES and the key's size" for Day 2.
- Do together (8 min)Problem 4 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- On their own (12 min)Problem 1 🔒 Problem 2 🔒 Problem 5 🔒 Problem 6 🔒 Problem 7 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- Exit check (5 min)🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
Day 2 · AES, key length, and OpenSSL45 min
- Discuss (5 min)Problem 7 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- Mini-lesson (15 min)Teach Cryptography and Symmetric Encryption, "AES and the key's size". Ask the section's question ("does the adversary have to search all of them?") and take answers before reading the paragraph that follows it.
- Do together (8 min)Problem 11 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- On their own (12 min)Problem 3 🔒 Problem 9 🔒 key length · Problem 8 🔒 where AES is used (select all) · Problem 12 🔒 one more command, this time to decrypt.
- Exit check (5 min)🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
Day 3 · What encryption protects, and what it does not45 min
- Mini-lesson (7 min)Teach Cryptography and Symmetric Encryption, "Adobe's response". Before reading its last sentence, ask what the password researcher needed in order to find the 100 most common passwords. (No key: the identical ciphertexts and the hints.)
- Do together (8 min)Problem 13 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- In pairs (7 min)Problem 10 🔒: one student reads the stem's two restrictions, the other tests each choice against both.
- On their own (5 min)Problem 14 🔒.
- Discuss (5 min)Problem 14 🔒 🔒 Teacher notes: sign in as a teacher to see this🔒 Teacher notes: open the full plan to see this
- Review (8 min)Go back to the two or three problems the class missed most and use the traps below to reteach them.
- Wrap (5 min)Students write one sentence on what encrypting the bookstore's backups protects and one on something it does not.
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.