SWT3 Design Rationale

Why Every Protocol Decision Was Made
Version:
1.0.0
Date:
2026-04-24
Companion to:
SWT3 Protocol Specification v1.3
License:
Apache 2.0
Purpose. The SWT3 Protocol Specification defines what the protocol does. This document explains why each design decision was made, what alternatives were considered, and why they were rejected. It is intended for patent examiners evaluating non-obviousness, standards reviewers assessing design rigor, technical diligence teams evaluating the protocol's depth, and implementors who want to understand the constraints that shaped the design space.

Contents

  1. Cryptographic Choices
  2. Formula Design
  3. Factor Architecture
  4. Clearing Protocol
  5. Anchor Format
  6. UCT Taxonomy
  7. Alternatives Considered and Rejected
  8. Infrastructure-Layer Witnessing

1. Cryptographic Choices

Why SHA-256?

Decision: SHA-256 is the sole hash primitive used in SWT3 for fingerprinting, prompt/response hashing, model hashing, and signing (via HMAC-SHA256).
Rejected: SHA-3 (Keccak). Less ubiquitous in standard libraries. Some embedded platforms and older runtimes do not include SHA-3. No meaningful security advantage over SHA-256 for this use case (hashing structured compliance data, not resisting quantum attacks).
Rejected: BLAKE3. Faster than SHA-256 on software-only benchmarks, but not FIPS validated. Not available in most language standard libraries (requires external crate/package). Speed is not the bottleneck for compliance anchoring; the inference call dominates latency by orders of magnitude.
Rejected: MD5 and SHA-1. Both have demonstrated collision attacks. Disqualified by NIST SP 800-131A for new applications. Using either would undermine the integrity guarantee that is the core value of SWT3.

Why 12 hex characters (48 bits) for fingerprint truncation?

Decision: The anchor fingerprint is the first 12 characters of the lowercase hexadecimal SHA-256 digest. The full 64-character digest SHOULD be stored alongside the anchor.
Rejected: 8 characters (32 bits). Birthday threshold drops to ~65,000. A moderately active enterprise ledger could hit collisions within a few years. Insufficient.
Rejected: 16 characters (64 bits). Birthday threshold rises to ~4 billion. No practical security gain over 12 characters for compliance ledgers. Wastes 4 characters in every anchor token for no measurable benefit.

Why HMAC-SHA256 for payload signing?

Decision: Payload signing uses HMAC-SHA256 with a shared symmetric key. The signature message is {fingerprint}:{agent_id} if agent identity is present, or just {fingerprint} otherwise.
Rejected: Ed25519 (asymmetric). Requires public/private key pair management. Overkill for the agent-to-platform trust model where both parties already share credentials. Implementations that require asymmetric guarantees can layer Ed25519 on top of the base signing.

2. Formula Design

Why the WITNESS: domain separator prefix?

Decision: The fingerprint input string begins with the literal WITNESS: prefix, followed by colon-separated fields.

Why colon-separated plaintext?

Decision: The fingerprint input is a colon-separated string: WITNESS:{tenant}:{proc}:{fa}:{fb}:{fc}:{ts_ms}
Rejected: JSON. JSON objects have no guaranteed key ordering in most languages. {"a":1,"b":2} and {"b":2,"a":1} are semantically identical JSON but produce different SHA-256 hashes. This would break cross-language fingerprint parity. Canonical JSON (RFC 8785) exists but adds complexity and is not widely implemented.
Rejected: Binary / Protocol Buffers. Requires schema definition, compilation step, and deserialization tooling. Opaque to human inspection. Cannot be debugged with shell one-liners. Adds a dependency that provides no benefit for a 7-field input string.

Why millisecond precision?

Why integer-valued floats stringify as integers?

Cross-language parity rule: If a factor value equals its integer representation (e.g., 1.0, 5000.0), it MUST be formatted without a decimal point ("1", "5000"). True fractional values retain their decimal representation ("1.5").

3. Factor Architecture

Why exactly three factors?

Decision: Every SWT3 witness observation produces exactly three numeric factors: factor_a (baseline/threshold), factor_b (observation), factor_c (context/delta).
Rejected: Two factors. Loses the context dimension. "Latency was 8,000ms against a 5,000ms threshold" requires three values: threshold (5000), observation (8000), and whether this constitutes a violation (1). With two factors, the violation flag must be inferred, which introduces ambiguity.
Rejected: Five or more factors. Every additional factor that enters the fingerprint formula increases the cross-language parity surface (more values to format consistently). Any information beyond three factors can be encoded in the existing three through scaling or composition. The marginal value of a fourth factor does not justify the parity risk and backward compatibility cost.

Why integer representation?

4. Clearing Protocol

Why exactly four levels?

Decision: SWT3 defines four discrete clearing levels: 0 (Retain), 1 (Factor-Only), 2 (Anchor-Only), 3 (Sovereign).
Rejected: Three levels. Loses the distinction between "factors visible but raw data purged" (Level 1) and "factors also purged, only anchor remains" (Level 2). This distinction matters: in healthcare, retained factors may reveal PHI (factor_b = patient count). Level 2 addresses this. Three levels would force healthcare into Level 1 (too much data) or Level 3 (too aggressive).

Why irreversibility as a hard requirement?

Why clearing is defined at the protocol level?

5. Anchor Format

Why a self-describing string token?

Decision: An SWT3 anchor is a hyphen-separated string: SWT3-{TIER}-{PROVIDER}-{UCT}-{PROCEDURE}-{VERDICT}-{EPOCH}-{FINGERPRINT}
Rejected: UUID. Opaque. 550e8400-e29b-41d4-a716-446655440000 tells you nothing about what it represents. Requires a database lookup to understand the content. Provides no self-verification capability.
Rejected: JSON blob. Multi-line. Requires JSON parsing to extract fields. Breaks in log files and terminal output where newlines are significant. Cannot be grepped with a simple pattern.

Why normalized procedure IDs in the anchor but original IDs in the fingerprint?

6. UCT Taxonomy

Why framework-agnostic codes?

Decision: The Universal Control Taxonomy (UCT) assigns 3-letter domain codes (ACC, AUD, CFG, CRY, etc.) that are independent of any specific compliance framework.

Why 3-letter codes?

Why additive-only governance?

7. Alternatives Considered and Rejected

Blockchain-based anchoring

Considered: Writing anchors to a public blockchain (Ethereum, Solana, or a purpose-built chain) for immutability guarantees.

Certificate-based signing (X.509 / PKI)

Considered: Signing each anchor with an X.509 certificate, creating a verifiable chain of trust from a Certificate Authority through the issuing system to the anchor.

OpenTelemetry as the native evidence format

Considered: Using OpenTelemetry spans as the primary evidence format instead of a custom anchor token and factor structure.

8. Infrastructure-Layer Witnessing

Why a two-layer architecture for NVIDIA Dynamo?

Decision: The Dynamo adapter provides two layers: Layer 1 (decorator-based, zero Dynamo dependencies) and Layer 2 (service-graph integration via Dynamo's depends() and @service patterns).

Why the SWT3_DSN connection string?

Decision: Configuration via a single environment variable: SWT3_DSN=https://axm_live_xxx@sovereign.tenova.io/TENANT_ID
Rejected: Configuration file. A YAML or TOML configuration file adds a deployment artifact that must be managed, versioned, and distributed alongside the application. Environment variables are universally available in containerized, serverless, and bare-metal environments without additional tooling.

Why duck-typing over explicit Dynamo imports?