OpenCyber Academy
Doctoral research · Chapter 5 · English
Course code: OCA-188Chapter 05: OCA-188-C005

Chapter 5 — Main study and independent validation

Open, free learning for anyone who wants to protect people and technology. No account is required to read this text or its worked answers.

Permanent link

Public activity · 30d

—Participating browsers

—Page views

—Reading sessions

—Exercise opens

Counts reflect browsers that allowed analytics. A reading session requires 30 seconds on a visible page. Browsers are not people.

Learning outcomes

You will (1) run a linkage attack on synthetic releases; (2) compare risk across release methods; (3) validate results with an independent team.

5.1 The attack model

Ines defines an attacker who knows the home zone, work zone and birth year of 500 target riders, perhaps from a social network or an employer directory. Against pseudonymised microdata, in which names are replaced but exact values remain, the attacker looks for a row matching each target exactly. Against the k-anonymised file, the attacker finds the matching class and guesses one row at random. Against the differentially private counts there are no rows to link. Defining the attacker precisely matters because NISTIR 8053 warns that re-identification estimates depend on the assumed knowledge, which must be stated openly.

5.2 Results

The lab shows that pseudonymisation alone lets the attacker re-identify 415 of the 500 targets with certainty, 83.0%. The k-anonymised file prevents any certain match; random guessing within classes yields about 4.4 expected correct guesses, 0.9% of targets. The differentially private counts give the attacker no record to link at all, and the risk is instead bounded by epsilon. H1 is supported in direction, but the comparison is not like for like: the k-anonymous file leaks little under this attack, and its remaining risk comes from attacks that Ines has not yet tried, such as combining journeys.

5.3 Pseudonymisation is not anonymisation

The 83.0% figure makes a legal point concrete. The GDPR defines pseudonymisation in Article 4(5) as processing so that data can no longer be attributed to a person without additional information kept separately, and it treats pseudonymised data as personal data. Valemont's original plan was to replace card numbers with random tokens and call the file anonymous. Ines's result shows why that would be wrong: the tokens hide names, but the remaining attributes identify most riders. She writes this finding as a recommendation the authority can act on immediately, independent of the rest of the thesis.

5.4 Independent validation

Ines asks a team from another university to run the attack on her released files without seeing her code. They receive the synthetic population, the releases and the attack description, and report their own re-identification rates. Their results differ from hers by less than one percentage point. She also asks them to try one attack she did not design, combining two days of journeys; they find that the k-anonymous file leaks more under that attack. Ines reports both results, because independent validation is only valuable if it is allowed to find problems in the main study.

Lab — Linkage attack on three release types

# Linkage attack: an adversary knows home zone, work zone and birth year of 500 targets.
import random
from collections import Counter
r = random.Random(7)
riders = [(r.randrange(40), r.randrange(40), r.randrange(1940, 2008)) for _ in range(20000)]
targets = r.sample(range(20000), 500)
raw = Counter(riders)
hit_raw = sum(1 for t in targets if raw[riders[t]] == 1)
g = lambda x: (x[0] // 8, x[1] // 8, x[2] // 10)
gen = Counter(g(x) for x in riders)
kept = [t for t in targets if gen[g(riders[t])] >= 5]
exp = sum(1 / gen[g(riders[t])] for t in kept)
print(f"pseudonymised microdata: {hit_raw} of 500 targets re-identified with certainty ({hit_raw/5:.1f}%)")
print(f"k-anonymised (k>=5): 0 certain; expected correct guesses {exp:.1f} ({exp/5:.1f}%)")
print("differentially private counts: no record-level rows to link; risk bounded by epsilon instead")

Run with python3 lab_link.py. Verified output:

pseudonymised microdata: 415 of 500 targets re-identified with certainty (83.0%)
k-anonymised (k>=5): 0 certain; expected correct guesses 4.4 (0.9%)
differentially private counts: no record-level rows to link; risk bounded by epsilon instead

Worked example

Ines finds 83.0% certain re-identification for pseudonymised data, 0.9% expected correct guesses for k = 5, and no linkable rows for differentially private counts; an independent team confirms the figures and finds an extra multi-day weakness.

Synthetic case. The attacker, targets and releases are synthetic; GDPR Article 4(5) and NISTIR 8053 are real.

Errors and limits

One attacker model cannot represent all attackers. Differential privacy removes linkage but its real protection depends on the epsilon accounting chosen.

Exercises

  • EX027 — Attacker knowledge. What does Ines's attacker know, and why state it?
    Show marking criteria
    Rubric: 3 = home zone, work zone, birth year of targets; risk estimates depend on assumed knowledge;; 2 = lists knowledge only;; 1 = omits;; 0 = none.
  • EX028 — Pseudonymised result. How many targets were re-identified in the pseudonymised file?
    Show marking criteria
    Rubric: 3 = 415 of 500, 83.0%;; 2 = about four in five;; 1 = wrong;; 0 = none.
  • EX029 — Article 4(5). Why is pseudonymised data still personal data under the GDPR?
    Show marking criteria
    Rubric: 3 = Article 4(5) data can be re-attributed using additional information, so it stays in scope;; 2 = mentions re-attribution;; 1 = says it is anonymous;; 0 = none.
  • EX030 — Like for like. Why is the H1 comparison "not like for like"?
    Show marking criteria
    Rubric: 3 = different release types face different attacks; k-anonymity's residual risk lies in attacks not yet tried;; 2 = mentions different outputs;; 1 = accepts H1 outright;; 0 = none.
  • EX031 — Blind validation. Why does the validation team work without Ines's code?
    Show marking criteria
    Rubric: 3 = so errors in her code are not copied and their check is independent;; 2 = mentions independence;; 1 = says it is quicker;; 0 = none.
  • EX032 — Unplanned attack. Why report the extra multi-day attack that weakened k-anonymity?
    Show marking criteria
    Rubric: 3 = validation must be allowed to find problems; hiding it would bias the thesis;; 2 = mentions honesty;; 1 = omits it;; 0 = none.

Synthesis

Chapter 5 measures risk under a stated attack and validates it independently. Chapter 6 faces peer critique and revises the claims.

Continue studying — chapter 05 of 08

← Chapter 04 (draft) · Course chapter index · Chapter 06 (draft) →

Practice the exercises

Open a prompt, write your response, then compare it with the worked answer. Five-choice practice appears where a reviewed question is available.

EX027

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

EX028

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

EX029

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

EX030

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

EX031

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

EX032

Opens in 30 days: — · browsers: —

Checking for a reviewed five-choice question…

Worked answers

EX027. The attacker knows three quasi-identifiers for 500 targets; stating this matters because risk depends on what the attacker knows.

EX028. 415 of 500 targets (83.0%) were re-identified with certainty.

EX029. Article 4(5) defines pseudonymised data as re-attributable with separately kept information; it therefore remains personal data.

EX030. Records and counts are attacked differently; the k-anonymous file's remaining risk shows up in other attacks, such as multi-day linkage.

EX031. Without her code they cannot repeat her mistakes, so agreement is real evidence.

EX032. Reporting the multi-day weakness shows the validation was genuine and gives the authority a complete risk picture.