Skip to content

[Task](crypto | masterkey | SSS) Create Operational Documentation for Key Ceremony and Recovery #58

@nnicora

Description

@nnicora

This task involves authoring the comprehensive "Runbook" for the MasterKey lifecycle. A Shamir Secret Sharing system is only as secure as its administration. We must document the formal Key Ceremony—the process of generating the key and distributing shards to various KMS/HSM providers—and the Disaster Recovery procedures for when providers or shards are lost.

Documentation must satisfy both technical operators and compliance auditors (e.g., SOC2, PCI-DSS), ensuring every action is logged, witnessed, and reversible in an emergency.

Goals

  • Define a step-by-step "Key Ceremony Script" for initializing the system.
  • Create a "Recovery Matrix" explaining how to reconstruct the key if specific providers fail.
  • Document the roles and responsibilities (Ceremony Master, Witness, Shard Custodian).
  • Establish a "Compromise Recovery Plan" for rotating the MasterKey if a threshold of shards is suspected to be leaked.

Acceptance Criteria

  • Key Ceremony Guide:
    • Detailed setup instructions for the SSS Generator CLI (#Task1).
    • Checklists for environment "Sanitization" (ensuring no persistent storage or cameras are present during generation).
    • Verification steps to confirm shards were successfully stored in AWS/GCP/Vault/HSM.
  • Shard Custodianship & Roles:
    • Definition of roles to ensure Segregation of Duties (e.g., the person who runs the CLI should not be the same person who manages the HSM PINs).
    • Guidelines for secure storage of offline recovery shards (e.g., printed QR codes in physical safes).
  • Disaster Recovery (DR) Plan:
    • Step-by-step "Unseal" procedure for various outage scenarios (e.g., "What to do if AWS Region US-East-1 is down").
    • Instructions for adding or replacing a shard in the database if a KMS key is accidentally deleted.
  • Audit & Compliance Templates:
    • A "Ceremony Log" template for recording dates, software versions, and participant signatures.
    • Formatting requirements for audit trails generated by the Audit Logging logic (#Task4).
  • Validation:
    • Perform a "Tabletop Exercise" where an operator follows the documentation to reconstruct a test key using only the recovery guide.

Documentation Structure

  1. Introduction: High-level SSS architecture and threshold math ($M$-of-$N$).
  2. The Ceremony: Preparation, Execution, and Verification.
  3. Key Lifecycle: Rotation, Versioning, and Revocation.
  4. Emergency Procedures: Shard loss, Provider breach, and System-wide compromise.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions