Encryption, Encryption Protocols and Digital Certificates

Computer Science A2 · Security. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science A2 topics

The idea

Encryption turns readable plain text into unreadable cipher text with an algorithm and a key. Only someone with the right key can turn it back.

In symmetric cryptography the same secret key encrypts and decrypts, so the key must reach the other person safely. In asymmetric cryptography each person has a matching pair of keys: a public key that anyone may know and a private key that is never shared. What one key encrypts, only the other key of the pair can decrypt.

The same pair of keys also proves who sent a message. This is the basis of digital signatures, digital certificates and SSL/TLS, the protocol that protects data between a browser and a web server.

Rules to remember

Common mistake

Students mix up which key is used. To keep a message secret, use the receiver's public key. To prove who sent it, use the sender's private key. A private key is never sent to anyone.

Worked example

Sana must send Omar a report that only Omar can read, and Omar must be sure it came from Sana. Which keys does Sana use?

  1. Secrecy: only Omar may read it, so it must need a key that only Omar has, his private key. Sana therefore encrypts the report with Omar's public key.
  2. Proof of sender: the signature must need a key that only Sana has. Sana hashes the report and encrypts the digest with her own private key.
  3. Omar decrypts the report with his private key, decrypts the signature with Sana's public key, and compares that digest with his own hash of the report.

Answer: Omar's public key to encrypt the report, and Sana's private key to make the digital signature.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Translation SoftwareArtificial Intelligence (AI) →Take a Computer Science A2 test