Encryption
CIE A-Level Computer ScienceΒ· Unit 6: Security, privacy and data integrityΒ· 20 min read
1. Core Concepts and Simple Ciphersβ β ββββ± 5 min
Encryption
The process of transforming readable plaintext into unreadable ciphertext to prevent unauthorized access. Decryption reverses this process using a secret key.
Example:
Encrypting customer payment data before storing it in a company database
Simple substitution ciphers are commonly used in CIE exam questions to test basic encryption principles. The most frequent example is the Caesar cipher.
Caesar Cipher
Shift =
A substitution cipher where each plaintext letter is shifted positions along the alphabet. Decryption requires shifting back by the same .
Encrypt the plaintext CODE using a Caesar cipher with shift , where .
- 1
Convert each plaintext letter to its numerical value:
- 2
- 3
Add the shift value to each number, mod 26:
- 4
- 5
Convert the new values back to letters:
- 6
- 7
Final ciphertext is FRGH
Exam tip:
Always check if the question defines A as 0 or 1, this changes the final ciphertext output.
2. Symmetric Encryptionβ β β βββ± 5 min
Symmetric Encryption
An encryption system where the same secret key is used for both encryption and decryption. The key must only be shared between authorized parties.
Common examinable symmetric algorithms are AES (Advanced Encryption Standard), DES, and 3DES. Symmetric encryption is very fast, making it ideal for encrypting large volumes of data.
Alice and Bob want to communicate using AES-256 symmetric encryption over an unsecured public channel. Why is this not secure?
- 1
Any key sent over an unsecured public channel can be intercepted by an attacker
- 2
If the attacker gains the secret key, they can decrypt all subsequent encrypted messages between Alice and Bob
- 3
No pre-existing shared secret exists to encrypt the key itself during exchange, so there is no way to secure it
3. Asymmetric Encryptionβ β β β ββ± 6 min
Asymmetric Encryption
An encryption system that uses a pair of mathematically linked keys: a public key (shared openly) and a private key (kept secret by the owner).
Data encrypted with a user's public key can only be decrypted with their matching private key
Data signed with a user's private key can be verified by anyone with their public key (used for digital signatures)
The most common examinable asymmetric algorithm is RSA, which relies on properties of prime numbers. Below is a worked simple RSA example for exam practice:
Given RSA , public exponent , encrypt plaintext .
- 1
RSA encryption formula is:
- 2
- 3
Substitute values:
- 4
- 5
Break down the exponent to simplify calculation:
- 6
- 7
- 8
Multiply and take mod 55:
- 9
- 10
Final ciphertext
CIE frequently asks to compare symmetric and asymmetric encryption, key properties are below:
Symmetric Encryption
Same key for encrypt/decrypt, key must be kept secret
+ Pros: Very fast, suitable for large datasets; Small key size for equivalent security
β Cons: Secure key distribution requires pre-shared secret; Poor support for digital signatures
Asymmetric Encryption
Separate public and private keys, public key can be shared openly
+ Pros: Secure key exchange over public channels; Native support for digital signatures
β Cons: Slow, computationally intensive; Unsuitable for large volumes of data
Exam tip:
Break RSA exponents into powers of two to avoid calculating huge numbers, this saves time and reduces calculation errors.
4. Applications of Encryptionβ β ββββ± 4 min
Encryption is used to secure two main states of data:
Data at rest: Encrypting stored data such as full hard drives, password databases, and customer payment information
Data in transit: Encrypting data sent over public networks, for example HTTPS web traffic, email, and VPN connections
Digital signatures: Verifying the authenticity of software updates, legal documents, and websites by signing a hash of the content with the sender's private key
Test your understanding
Which type of encryption is used to encrypt bulk data transferred over HTTPS?
Symmetric encryption
Asymmetric encryption
RSA encryption
No encryption
5. Common Pitfalls
Wrong move:
Confusing encryption with hashing
Why:
Examiners frequently test this distinction, mixing the two loses easy marks
Correct move:
Remember: Encryption = reversible confidentiality, Hashing = one-way integrity checking
Wrong move:
Claiming asymmetric encryption is always better than symmetric
Why:
Asymmetric is much slower, so it is not used for large data
Correct move:
State that the two methods are used together: asymmetric for key exchange, symmetric for bulk data
Wrong move:
Mixing up which key encrypts/decrypts in asymmetric encryption
Why:
Common confusion about public/private key roles
Correct move:
To send a message to someone: encrypt with their public key, only their private key can decrypt it
Wrong move:
Calculating full large exponents for RSA questions
Why:
This leads to arithmetic errors and wastes valuable exam time
Correct move:
Break the exponent into powers of two, take mod at each step to keep numbers small
Wrong move:
Claiming asymmetric encryption uses one shared key
Why:
Mixes up symmetric and asymmetric core properties, a common exam trap
Correct move:
Remember: symmetric = 1 shared key, asymmetric = 2 keys per user (public + private)
6. Quick Reference Cheatsheet
Property | Symmetric Encryption | Asymmetric Encryption |
|---|---|---|
Number of keys | 1 shared secret key | 2 keys per user: public + private |
Key distribution | Requires secure pre-shared channel | Public key can be shared openly |
Speed | Very fast, low computation | Slow, high computation |
Best for | Bulk data, data at rest | Key exchange, digital signatures |
7. Frequently Asked
What is the difference between encryption and hashing?
Encryption is reversible with a secret key, designed for confidentiality. Hashing is a one-way function that produces a fixed-length digest, designed for data integrity checking, not confidentiality.
Why is RSA considered secure?
RSA security relies on the fact that factoring the product of two large prime numbers is computationally infeasible for current technology when keys are sufficiently long.
When this came up on past exams
AI-estimated based on syllabus patterns β cross-check with official past papers for accuracy. Use only as revision-focus signals.
- 2022 Β· 2
Compare symmetric/asymmetric encryption
- 2023 Β· 2
Simple RSA encryption calculation
- 2024 Β· 2
Encryption use cases question
Going deeper
- syllabusCIE 9618 Official Syllabus
- practiceCIE 9618 Past Paper RepositoryPractice encryption questions from past papers
What's Next
Encryption is a foundational concept for all security topics in CIE 9618 Paper 2, and it is regularly combined with other security concepts in extended response questions. Understanding the tradeoffs between symmetric and asymmetric encryption is critical for answering questions about HTTPS, digital certificates, and secure network communication. Encryption is often paired with hashing for data integrity, and forms the basis of all modern secure systems. Next, you can explore related security topics to build your full understanding of the unit.
