Pro Content

Upgrade to access all Cambridge 9618 lessons including symmetric and asymmetric encryption, digital signatures, certificates, and TLS.

Upgrade to Pro →
← Back to Dashboard
📘 Paper 3 · 3.5 Security
3.5.2 Encryption, Digital Signatures & Certificates
Cambridge 9618 · International A Level Computer Science · ~18 min read
Notes
Video
Slides
Quiz
Worksheet

Symmetric vs Asymmetric Encryption

Encryption converts plaintext into ciphertext using a mathematical algorithm and key, making data unreadable to unauthorised parties. There are two fundamental approaches:

🔁 Symmetric Encryption
  • Uses the same key for both encryption and decryption
  • Fast — suitable for bulk data encryption
  • Key distribution problem: how do you securely share the key?
  • Algorithms: AES (Advanced Encryption Standard), DES, 3DES, ChaCha20
  • Used for: file encryption, disk encryption, VPN data
  • Key size: AES-128, AES-256
🔑🔓 Asymmetric Encryption
  • Uses a key pair: public key and private key — mathematically linked
  • Message encrypted with public key can ONLY be decrypted with paired private key
  • Public key is shared openly; private key is kept secret
  • Slower — not suitable for large amounts of data
  • Solves the key distribution problem
  • Algorithms: RSA, ECC (Elliptic Curve Cryptography)
  • Used for: key exchange, digital signatures, HTTPS

Symmetric Encryption — How it works

Symmetric encryption flow
Plaintext
Hello Alice
+
Secret Key
K7x#mQ9p
AES
encrypt
Ciphertext
Xk9#@mZ...
⬇ Transmitted over network
Ciphertext
Xk9#@mZ...
+
Same Key
K7x#mQ9p
AES
decrypt
Plaintext
Hello Alice

Asymmetric Encryption — Encrypting a message to Bob

Step 1: Bob generates a key pair and shares his public key
Bob's Public Key 🔑
← Anyone can have this
Bob's Private Key 🔐
← Only Bob keeps this
Step 2: Alice encrypts with Bob's PUBLIC key
Plaintext
+
Bob's Public Key
Ciphertext
Step 3: Only Bob can decrypt — using his PRIVATE key
Ciphertext
+
Bob's Private Key
Plaintext

Hashing

A hash function converts any input into a fixed-size output called a hash digest (or message digest). Hashing is not encryption — it is a one-way process; you cannot reverse a hash to get the original data.

🔢 Hash function properties
Input: "Hello" → SHA-256: 185f8db32...abc (64 hex chars)
Input: "hello" → SHA-256: 2cf24dba5...xyz (completely different!)
Input: "Hello World — a very long string with many characters" → SHA-256: 7f83b165...mno (same 64 chars!)
  • Fixed output size regardless of input length
  • Deterministic: same input always gives same hash
  • Avalanche effect: small change in input completely changes hash
  • One-way: cannot compute input from hash
  • Collision resistant: two different inputs should not produce the same hash
  • Common algorithms: SHA-256, SHA-3, MD5 (no longer secure)

Hashing is used to: store passwords securely (store hash, not password), verify file integrity (compare hashes), create digital signatures (hash then sign).

Digital Signatures

A digital signature proves: (1) the message came from the claimed sender (authenticity), (2) the message has not been altered (integrity), (3) the sender cannot deny sending it (non-repudiation).

How digital signatures work
1
Sender (Alice) creates a hash of the message using a hash function (e.g. SHA-256)
2
Alice encrypts the hash using her own private key — this encrypted hash is the digital signature
3
Alice sends both the message AND the signature to Bob
4
Bob decrypts the signature using Alice's public key — recovering the original hash Alice computed
5
Bob hashes the received message independently using the same hash function
6
Bob compares the two hashes. If they match: message is authentic and unmodified ✅. If they don't match: message was tampered with ❌.

Note the key usage direction in digital signatures: the private key is used to SIGN (encrypt the hash); the public key is used to VERIFY (decrypt the hash). This is the opposite of encryption for confidentiality.

Digital Certificates

A digital certificate (also called a public-key certificate) binds a public key to an identity. It solves the problem: "how do I know this public key really belongs to Amazon and not a hacker?"

📄 Contents of a digital certificate
Subject (Owner)
amazon.com
Public Key
RSA 2048-bit public key of amazon.com
Issuer (CA)
DigiCert Inc (Certificate Authority)
CA's Digital Signature
Signature proving CA verified this certificate
Valid From / To
2025-01-01 — 2026-01-01
Serial Number
Unique identifier for this certificate

A Certificate Authority (CA) is a trusted third party (e.g. DigiCert, Let's Encrypt, Comodo) that verifies a website's identity and signs the certificate. Browsers trust known CAs — when you visit https://amazon.com, your browser checks that the certificate is signed by a known CA.

TLS / HTTPS — Putting it all together

HTTPS uses TLS (Transport Layer Security), which combines asymmetric and symmetric encryption in a hybrid approach:

TLS Handshake (simplified)
1
Client Hello: browser tells server what TLS version and cipher suites it supports
2
Server Hello + Certificate: server sends its digital certificate (containing its public key)
3
Certificate verification: browser verifies the certificate is signed by a trusted CA
4
Key exchange: browser and server use asymmetric encryption to securely negotiate a shared session key
5
Symmetric encryption begins: all subsequent communication is encrypted with the faster symmetric session key (AES)

Why hybrid? Asymmetric encryption solves the key distribution problem (secure key exchange) but is slow. Symmetric encryption is fast but has the key distribution problem. TLS combines both: asymmetric to exchange the symmetric key, then symmetric for speed.

Cambridge 9618 exam tip: Know the key difference table: symmetric = same key, fast, key distribution problem; asymmetric = key pair (public+private), slower, solves key distribution. For encryption: public key encrypts, private key decrypts. For digital signatures (REVERSED): private key signs (encrypts hash), public key verifies (decrypts hash). Hash: one-way, fixed-size, used in digital signatures. Certificate: public key + identity + CA's signature — proves public key belongs to the right person. TLS/HTTPS: hybrid — asymmetric for key exchange, symmetric (AES) for session data. Non-repudiation = sender cannot deny sending (because only they have the private key used to sign).
⚠️ Common Mistakes
  • Confusing the direction for digital signatures — signing uses the PRIVATE key; verifying uses the PUBLIC key. Many students think public key is used for signing.
  • Saying hashing is encryption — hashing is one-way and irreversible; encryption is two-way (reversible with the key); they are different processes
  • Thinking the same key pair direction applies to signatures and encryption — in encryption: public key encrypts, private decrypts. In signatures: private key signs, public key verifies. Opposite!
  • Saying digital certificates prevent eavesdropping — certificates prove IDENTITY (the public key belongs to whom it claims); encryption prevents eavesdropping
  • Forgetting what non-repudiation means — only the holder of the private key could have created the signature, so the sender cannot later deny they signed and sent the message
  • Saying TLS uses only asymmetric encryption — TLS uses a HYBRID approach: asymmetric for key exchange, then symmetric (AES) for the actual data
✅ Notes completed!
Video coming soon
Click slide or press arrow keys to navigate

Worksheet — 3.5.2 Encryption

8 questions · Cambridge 9618 standard

Q1State two differences between symmetric and asymmetric encryption.[2]
✅ Mark scheme
Any two from: symmetric uses the same key for encryption and decryption; asymmetric uses a pair of mathematically linked keys (public and private) [1]; symmetric is faster and suitable for large data; asymmetric is slower [1]; symmetric has the key distribution problem — the secret key must be shared securely; asymmetric solves this — the public key can be shared openly [1].
Q2Describe how digital signatures provide integrity and non-repudiation. Include which key is used at each step.[5]
✅ Mark scheme
The sender hashes the message using a hash function (e.g. SHA-256) to produce a message digest [1]; the sender encrypts the hash using their private key — this encrypted hash is the digital signature [1]; the recipient decrypts the signature using the sender's public key, recovering the original hash [1]; the recipient independently hashes the received message and compares the two hashes — if they match, the message has not been altered (integrity) [1]; non-repudiation: only the sender holds the private key, so only they could have produced the signature — they cannot deny sending the message [1].
Q3Explain the purpose of a digital certificate and state three pieces of information it contains.[4]
✅ Mark scheme
A digital certificate binds a public key to an identity — it proves that the public key genuinely belongs to the entity claimed (e.g. a website) and hasn't been substituted by an attacker [1]; any three from: the public key of the certificate owner [1]; the identity of the owner (domain name / organisation name) [1]; the name of the issuing Certificate Authority (CA) [1]; the CA's digital signature on the certificate [1]; the validity period (valid from/to dates) [1].
Q4Explain what hashing is and why it is described as a one-way function. Give one use of hashing in computer security.[3]
✅ Mark scheme
A hash function transforms an input of any length into a fixed-size output (hash digest/message digest) using a mathematical algorithm [1]; it is one-way because it is computationally infeasible to reverse the process — you cannot determine the original input from the hash alone; unlike encryption, there is no key to reverse the process [1]; use in security: storing passwords as hashes — the system stores the hash of the password, not the password itself; if the database is breached, attackers cannot recover plaintext passwords from hashes [1]. Accept: verifying file integrity (download hash comparison), digital signatures (hash the message before signing).
Q5Explain why HTTPS uses a hybrid encryption approach (both symmetric and asymmetric). What role does each play?[4]
✅ Mark scheme
Asymmetric encryption is used during the TLS handshake to securely exchange a session key — the client and server use asymmetric encryption to agree on a shared symmetric session key without it ever being transmitted in plaintext [1]; this solves the key distribution problem — even if an eavesdropper monitors the handshake, they cannot determine the session key without the server's private key [1]; symmetric encryption (typically AES) is then used for the actual data transmission — it is much faster than asymmetric encryption and suitable for the large volume of data exchanged [1]; the hybrid approach gets the best of both: the security of asymmetric key exchange and the speed of symmetric data encryption [1].
Q6Alice wants to send an encrypted, signed message to Bob. List the steps she should take, specifying which keys are used at each step and why.[4]
✅ Mark scheme
Alice hashes the message and encrypts the hash with her own private key to create a digital signature — proves the message came from Alice [1]; Alice obtains Bob's public key (from Bob's certificate); Alice encrypts the message with Bob's public key — only Bob's private key can decrypt it, ensuring confidentiality [1]; Alice sends Bob both the encrypted message and the digital signature; Bob decrypts the message with his own private key [1]; Bob decrypts Alice's signature with Alice's public key to recover the hash; Bob hashes the decrypted message and compares — matching hashes confirm integrity and authenticity [1].
Q7Explain how asymmetric (public-key) encryption works when Alice sends a secure message to Bob. State which key is used to encrypt and which to decrypt, explain why the private key must never be shared, and identify one advantage of asymmetric encryption over symmetric encryption.[5]
✅ Mark scheme
Alice encrypts the message using Bob's public key [1]; only Bob's private key can decrypt it [1]; the private key must never be shared — if it were compromised, any message encrypted with the public key could be read, and digital signatures could be forged [1]; advantage of asymmetric: no shared secret needs to be exchanged over an insecure channel — the public key can be distributed freely without risk, solving the key distribution problem of symmetric encryption [1]; Award 1 additional mark for correct description of how Bob then decrypts [1].
Q8Describe how a digital signature is created and verified. Explain how a digital signature provides both authentication and non-repudiation, and state why a hash of the message is signed rather than the entire message.[5]
✅ Mark scheme
Creation: sender computes a hash of the message, then encrypts the hash with their private key — this encrypted hash is the digital signature [1]; the signature is attached to the message [1]; Verification: receiver decrypts the signature using the sender's public key to recover the original hash; independently computes the hash of the received message; if the two hashes match, the signature is valid [1]; Authentication: only the holder of the private key could have created the signature, proving the message came from the sender [1]; Non-repudiation: the sender cannot later deny signing the message, as only they hold their private key [1]; Hash is signed not the whole message because hashing produces a short, fixed-length digest that is efficient to encrypt and compare [1]. Award max 5.
Topic Quiz
Question 1 of 10
You scored
out of 10
Card 1 of 10
Click to reveal definition
🎉
All cards reviewed!
TermDefinition
🎯

Mini Test — 3.5.2 Encryption

10 questions · 10 marks · 10 minutes

← 3.5.1 Security Threats
63 of 82 · Cambridge 9618
3.5.3 Cybersecurity Ethics →