Key Lifecycle/PROTOCOL

Key Healing

System-initiated self-healing protocol that detects degraded share sets and restores absent ORKs' shares from encrypted SafeKeep records - without reconstructing the key, without user involvement, and without key-type awareness.

18 min read

Overview

This document specifies the Key Healing protocol - a system-initiated mechanism that detects degraded share sets and restores absent ORKs' Shamir shares from encrypted mimDB backups, without reconstructing the key, without user involvement, and without any awareness of what key type is being restored.
Key Healing is triggered opportunistically during normal API processing. When an ORK receives any key-related call, it compares its local state of key's-swarm participatis (as encapsulated in the digest) against the mimDB's authoritative digest (piggybacked on the call by the Secure Web Enclave). A mismatch initiates healing - the ORK queries the mimDB for its missing SafeKeep records, decrypts them using pairwise ECDH, verifies Schnorr proofs and the Accountable Group Signature, and writes the recovered shares directly as committed state. The calling Secure Web Enclave (SWE) and user are unaware that healing occurred.
The protocol operates entirely at the Authority Layer and demonstrates pure key-type agnosticism: the same for m=1 to q loop heals CMK shares, PRISM shares, VVK shares, and CVK shares identically. No Agency Layer operation (MPC, signing, decryption) occurs. At no point does the complete key materialize.
Loading diagram...

Preconditions

ConditionDetail
SafeKeep records existCreated during Protocol: Account Creation / KeyGen, Protocol: PRISM Password Change, or any key operation where the healing ORK was absent. Participating ORKs package the absent ORK's shares, encrypted under pairwise ECDH (DH(mSecORKorigin,mgORKabsent)\textsf{DH}(mSecORK_{\text{origin}}, mgORK_{\text{absent}})), and write them to the mimDB during Commit.
mimDB stateHolds the authoritative key record (Participating ORKs digest MM, public key, swarm roster, Accountable Group Signature) and the signed SafeKeep packages for the absent ORK.
Healing ORKOnline, possesses its private key mSecORKimSecORK_i, but holds a stale local digest (CMKRecord.MmDigestCMKRecord.M \neq mDigest).

Protocol Flow

Phase 0: Digest Mismatch Detection (Trigger)

Loading diagram...
The SWE passes the key's mDigest (obtained from the Home ORK's TWELVE-MAP response) alongside any normal API call. The ORK compares this against its locally stored digest to detect if its state is stale. No separate healing daemon or scheduled sync exists - detection is piggybacked on operational traffic.

Phase 1: SafeKeep Retrieval from mimDB

Loading diagram...
The mimDB's short-circuit check (M == CMKRecord.M) handles race conditions where the TWELVE-MAP digest was temporarily stale. If the ORK missed multiple operations, B>1B > 1 broken records are returned.

Phase 2: SafeKeep Decryption and Share Integration

Loading diagram...
Direct-to-committed rationale: Unlike Account Creation (which uses an uncommitted → committed two-phase commit because the DKG outcome is uncertain), healing integrates data that has already passed through the full commit process on mimDB. The Accountable Group Signature and Schnorr proofs were verified by the mimDB at original-commit time and are re-verified by the healing ORK here.
PubAuth = "": The per-ORK verifier field (e.g., PRISMAuth_i for PRISM keys) is stored empty. The PRISM verifier depends on the password-PRISM product, which is only available during live authentication. It will be derived on the user's next BYOiD ceremony. This does not affect the share itself.
Multi-record iteration: If B>1B > 1, the healing ORK processes records sequentially, catching up through each missed operation in order.

Phase 3: Resume Normal Operation

Once all broken records are processed, the healing ORK's local state matches the mimDB's authoritative record. The ORK resumes the API call that originally triggered the digest mismatch. The SWE and user experience only a minor one-time latency increase.
Loading diagram...

Algorithms

Algorithm 1

Algorithm 2

Healing vs. Recovery: Architectural Distinction

Key Healing (this protocol) and Account Recovery (Protocol: Decentralized Account Recovery) both restore share state, but serve different actors through fundamentally different mechanisms:
Key Healing is system-initiated. It occurs when infrastructure (an ORK) identifies it lost its state due to outage. The ORK detects the drift via digest mismatch (where digest encapulates the exact state of the participating ORKs) and repairs its own share from encrypted backups awaiting at other ORKs. No user active involvement. The original swarm and threshold remain intact. Shares are the same ones pre-computed during the original ceremony.
Account Recovery is user-initiated. It occurs when a user loses their password or device. The user proves identity via secondary factors (e.g., cryptographic email loop). The protocol generates entirely new key shares and a new PRISM state - potentially assigning the user to a new ORK swarm - without assembling the key.
Healing repairs the network's operational state. Recovery reclaims the user's authoritative access.

Notation Reference

SymbolDescription
G\mathcal{G}Generator point on Curve25519
AbA \cdot bScalar-point multiplication
H()H(\cdot)SHA-256 unless stated otherwise
DH(a,B)\textsf{DH}(a, B)Diffie-Hellman: BaB \cdot a
keyIDkeyIDKey identifier (e.g., H(username)H(\text{username}) for a CMK)
mSecORKimSecORK_iHealing ORK's long-term private key
mgORKimgORK_iHealing ORK's long-term public key: GmSecORKi\mathcal{G} \cdot mSecORK_i
mIdORKimIdORK_iHealing ORK's public identifier
OriginGORKjOriginGORK_jPublic key of contributing ORK jj that created the SafeKeep record
ECDHijECDH_{ij}Pairwise ECDH shared secret: DH(mSecORKi,OriginGORKj)\textsf{DH}(mSecORK_i, OriginGORK_j)
mDigestmDigestCurrent key's Accountable Group Signature digest of participating ORKS, as taken from the Home ORK's TWELVE-MAP response
CMKRecord.MCMKRecord.MThe healing ORK's locally stored digest
YijCipherYijCipherEncrypted share ciphertext in a SafeKeep record
Y[m]Y[m]Healing ORK's combined shard for key type mm
gK[m]gK[m]Aggregated public key for key type mm
gK[m][z]gK[m][z], gR[m][z]gR[m][z], S[m][z]S[m][z]Contributing ORK zz's public key, Schnorr nonce, and Schnorr signature for key type mm
gRgR, SSAggregate nonce and signature from the original Accountable Group Signature
qqNumber of key types being healed (e.g., q=2q=2 for CMK + PRISM)
BBNumber of broken records (missed key operations)
JJNumber of contributing ORKs in a SafeKeep record
nn, ttSwarm size (20), threshold (14)
ORKsBitwiseORKsBitwiseBitwise array of ORKs that participated in the original ceremony
AES_DECa(B)\textsf{AES\_DEC}_{a}(B)AES256 decryption of message BB with key aa

Actors and Trust Assumptions

ActorDescriptionTrust Assumption
SWEClient-side agent. Passes mDigest to ORKs during normal API calls. Not involved in healing orchestration - unaware healing is occurring.Minimal role. Cannot influence the healing outcome.
Home ORKServes swarm roster and current key's digest via the TWELVE-MAP.No elevated trust. A compromised Home ORK could provide a stale digest (delaying healing), but cannot compromise key material.
Healing ORKThe primary actor. Detects mismatch, queries mimDB, decrypts SafeKeep records, verifies integrity, writes committed state.Must possess mSecORKimSecORK_i to decrypt SafeKeep records. Standard ORK trust.
Other ORKsStores key SafeKeep packages. Returns records to the healing ORK. Already verified Accountable Group Signatures and SafeKeep proofs at original-commit time.Stores healing ORKs shards in unaccessible encrypted form. Standard ORK trust.
mimDBMimir Database - The Fabric's synced authoritative registry. Stores key records.Append-only registry integrity.
TWELVE-MAPTide Wide Enumerated Ledger of Verifiable Entries - Mapping Authoritative Pointers is the self-verifying directory service on mimDB mapping key identifiers to ORK swarms.Each entry includes a ZK proof attesting to its authenticity against the master registry.
Contributing ORKs (implicit)Created SafeKeep records during the original ceremony. Not contacted during healing.Integrity verified at original commit (mimDB signature check) and re-verified during healing (Schnorr proofs).

Layer Traversal

LayerHow Healing Engages It
LegitimacyThe triggering API call and TWELVE-MAP key lookup use standard Tide legitimacy mechanisms (ECDH session, Doken).
AuthorityPrimary layer. Healing restores Shamir shares - the Authority Layer's core responsibility. The for m=1 to q\text{for } m = 1 \text{ to } q loop processes all key types uniformly, maintaining key-type agnosticism.
AgencyNot engaged. Healing restores key existence, not key purpose. No MPC, signing, or decryption occurs. Agency operations resume after healing completes.
SettlementMinimally engaged. No new vouchers required. The original ceremony was funded by the vendor; SafeKeep records exist because that ceremony was properly settled.

Security Properties

PropertyMechanismAssumption
No key reconstructionThe ORK computes its own Shamir share (Y[m]=Y[m]jY[m] = \sum Y[m]_j). The complete key is never assembled.Threshold (<14< 14 compromised)
Encryption at rest (SafeKeep)Records encrypted via pairwise ECDH (DH(mSecORKorigin,mgORKabsent)\textsf{DH}(mSecORK_{\text{origin}}, mgORK_{\text{absent}})). Only the intended ORK can decrypt. ORK's database stores ciphertext only.ECDH + AES security
Fraud detectionSchnorr proof verification on each contributing ORK's public key contribution. Failure → dLog + SLA report + abort.DLP hardness
Accountable Group Signature verificationComposite key record verified against the mimDB's endorsed Accountable Group Signature before adoption.Registry integrity
Key-type agnosticismThe for m=1 to q\text{for } m = 1 \text{ to } q loop processes all key types uniformly. No metadata about key purpose is exposed.Architectural design
Opportunistic, zero user latencyTriggered during normal API calls via piggybacked digest comparison. No separate daemon, scheduled task, or user action.-
Multi-operation catch-upB>1B > 1 broken records processed sequentially in a single healing pass.-
Direct committed stateData already validated via two-phase commit at original ceremony time. No uncommitted phase needed.mimDB transaction finality
Audit trailChangePurpose = "RECOVER" distinguishes healed records from live-ceremony records.Local DB integrity
Replay resistanceDigest comparison (CMKRecord.MmDigestCMKRecord.M \neq mDigest) ensures healing only when needed. Short-circuit check resolves race conditions.Hash collision resistance
Transport-independent securitySafeKeep encryption uses ECDH, not TLS.-
PRISM verifier gapPubAuth = "" for healed keys. PRISM verifiers are password-dependent and regenerated on next authentication - shares themselves are intact.-

Call Summary

CallDirectionPurpose
keyLookupSWE → Home ORKRetrieve swarm roster and current mimDB digest (mDigest).
SomeAPICallSWE → Healing ORKAny normal API call, carrying mDigest. Triggers digest comparison.
HealKeyHealing ORK → mimDBSubmit stale digest. Request missing SafeKeep records and the TWELVE-MAP state.
BrokenRecords / YouAlreadyHaveLatestmimDB → Healing ORKReturn encrypted SafeKeep records (B1B \geq 1), or confirm ORK is current.

References

  • Hall, J. L., Hertzog, Y., et al. (2023). Manifesting Unobtainable Secrets: Threshold Elliptic Curve Key Generation using Nested Shamir Secret Sharing. arXiv:2309.00915. Presented at AustMS 2021.
  • Tide Developer Documentation: docs.tidecloak.com
Related Protocol Articles: