Study Guide

Encryption

CIE A-Level Computer ScienceΒ· Unit 6: Security, privacy and data integrityΒ· 20 min read

1. Core Concepts and Simple Ciphersβ˜…β˜…β˜†β˜†β˜†β± 5 min

πŸ“˜ Definition

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.

πŸ“˜ Definition

Caesar Cipher

Shift =

A substitution cipher where each plaintext letter is shifted positions along the alphabet. Decryption requires shifting back by the same .

πŸ“ Worked Example

Encrypt the plaintext CODE using a Caesar cipher with shift , where .

  1. 1

    Convert each plaintext letter to its numerical value:

  2. 2
    C=2,O=14,D=3,E=4C = 2, O = 14, D = 3, E = 4
  3. 3

    Add the shift value to each number, mod 26:

  4. 4
    2+3=5,14+3=17,3+3=6,4+3=72+3=5, 14+3=17, 3+3=6, 4+3=7
  5. 5

    Convert the new values back to letters:

  6. 6
    5=F,17=R,6=G,7=H5=F, 17=R, 6=G, 7=H
  7. 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

πŸ“˜ Definition

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.

πŸ“ Worked Example

Alice and Bob want to communicate using AES-256 symmetric encryption over an unsecured public channel. Why is this not secure?

  1. 1

    Any key sent over an unsecured public channel can be intercepted by an attacker

  2. 2

    If the attacker gains the secret key, they can decrypt all subsequent encrypted messages between Alice and Bob

  3. 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

πŸ“˜ Definition

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:

πŸ“ Worked Example

Given RSA , public exponent , encrypt plaintext .

  1. 1

    RSA encryption formula is:

  2. 2
    C=Memod  nC = M^e \mod n
  3. 3

    Substitute values:

  4. 4
    C=127mod  55C = 12^7 \mod 55
  5. 5

    Break down the exponent to simplify calculation:

  6. 6
    122=144≑144βˆ’2(55)=34mod  5512^2 = 144 \equiv 144 - 2(55) = 34 \mod 55
  7. 7
    124=(122)2=342=1156≑1156βˆ’21(55)=1mod  5512^4 = (12^2)^2 = 34^2 = 1156 \equiv 1156 - 21(55) = 1 \mod 55
  8. 8

    Multiply and take mod 55:

  9. 9
    C=1Γ—34Γ—12=408≑408βˆ’7(55)=23mod  55C = 1 \times 34 \times 12 = 408 \equiv 408 - 7(55) = 23 \mod 55
  10. 10

    Final ciphertext

Methods compared

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

βœ“ Quick check

Test your understanding

  1. 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

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.