Contents
1. What Is a Witness Receipt Signature?
Every time you submit evidence to the SWT3 witness endpoint, TeNova signs the receipt with an Ed25519 private key. This signature proves that TeNova received and validated the evidence at the exact moment of ingestion. It does not prove the evidence is correct -- it proves the evidence was received.
Think of it as a notary stamp. A notary does not vouch for the contents of a document. The notary confirms that the document was presented, at a specific time, by a specific party. The SWT3 witness receipt signature serves the same function -- cryptographically.
did:web:sovereign.tenova.io. No API key, no account, no trust assumption required.
Resolve the DID, extract the key, verify the signature.
What the Signature Proves
- Receipt -- TeNova's witness infrastructure received your evidence submission
- Integrity -- The receipt has not been modified since signing
- Timing -- The
witnessed_attimestamp was set at ingestion, not after the fact - Origin -- Only the holder of the Ed25519 private key could have produced this signature
What the Signature Does Not Prove
- It does not prove the underlying evidence is true or accurate
- It does not constitute approval, certification, or endorsement
- It does not replace domain-specific validation (e.g., NIST 800-53A assessment objectives)
2. Receipt Anatomy
When you submit evidence to POST /api/v1/witness, the response contains a signed
receipt with the following structure:
{
// Envelope fields (not signed)
"ok": true,
"tenant_id": "ACME_CORP",
// Evidence fields (signed)
"procedure_id": "AI-INF.1",
"verdict": "PASS",
"swt3_anchor": "SWT3-E-VULTR-AI-AI-INF.1-PASS-1788000000-abcdef123456",
"clearing_level": 1,
"witnessed_at": "2026-11-07T12:00:00.000Z",
"verification_url": "/api/v1/attest/verify?token=...",
// Signature verification status (server-side pre-check)
"signature_verified": false,
// Proof chain (async evidence layers)
"proof_chain": {
"merkle_inclusion": "pending",
"merkle_proof_url": "/api/v1/merkle/proof?fingerprint=abcdef123456",
"daily_rollup_url": "/api/v1/merkle?tenant=ACME_CORP&days=1",
"tsa_provider": "freetsa",
"tsa_status": "next_rollup_00:01_utc",
"protocol": "RFC 3161 (IETF)"
},
// Witness signature (Ed25519, base58btc multibase)
"witness_signature": "z4vJ9...(base58btc Ed25519 signature)...",
"witness_verification_method": "did:web:sovereign.tenova.io#key-1"
}
Field Groups
Envelope Fields (not signed)
ok -- Boolean success indicator. Always true for successful submissions.
tenant_id -- Your organization identifier. Stripped before signature computation to prevent cross-tenant replay.
Evidence Fields (signed)
procedure_id -- The UCT procedure that was witnessed (e.g., AI-INF.1, AI-GRD.1).
verdict -- Deterministic outcome: PASS or FAIL.
swt3_anchor -- The full SWT3 Witness Anchor string, uniquely identifying this attestation.
clearing_level -- Data retention tier (0 = Analytics, 1 = Standard, 2 = Sensitive, 3 = Classified).
witnessed_at -- ISO 8601 timestamp set at ingestion time.
verification_url -- Path to verify this specific anchor server-side.
Signature Fields
witness_signature -- Ed25519 signature over the SHA-256 hash of the JCS-canonicalized evidence fields. Encoded as base58btc with z multibase prefix.
witness_verification_method -- DID URL pointing to the public key used for signing. Resolve this to obtain the verification key.
signature_verified -- Server-side pre-check result. Always verify independently -- do not trust this field alone.
Proof Chain Fields (async)
merkle_inclusion -- Status of Merkle tree inclusion: pending until the daily rollup at 00:01 UTC, then included.
merkle_proof_url -- Endpoint to retrieve the Merkle inclusion proof after rollup.
daily_rollup_url -- Endpoint to retrieve the daily Merkle root for your tenant.
tsa_provider -- The RFC 3161 Time Stamp Authority used for the daily batch.
tsa_status -- When the next TSA timestamp will be applied.
protocol -- The timestamping protocol (RFC 3161, IETF standard).
3. Verification Steps
To verify a witness receipt signature, you need to: extract the signed content, canonicalize it, hash it, resolve the public key from the DID document, and verify the Ed25519 signature. Six steps, deterministic, reproducible in any language.
| Step | Operation | Standard |
|---|---|---|
| 1 | Extract receipt body (strip envelope + signature fields) | -- |
| 2 | JCS-canonicalize the receipt body | RFC 8785 |
| 3 | SHA-256 hash the canonical JSON | FIPS 180-4 |
| 4 | Resolve the DID document | W3C DID Core |
| 5 | Extract Ed25519 public key from #key-1 | Multicodec + Multibase |
| 6 | Verify Ed25519 signature against digest | RFC 8032 |
import json, hashlib import requests import base58 from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey # Step 1: Separate signed content from envelope + signature receipt = response_json.copy() signature = receipt.pop("witness_signature") receipt.pop("witness_verification_method", None) receipt.pop("ok", None) receipt.pop("tenant_id", None) # Step 2: JCS-canonicalize (RFC 8785 -- sorted keys, no whitespace) canonical = json.dumps(receipt, sort_keys=True, separators=(",", ":")) # Step 3: SHA-256 hash digest = hashlib.sha256(canonical.encode("utf-8")).digest() # Step 4: Resolve the DID document did_url = "https://sovereign.tenova.io/.well-known/did.json" did_doc = requests.get(did_url).json() # Step 5: Extract Ed25519 public key # The key is multibase base58btc (z prefix) + multicodec ed25519-pub (0xed01) key_data = did_doc["verificationMethod"][0]["publicKeyMultibase"] raw_bytes = base58.b58decode(key_data[1:]) # strip 'z' multibase prefix raw_key = raw_bytes[2:] # strip 2-byte multicodec header public_key = Ed25519PublicKey.from_public_bytes(raw_key) # Step 6: Verify the Ed25519 signature sig_bytes = base58.b58decode(signature[1:]) # strip 'z' multibase prefix try: public_key.verify(sig_bytes, digest) print("Signature VALID -- receipt is authentic") except Exception: print("Signature INVALID -- receipt may be tampered")
Dependencies: pip install cryptography requests base58
import { createHash, verify, createPublicKey } from "crypto"; // Step 1: Separate signed content from envelope + signature const { witness_signature, witness_verification_method, ok, tenant_id, ...receiptBody } = response; // Step 2: JCS-canonicalize (RFC 8785 -- recursive key sort) function jcsCanon(obj: unknown): unknown { if (obj === null || typeof obj !== "object") return obj; if (Array.isArray(obj)) return obj.map(jcsCanon); return Object.keys(obj as Record<string, unknown>) .sort() .reduce((acc, key) => { acc[key] = jcsCanon((obj as Record<string, unknown>)[key]); return acc; }, {} as Record<string, unknown>); } const canonical = JSON.stringify(jcsCanon(receiptBody)); // Step 3: SHA-256 hash const digest = createHash("sha256").update(canonical).digest(); // Step 4: Resolve the DID document const didDoc = await fetch( "https://sovereign.tenova.io/.well-known/did.json" ).then(r => r.json()); // Step 5: Extract Ed25519 public key const multibase = didDoc.verificationMethod[0].publicKeyMultibase; const rawKey = base58Decode(multibase.slice(1)).slice(2); // strip z + multicodec // Wrap raw key in SPKI DER envelope for Node.js crypto const spkiHeader = Buffer.from("302a300506032b6570032100", "hex"); const publicKey = createPublicKey({ key: Buffer.concat([spkiHeader, rawKey]), format: "der", type: "spki", }); // Step 6: Verify the Ed25519 signature const sigBytes = base58Decode(witness_signature.slice(1)); // strip z prefix const valid = verify(null, digest, publicKey, sigBytes); console.log(valid ? "Signature VALID" : "Signature INVALID"); // Base58 decode utility (or use a library like bs58) function base58Decode(str: string): Buffer { const ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"; let result = BigInt(0); for (const char of str) { result = result * 58n + BigInt(ALPHABET.indexOf(char)); } const bytes: number[] = []; while (result > 0n) { bytes.unshift(Number(result % 256n)); result /= 256n; } for (const char of str) { if (char === "1") bytes.unshift(0); else break; } return Buffer.from(bytes); }
Dependencies: Node.js 18+ built-in crypto module only. No npm packages required.
signature_verified field in the
receipt is a server-side convenience check. For audit and compliance purposes, you must perform
client-side verification using the DID document. Trust the math, not the self-reported field.
4. Three-Layer Evidence Chain
The witness receipt signature is Layer 1 of a three-layer evidence chain. Each layer provides a different trust property. Together, they form a complete evidence chain that satisfies multiple audit frameworks simultaneously.
| Layer | Mechanism | Timing | Trust Property |
|---|---|---|---|
| 1 | Ed25519 Witness Signature | Immediate (per-anchor) | TeNova received and signed this specific evidence |
| 2 | Merkle Inclusion Proof | Daily rollup (00:01 UTC) | This anchor is part of a tamper-evident batch |
| 3 | RFC 3161 Timestamp | Daily (after rollup) | The batch existed at a specific wall-clock time |
SDK → POST /api/v1/witness → Ed25519 Sign → Receipt
↓
Ledger → 00:01 UTC Cron → Merkle Tree → Root Hash
↓
Root Hash → FreeTSA → RFC 3161 Timestamp Token
Why Three Layers?
Each layer addresses a different adversarial scenario:
- Layer 1 alone -- Proves TeNova signed the receipt, but TeNova could theoretically re-sign a modified receipt (single point of trust).
- Layer 1 + Layer 2 -- The Merkle root commits to the entire day's evidence set. Modifying one receipt changes the root, invalidating all proofs. Requires compromising the entire tree.
- Layer 1 + Layer 2 + Layer 3 -- The RFC 3161 timestamp from an independent TSA anchors the Merkle root to wall-clock time. Even if TeNova's infrastructure is compromised, the TSA's independent timestamp proves the batch existed before the compromise.
5. Merkle Proof Verification
After the daily rollup at 00:01 UTC, you can retrieve a Merkle inclusion proof for any anchor fingerprint. The proof demonstrates that your specific anchor was included in that day's tamper-evident batch.
Query the Proof
GET /api/v1/merkle/proof?fingerprint=abcdef123456 Authorization: Bearer axm_live_...
Response
{
"fingerprint": "abcdef123456",
"merkle_root": "93dac175a4f8e2b1c7d903...",
"leaf_hash": "SWT3:LEAF:abcdef123456...",
"proof_steps": [
{ "hash": "7b2a1f...", "position": "right" },
{ "hash": "e4c903...", "position": "left" },
{ "hash": "1d8f42...", "position": "right" }
],
"tsa": {
"url": "https://freetsa.org/tsr",
"timestamp": "2026-11-07T00:01:02.000Z",
"serial": "a1b2c3d4e5f6g7h8",
"protocol": "RFC 3161"
}
}
Verify the Proof Locally
Walk the proof steps from your leaf hash up to the root. At each step, concatenate with the
sibling hash (respecting left/right position) and SHA-256 hash the result. The final hash
must match merkle_root.
import hashlib def verify_merkle_proof(fingerprint, proof_steps, expected_root): # Domain-separated leaf hash current = hashlib.sha256( ("SWT3:LEAF:" + fingerprint).encode() ).hexdigest() for step in proof_steps: if step["position"] == "left": combined = step["hash"] + current else: combined = current + step["hash"] # Domain-separated node hash current = hashlib.sha256( ("SWT3:NODE:" + combined).encode() ).hexdigest() return current == expected_root
SWT3:LEAF: and SWT3:NODE:
prefixes prevent second-preimage attacks where a leaf could be misinterpreted as an
internal node. This is a standard Merkle tree hardening technique.
6. Response Headers
Every witness endpoint response includes passive identification headers. These are informational and do not affect signature verification, but they are useful for diagnostics and routing.
| Header | Value | Purpose |
|---|---|---|
X-TeNova-Protocol |
SWT3-v8.0.0 |
Protocol version used for this response |
X-TeNova-Service |
Sovereign Witness Authority |
Service identifier for routing and logging |
X-TeNova-Tier |
Open | Pro | Enclave | Sovereign |
Your subscription tier (affects retention and features) |
X-TeNova-Docs |
https://sovereign.tenova.io/docs |
Link to the developer documentation |
7. Frequently Asked Questions
What if witness_signature is null?
If the Ed25519 signing key is not configured in that environment (e.g., a development or
staging instance), the witness_signature field will be null. The
receipt is still valid -- the evidence was still ingested, the SWT3 Witness Anchor was still
minted, and the anchor will still appear in the Merkle rollup. The receipt simply lacks the
per-anchor Ed25519 signature layer. In production at sovereign.tenova.io, the
signing key is always present.
Can I cache the DID document?
Yes. The DID document at did:web:sovereign.tenova.io changes only during key
rotation, which is a rare operational event. When a key rotation occurs, the new key is added
as #key-2 while #key-1 remains for verifying older receipts. You
can cache the DID document for hours or days without risk. For maximum freshness, re-fetch
daily or on verification failure.
What algorithm is used?
Ed25519 (RFC 8032) with SHA-256 pre-hash over JCS-canonicalized JSON (RFC 8785).
The signature is encoded as base58btc with the z multibase prefix, following the
W3C Data Integrity specification. The public key uses the multicodec 0xed01
(ed25519-pub) prefix, also base58btc-encoded with z multibase prefix.
Is this legally admissible?
The Ed25519 signature provides cryptographic, tamper-evident proof of receipt. Combined with the Merkle inclusion proof and RFC 3161 timestamp, it establishes a strong chain of custody for the evidence record. Legal admissibility depends on jurisdiction, the specific legal context, and how the evidence is presented. Consult qualified legal counsel for your use case. The technical chain is designed to meet the evidentiary bar described in NIST SP 800-86 (Guide to Integrating Forensic Techniques) and eIDAS Article 25.1 (electronic signatures).
What about post-quantum?
ML-DSA-65 (FIPS 204, formerly CRYSTALS-Dilithium) dual-signature envelope is on the roadmap. When deployed, each receipt will carry both an Ed25519 signature (for current interoperability) and an ML-DSA-65 signature (for post-quantum assurance). The DID document will include a second verification method with the ML-DSA public key. No changes to existing verification code will be required -- the Ed25519 path will continue to work indefinitely.
How do I report a verification failure?
If you observe a valid-looking receipt whose signature does not verify, and you have confirmed
your JCS canonicalization and key extraction are correct, contact
security@tenovaai.com
with the full receipt JSON (redact tenant_id if desired). Verification failures
in the wild are taken seriously -- they may indicate key compromise, implementation bugs, or
receipt tampering.