Practice Encryption in CS Thinking

Use these practice problems to test your method after reviewing the concept explanation and worked examples.

Quick Recap

Encryption is the process of transforming readable data into an unreadable form so only someone with the right key can recover the original message. It is used to protect stored files, passwords, and data moving across networks.

Encryption is like locking a message in a box. Anyone can see the box, but only someone with the key can open it.

Showing a random 20 of 50 problems.

Example 1

medium
In Diffie-Hellman, Alice and Bob each pick a secret. What do they exchange publicly?

Example 2

challenge
You see Caesar ciphertext where 'E' would normally be most common in English, but 'H' is most common here. Estimate the shift.

Example 3

medium
Encryption guarantees data secrecy, but not message ___.

Example 4

medium
AES-128 has key length ___ bits, giving roughly 21282^{128} possible keys.

Example 5

medium
A Caesar cipher has only 25 useful shifts. Why is it trivially breakable, and what is the attack called?

Example 6

medium
Decrypt `MJQQT` (Caesar shift +5+5).

Example 7

medium
Decrypt 'IFMMP' (Caesar shift +1) and state the plaintext.

Example 8

challenge
Why is a Vigenere cipher (Caesar with a repeating multi-letter key) much harder to break than a single Caesar shift, yet still breakable?

Example 9

challenge
Quantum computers threaten RSA via Shor's algorithm but symmetric AES-256 is considered safer. Why?

Example 10

medium
In HTTPS, what does the server's TLS certificate prove?

Example 11

medium
Encrypt 'CAT' with a Caesar shift of +2.

Example 12

easy
Encryption mainly protects which security property?

Example 13

challenge
You intercept Caesar ciphertext 'WKH' and suspect it is a common 3-letter English word. By trying shifts, recover the most likely plaintext and give the shift used.

Example 14

medium
HTTPS uses slow asymmetric encryption to exchange a key, then fast symmetric encryption for the data. Why combine them?

Example 15

medium
Decrypt the Caesar ciphertext 'ZRUOG' that used shift +3. What is the plaintext?

Example 16

easy
Apply a Caesar cipher with shift +3 to the letter A. What letter results?

Example 17

medium
You receive `KHOOR` and suspect Caesar with shift +3+3. Decrypt.

Example 18

medium
A site encrypts stored passwords with a reversible key the server holds. Why do experts prefer hashing passwords instead?

Example 19

medium
Why does asymmetric encryption solve the key-distribution problem that symmetric encryption has?

Example 20

medium
Encrypt `CODE` with Caesar shift +7+7.