Final exam
Cryptography Basics
Before you start
- 20 questions, drawn at random from a pool of 32.
- Pass mark: 70%. Your final score is 30% practice + 70% exam.
- No time limit, but finish within 3 hours. You can move between questions before you submit.
- Failed? Review the lessons and try again: every attempt gets a new set of questions.
Question 1 of 20Choose one
A file is converted to Base64 before being emailed. Which security goal does this provide?
Question 2 of 20Match the pairs
Match each cryptographic tool to the goal it most directly provides.
Tap an answer, then tap the place where it belongs (or drag it there).
- AES encryption
- HMAC tag
- Digital signature
- SHA-256 checksum from a trusted source
Question 3 of 20True or false
Keeping a cipher's algorithm secret is the main source of its security in modern cryptography.
Question 4 of 20Fill in the blanks
Fill in the blanks
With a Caesar shift of 5, the plaintext letter A becomes , and the plaintext letter Y becomes .
Question 5 of 20Choose one
Why did the simple substitution cipher fall to analysis despite having about 4 × 1026 possible keys?
Question 6 of 20Work it out
XOR the 4-bit ciphertext 1100 with the key 0110 to recover the plaintext. Type the four bits.
Question 7 of 20What would you do?
What would you do?
Two spies reuse the same one-time pad page for two different messages, believing the pad is unbreakable. What risk have they created?
Question 8 of 20Work it out
How many times larger is the key space of a 128-bit key than that of a 120-bit key?
Question 9 of 20Choose one
Which describes AES correctly?
Question 10 of 20True or false
An encrypted image in ECB mode can still show the outline of the original picture.
Question 11 of 20Select all that apply
Which practices are correct when using AES-GCM? Select all that apply.
Select all that apply.
Question 12 of 20Sort into groups
Classify each mode by whether it provides integrity on its own.
Tap an item, then tap its group (or drag it there).
Question 13 of 20Choose one
What is the approximate collision resistance of SHA-256?
Question 14 of 20Spot the mistake
A colleague's notes on hash functions contain errors. Select the incorrect statements.
Question 15 of 20Work it out
Using the birthday bound, about how many hashes must be computed to expect a collision in a 128-bit hash? Give the exponent of 2.
Question 16 of 20Choose one
Why does each user's password hash get its own random salt?
Question 17 of 20Work it out
A 6-character password uses 62 possible characters (626 ≈ 5.68 × 1010). An attacker tests 1010 guesses per second against a fast hash. About how many seconds does a full search take?
Question 18 of 20Sort into groups
Sort these into good or poor choices for storing user passwords.
Tap an item, then tap its group (or drag it there).
Question 19 of 20True or false
HMAC was designed so that knowing a valid tag for a message doesn't let an attacker compute a valid tag for that message with extra data appended.
Question 20 of 20Work it out
Diffie-Hellman uses p = 23 and g = 5. Alice's secret is a = 6. What public value A does she send?
Question 21 of 20Choose one
What does unauthenticated Diffie-Hellman fail to protect against?
Question 22 of 20Work it out
A tiny RSA key uses primes p = 3 and q = 11. What is the public modulus n?
Question 23 of 20Work it out
With the tiny public key (n = 33, e = 3), what is the ciphertext of the message m = 4?
Question 24 of 20Choose one
Why do real systems encrypt bulk data with AES rather than RSA?
Question 25 of 20Put in order
Order the steps of verifying a digital signature on a document.
Drag the items, or use the arrow buttons, to put them in order.
- Obtain the signer's public key, for example from a certificate
- Accept the document only if the check succeeds
- Hash the received document
- Check the signature against the hash using the public key
Question 26 of 20Select all that apply
Which items are part of a typical website certificate? Select all that apply.
Select all that apply.
Question 27 of 20What would you do?
What would you do?
Your browser shows a certificate warning when you open your webmail on a hotel network, though it worked fine at home this morning. What should you do?
Question 28 of 20Put in order
Order these TLS 1.3 events.
Drag the items, or use the arrow buttons, to put them in order.
- Both sides exchange Finished messages
- Client sends its key share
- Server signs the handshake transcript
- Server sends its key share
- Server sends its certificate
Question 29 of 20True or false
With end-to-end encryption, the messaging provider's servers can read message content but not metadata.
Question 30 of 20Choose one
Which random source is appropriate for generating an encryption key in a browser?
Question 31 of 20Sort into groups
Sort each item by its quantum-era status.
Tap an item, then tap its group (or drag it there).
Question 32 of 20Choose one