You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
This lesson covers encryption — the process of converting plaintext into ciphertext to protect data from unauthorised access. You need to understand the Caesar cipher, Vernam cipher (one-time pad), symmetric and asymmetric encryption, and their use cases for the OCR H446 specification.
Encryption is the process of transforming readable data (plaintext) into unreadable data (ciphertext) using an algorithm and a key. Only someone with the correct key can reverse the process (decryption) to recover the plaintext.
| Term | Definition |
|---|---|
| Plaintext | The original, readable message |
| Ciphertext | The encrypted, unreadable message |
| Key | A value used by the encryption algorithm to transform the data |
| Encryption | The process of converting plaintext to ciphertext |
| Decryption | The process of converting ciphertext back to plaintext |
| Cipher | The algorithm used to perform encryption/decryption |
The Caesar cipher is a simple substitution cipher that shifts each letter in the plaintext by a fixed number of positions in the alphabet.
| Plain | A | B | C | D | E | F | G | ... | X | Y | Z |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Cipher | D | E | F | G | H | I | J | ... | A | B | C |
Plaintext: HELLO Ciphertext: KHOOR
To decrypt, shift each letter back by the key value.
KHOOR with shift -3 -> HELLO
| Aspect | Assessment |
|---|---|
| Key space | Only 25 possible keys (shifts 1-25) |
| Vulnerable to | Brute force (try all 25 shifts), frequency analysis |
| Security | Extremely weak — trivially breakable |
| Use | Educational only — never for real security |
Frequency analysis: In English, the letter E is the most common. If the most common letter in the ciphertext is H, the shift is likely 3. This immediately breaks the cipher.
The Vernam cipher is a theoretically unbreakable encryption scheme when used correctly.
| A | B | A XOR B |
|---|---|---|
| 0 | 0 | 0 |
| 0 | 1 | 1 |
| 1 | 0 | 1 |
| 1 | 1 | 0 |
Key property: XOR is its own inverse. If C = P XOR K, then P = C XOR K.
Plaintext (ASCII): H = 01001000
Key (random): 10110101
────────
Ciphertext (XOR): 11111101
To decrypt: XOR the ciphertext with the same key:
Ciphertext: 11111101
Key: 10110101
────────
Plaintext: 01001000 = H
The Vernam cipher is only mathematically proven unbreakable if ALL of these conditions are met:
| Requirement | Why |
|---|---|
| Key is truly random | Non-random patterns can be exploited |
| Key is at least as long as the plaintext | Short keys that are reused create patterns |
| Key is used only once | Reusing the key allows mathematical attacks |
| Key is kept completely secret | If the key is compromised, so is the message |
If any condition is violated, the cipher is no longer provably secure.
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.