Session 1 · Cryptography
← All sessions
00:00
Score
0 / 28
Personal Study Notes · Session 1

Cryptography

Cryptology, classical & modern ciphers, and where crypto goes wrong in practice.
Cryptology basics
Classical & modern ciphers
Real-world pitfalls
Symmetric vs asymmetric
25 questions · 28 marks
Core Concepts Classical Ciphers & Attacks Modern Ciphers & Modes Pitfalls & Side Channels History & Real-World Failures Symmetric vs Asymmetric
🔑

Core Concepts

5 questions
Cryptology splits into cryptography (defending information) and cryptanalysis (attacking it). Modern schemes are designed under Kerckhoffs's principle: assume attackers know every algorithm involved — only the short secret key stays hidden.
Q1
"Cryptology" is made up of two branches: cryptography (which defends) and ______ (which attacks).
1 mark
Cryptanalysis
Steganography
Digital forensics
Obfuscation
Q2
In the classic Alice / Bob / Eve / Mallory terminology, who represents an attacker who can only eavesdrop, not modify data?
1 mark
Alice
Bob
Eve
Mallory
Q3
Kerckhoffs's principle assumes attackers already know everything about a cryptosystem except:
1 mark
The ciphertext
The algorithm used
The secret key
The plaintext length
Q4
A classical substitution cipher maps 27 symbols (26 letters + a space character) to 27 symbols, giving 27! possible keys. Roughly how many bits are needed to represent one key (log₂(27!))?
1 mark
About 27 bits
About 94 bits
About 128 bits
About 256 bits
Q5
Why is exhaustive (brute-force) search infeasible against a 27!-key substitution cipher, per the lecture's back-of-envelope estimate?
1 mark
Computers cannot perform XOR operations
It would take roughly as long as the solar system has left to exist
The algorithm itself is a state secret
No computer can generate random numbers
Core Concepts score
0/5
🔤

Classical Ciphers & Attacks

3 questions
Substitution ciphers aren't secure against a determined attacker: a known plaintext reveals the key directly, and even a ciphertext-only attacker can exploit the fact that English letters (and letter pairs) occur with predictable frequency.
Q6
Classical substitution ciphers can be broken with only a ciphertext (no known plaintext) using:
1 mark
Frequency analysis of letters/letter-pairs
Quantum computing
SQL injection
The birthday paradox
Q7
According to the lecture, roughly how much ciphertext is "sufficiently long" for frequency analysis to reliably break a substitution cipher in English?
1 mark
5 characters
50 characters
500 characters
5000 characters
Q8
Given a known plaintext/ciphertext pair for a substitution cipher, an attacker can recover the key by:
1 mark
Running the AES key schedule backwards
Matching up corresponding plaintext and ciphertext letters directly
Guessing randomly until the checksum matches
Waiting for the algorithm to be leaked online
Classical Ciphers & Attacks score
0/3
🧊

Modern Ciphers & Modes

4 questions
AES is the workhorse modern block cipher — but a block cipher only encrypts one fixed-size block. Extending that to real (large) messages needs a mode of operation, and the choice of mode matters enormously for security.
Q9
Select all TRUE statements about AES (select all that apply):
2 marks
A
Block length is 128 bits
B
Key length can be 128, 192, or 256 bits
C
Proposed to NIST in 2000 through an open, worldwide selection process
D
Designed by Ron Rivest in 1987
Q10
Which block-cipher mode of operation is known for leaking plaintext patterns — e.g. an encrypted image's flat background stays visible — because identical plaintext blocks always produce identical ciphertext blocks?
1 mark
CTR
GCM
ECB
CBC
Q11
Among the AES modes mentioned in the lecture, which is described as the most secure, able to withstand attackers who can probe a "decryption oracle"?
1 mark
ECB
CTR
CBC
GCM
Q12
In CTR mode, what happens if the same key and the same IV (nonce) are mistakenly reused to encrypt two different messages, X and Y?
2 marks
The ciphertext becomes shorter
Nothing — CTR mode is immune to IV reuse
The AES algorithm simply refuses to run
XOR-ing the two ciphertexts cancels the shared keystream, leaking X⊕Y
Modern Ciphers & Modes score
0/6
⚠️

Pitfalls & Side Channels

5 questions
Modern ciphers like AES are believed mathematically secure — but real systems are broken through implementation mistakes, not by breaking the maths.
Q13
A key derived from an 8-character password (e.g. via SHA3), even when it feeds 128-bit AES, is realistically only as strong as:
1 mark
The much smaller password-guessing space
The full 2¹²⁸ AES keyspace
The SHA3 output size (256+ bits)
It cannot be attacked at all
Q14
"Security through obscurity" failed for RC4 and MIFARE Classic because:
1 mark
Their secret algorithms were eventually leaked or reverse-engineered, exposing real weaknesses
Both were open-source from day one
Both used quantum-resistant algorithms
Neither was ever deployed in production
Q15
A side-channel attack is best defined as one that:
1 mark
Exploits a mathematical weakness in the cipher's core algorithm
Requires directly breaking AES
Only works against quantum computers
Uses information (often physical — power, timing, sound) outside the cipher's abstract security model
Q16
Which of these are side-channel attack techniques mentioned in the lecture? (select all)
2 marks
A
Power analysis on a smartcard
B
Acoustic cryptanalysis (keystroke / 3D-printer sound)
C
SQL injection
D
Electromagnetic emissions from an LCD panel
E
Cache/page-fault timing on trusted hardware like Intel SGX
Q17
Which real CVE example from the lecture illustrates a "predictable key generation" pitfall?
1 mark
CVE-2020-7010: a Kubernetes cloud app generating passwords from deployment time
Heartbleed leaking OpenSSL memory
The BEAST attack on TLS 1.0
ZeroLogon's static AES-CFB8 IV
Pitfalls & Side Channels score
0/6
📜

History & Real-World Failures

4 questions
Cryptography has a long track record of ciphers that looked strong when introduced, then fell to advances in cryptanalysis or plain hardware progress.
Q18
DES, standardized in 1977 with a 56-bit key, was practically broken in 1998 by:
1 mark
Quantum computers
A side-channel power-analysis attack
A dedicated brute-force machine cracking a key in about 56 hours
Reverse-engineering the algorithm
Q19
RC4 became insecure in real deployments primarily because:
1 mark
It was mathematically broken from the very first day
WEP's use of RC4 with weak/reused IVs was exploited, and the industry moved to WPA2/AES
It required specialised hardware nobody owned
It was never actually implemented anywhere
Q20
During WWII, the Enigma machine's secret key was set physically using its:
1 mark
Keyboard layout alone
Power cable
Lampboard bulbs
Rotors and plugboard settings
Q21
Triple DES is still in limited use today with an effective key strength of about:
1 mark
56 bits
168 bits
112 bits
256 bits
History & Real-World Failures score
0/4
🗝️

Symmetric vs Asymmetric Keys

4 questions
Symmetric crypto uses one shared secret key to both encrypt and decrypt — fast, but both sides must somehow get that key safely first. Asymmetric (public-key) crypto uses a matched key pair: a public key anyone may have, which only locks (or verifies signatures), and a private key that never leaves its owner, which unlocks (or signs). It is much slower, so real protocols like TLS and SSH are hybrid: asymmetric crypto sets up a shared key, then symmetric crypto (AES, ChaCha20) protects the data.
Worked example: toy RSA with tiny numbers
  1. Bob makes his keys. He picks two primes, 3 and 11, and multiplies them: n = 33. His public key is (e = 3, n = 33), which he gives to everyone. His private key is (d = 7, n = 33), which he keeps secret.
  2. Alice encrypts the message 4 with Bob's public key: 4³ = 64, and 64 mod 33 = 31. She sends 31.
  3. Bob decrypts with his private key: 31⁷ mod 33 = 4
mod means “the remainder after dividing”: 64 ÷ 33 = 1 remainder 31, so 64 mod 33 = 31. A clock works the same way — 15:00 is 3 o’clock because 15 mod 12 = 3. Eve sees 31 and knows the public key (3, 33). To find the private key 7 she must first factor 33 = 3 × 11 — trivial here, but real RSA uses an n about 600 digits long that nobody can factor in any practical time. That difficulty is what makes RSA secure. Try it in Python: pow(4, 3, 33) → 31, then pow(31, 7, 33) → 4.
Q22
In asymmetric (public-key) cryptography, a message encrypted with Bob's public key can be decrypted by:
1 mark
Anyone who has Bob's public key
Only Bob, using his matching private key
Anyone who knows which algorithm was used
Eve, by XOR-ing the ciphertext with the public key
Q23
Every cipher covered earlier in this session (the substitution cipher, Enigma, DES, Triple DES, RC4, AES) is:
1 mark
Asymmetric — each uses a public/private key pair
A hash function, not a cipher
A mix: the classical ones are symmetric, the modern ones asymmetric
Symmetric — the same secret key encrypts and decrypts
Q24
Why does HTTPS/TLS use both asymmetric and symmetric cryptography?
1 mark
Asymmetric crypto safely agrees on a shared session key; fast symmetric crypto (e.g. AES) then encrypts the actual data
Symmetric crypto exchanges the keys; asymmetric crypto encrypts the bulk data because it is faster
For redundancy — if one breaks, the other still protects the data
Browsers cannot run AES without a public key
Q25
When you log in to a server with an SSH key pair, which file must never leave your own machine?
1 mark
Your public key (id_ed25519.pub)
The server's authorized_keys file
Your private key (id_ed25519)
The known_hosts file
Symmetric vs Asymmetric Keys score
0/4
Complete all questions to see your final score