AP Cybersecurity · Unit 5 · Topic 5.2 · Exercise 2
Applied Mode Selection
Mode of operation matters more than algorithm choice. For each scenario, identify the correct mode or diagnose the specific mode-level failure.
6 Questions~14 minApplied · Scored
How This Exercise Works
For each scenario: Identify which mode (ECB, CBC, CTR, GCM, XTS) fits the constraints, or diagnose the specific failure (nonce reuse, deterministic IV, pattern leakage, missing integrity).
Remember the rules: ECB never for bulk data. CBC needs random IVs. CTR/GCM need unique nonces. GCM = AEAD. XTS = disk. AES-256-GCM is the modern default.
Score0 / 6
Question 1
Scenario: You are designing an encryption scheme for a database column that stores users' Social Security numbers. The application needs to encrypt on insert, decrypt on read, and be able to verify that the ciphertext hasn't been tampered with. Which algorithm + mode should you select?
✎ Predict before reading options. Commit to your answer first.
Exam TipField encryption with tamper detection = AES-GCM. AEAD modes solve both confidentiality and integrity.
Question 2
Scenario: Your application needs to encrypt 50 GB of sequential log files before archival to cold storage. The encryption can be parallelized across CPU cores. No network adversary will see the ciphertext mid-stream. Which mode best balances speed and security?
✎ Predict before reading options. Commit to your answer first.
Exam TipLarge bulk data + parallel + integrity = AES-GCM or ChaCha20-Poly1305. Both are AEAD.
Question 3
Scenario: You're implementing full-disk encryption for company laptops. The encryption must work at the block device layer, meaning the cipher encrypts every 4KB disk sector independently, and the OS can read/write any sector at random. Which mode is designed for this use case?
✎ Predict before reading options. Commit to your answer first.
Scenario: A developer proposes encrypting user API tokens stored in a database. She writes: 'I'll use AES-256-CBC. For the IV, I'll use the user's ID padded with zeros.' Identify the problem.
✎ Predict before reading options. Commit to your answer first.
Exam TipCBC IVs must be random and unpredictable. Deterministic or predictable IVs break CBC's guarantees.
Question 5
Scenario: A team encrypts files with AES-256-CTR. For performance, they use the same key for a year and generate nonces from an incrementing counter that occasionally wraps around when the service restarts. Identify the catastrophic risk.
✎ Predict before reading options. Commit to your answer first.
Exam TipCTR/GCM nonce reuse under same key = catastrophic. Never. Use a cryptographically random nonce or strict monotonic counter with persistent state.
Question 6
Scenario: Your company's threat model includes advanced adversaries who may have access to quantum computing in 10-15 years. For archival data that must remain confidential for 20 years, which symmetric cipher choice provides the most future-proof margin?
✎ Predict before reading options. Commit to your answer first.
Whether you're a student, parent, or teacher — I'd love to hear from you.
Just want free AP CS resources?
Enter your email below and check the subscribe box — no message needed.
Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.
Typically responds within 24 hours
✓
Message Sent!
Thanks for reaching out. I'll get back to you within 24 hours.
34.8% of Tanner’s CSP students score 5s. The national average is 9.6%.
I’m a Student
I’m a Teacher
✓Free AP CSP Big Ideas cheat sheet (PDF)
✓Daily practice questions covering all 5 Big Ideas
✓Create Task tips that actually work — from a real AP teacher
✓Free class codes with student progress tracking
✓3 full practice exams + Top 100 questions for your class
✓Create Task guidance and pseudocode reference sheets
Which AP CS exams are you prepping for?
✓
You’re in!
Your Big Ideas cheat sheet is on its way.
No thanks, I’ll figure it out myself
Avg student improvement: 2+ score levels | Real AP teacher, not just a tutor
AP Cybersecurity — National Launch 2026–27
Get Early Access to AP Cyber
AP Cyber launches nationally fall 2026. Get in early to help shape the course — start free with Unit 1 and the free teacher gradebook.
✓
You’re in — you’re on the AP Cyber early-access list!
Tanner will follow up personally within 48 hours. Your feedback will directly shape what gets built.
Step 1 of 4
Early Access — Limited Spots
Who are you?
Are you a teacher or a student?
I’m a Teacher
I’m a Student
Free to start — Unit 1 and the teacher gradebook are always free, no credit card.
Founding teachers unlock all 5 units and get direct input on what we build.
Not interested right now
Step 2 of 4
Your School
Tell us about your class
Other AP CS courses you teach
Your Situation
Tell us about yourself
Step 3 of 4
Classroom Needs
What does your classroom need? (select all that apply)
How You Study
What would help you most? (select all that apply)
Step 4 of 4
Almost Done
Where should we send your early-access details?
Free gradebook + Unit 1 | Your feedback shapes the course | Built by a real AP teacher