Chapter 32 — Cryptography and trust services: reliability
Lesson map
Lesson 32 published. Map, example, EX094.
flowchart TD
N0["Learning outcomes"]
N1["32.1 Reliability of people and services"]
N2["Lab — Custodian quorum"]
N3["32.2 Reading the quorum results"]
N4["32.3 Redundancy for services"]
N5["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5
N5 --> EX["Worked example"]
EX --> Q["Exercise EX094"]
Logical drawing
flowchart LR
N0["Learning outcomes"]
N1["32.1 Reliability of people and services"]
N2["Lab — Custodian quorum"]
N3["32.2 Reading the quorum results"]
N4["32.3 Redundancy for services"]
N5["Synthesis"]
N0 --> N1 --> N2 --> N3 --> N4 --> N5 --> Q["EX094"]
[Learning outcomes]
|
v
[32.1 Reliability of people and services]
|
v
[Lab — Custodian quorum]
|
v
[32.2 Reading the quorum results]
|
v
[32.3 Redundancy for services]
|
v
[Synthesis]
|
v
[Worked example] --> [Exercise EX094]
Learning outcomes
You will (1) model the availability of key custodians and services; (2) choose quorum sizes for recovery; (3) design redundancy without weakening security.
32.1 Reliability of people and services
A key that cannot be used when needed is a reliability failure. Aiyana models the firmware root recovery process, which requires custodians with smart cards. If only one custodian holds the root backup, the root is unavailable whenever that person is ill or travelling, and lost if they leave. If all five must be present, availability falls sharply. Quorum schemes, where any m of n custodians suffice, balance the two. She uses probability to choose m and n, given each custodian's availability.
Lab — Custodian quorum
"""Probability that at least m of n key custodians are reachable (each independently with prob a)."""
from math import comb
def at_least(m, n, a):
return sum(comb(n, k) * a ** k * (1 - a) ** (n - k) for k in range(m, n + 1))
def main():
for m, n in [(1, 1), (2, 3), (3, 5), (5, 5)]:
print(f"{m}-of-{n}, each 0.90 reachable: P = {at_least(m, n, 0.90):.4f}")
if __name__ == "__main__":
main()
Run with python3 lab_quorum.py. Verified output:
1-of-1, each 0.90 reachable: P = 0.9000
2-of-3, each 0.90 reachable: P = 0.9720
3-of-5, each 0.90 reachable: P = 0.9914
5-of-5, each 0.90 reachable: P = 0.5905
32.2 Reading the quorum results
With each custodian reachable 90 percent of the time, a single custodian gives 0.90 availability, two of three gives 0.972, three of five gives 0.9914, and requiring all five gives only 0.5905. Requiring everyone is worse than a single person. Aiyana recommends three of five for the root: high availability, and no two custodians can collude to recover the key alone. The HSM vendor's key-splitting feature implements the split; she does not implement secret sharing herself, consistent with the rule against home-made cryptography. Her choice is recorded in the key-management policy.
32.3 Redundancy for services
For the online key service, Aiyana designs active-standby replicas in two data centres with keys replicated in encrypted form between HSMs of the same model. Replication uses the vendor's secure key-transfer mechanism, so keys never appear in plain text. Failover is tested quarterly. She records a trade-off: more replicas mean more places to secure and audit. She limits replicas to two sites and requires the same physical controls at both. Reliability and security reinforce each other only when redundancy is designed with the same rigour as the primary.
Worked example
Aiyana chooses a three-of-five custodian quorum (0.9914 availability) implemented by the HSM vendor, and active-standby key service replicas in two sites with quarterly failover tests.
Synthetic case. Availability figures are invented assumptions.
Errors and limits
Independence assumptions fail if custodians travel together or share a building. More replicas increase attack surface.
Exercises
- EX094 — All-five quorum. What availability does requiring all five custodians give, and why is it bad? Rubric: 3 = 0.5905, worse than a single custodian;; 2 = number;; 1 = good;; 0 = none.
- EX095 — Recommended quorum. What quorum does Aiyana recommend and why? Rubric: 3 = three of five: 0.9914 availability and no two can collude;; 2 = 3-of-5;; 1 = 1-of-1;; 0 = none.
- EX096 — Splitting implementation. Who implements the key split and why? Rubric: 3 = the HSM vendor's feature, avoiding home-made cryptography;; 2 = vendor;; 1 = Aiyana;; 0 = none.
Synthesis
Quorum and redundancy designs keep keys available without concentrating power, provided they are built on vetted mechanisms and tested.
Continue studying — chapter 32 of 50
← Chapter 31 (draft) · Course chapter index · Chapter 33 (draft) →