◇ OpenCyber Academy
Postgraduate · Chapter 5 · English

Chapter 5 — Cryptography and trust services: design alternatives

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 5 — Cryptography and trust services: design alternatives

Lesson map

Lesson 05 published. Map, example, EX021.

flowchart TD
  N0["Learning outcomes"]
  N1["5.1 Three alternatives"]
  N2["Lab — Weighted decision matrix"]
  N3["5.2 Reading the matrix"]
  N4["5.3 Hidden trade-offs"]
  N5["5.4 Presenting alternatives"]
  N6["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6
  N6 --> EX["Worked example"]
  EX --> Q["Exercise EX021"]

Logical drawing

flowchart LR
  N0["Learning outcomes"]
  N1["5.1 Three alternatives"]
  N2["Lab — Weighted decision matrix"]
  N3["5.2 Reading the matrix"]
  N4["5.3 Hidden trade-offs"]
  N5["5.4 Presenting alternatives"]
  N6["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6 --> Q["EX021"]
[Learning outcomes]
    |
    v
[5.1 Three alternatives]
    |
    v
[Lab — Weighted decision matrix]
    |
    v
[5.2 Reading the matrix]
    |
    v
[5.3 Hidden trade-offs]
    |
    v
[5.4 Presenting alternatives]
    |
    v
[Synthesis]
    |
    v
[Worked example] --> [Exercise EX021]

Learning outcomes

You will (1) compare key-management architectures at organisation scale; (2) apply a weighted decision matrix and test its sensitivity; (3) present alternatives without hiding trade-offs.

5.1 Three alternatives

Corvane's keys are scattered across application servers, two old HSMs and several cloud accounts. Leila defines three alternatives for consolidation. On-premises HSMs give Corvane full custody but require specialist staff and hardware refreshes. A cloud key management service offers availability and low operational effort, with custody shared under contract. A hybrid keeps root and high-value signing keys in on-premises HSMs while application data keys live in the cloud service, wrapped under keys Corvane controls. Each alternative is described with its trust assumptions, following SP 800-57's emphasis on who can access keys.

Lab — Weighted decision matrix

"""Weighted decision matrix for key-management options (synthetic scores 1-5)."""
W = {"custody": 0.30, "availability": 0.20, "ops_effort": 0.20, "cost": 0.15, "pq_path": 0.15}
OPT = {"on-prem HSM": {"custody": 5, "availability": 3, "ops_effort": 2, "cost": 2, "pq_path": 3},
       "cloud KMS": {"custody": 3, "availability": 5, "ops_effort": 4, "cost": 4, "pq_path": 4},
       "hybrid (HSM root + cloud KMS)": {"custody": 4, "availability": 4, "ops_effort": 3, "cost": 3, "pq_path": 4}}

def main():
    for name, s in sorted(OPT.items(), key=lambda kv: -sum(W[k] * kv[1][k] for k in W)):
        print(f"{name:<31} {sum(W[k] * s[k] for k in W):.2f}")
    W2 = dict(W, custody=0.45, cost=0.0)
    best = max(OPT, key=lambda o: sum(W2[k] * OPT[o][k] for k in W2))
    print("if custody weight 0.45 and cost 0:", best)

if __name__ == "__main__":
    main()

Run with python3 lab_matrix.py. Verified output:

cloud KMS                       3.90
hybrid (HSM root + cloud KMS)   3.65
on-prem HSM                     3.25
if custody weight 0.45 and cost 0: hybrid (HSM root + cloud KMS)

5.2 Reading the matrix

With weights of 0.30 for custody, 0.20 each for availability and operational effort, and 0.15 each for cost and post-quantum path, the cloud service scores 3.90, the hybrid 3.65 and on-premises HSMs 3.25. A sensitivity test raises custody to 0.45 and removes cost, reflecting a board that values control above price; the hybrid then wins. Leila presents both results. The matrix does not decide; it shows that the choice depends mainly on how much the board values custody, which is a value judgement, not an engineering fact.

5.3 Hidden trade-offs

Leila lists trade-offs the matrix cannot show. Cloud custody depends on contract terms, regional data laws and the provider's own staff controls. On-premises HSMs concentrate knowledge in a few engineers, creating key-person risk. The hybrid doubles the number of systems to audit and requires careful key wrapping so cloud services never see root keys. She also notes migration effort: moving keys between systems is itself risky and must be done with vendor-supported mechanisms, never by exporting keys in plain form.

5.4 Presenting alternatives

Leila's board paper presents all three options with scores, sensitivity results, trade-offs and her recommendation: the hybrid, because Corvane's regulators and customers expect control over signing roots, while cloud services suit high-volume data keys. She states the condition that would reverse it: if the cloud provider offered customer-controlled HSM-backed keys meeting regulator requirements at lower cost. Presenting the runner-up fairly builds trust with the board and protects the recommendation from accusations of bias. The board asks for a cost breakdown before deciding.

Worked example

Leila's matrix ranks cloud first at 3.90, but a custody-heavy sensitivity test favours the hybrid, which she recommends with an explicit reversal condition.

Synthetic case. Scores and weights are invented; SP 800-57 is real.

Errors and limits

Weighted matrices hide judgement in weights; always test sensitivity. Key migration must use vendor mechanisms, never plaintext export.

Exercises

Synthesis

Comparing key-management alternatives with tested weights and explicit trade-offs exposes the value judgements boards must own.

Continue studying — chapter 05 of 12

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