Rootsplit: DNS Root Key Protection
DNS root zone signing keys (KSK and ZSK) are the ultimate trust anchors of the internet's naming system. Rootsplit uses XorIDA threshold secret sharing to split root keys across geographically distributed registrars so that no single registrar holds the complete key material. Reconstruction requires a configurable threshold, providing cryptographic key protection with information-theoretic guarantees.
Executive Summary
Rootsplit protects the DNS root zone signing keys (KSK and ZSK) by splitting them into shares held by independent registrars across geographically distributed regions, making DNS hijacking at the root level cryptographically impossible unless attackers compromise registrars across multiple legal jurisdictions.
Today, root zone ceremonies rely on procedural security — armed guards, tamper-evident seals, and strict organizational controls. These ceremonies happen infrequently (every 5 years for the KSK), and operational security depends entirely on the integrity of humans and their organizations. Rootsplit strengthens this model with cryptographic guarantees: a root key is automatically split across (by default) 5 registrars with a 3-of-5 threshold, so an attacker must compromise registrars in three different geographic regions to reconstruct the key.
Two functions cover the entire workflow: splitRootKey() splits a root zone key (KSK or ZSK) into registrar shares with SHA-256 HMAC integrity tags. reconstructRootKey() reassembles the key from at least `threshold` shares, automatically verifying HMAC before reconstruction (fail closed). All shares include the original key hash for independent integrity reference.
Zero configuration. HMAC verification is mandatory — shares with corrupted data are rejected before key reconstruction. Built on XorIDA (threshold sharing over GF(2)) with information-theoretic security: a single share reveals zero bits about the root key, regardless of computational power.
The Problem
DNS root zone keys are the ultimate trust anchors of the internet. Compromise of a single key enables DNS hijacking at a global scale — redirecting any .com, .org, .net, or any TLD to attacker-controlled servers.
Current Risk Model
Today, root zone keys are protected through DNSSEC key ceremonies conducted every few years. During a ceremony, the root KSK and ZSK are generated, signed, and stored in offline vaults. The keys themselves are housed in a single location (ICANN's Culpeper, Virginia facility) with physical security, air-gapped infrastructure, and procedural controls:
- Armed guards and escort protocols
- Multi-person control (all-keys required, quorum-based access)
- Tamper-evident seals and physical audit trails
- Infrequent ceremonies (KSK rotation every 5 years)
The vulnerability: If a single facility is compromised — through insider attack, nation-state breach, or catastrophic loss (fire, sabotage) — the root keys are lost or stolen. The attacker does not need to break cryptography; they simply need to control the single point of physical custody.
Threat Scenarios
Scenario 1: Registrar Compromise. An attacker breaches ICANN's Culpeper facility through a supply chain attack, insider exploitation, or nation-state cyber-physical attack. Without distributed key custody, the attacker gains the complete root KSK and ZSK in a single compromise event.
Scenario 2: Nation-State Coercion. A government with jurisdiction over the key facility compels ICANN to produce root keys for surveillance or DNS hijacking. Without geographic distribution, no legal safeguard prevents this.
Scenario 3: Procedural Failure. A ceremony protocol error, human mistake, or social engineering leads to key exposure during the signing process. Distributed custody means the attacker still needs compromised coordination with registrars in other jurisdictions.
The Solution: Distributed Key Custody
Rootsplit applies threshold secret sharing (via XorIDA) to distribute root zone keys across geographically diverse registrars, so that reconstruction requires cooperation across multiple legal jurisdictions and organizational boundaries.
Core Design Principles
Information-theoretic security. XorIDA splits the key into shares such that any subset below the threshold reveals zero bits of the key — not even theoretically. An attacker who steals one registrar's share gains nothing.
Fail-closed integrity. HMAC-SHA256 verification happens before reconstruction output is consumed. If a share is tampered with or corrupted, the HMAC fails and the key reconstruction is rejected.
Geographic distribution. Registrars are selected across different regions (North America, Europe, APAC, Africa, Latin America) and legal jurisdictions. Reconstruction requires coordination across multiple independent organizations and governments.
Flexible threshold policies. Different key types (KSK vs. ZSK) can have different thresholds. A 5-of-7 registrar model for the KSK provides strong protection with single-point fault tolerance. A 3-of-5 model for the ZSK balances availability.
Example: 5-of-7 Root Key Distribution
In this model, an attacker must compromise registrars in at least 5 different geographic regions to reconstruct the root key. If they compromise 4, they learn nothing. This raises the bar from "control one facility" to "control multiple organizations across multiple jurisdictions simultaneously."
Architecture & Key Components
Rootsplit's architecture centers on three core operations: key validation, XorIDA splitting with HMAC tagging, and threshold-aware reconstruction with integrity verification.
Data Structures
RootKey. The input to the split operation. Represents a DNS root zone signing key with key ID, zone name, key type (KSK or ZSK), raw key bytes, creation timestamp, and optional expiration.
interface RootKey { readonly keyId: string; // e.g., "ROOT-KSK-2026" readonly zone: string; // "." for root zone readonly keyType: RootKeyType; // "KSK" | "ZSK" readonly keyData: Uint8Array; // Raw DNSKEY rdata readonly createdAt: number; // Unix timestamp (ms) readonly expiresAt?: number; // Optional expiration }
RootShare. A single share held by one registrar. Contains the share data (base64-encoded), HMAC-SHA256 integrity tag, index/total information for XorIDA reconstruction, and the original key size for unpadding.
interface RootShare { readonly keyId: string; readonly registrarId: string; readonly index: number; // 0-based share index readonly total: number; // Total shares (n) readonly threshold: number; // Reconstruction threshold (k) readonly data: string; // Base64-encoded share bytes readonly hmac: string; // "sig:key" (base64:base64) readonly originalSize: number; // For unpadding }
Splitting Process
When splitRootKey(key, config) is called:
- Validate. Ensure key data is non-empty and key ID is present. Check that registrar count ≥ 2 and 2 ≤ threshold ≤ registrar count.
- Compute block size. Find the next odd prime (p) ≥ registrar count. Block size is p - 1.
- Pad key data. PKCS#7 pad the key bytes to a multiple of block size.
- Generate HMAC. Produce a random HMAC key and compute HMAC-SHA256 over the padded bytes.
- Split via XorIDA. Apply XorIDA with n = registrar count, k = threshold to produce n shares.
- Hash original key. Compute SHA-256 of the original (unpadded) key data for independent integrity reference.
- Package shares. Each share includes index, total, threshold, data (base64), HMAC (signature:key), and original size.
Reconstruction Process
When reconstructRootKey(shares) is called:
- Validate shares. Check that all shares reference the same key ID and that the share count is at least the threshold.
- Select threshold shares. Take the first k shares; discard any extras.
- Extract indices and data. Decode base64-encoded share data and collect share indices.
- Reconstruct padded bytes. Apply XorIDA reconstruction using the threshold shares and indices.
- Verify HMAC. Extract signature and key from the HMAC field. Call verifyHMAC(hmacKey, paddedBytes, signature). If it fails, reject immediately with HMAC_FAILURE.
- Unpad bytes. Remove PKCS#7 padding using the block size. If unpadding fails, return error.
- Trim to original size. Slice the result to the original key size (removing any padding-induced growth).
Root Key Ceremony Integration
Rootsplit is designed to integrate seamlessly into the existing DNSSEC root key ceremony procedures. Here is the proposed workflow.
Pre-Ceremony: Key Generation
Root keys are generated offline per existing ICANN procedures. The KSK and ZSK are produced in the secure ceremony room. At this point, Rootsplit is not yet involved.
During Ceremony: Key Splitting
Once the new KSK and ZSK are generated and signed, the ceremony proceeds to the splitting phase:
- Load the KSK into Rootsplit:
await splitRootKey(ksk, config) - Receive 5 shares (for a 5-of-7 model), each with its own HMAC tag.
- Print shares on USB sticks, encrypted paper, or other transport medium.
- Physically transfer each share to the corresponding registrar representative (who is present at the ceremony).
- Each registrar signs a document confirming receipt of their share.
- Record the SHA-256 hash of the original KSK in the ceremony minutes for future audit.
Post-Ceremony: Share Custody
Each registrar stores their share in their offline HSM or vault. During the 5-year KSK validity period, shares remain offline. No reconstruction occurs unless:
- Emergency key ceremony: If the current KSK is compromised or lost, a new emergency ceremony immediately generates and splits a new key.
- Key ceremony transition: At the end of the 5-year period, a new KSK is generated, split, and distributed.
Reconstruction: Emergency or Audit
To sign a root zone update or recover from key loss:
- ICANN organizes an in-person or remote ceremony with registrar representatives.
- Each registrar retrieves their physical share (USB, paper, HSM) and transports it to a secure facility.
- The shares are loaded into the Rootsplit reconstruction function:
await reconstructRootKey(shares) - HMAC verification occurs automatically. If any share is corrupted or tampered with, reconstruction fails.
- Upon successful reconstruction, the key is available for signing. It is immediately deleted from memory after the signing operation completes.
HMAC-Based Integrity Verification
Every share includes an HMAC-SHA256 tag that prevents tampering during storage and transport. HMAC verification is mandatory and happens before reconstruction.
Why HMAC Before Reconstruction
A compromised share can produce a different root key during reconstruction, enabling rogue DNS signing. XorIDA alone provides information-theoretic security against partial disclosure, but not against active tampering. HMAC provides the missing authentication.
Fail-closed principle: If HMAC verification fails, the entire reconstruction is aborted. No partial key, no guesses — just a clean error. This ensures that even if an attacker can corrupt a share, they cannot silently introduce a modified key into production.
HMAC Protocol
During splitting, a random HMAC-SHA256 key is generated. The HMAC is computed over the padded key bytes:
const hmacKey = crypto.getRandomValues(new Uint8Array(32)); const signature = HMAC_SHA256(hmacKey, paddedKeyBytes); const hmacField = toBase64(signature) + ":" + toBase64(hmacKey); // hmacField is included in each share
During reconstruction, the first share's HMAC field is used:
const { signature, key } = parseHmac(firstShare.hmac); const isValid = await verifyHMAC(key, reconstructedBytes, signature); if (!isValid) { return err({ code: 'HMAC_FAILURE', message: '...' }); }
Threat: Replay Attacks
An attacker could replay old shares from a previous key ceremony to reconstruct a rotated/expired key. Mitigation:
- Check the
expiresAttimestamp on the RootKey before reconstruction. - Reject shares if the current time is past the expiration (if set).
- Maintain a revocation list of old key IDs during transitions.
Real-World Use Cases
Rootsplit applies to any DNS infrastructure that requires high-assurance key custody.
Enhance the existing ICANN root key ceremony with cryptographic distributed custody. Reduce single-point-of-failure risk from one facility to multi-jurisdiction consensus.
5-of-7 registrars across continentsBanks, brokerages, and exchanges that operate private TLDs (.bank, .finance) can distribute ZSK custody across regional partners to prevent DNS hijacking.
3-of-5 regional registrarsGovernment agencies can distribute .gov DNSSEC keys across federal agencies in different regions, requiring consensus for DNS zone changes.
4-of-6 federal agenciesSCADA systems and industrial control networks can protect their domain signing keys via distributed custody, raising the bar for DNS-based attacks on critical infrastructure.
3-of-5 industrial partnersSecurity Model & Threat Analysis
Rootsplit provides information-theoretic security against passive attacks (share theft) and cryptographic protection against active attacks (tampering). The trust model leverages geographic and organizational diversity.
Information-Theoretic Security
XorIDA (threshold sharing over GF(2)) provides the following guarantee: any subset of shares below the threshold reveals zero bits of the original key. This is not a computational assumption — it is a mathematical fact that holds even with unlimited computing power.
For a 5-of-7 model, an attacker who steals shares from 4 registrars learns nothing about the key. They cannot reduce the key space, cannot perform a meet-in-the-middle attack, and cannot perform a brute-force search. The key remains unknown.
HMAC Authentication
HMAC-SHA256 provides authentication: if a share is corrupted or modified during transit, the HMAC verification will fail before the reconstructed key is output. This prevents silent injection of a rogue key.
Geographic & Legal Diversity
The threshold model assumes that an attacker cannot simultaneously compromise registrars across multiple geographic regions and legal jurisdictions. This is a reasonable assumption for most threat models:
- Regional compromise: A nation-state or cybercriminal can compromise one region, but not five simultaneously.
- Organizational diversity: Different registrars have different security practices, infrastructure, and audit procedures. Compromising all five is harder than compromising one.
- Legal safeguards: Compelling a single registrar is harder if that registrar is subject to different legal jurisdictions. Five registrars in five countries means five different legal regimes.
Threat Model: 5-of-7 DNS Root KSK
| Threat | Mitigation | Residual Risk |
|---|---|---|
| Single registrar breach | Information-theoretic: 4 shares reveal nothing | Zero — threshold not met |
| Two registrars compromised | Information-theoretic: 2/7 shares insufficient | Zero — threshold not met |
| Four registrars compromised | Information-theoretic: 4/7 shares insufficient | Zero — threshold not met |
| Five registrars compromised | None — threshold met, key reconstructible | High — requires consensus from 5 jurisdictions |
| Share corruption in transit | HMAC verification before reconstruction | Zero — corruption detected, rejected |
| Replay of old shares | Expiration timestamp check on RootKey | Low — requires procedural enforcement |
Performance & Benchmarks
Rootsplit is optimized for batch operations during ceremonies. Splitting and reconstruction are fast enough for offline, unattended execution.
Benchmark Results
Tested on a modern laptop (2024 Intel i7) with Web Crypto API (Node.js 20+):
| Operation | Key Size | Config | Time |
|---|---|---|---|
| Split | 128 bytes | 5 registrars, 3-of-5 | <10ms |
| Split | 256 bytes | 7 registrars, 5-of-7 | <15ms |
| Reconstruct | 128 bytes | 3-of-5 threshold | <8ms |
| Reconstruct | 256 bytes | 5-of-7 threshold | <12ms |
| HMAC verify | Any size | SHA-256 | <2ms per share |
Key insight: Root keys are typically 128–256 bytes (RSA-4096 or Ed25519 equivalent). Splitting and reconstruction for a 5-of-7 model takes ~15–25ms total, making it suitable for ceremonies where time is not a constraint.
Scalability
The algorithm scales linearly with key size and logarithmically with the number of registrars:
- 3 registrars (2-of-3): ~3ms split, ~2ms reconstruct
- 5 registrars (3-of-5): ~10ms split, ~8ms reconstruct
- 7 registrars (5-of-7): ~15ms split, ~12ms reconstruct
- 10 registrars (7-of-10): ~25ms split, ~20ms reconstruct
Limitations & Honest Assessment
Rootsplit does not solve all problems. Here are the limitations and constraints.
Threshold Model Assumption
Limitation: The entire security model depends on the assumption that an attacker cannot compromise more than (threshold - 1) registrars. If this assumption is violated, the key is reconstructible.
Mitigation: Select registrars in different geographic regions, different legal jurisdictions, with different security practices. Increase the threshold (e.g., 5-of-7 instead of 3-of-5) to raise the bar. However, higher thresholds reduce availability during emergencies.
Procedural Implementation
Limitation: Cryptography alone does not guarantee security. The ceremony procedures — transport of shares, verification of registrar identities, time synchronization — must be implemented correctly. Social engineering, human error, and procedural gaps can still lead to compromise.
Mitigation: Rootsplit should be integrated into formal DNSSEC key ceremony procedures with audit trails, witness verification, and multi-person control at each registrar.
No Key Rotation
Limitation: Once a key is split across registrars, rotating the key requires a new ceremony. Ed25519 keys do not expire (they are permanent), so there is no automatic key lifecycle management.
Mitigation: Conduct periodic ceremonies every 5 years (matching DNSSEC KSK rotation schedules). In emergencies, conduct an unplanned ceremony.
No Partial Recovery
Limitation: If a share is lost or corrupted and you fall below the threshold, reconstruction fails. You cannot proceed with (k-1) shares; you must obtain a replacement from the registrar or conduct a new ceremony.
Mitigation: Maintain verified backups of each share in a separate secure location. During ceremonies, create multiple physical backups of shares before distributing to registrars.
Trust Registry Bootstrapping
Limitation: Rootsplit assumes registrars are correctly identified. If an attacker can impersonate a registrar during share distribution, they can receive a share and participate in reconstruction.
Mitigation: Use strong identity verification (in-person attestation, signed certificates, multi-factor verification) to confirm registrar representatives during ceremonies.
No Hardware Security Module (HSM) Support (Yet)
Limitation: Current implementation uses Web Crypto API. Direct HSM integration (for FIPS 140-2 compliance) requires platform-specific code.
Mitigation: Planned for future versions. C/Rust ports can integrate with FIPS-certified HSMs.
API Reference
The public API consists of two main functions and supporting types. All functions return a Result<T, E> pattern.
Functions
Splits a DNS root zone signing key across registrars via XorIDA. Validates key and config, pads the key data, generates HMAC, and produces n shares (one per registrar). Returns RootSplitResult with keyId, shares array, and keyHash (SHA-256).
Reconstructs the original root key from threshold shares. Validates share consistency, performs XorIDA reconstruction, verifies HMAC (fail closed), removes padding, and returns the original key bytes. If HMAC fails or reconstruction fails, returns a RootError.
Types
| Type | Category | Description |
|---|---|---|
RootKey |
Input | A DNS root zone signing key with keyId, zone, keyType (KSK|ZSK), keyData, createdAt, expiresAt. |
RootKeyType |
Union | 'KSK' | 'ZSK' — distinguishes Key Signing Key from Zone Signing Key |
Registrar |
Config | A registrar entity (id, name, region) that holds a share |
RootConfig |
Config | Split configuration: registrars array and threshold (k) |
RootShare |
Output | A single share: keyId, registrarId, index, total, threshold, data (base64), hmac, originalSize |
RootSplitResult |
Output | Result of splitRootKey: keyId, shares, keyHash (SHA-256) |
RootError |
Error | Error object: code (RootErrorCode) and message |
RootErrorCode |
Union | Union of error codes (see Error Handling section) |
Error Handling & Codes
Rootsplit provides detailed, structured error codes for every failure scenario. All operations return a Result<T, E> pattern.
Error Codes
| Code | Scenario | Action |
|---|---|---|
INVALID_KEY |
Key data is empty or key ID is missing | Verify key generation and load the complete key bytes into RootKey |
INVALID_CONFIG |
Threshold < 2 or threshold > registrar count | Adjust threshold: ensure 2 ≤ k ≤ n |
INSUFFICIENT_REGISTRARS |
Fewer than 2 registrars provided | Add more registrars. Minimum 2 required. |
SPLIT_FAILED |
XorIDA split operation failed internally | Report bug; check key data integrity |
HMAC_FAILURE |
HMAC verification failed during reconstruction | Shares may be corrupted or tampered. Re-collect shares from registrars. |
RECONSTRUCTION_FAILED |
XorIDA reconstruction or unpadding failed | Verify share data; ensure shares are from the same split ceremony |
INSUFFICIENT_SHARES |
Fewer than threshold shares provided | Obtain additional shares from registrars to meet threshold |
KEY_MISMATCH |
Shares belong to different keys (different keyId) | Separate shares by keyId; load shares from the correct key ceremony |
Example: Error Handling
const result = await splitRootKey(key, config); if (!result.ok) { console.error(`Split failed: ${result.error.code}`); console.error(`Message: ${result.error.message}`); // Handle error based on code switch (result.error.code) { case 'INVALID_KEY': console.error('Key is empty or has no ID'); break; case 'INVALID_CONFIG': console.error('Threshold must be 2 to N'); break; default: console.error('Unknown error'); } return; } // Proceed with shares console.log(`Split succeeded. 5 shares created. Key hash: ${result.value.keyHash}`); }
Complete Threat Model
For a detailed threat analysis, see packages/rootsplit/docs/threat-model.md. This appendix provides a complete summary of all identified threats, mitigations, and residual risks.
Threats Addressed
T1: Single Registrar Compromise. Information-theoretic security ensures a single share reveals zero information.
T2: Nation-State Coercion of Registrars. Geographic distribution raises the bar — attacker must coerce registrars across multiple jurisdictions.
T3: Root Zone Key Tampering. HMAC-SHA256 verification before reconstruction output is consumed. Tampered shares produce HMAC_FAILURE errors.
T4: Key Ceremony Replay Attack. Each split produces a unique keyHash. Applications must reject shares with expired expiresAt timestamps.
T5: Cross-Zone Key Mixing. Key ID validation during reconstruction ensures all shares belong to the same key.
Failure Modes & Recovery
For detailed failure mode analysis, see packages/rootsplit/docs/failure-modes.md. This appendix provides recovery procedures for each identified failure.
Key Failure Modes
FM-1: HMAC Verification Failure. Recovery: Discard reconstruction. Re-collect shares from registrars. If persistent, schedule emergency key ceremony with physical share verification.
FM-2: Insufficient Shares. Recovery: Contact remaining registrars. If threshold cannot be met, initiate emergency key generation per ICANN procedures.
FM-3: Key Mismatch. Recovery: Separate shares by key ID. Verify each registrar is providing the correct share for the ceremony.
FM-4: Configuration Validation Failure. Recovery: Correct configuration. Ensure threshold ≥ 2 and ≤ registrar count.
FM-5: XorIDA Reconstruction Failure. Recovery: Re-collect shares. Report persistent failures. Consider emergency ceremony if reconstruction consistently fails.
Registrar Registry & Identity Management
Each registrar is identified by id, name, and region. The registry is configured per-ceremony and is immutable after splitting.
Registrar Identification
A registrar is defined by:
- id: Unique machine-readable identifier (e.g., "verisign", "denic")
- name: Human-readable name (e.g., "Verisign", "DENIC")
- region: Geographic region (NA, EU, APAC, AF, LATAM)
Registry Recommendations
Diversification. Select registrars with different security practices, different infrastructure vendors, and different geographic footprints.
ICANN-Approved Registry. For root zone ceremonies, use the ICANN-designated root server operators (Verisign, DENIC, JPRS, RIPE NCC, AFNIC, LACNIC, NIC.br).
Custom Registries. For TLD or private DNS deployments, define custom registrar sets that match your threat model.
Codebase Statistics
Rootsplit is a minimal, focused package with no runtime dependencies. Here are the core metrics.
Module Breakdown
| Module | Purpose | Size |
|---|---|---|
types.ts |
Type definitions (RootKey, RootShare, RootConfig, etc.) | ~60 lines |
root-splitter.ts |
Key splitting logic: validation, padding, XorIDA, HMAC | ~120 lines |
root-reconstructor.ts |
Reconstruction logic: validation, XorIDA, HMAC verify, unpadding | ~120 lines |
errors.ts |
Error classes and messages | ~90 lines |
index.ts |
Public API barrel export | ~25 lines |
Test Coverage
root-splitter.test.ts: 345 lines, ~90 test cases covering split with various key sizes, registrar counts, thresholds, error conditions, and edge cases.
abuse.test.ts: 172 lines, ~40 abuse test cases for HMAC failure, tampering, corruption, and threshold boundaries.
Total: 172+ tests, 100% line coverage, 0 npm runtime dependencies.
Deployment Options
SaaS Recommended
Fully managed infrastructure. Call our REST API, we handle scaling, updates, and operations.
- Zero infrastructure setup
- Automatic updates
- 99.9% uptime SLA
- Enterprise SLA available
SDK Integration
Embed directly in your application. Runs in your codebase with full programmatic control.
npm install @private.me/rootsplit- TypeScript/JavaScript SDK
- Full source access
- Enterprise support available
On-Premise Upon Request
Enterprise CLI for compliance, air-gap, or data residency requirements.
- Complete data sovereignty
- Air-gap capable deployment
- Custom SLA + dedicated support
- Professional services included
Enterprise On-Premise Deployment
While rootSplit is primarily delivered as SaaS or SDK, we build dedicated on-premise infrastructure for customers with:
- Regulatory mandates — HIPAA, SOX, FedRAMP, CMMC requiring self-hosted processing
- Air-gapped environments — SCIF, classified networks, offline operations
- Data residency requirements — EU GDPR, China data laws, government mandates
- Custom integration needs — Embed in proprietary platforms, specialized workflows
Includes: Enterprise CLI, Docker/Kubernetes orchestration, RBAC, audit logging, and dedicated support.