Encryption (Copy)
IGCSE / O Level Computer Science Cheat Sheet
Topic: 2.3 Encryption
🔐 What is Encryption?
- Encryption is the process of converting plain text into unreadable code (ciphertext) to prevent unauthorized access.
- Ensures confidentiality of data during transmission or storage.
🗝️ Key Concepts
| Term | Definition |
|---|---|
| Plaintext | Original readable data |
| Ciphertext | Encrypted version of the plaintext |
| Key | Secret value used to encrypt or decrypt data |
| Encryption | Converts plaintext → ciphertext |
| Decryption | Converts ciphertext → plaintext |
🔄 Types of Encryption
✅ Symmetric Encryption
- Same key used for both encryption and decryption
- Fast, but key must be securely shared
Example:
AES, DES
| Feature | Description |
|---|---|
| Key Usage | Same key for both operations |
| Speed | Faster |
| Security Risk | Key must be transmitted safely |
✅ Asymmetric Encryption
- Uses two keys:
- Public Key: used to encrypt
- Private Key: used to decrypt
- Only the private key holder can decrypt data encrypted with the matching public key
Example:
RSA
| Feature | Description |
|---|---|
| Key Usage | Different keys (public/private) |
| Speed | Slower |
| Security Advantage | No need to transmit private key |
🔁 Comparison Summary
| Feature | Symmetric | Asymmetric |
|---|---|---|
| Keys Used | 1 (shared) | 2 (public/private) |
| Speed | Faster | Slower |
| Security Risk | Key distribution | Key stays private |
| Example Use | File encryption | Digital communication |
🧠 Why Encryption is Used
- Protects sensitive data (e.g. passwords, messages)
- Prevents unauthorized access
- Essential for:
- Online banking
- Secure websites (HTTPS)
- Cloud storage
- Messaging apps (end-to-end encryption)
🌐 Real-World Application
| Scenario | Encryption Type |
|---|---|
| Email communication | Asymmetric |
| Wi-Fi password encryption | Symmetric |
| HTTPS websites | Both (hybrid) |
