Design input for REQ-CEREMONY-001, prompted by #110 (the current root has one write-only copy and cannot be moved or recovered). Three questions, answered in the order they constrain each other: what hardware, how a root is succeeded without stranding consumers, and how many backups.
1. Hardware — the tension is non-exportable vs. backupable
The obvious hardware answers make #110 worse, not better:
| option |
holds a root? |
backupable? |
verdict |
| YubiKey (PIV) |
yes, non-exportable |
no |
recreates #110 in hardware — a single copy nobody can duplicate |
| TPM 2.0 |
P-256 only, board-bound |
no (not without duplicable-key policy) |
plus wsc cannot persist/reload TPM keys today (sigil#268), and varve roots are ed25519 |
| YubiHSM 2 |
yes, ed25519 |
yes, under a wrap key |
fits |
YubiHSM 2 is the one that fits, and the ed25519 support is why. varve trust roots are ed25519, pinned as 64 hex characters in every consumer's config. A TPM-held root would have to be P-256 — a breaking change to the trust-root format on top of everything else v1.0 already changes. YubiHSM 2 signs ed25519 natively, so the root format survives.
The decisive feature is not the signing, it is the wrap key: objects are exported under wrap for backup, and the wrap key itself can be split M-of-N across custodians, with a configurable threshold (Yubico's own worked example is 4-of-7 for an AD root CA).
That resolves the tension. The private key never leaves hardware in the clear, and it can be restored to a second device — which is precisely what the current root cannot do.
Prior art worth copying rather than reinventing: Oxide Computer's offline-keystore — a Rust replacement for yubihsm-setup implementing wrap-key creation and splitting for their own key ceremonies, built on the yubihsm crate. A company solving this exact problem in the open, in our language.
Buy two devices, not one: a backup you have never restored is a hypothesis, and the second device is what turns the annual read test into an actual restore.
2. Succession — "switch or exchange while keeping the status"
Today varve has no rotation and no revocation. docs root-ceremony says the compromise plan is manual: publish a new realm and reach every consumer through the channel that bootstrapped them. That is honest but it does not scale, and it means a rotation is indistinguishable from an attacker telling consumers to re-pin.
The solved version of this problem is TUF root rotation, and the mechanism is worth adopting even if we adopt none of the rest of TUF:
A new root is signed by a threshold of BOTH the old and the new root keys. A client holding only the old root can verify the chain forward to the new one, with no out-of-band contact.
Concretely for varve:
- A root-succession statement: the new root's public key, signed by the old root and by the new root (the latter proving possession, so a typo cannot enthrone a key nobody holds).
varve verifies that statement against the currently pinned root, and updates trust-root in varve-realms.toml — as an explicit, logged action, not silently.
- Thresholds are what make this safe. With a single root key, whoever holds it can redirect the realm permanently. That is already true today (they can sign any layer), but succession makes the redirection durable, so a threshold — say 2-of-3 root keys, each in its own HSM — is what stops one compromised device from carrying the realm away.
- Anti-rollback applies to succession too: a succession statement carries a counter, and an older one is refused, or an attacker replays a retired root.
This is new requirement territory, not a clause of the existing one. It should be written up before the ceremony, because the number of root keys is a ceremony input — you cannot add a threshold afterwards.
3. How many backups — the answer differs by artifact
The framing that makes this tractable: with no revocation, loss and compromise are both terminal. More copies reduce loss risk and raise compromise risk. M-of-N secret sharing is what breaks the trade-off — a single share is useless, so copies of shares are cheap, while reconstruction still needs a quorum.
With a YubiHSM the split is not of the key but of the wrap key, which changes the arithmetic in a useful way:
| artifact |
how many |
why |
| HSM devices |
2 |
primary + restore target. The second is what makes the read test real. |
| wrap key shares |
3-of-5, paper, tamper-evident, five separate custodians and locations |
a single share is worthless, so no location is a compromise; three must fail simultaneously to lose it |
| wrapped key backup (the encrypted blob) |
≥3 copies, ≥2 media types, ≥1 offsite |
it is inert without the wrap key, so copies are nearly free — this is where redundancy is cheap, so buy it here |
| the public half |
stored separately, and published |
the restore check has to compare against something |
3-of-5 rather than 4-of-7 because five custodians is a plausible number of people for this organisation and 4-of-7 fails closed too easily when someone is unreachable. The threshold should be chosen for the worst realistic day, not the median one.
The read test is the part people skip and the part that matters. Annually: restore the wrapped backup onto the second HSM, sign a throwaway payload, and confirm varve pubkey prints the published trust root character for character. A safe full of unreadable media discovered in the year you need it is the failure mode this prevents, and varve's own docs already prescribe the test — for a key that has never had one.
What this changes upstream
If the root lives in a YubiHSM, varve needs to sign through it, and varve today reads keys from a file only — --key <FILE> is the entire key input. That is REQ-CEREMONY-001 work: a signer seam (wsc already has HardwareSigner), plus a yubihsm backend. Raised on sigil#268, where we offered to build the hardware pieces rather than request them.
Caveats
- Device models, firmware and FIPS variants differ in algorithm support; confirm ed25519 on the exact SKU before the ceremony, not during it.
- None of this is verified against hardware we own. It is a design to be validated by buying two devices and running a rehearsal ceremony with a throwaway key first — the first ceremony should mint a key we intend to discard, so the procedure is debugged before it holds anything real.
Related: #110 (no backup today), REQ-CEREMONY-001 (v1.0.0), sigil#268 (hardware signer support).
Sources: YubiHSM 2 backup and restore, YubiHSM 2 product page, oxidecomputer/offline-keystore
Design input for REQ-CEREMONY-001, prompted by #110 (the current root has one write-only copy and cannot be moved or recovered). Three questions, answered in the order they constrain each other: what hardware, how a root is succeeded without stranding consumers, and how many backups.
1. Hardware — the tension is non-exportable vs. backupable
The obvious hardware answers make #110 worse, not better:
wsccannot persist/reload TPM keys today (sigil#268), and varve roots are ed25519YubiHSM 2 is the one that fits, and the ed25519 support is why. varve trust roots are ed25519, pinned as 64 hex characters in every consumer's config. A TPM-held root would have to be P-256 — a breaking change to the trust-root format on top of everything else v1.0 already changes. YubiHSM 2 signs ed25519 natively, so the root format survives.
The decisive feature is not the signing, it is the wrap key: objects are exported under wrap for backup, and the wrap key itself can be split M-of-N across custodians, with a configurable threshold (Yubico's own worked example is 4-of-7 for an AD root CA).
That resolves the tension. The private key never leaves hardware in the clear, and it can be restored to a second device — which is precisely what the current root cannot do.
Prior art worth copying rather than reinventing: Oxide Computer's
offline-keystore— a Rust replacement foryubihsm-setupimplementing wrap-key creation and splitting for their own key ceremonies, built on theyubihsmcrate. A company solving this exact problem in the open, in our language.Buy two devices, not one: a backup you have never restored is a hypothesis, and the second device is what turns the annual read test into an actual restore.
2. Succession — "switch or exchange while keeping the status"
Today varve has no rotation and no revocation.
docs root-ceremonysays the compromise plan is manual: publish a new realm and reach every consumer through the channel that bootstrapped them. That is honest but it does not scale, and it means a rotation is indistinguishable from an attacker telling consumers to re-pin.The solved version of this problem is TUF root rotation, and the mechanism is worth adopting even if we adopt none of the rest of TUF:
Concretely for varve:
varveverifies that statement against the currently pinned root, and updatestrust-rootinvarve-realms.toml— as an explicit, logged action, not silently.This is new requirement territory, not a clause of the existing one. It should be written up before the ceremony, because the number of root keys is a ceremony input — you cannot add a threshold afterwards.
3. How many backups — the answer differs by artifact
The framing that makes this tractable: with no revocation, loss and compromise are both terminal. More copies reduce loss risk and raise compromise risk. M-of-N secret sharing is what breaks the trade-off — a single share is useless, so copies of shares are cheap, while reconstruction still needs a quorum.
With a YubiHSM the split is not of the key but of the wrap key, which changes the arithmetic in a useful way:
3-of-5 rather than 4-of-7 because five custodians is a plausible number of people for this organisation and 4-of-7 fails closed too easily when someone is unreachable. The threshold should be chosen for the worst realistic day, not the median one.
The read test is the part people skip and the part that matters. Annually: restore the wrapped backup onto the second HSM, sign a throwaway payload, and confirm
varve pubkeyprints the published trust root character for character. A safe full of unreadable media discovered in the year you need it is the failure mode this prevents, and varve's own docs already prescribe the test — for a key that has never had one.What this changes upstream
If the root lives in a YubiHSM, varve needs to sign through it, and varve today reads keys from a file only —
--key <FILE>is the entire key input. That is REQ-CEREMONY-001 work: a signer seam (wscalready hasHardwareSigner), plus ayubihsmbackend. Raised on sigil#268, where we offered to build the hardware pieces rather than request them.Caveats
Related: #110 (no backup today), REQ-CEREMONY-001 (v1.0.0), sigil#268 (hardware signer support).
Sources: YubiHSM 2 backup and restore, YubiHSM 2 product page, oxidecomputer/offline-keystore