All subjects · Information Technology · WIT13 2 hour written exam on data, enabling technologies and systems development

Symmetric and asymmetric encryption

Edexcel IAL Information Technology · WIT13 2 hour written exam on data, enabling technologies and systems development

Encryption protects data stored and sent across networks. Symmetric encryption uses one shared key; asymmetric (public key) encryption uses a pair of keys. You need their features, functions, strengths and weaknesses (spec 13.5.1 and 13.5.2).

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

Symmetric encryption

In symmetric encryption the same secret key is used to encrypt and decrypt.

Features: fast and efficient, so suitable for large amounts of data (disk encryption, files, the bulk of a secure web session). AES is the widely used standard: NIST's FIPS 197 specifies AES with keys of 128, 192 or 256 bits, encrypting data in 128-bit blocks.

Problems:

Simple illustrations: a Caesar cipher (shift each letter by k) and XOR with a key (applying the same XOR again decrypts).

Asymmetric (public key) encryption

Each user has a key pair: a public key, shared openly, and a private key, kept secret. Data encrypted with one key can only be decrypted with the other.

Features: solves key distribution (public keys can be published); only 2 keys per person (2n in total). But it is much slower, so it is normally used to exchange a symmetric session key, which then encrypts the data (hybrid encryption, as in HTTPS). RSA is a well-known asymmetric algorithm based on the difficulty of factorising the product of two large primes.

Comparison

FeatureSymmetricAsymmetric
KeysOne shared secret keyPublic and private key pair
SpeedFastSlow
Key distributionDifficult: key must be sent securelyEasy: public key can be published
Keys for n usersn(n - 1)/22n
Typical useBulk data, files, disksExchanging session keys, digital signatures, certificates

Worked example

Toy RSA: p = 5, q = 11, e = 3. Find n, the private key d, and encrypt the message m = 8.

  1. n = p x q = 55
  2. phi = (p - 1)(q - 1) = 40
  3. d is the number with e x d mod 40 = 1: d = 27 (check 3 x 27 = 81 = 2 x 40 + 1)
  4. Ciphertext c = me mod n = 83 mod 55 = 512 mod 55 = 17
  5. Decrypt: 1727 mod 55 = 8

Answer: Public key (3, 55); private key (27, 55); ciphertext 17

Key idea: Symmetric: one shared key, fast, key distribution problem, n(n-1)/2 keys. Asymmetric: public and private keys, slower, solves distribution, 2n keys. Encrypt with receiver's public key for secrecy; sign with sender's private key. HTTPS combines them.

Check yourself

  1. How many symmetric keys are needed so that each pair among 20 employees has its own key?
    Show answer

    190. n(n - 1)/2 = 20 x 19 / 2 = 190.

  2. How many keys in total are needed for 20 employees using asymmetric encryption?
    Show answer

    40. Each person has a public and a private key: 40.

  3. Encrypt the word DATA with a Caesar cipher shifting each letter 3 places forward.
    Show answer

    GDWD. D to G, A to D, T to W, A to D: GDWD.

  4. XOR the data byte 10110010 with the key 01101100. Give the 8-bit result.
    Show answer

    11011110. Bit by bit, 1 where the bits differ: 11011110. XORing the result with the same key gives back 10110010.

  5. Ana wants to send Ben a confidential message using asymmetric encryption. Which key should she encrypt it with?
    • Ben's private key
    • Ben's public key
    • Ana's public key
    • Ana's private key
    Show answer

    Ben's public key. Only Ben's private key can then decrypt it.

  6. How does a digital signature prove who sent a message?
    • The receiver signs with their public key
    • The message is sent twice
    • The message is compressed
    • The sender signs with their private key, and only their public key verifies it
    Show answer

    The sender signs with their private key, and only their public key verifies it. Only the sender holds the private key.

  7. Using the toy RSA public key (e = 3, n = 55), encrypt the message m = 4.
    Show answer

    9. 43 = 64; 64 mod 55 = 9.

  8. Explain why HTTPS uses asymmetric encryption to exchange a key and then symmetric encryption for the data.
    Show answer

    Asymmetric encryption solves the problem of sharing the key securely, but it is slow, so it is used only to exchange a session key; symmetric encryption is fast, so it encrypts the bulk of the data.. Asymmetric for the key (secure sharing), symmetric for data (speed).

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.