Skip to content

9618 · Unit 20 · Paper 3: Advanced theory

Encryption, signatures and trust.

9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

Encryption and key ownership

§17.1 · Security

Some messages must stay secret. Others are meant for everyone, but readers must be able to trust them. The Veyra notice service does both: it sends a confidential inspection report to Luma workshop, and publishes entrance notices anyone can read. Secrecy and proof of origin use keys in different directions.

What encryption does

An encryption algorithm uses a key to transform plaintext into ciphertext. Decryption uses the appropriate key and algorithm to recover the plaintext. The algorithm may be public; the necessary secret key must remain protected.

Compare who holds which key: one green key copied to both sides, or a violet private key and a blue-grey public key for each owner.

Symmetric · one shared secret keyVeyrashared keyLumashared keythe same key encrypts and decrypts;it must reach Luma in secretAsymmetric · a key pair for each ownerVeyraVeyra private keyVeyra public keyLumaLuma private keyLuma public keyviolet: kept by its owner · blue-grey: given to anyoneSymmetric · one shared secret keyVeyrashared keyLumashared keythe same key encrypts and decrypts;it must reach Luma in secretAsymmetric · a key pair for each ownerVeyraVeyra private keyVeyra public keyLumaLuma private keyLuma public keyviolet: kept by its owner · blue-grey: shared

What each arrangement costs in practice:

MethodKeys and ownershipMain consequence
SymmetricVeyra and Luma share one secret key; the same key encrypts and decrypts.Fast for large messages, but both sides need a secure way to obtain the secret.
AsymmetricAn owner holds a mathematically linked public/private pair. The public key is distributed; the private key stays with its owner.A public key can be shared openly. The private key never needs to travel.

Whose key, and what it protects

Every key choice protects one of three things. Name the key’s owner and purpose: “use the public key” alone leaves both unclear.

ProtectionWhat it means
ConfidentialityUnauthorised readers cannot understand the content.
AuthenticityThe claimed origin can be verified.
IntegrityAn alteration can be detected.
A shared symmetric key cannot distinguish which holder created a message. A sender’s private key can support verification using its matching public key.
Your turn

1 Veyra and Luma use one shared key. What problem must they solve before the first message?

2 How many keys does Luma own in asymmetric encryption, and which one may it give to anyone?

3 A notice must not be changed without anyone noticing. Which protection is this: confidentiality, authenticity or integrity?

  1. 1
    getting the shared key to the other side securely, without it being intercepted
  2. 2
    two, a matched pair: it gives out Luma public key and keeps Luma private key
  3. 3
    integrity
Tick what you can do now
Practise with s26/31 Q8(a); s26/32 Q8(a)
1 / 8
9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

Sending a private message

§17.1 · Security

Anything sent across a network can be copied on the way. Veyra’s inspection report must be useless to anyone who copies it: only Luma may read it. Veyra encrypts it using Luma’s public key; only the matching Luma private key can decrypt it.

Watch the two keys: the blue-grey one locks the report at Veyra, and only the violet one at Luma opens it again.

VeyraLumaCiphertextk3V@9fQw!Luma public keyLuma private keyencryptciphertext sentunreadable if interceptedPlaintextInspection reportdecryptVeyraLumaCiphertextk3V@9fQw!Luma public keyLuma private keyencryptciphertextsent acrossthe networkPlaintextInspection reportdecrypt
1
Luma generates its matched key pair and makes its public key available.
2
Veyra checks that the public key belongs to Luma, then encrypts the report with it.
3
Veyra sends the ciphertext. Luma decrypts with its private key.

Why no secret key has to travel

Veyra does not have to send a shared secret across an unprotected channel. A certificate can establish whose public key it received; otherwise an impostor could substitute a different key.

Replying: use the other owner’s keys

For Luma’s confidential reply, Luma uses Veyra’s public key; Veyra decrypts with Veyra’s private key. Reusing Luma’s private key at Veyra would expose Luma’s secret.

Anyone can obtain Luma’s public key and encrypt a message to Luma. Successful decryption therefore does not prove that Veyra sent it.
Your turn

1 Veyra sends Luma a private report. Which key encrypts it, and which key decrypts it?

2 Luma replies privately to Veyra. Which key encrypts the reply?

3 An attacker copies the ciphertext on the way. Why can they not read it?

  1. 1
    encrypt: Luma public key; decrypt: Luma private key
  2. 2
    Veyra public key; Veyra decrypts with Veyra private key
  3. 3
    only Luma private key can decrypt it, and that key never leaves Luma
Tick what you can do now
Practise with s26/31 Q8(b)
2 / 8
9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

Verifying the sender

§17.1 · Security

Veyra’s entrance notices are for everyone, so there is nothing to keep secret. The danger is a fake: a notice that claims to be Veyra’s and sends visitors to the wrong door. Readers need to know that a notice came from Veyra.

Follow the notice from 1 to 3: Veyra uses its private key, every reader uses Veyra’s public key.

1VeyraVeyra private keyapplies its private key2notice + private-key resultsent to every subscriber3ReadersVeyra public key✓ the origin is Veyraanyone can read it: not secret1VeyraVeyra private keyapplies its private key2notice + result,sent to everyone3ReadersVeyra public key✓ the origin is Veyraanyone can read it: not secret
Veyra prepares the noticeVeyra alone holds Veyra private keyVeyra private keyPrivate-key transformationSent to all notice subscribersVeyra public keyReaders use Veyra public keyMatching operation verifies the origin

Signing this way gives verification, not confidentiality: everyone can obtain Veyra’s public key and read the notice.

Which key for secrecy, which for proof

Two jobs, opposite directions. Read across: whose key the sender uses, then whose key the receiver uses.

RequirementAt senderAt receiver
Private report to LumaEncrypt: Luma public keyDecrypt: Luma private key
Verified notice from VeyraApply: Veyra private keyCheck: Veyra public key

Only the owner should hold the private key. Verification supports non-repudiation: evidence makes it harder for that owner to deny sending the message. This depends on the private key staying secure and the public key being bound to the right identity.

Why sign a short digest

A long notice is expensive to process with public-key operations. A digital signature normally applies the private-key operation to a short message digest. The readable notice and its signature then travel together.

Your turn

1 Which key does Veyra use so that readers can check a notice came from Veyra?

2 Which key do the readers use to check it?

3 Does this keep the notice secret? Why?

  1. 1
    Veyra private key
  2. 2
    Veyra public key
  3. 3
    no: anyone can obtain Veyra public key, so anyone can read the notice
Tick what you can do now
Practise with s26/32 Q8(b)
3 / 8
9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

Hashes and digital signatures

§17.1 · Security

To show a notice is unchanged, Veyra needs a short fingerprint of it that changes if a single word does. A cryptographic hash function produces a fixed-length digest from a message. The same message and function reproduce the digest; a changed message is likely to produce a different one. Hashing is one-way, not reversible encryption.

Veyra hashes the notice, then signs the digest with Veyra’s private key. This protected digest is the digital signature. Readers follow two routes and compare their results:

RECEIVED FROM VEYRANoticeThe east entrance opensafter inspection.Signaturesigned digesthash: SHA-256New digestfb8cba18…verify signatureVeyra public keyOriginal digestfb8cba18…Equal digests: verifiedAuthentic and unchangedRECEIVED FROM VEYRANoticeThe east entrance opensafter inspection.Signaturesigned digesthash: SHA-256New digestfb8cba18…verifyVeyra public keyOriginal digestfb8cba18…Equal digests: verifiedAuthentic and unchanged

A changed word changes the digest

NoticeSHA-256 digest (first 20 of 64 hex digits)
The east entrance opens after inspection.fb8cba18d41e282a56f9…
The east entrance opens before inspection.3571831a84adaafd1380…

One word changed, and the whole digest changed. Keeping the old signature with the altered notice makes the digest comparison fail.

Why a hash alone does not prove the sender

An attacker could replace both a plain message and an unsigned digest. The private-key signature protects the origin of the digest. A valid comparison supports authenticity and integrity; the notice remains readable. Encrypt it separately if secrecy is also needed.

Your turn

1 Put the reader’s steps in order: compare the digests; hash the received notice; recover the original digest with Veyra public key.

2 The notice is changed on the way but the old signature is kept. What does the reader find?

3 Why is a hash on its own not enough to prove who sent a message?

  1. 1
    hash the received notice; recover the original digest with Veyra public key; compare the two digests
  2. 2
    the new digest differs from the original digest, so the notice is rejected
  3. 3
    an attacker could replace both the message and an unsigned digest; only Veyra private key can make a signature that Veyra public key checks
Tick what you can do now
Practise with s22/32 Q7(b)(i); s22/32 Q7(b)(ii) (older paper)
4 / 8
9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

Certificates and authorities

§17.1 · Security

Readers check Veyra’s signature with Veyra’s public key. But how do they know that key belongs to Veyra, and not to an impostor? Someone they already trust vouches for it: a Certification Authority (CA) checks who Veyra is, then signs a digital certificate that binds that identity to the public key.

How Veyra gets a certificate

Follow Veyra’s public key from Veyra to the CA, into the signed certificate, and on to a reader. The numbers on the drawing match the steps.

1VeyraVeyra private keystays with Veyrapublic key +identity23CertificationAuthority (CA)checks the identity,then signs withCA private keysigns4CertificateSubject: VeyraVeyra public keyIssuer: CA · valid to 2027CA signatureVeyra publishes itReaderCA public key✓ CA signature valid:trust Veyra’s key1VeyraVeyra private keystays with Veyrasends public key + identity23Certification Authority (CA)checks the identity, then signsCA private key4CertificateSubject: VeyraVeyra public keyIssuer: CA · valid to 2027CA signatureVeyra publishes itReaderCA public key✓ CA signature valid:trust Veyra’s key
1
Veyra generates its public/private pair and requests a certificate from a CA.
2
Veyra supplies its public key and the identity information required by the CA. Veyra keeps its private key.
3
The CA checks the application and identity, creates the certificate and signs it with the CA’s private key.
4
The CA issues the certificate. Veyra publishes it, and a reader checks the CA signature with the CA public key.

What the CA signs: find each field on the certificate in the drawing.

Certificate fieldPurpose
Subject / holderIdentifies the person or organisation whose key is recorded.
Subject public keyVeyra’s key, not the CA’s private key.
Issuer, serial number and validity datesIdentify the certificate and when it is valid.
CA digital signatureAllows the signed certificate contents to be checked.

How a reader checks a certificate

A reader checks the certificate’s signature using the CA’s public key, checks the holder identity and validity, and accepts the subject key only through a trusted issuer. PKI (Public Key Infrastructure) provides the authorities, certificates and trust arrangements supporting this process.

Two signatures have different owners: the CA signs Veyra’s certificate; Veyra signs its notice. A valid certificate does not encrypt the notice or guarantee that its claims are true.
Your turn

1 What does Veyra send to the CA, and what does it keep?

2 Which key does the CA use to sign the certificate, and which key does a reader use to check that signature?

3 Name two fields found in a digital certificate.

  1. 1
    it sends Veyra public key and its identity details; it keeps Veyra private key
  2. 2
    signs: CA private key; checks: CA public key
  3. 3
    any two: subject (holder) name, subject public key, issuer, serial number, validity dates, the CA’s digital signature
Tick what you can do now
Practise with w25/31 Q5(a–b); w25/33 Q9 (older papers: certificates)
5 / 8
9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

SSL and TLS

§17.1 · Security

When Veyra’s staff log in, their passwords cross networks Veyra does not control. SSL (Secure Sockets Layer) and its successor TLS (Transport Layer Security) secure communication between a client and a server. HTTPS uses this protection for web traffic.

The handshake, step by step

Read the timeline from top to bottom: each arrow is one message between client and server, numbered as in the steps.

ClientServer1hello: start the handshake2certificateServer public key✓ checks it with the CA public key3session keysession keyagree the session keys47f#Qa9…data encrypted with the session keyClientServer1hello: start the handshake2certificateServer public key✓ checks it with CA public key3session keysession key47f#Qa9…data encrypted with the session key
1
The client application initiates a connection and a handshake begins.
2
The server supplies its digital certificate. The client checks the certificate and obtains the authenticated server public key.
3
The endpoints agree security algorithms and establish symmetric session keys using the handshake’s key-establishment method.
4
The session uses those keys to protect application data against reading and undetected modification.

Which keys do which job

Public-key work is slow, so TLS uses it once to set up the session, then switches to something faster:

During setupDuring data transfer
Certificate/public-key operations authenticate the server and support key establishment.Symmetric encryption efficiently protects repeated application messages.
A simplified key-transport model encrypts a session secret with the server public key; only its private key can recover it.The agreed session keys protect traffic for this session; the server private key is not shared.

The key-establishment details depend on the protocol version and chosen method. TLS is the improved successor to SSL; describing the historical key-transport model does not mean every TLS handshake sends an encrypted session key.

Where Veyra uses TLS

Veyra’s staff login sends a password and session cookie; its workshop portal carries private reports. TLS protects both exchanges and helps the client check that it reached the intended server. A signed public notice can still benefit from TLS during retrieval.

Your turn

1 What does the server send so that the client can check who it is?

2 Which kind of key protects the data once the handshake is over, and why that kind?

3 Give one use of TLS on Veyra’s web service.

  1. 1
    its digital certificate, which holds the server public key
  2. 2
    symmetric session keys: symmetric encryption is faster for the many messages of a session
  3. 3
    the staff login (password and session cookie) or the report portal
Tick what you can do now
Practise with s25/31 Q9(a–b); s25/33 Q7 (older papers: SSL/TLS)
6 / 8
9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

Quantum cryptography

§17.1 · Security

Every method so far relies on a key staying out of an eavesdropper’s hands. Quantum physics offers a way to notice when someone has looked. Quantum key distribution (QKD) uses properties of quantum particles, such as the polarisation of photons, to establish a shared secret key. The key then protects data using an encryption method.

How QKD shares a key and spots an eavesdropper

Each photon carries one bit of the key in its polarisation. Look for the amber one: the eavesdropper measured it, and it arrives changed. The numbers match the steps.

SenderReceiver1eavesdropper measuresa photon: it changes32compare a sample:errors → discardthe key, try againSenderReceiver1eavesdropperdisturbs a photon32errors → discardthe key, try again
1
The endpoints exchange quantum states over a suitable quantum channel.
2
Their measurements and agreed checks establish usable shared key material.
3
An eavesdropper’s measurements can disturb the states and introduce detectable discrepancies. The endpoints can discard suspect key material and try again.

Weigh it up for Veyra: two gains, then two costs.

Benefit or drawbackWhy it matters
Benefit: eavesdropping detectionDisturbance can expose an attempt to discover the key, allowing it to be rejected.
Benefit: quantum states cannot be copied perfectlyAn attacker cannot simply duplicate unknown states and keep an undisturbed copy for later measurement.
Drawback: specialist hardware and a dedicated channelInstallation is costly compared with an ordinary network connection.
Drawback: distance and transmission limitsLoss or changes in the travelling photons restrict reliable links; an arbitrary internet route cannot simply become a quantum channel.

What QKD does not protect

Veyra would still need protected endpoints and suitable encryption for the notice data. QKD concerns key establishment; it does not make a stolen private report safe after a recipient opens it. For a widely accessed notice portal, the specialist link requirements are a major constraint.

Your turn

1 What does quantum key distribution establish: the message, or the key?

2 Why can an eavesdropper be detected?

3 Give one drawback of quantum cryptography.

  1. 1
    a shared secret key, which then protects the data with an encryption method
  2. 2
    measuring a photon disturbs its state, so the endpoints find errors when they compare a sample
  3. 3
    any one: specialist hardware and a dedicated channel are costly; distance limits; an ordinary internet route cannot be used
Tick what you can do now
Practise with s26/33 Q8(a–b)
7 / 8
9618 · Unit 20 · Encryption, signatures and trust
Revisionbyexamplicity

Choosing the protection

§17.1 · Security

Encryption, signatures, certificates and TLS each stop one attack and leave others open. So start with what an attacker must be prevented from doing. Choose the mechanism whose key route stops it, then ask what still needs protection.

Each row is one job Veyra needs done, from private reports to the staff login. Read across: the protection that does the job, then what it still leaves open.

Veyra’s requirementProtection and reasonRemaining limit
Send a report only Luma can readEncrypt for Luma public key; decrypt with Luma private key.Does not establish which sender used the public key.
Publish an authentic entrance noticeHash it and sign the digest with Veyra private key; check with Veyra public key.The notice is readable; identity depends on trusting the public key.
Bind Veyra’s name to that keyUse a CA-signed certificate and check the CA signature, identity and validity.A certificate is not message encryption.
Protect a staff login and report portalUse TLS: authenticate the server and protect the session using agreed keys.Protection in transit does not secure a compromised endpoint.
Establish a key while detecting interceptionConsider QKD on a suitable specialist link.Cost and channel constraints remain.

Secret and signed: both at once

A report can need both: only Luma may read it, and Luma must be able to prove it came from Veyra. Follow the report from Veyra to Luma: four keys, two owners, numbered as in the steps.

VeyraLuma1report + signatureVeyra private key2k3V@9fQw!Luma public keyencrypt report + signaturesent3Luma private keydecrypt: report readable4Veyra public key✓ signed by Veyra, unchangedverify with the certificate’s keyVeyra1Veyra private keysigns the report’s digest2k3V@9fQw!Luma public keyencrypts report + signaturesentLuma3Luma private keydecrypts: report readable4Veyra public key✓ signed by Veyra, unchangedverify with the certificate’s key
1
Veyra signs the report’s digest using Veyra private key.
2
Veyra encrypts the report and signature for Luma public key.
3
Luma decrypts with Luma private key.
4
Luma verifies the signature using Veyra public key from its checked certificate.

The outer encryption answers “who may read it?”. The signature answers “whose key signed it, and is it unchanged?”. Each private key stays with its owner throughout.

Your turn

1 Veyra must send Luma a report that only Luma can read and that Luma can prove came from Veyra. Which key does Veyra use to sign, and which to encrypt?

2 Which two keys does Luma use, in order?

3 A staff login page must be protected while data travels. Which protection fits?

  1. 1
    sign with Veyra private key; encrypt with Luma public key
  2. 2
    Luma private key to decrypt, then Veyra public key to verify the signature
  3. 3
    TLS
Tick what you can do now
Practise with s26/31 Q8(b); s26/32 Q8(b); s25/31 Q9 (older paper: session protection)
8 / 8