0984

Encryption

Data Transmission · 4 question types

Exam Frequency Analysis

Past paper frequency (2018 to 2024)

This topic accounts for approximately 4% of your exam marks.

increasing
Rare
Increasing4%

Symmetric vs asymmetric encryption questions are growing as cybersecurity becomes more prominent.

uses two related keys: a that anyone is allowed to know, and a that only the owner knows. Data encrypted with one of the keys can only be decrypted with the other.

How it works

Suppose Alice wants to send a private message to Bob.

  1. Bob publishes his public somewhere everybody can see it (e.g. on his website or in a public directory).
  2. Bob keeps his private key secret, stored only on his own computer.
  3. Alice fetches Bob's public key and uses it to encrypt her plaintext message into ciphertext.
  4. Alice sends the ciphertext to Bob over the (insecure) network.
  5. Bob uses his private key to decrypt the ciphertext back into Alice's original plaintext.
  6. An attacker who has intercepted the ciphertext AND Bob's public key still cannot read the message, because only the private key can decrypt and the private key never leaves Bob's machine.
Asymmetric encryption: Alice encrypts the message "Hello Bob!" with Bob's public key to produce ciphertext, and only Bob's private key can decrypt it back into the original message
Source: Asymmetric (public/private key) encryption by Save My Exams

Why the public key cannot decrypt

The clever maths behind asymmetric encryption (RSA, ECC, etc.) is built so that knowing the public key is enough to encrypt but not enough to decrypt. Decryption requires the private key, which is held only by the recipient. Even though anyone can see the public key, no one can use it to reverse the encryption.

The big advantage: no shared secret to exchange

Asymmetric encryption solves the key-sharing problem. Bob can publish his public key to the whole world. Anyone (Alice, Charlie, total strangers) can use it to send him encrypted messages, and only Bob, with his private key, can read them. There is no need to pre-arrange a shared key.

The cost

Asymmetric encryption is much slower than symmetric encryption because the mathematics is more demanding. For this reason, real systems usually:

  1. Use asymmetric to exchange a small piece of data, such as a one-time symmetric key.
  2. Then switch to for the actual conversation, using the freshly exchanged key.

This is exactly what HTTPS does: a brief asymmetric handshake, then fast symmetric encryption for the bulk of the page load.

Key sizes

Modern asymmetric keys are large to resist guessing. A 100-bit key would give about 10³⁰ different possible values; a 2048-bit RSA key is the modern minimum. The number of possible combinations is so huge that a brute-force search is impossible with today's computers.

When asymmetric encryption is used

  • HTTPS (the secure web), specifically the TLS handshake at the start of each connection
  • Digital signatures that prove a message came from a particular person
  • PGP / GPG email encryption
  • SSH for secure remote login
  • Certificate authorities verifying website identities