◇ OpenCyber Academy
Engineering · Chapter 29 · English

Chapter 29 — Quantum and post-quantum security: measurement

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

Chapter 29 — Quantum and post-quantum security: measurement

Lesson map

Lesson 29 published. Map, example, EX057.

flowchart TD
  N0["Learning outcomes"]
  N1["29.1 Sources of evidence"]
  N2["29.2 Practical activity — Lab I"]
  N3["29.3 Metrics"]
  N4["29.4 Gaming"]
  N5["Engineering note"]
  N6["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6
  N6 --> EX["Worked example"]
  EX --> Q["Exercise EX057"]

Logical drawing

flowchart LR
  N0["Learning outcomes"]
  N1["29.1 Sources of evidence"]
  N2["29.2 Practical activity — Lab I"]
  N3["29.3 Metrics"]
  N4["29.4 Gaming"]
  N5["Engineering note"]
  N6["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6 --> Q["EX057"]
[Learning outcomes]
    |
    v
[29.1 Sources of evidence]
    |
    v
[29.2 Practical activity — Lab I]
    |
    v
[29.3 Metrics]
    |
    v
[29.4 Gaming]
    |
    v
[Engineering note]
    |
    v
[Synthesis]
    |
    v
[Worked example] --> [Exercise EX057]

Learning outcomes

You will (1) build and query a CBOM; (2) measure negotiated versus configured algorithms; (3) report coverage and unknown share; and (4) design metrics resistant to gaming. It builds on Chapters 17 and 22.

29.1 Sources of evidence

Inventory evidence comes from code scanning, configuration analysis, passive network observation of handshakes, endpoint logs and vendor declarations. Each sees different things: code shows intent, configuration shows what is offered, passive observation shows what is negotiated, vendors declare what closed products do. Combine them and record the source per finding.

Where sources disagree, the disagreement is itself a finding: if configuration offers the hybrid group but passive observation never sees it negotiated, something in the path is stripping it or clients do not offer it.

29.2 Practical activity — Lab I

# Lab I (ch 29): aggregate a synthetic cryptographic bill of materials (CBOM) and measure coverage.
records = [  # (asset, function, algorithm, source)
    ("gateway-1", "key-exchange", "X25519MLKEM768", "passive"), ("gateway-1", "signature", "RSA-2048", "config"),
    ("scada-hmi", "key-exchange", "ECDHE-P256", "passive"), ("scada-hmi", "signature", "ECDSA-P256", "code"),
    ("billing", "key-exchange", "RSA-kex", "config"), ("billing", "data-at-rest", "AES-256-GCM", "code"),
    ("crane-plc", "unknown", "unknown", "none"), ("vpn", "key-exchange", "ECDHE-P384", "config")]
VULN = {"RSA-2048", "ECDHE-P256", "ECDSA-P256", "RSA-kex", "ECDHE-P384"}
assets = {r[0] for r in records}
unknown = {r[0] for r in records if r[2] == "unknown"}
vuln = [r for r in records if r[2] in VULN]
print(f"assets {len(assets)}, unknown {len(unknown)} ({100*len(unknown)/len(assets):.0f}%)")
print(f"quantum-vulnerable uses {len(vuln)}:", ", ".join(f"{a}/{f}" for a, f, _, _ in vuln))
print("hybrid key exchange present on:", [r[0] for r in records if "MLKEM" in r[2]])

Expected output:

assets 5, unknown 1 (20%)
quantum-vulnerable uses 5: gateway-1/signature, scada-hmi/key-exchange, scada-hmi/signature, billing/key-exchange, vpn/key-exchange
hybrid key exchange present on: ['gateway-1']

The crane PLC's unknown status is a finding, not a gap to hide: it is 20% of this tiny inventory and must be resolved by vendor declaration or testbed analysis.

Note how the script counts uses rather than assets: gateway-1 has hybrid key exchange yet still appears as vulnerable because its signature is RSA-2048, which matches the earlier point that hybrid key exchange leaves authentication untouched. The billing system's AES-256-GCM is correctly absent from the vulnerable list. Extend the records with a source column filter and print how many findings rest only on configuration, then add a sixth asset whose source is a vendor declaration and decide how to report it.

29.3 Metrics

Weighting the hybrid share by data class stops a large volume of short-lived telemetry from making progress look better than it is for customs data. Time-to-replace is the only metric that measures agility directly, and the algorithm-break tabletop later in the book uses it. Each metric has a written definition and data source.

29.4 Gaming

"Percentage migrated" can be inflated by redefining assets or counting configuration instead of negotiation. Use auditable denominators and publish definitions.

A common inflation is to drop hard-to-inventory devices from the asset list, which raises coverage without any new knowledge. BPA fixes the denominator to the asset register maintained by operations, which the security team cannot edit, and counts only negotiated groups seen in session logs. Definitions are published alongside each monthly figure, so any change in definition appears as a visible note rather than an unexplained jump in the trend line.

29.5 Worked example

BPA's first CBOM report: 412 assets, coverage 82%, unknown 18%, 311 vulnerable uses, hybrid negotiation 0% (before rollout). After six months: coverage 94%, unknown 6%, hybrid negotiation 64% of edge connections, vulnerable uses on long-lived data reduced from 37 flows to 8.

The figures tell a consistent story: coverage rose as unknowns fell, and the reduction from 37 exposed flows to 8 reflects the four-gateway change found by the model, which removed 29 of them. Hybrid negotiation at 64% of edge connections rather than 100% is expected, because old scanners and some partner clients do not offer the hybrid group; the report lists them as known exceptions with replacement dates.

29.6 Common errors and limits

Hiding unknowns makes the inventory look complete while systems like the crane PLC remain unassessed; Lab I reports them as 20% so they cannot be overlooked. Counting configured algorithms overstates protection whenever clients or middleboxes prevent negotiation. An inventory built from one source misses what that source cannot see, such as statically linked libraries invisible to package scans or vendor appliances invisible to code scanning. BPA requires at least two sources for any asset holding long-lived data.

Engineering note

Present measurements with their blind spots. Passive sensors in TLS 1.3 see the negotiated key-exchange group in the ServerHello but not the certificate, which is encrypted; endpoint logs fill that gap but only where logging is enabled. A good dashboard therefore shows, next to every metric, which source produced it and what share of assets that source can observe. Decision-makers then understand why certificate-migration figures come from configuration evidence while key-exchange figures come from the wire.

Exercises

Synthesis

Measurement means a multi-source CBOM, negotiated rather than configured metrics, explicit unknowns and definitions that resist gaming.

Continue studying — chapter 29 of 50

← Chapter 28 (draft) · Course chapter index · Chapter 30 (draft) →