Encryption is the process of converting readable data (plaintext) into an unreadable form (ciphertext) using an algorithm and a key. Only someone with the correct key can reverse the process (decrypt) and recover the original data.
Encryption does not prevent data from being intercepted — it ensures that even if someone intercepts the data, they cannot read it without the key.
Encryption protects data in two situations:
Examples of where encryption is used: online banking, HTTPS web connections, WhatsApp messages, password storage in databases, healthcare records.
The Caesar cipher is a simple substitution cipher. Each letter is shifted a fixed number of positions down the alphabet. The shift value is the key.
The Caesar cipher has only 25 possible keys (shifts of 1–25). An attacker can try all 25 combinations in seconds — this is called a brute-force attack. It is far too weak for modern use and is only used as an educational example.
In symmetric encryption, the same key is used to both encrypt and decrypt the data.
| Advantage | Disadvantage |
|---|---|
| Fast and efficient for large amounts of data | The key must be shared securely — if intercepted, the attacker can decrypt everything |
| Simple to implement | Key distribution is a major problem |
Examples: AES (Advanced Encryption Standard), used for encrypted files, WPA2 Wi-Fi.
In asymmetric encryption, two keys are used: a public key and a private key.
| Advantage | Disadvantage |
|---|---|
| No need to share a secret key — the public key can be distributed openly | Slower than symmetric encryption |
| Used for secure key exchange and digital signatures | More computationally expensive |
Examples: RSA, used in HTTPS and email encryption. When you connect to a website over HTTPS, asymmetric encryption is used to securely exchange a symmetric key, then symmetric encryption handles the actual data transfer.
When you visit a website with HTTPS (the padlock in the browser), encryption is protecting your data. The process uses both asymmetric encryption (for the initial handshake and key exchange) and symmetric encryption (for the data transfer), combining the security benefits of both.
8 questions · 17 marks
| Term | Definition |
|---|
Timed exam conditions.