◇ OpenCyber Academy
Engineering · Chapter 18 · English

Chapter 18 — Security architecture

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 18 — Security architecture

Lesson map

Lesson 18 published. Map, example, EX035.

flowchart TD
  N0["Learning outcomes"]
  N1["18.1 Trust boundaries"]
  N2["18.2 Cryptographic services"]
  N3["18.3 Crypto-agility as architecture"]
  N4["18.4 Hybrid placement"]
  N5["Engineering note"]
  N6["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6
  N6 --> EX["Worked example"]
  EX --> Q["Exercise EX035"]

Logical drawing

flowchart LR
  N0["Learning outcomes"]
  N1["18.1 Trust boundaries"]
  N2["18.2 Cryptographic services"]
  N3["18.3 Crypto-agility as architecture"]
  N4["18.4 Hybrid placement"]
  N5["Engineering note"]
  N6["Synthesis"]
  N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> N6 --> Q["EX035"]
[Learning outcomes]
    |
    v
[18.1 Trust boundaries]
    |
    v
[18.2 Cryptographic services]
    |
    v
[18.3 Crypto-agility as architecture]
    |
    v
[18.4 Hybrid placement]
    |
    v
[Engineering note]
    |
    v
[Synthesis]
    |
    v
[Worked example] --> [Exercise EX035]

Learning outcomes

You will (1) identify trust boundaries and where cryptography enforces them; (2) design a cryptographic architecture with zones and services; (3) place key management centrally; and (4) document crypto-agility as an architectural property. It builds on Chapters 15–17 and prepares the PQC core.

18.1 Trust boundaries

Draw every boundary where data crosses between trust domains: internet to portal, BPA to shipping line, terminal network to crane network, BPA to customs agency. At each boundary, list the cryptographic functions: key establishment, authentication, integrity, confidentiality at rest. That list is the architecture's skeleton.

At the crane-network boundary, for instance, the list contains firmware signature verification and the VPN to the vendor's maintenance service. Writing it down revealed that the vendor link used a pre-shared key and RSA authentication, which the original inventory had missed because the link was managed by the vendor. Each boundary's list becomes a set of rows in the interface control document.

18.2 Cryptographic services

Centralize where possible: a TLS termination layer, a PKI with an HSM-backed CA, a key-management service, a signing service for firmware and documents. Centralization turns migration of one service into migration for many consumers. Decentralized cryptography — each application with its own library and keys — multiplies the work.

BPA's edge proxy terminates TLS for all its public services, so enabling the hybrid group there protected every one of them in one change. By contrast, internal services that each embed a library require a separate project apiece. The architecture direction is therefore to route new services through shared components and to record any exception with its reason and an expiry date.

18.3 Crypto-agility as architecture

NIST's crypto-agility white paper (CSWP 39) describes agility as the capability to replace algorithms in protocols, applications, software, hardware and infrastructure while preserving security and operations. Architecturally this means: algorithm choices in policy, not code; protocols that negotiate algorithms securely; certificate and key lifecycles short enough to rotate; and inventory that shows where everything is.

Each element can be tested: a policy change should switch algorithms in a test environment without a code change; certificate lifetimes should be short enough to replace all of them within a planned window.

18.4 Hybrid placement

Decide where hybrids apply: key exchange at every external TLS and VPN boundary first; signatures for long-lived roots and firmware next; internal service-to-service traffic by data lifetime. Record the decision and its review date.

The order follows Mosca's inequality: external key exchange first because recorded traffic is exposed now, then long-lived signatures because roots and firmware must outlast a CRQC, and internal traffic last if it carries short-lived data. A service carrying customs records moves up the list even if it is internal. The review date forces a fresh look as libraries and partners become ready.

18.5 Worked example

BPA's target architecture: hybrid TLS at the edge proxy and partner VPNs; a new PQC-capable HSM for the CA; LMS-signed crane firmware via a central signing service with state management; ML-DSA for bills of lading with timestamping; policy-driven algorithm selection in internal services.

Each element maps to an earlier decision: hybrid TLS from the portal rollout, the HSM from the CA plan, LMS from the crane controller's 32 KB constraint and timestamped ML-DSA from the bills-of-lading analysis. Writing the architecture this way shows reviewers where each choice came from, and which earlier decision to revisit if a constraint changes.

18.6 Common errors and limits

Without cryptographic functions on the diagrams, the vendor VPN and the export format stay invisible until an incident. Independent choices produce several post-quantum libraries and parameter sets that must each be maintained. A 20-year key lifetime means agility exists only on paper, because rotation would take longer than the threat timeline allows. BPA caps new key lifetimes so that every key can be replaced within two years.

Engineering note

Trust boundaries also exist in time. A document signed today crosses a boundary into the future when a court or partner verifies it years later, so the architecture should show long-term validation services — timestamping, archive re-signing, evidence records — as components with their own cryptography to migrate. Drawing them explicitly prevents the common oversight in which every online path is migrated while archived evidence stays protected by algorithms that a future adversary could forge.

Exercises

Synthesis

Architecture maps trust boundaries to cryptographic functions, centralizes services to make migration tractable and encodes agility in policy, protocols, lifecycles and inventory.

Continue studying — chapter 18 of 50

← Chapter 17 (draft) · Course chapter index · Chapter 19 (draft) →