Skip to content

Reference

This page covers the shared cryptographic layer, security assumptions, data scope, and architectural decisions that apply across both ClaimLedger and CreatorLedger.

Both ledgers share a common cryptographic foundation through Shared.Crypto, located at src/CreatorLedger/Shared.Crypto/. This library provides three capabilities:

All signatures in Ledger Suite use Ed25519 (RFC 8032):

  • Key size: 32-byte public key, 64-byte signature
  • Properties: Deterministic (same input always produces the same signature), fast verification, small keys
  • Usage: Every claim assertion, attestation, citation, revocation, and proof bundle carries an Ed25519 signature

Content integrity and event chaining both use SHA-256:

  • Content hashing: Asset files and evidence are hashed to produce a 32-byte (64-character hex) digest
  • Event hashing: Each ledger event is hashed over its canonical JSON representation, and the hash is included in the next event to form the chain
  • Hash format: Lowercase hexadecimal, 64 characters

All signed data uses deterministic JSON serialization to ensure that the same logical content always produces the same byte sequence:

  • UTF-8 encoding, no BOM
  • Compact (no whitespace)
  • Null values included explicitly
  • Property order controlled by schema
  • Numbers use strict formatting (no leading zeros, no trailing decimals)
  • Strings use minimal escaping

This determinism is critical. Without it, two semantically identical JSON objects could produce different byte sequences and therefore different signatures.

Ledger Suite is local-first. Here is exactly what it touches and what it does not:

CategoryDetails
Data accessedLocal SQLite databases, Ed25519 keypairs, claim/attestation records, proof bundles
Data NOT accessedNo cloud sync, no telemetry, no analytics, no external API calls
NetworkZero egress by default. RFC 3161 timestamping requires an external TSA endpoint when explicitly invoked. Publish commands target local or user-configured endpoints only.
TelemetryNone. No data is collected or transmitted.
  • Private keys are never transmitted. They are stored locally and used only for signing operations.
  • Hash chains provide tamper evidence, not tamper prevention. Physical access to the SQLite database allows modification, but any modification is detectable via chain verification.
  • RFC 3161 timestamping requires contacting an external Timestamp Authority. This is the only network operation in the entire suite, and it is opt-in.
  • Proof bundles are self-contained. Verify signatures before trusting imported bundles — a valid signature means the stated signer signed it, not that the signer is trustworthy.

Ledger Suite detects:

  • Content modification after signing
  • Signature forgery without the private key
  • Payload tampering in attestations and events
  • Event chain manipulation (reordering, deletion, insertion)
  • Identity impersonation (wrong key)

Ledger Suite does not detect:

  • A signer lying about what they know or created
  • Private key compromise
  • Timestamps before blockchain anchoring (self-reported)
  • Whether content was human-made or AI-generated

Vulnerabilities can be reported to 64996768+mcp-tool-shop@users.noreply.github.com. The response timeline targets acknowledgment within 48 hours, severity assessment within 7 days, and a fix within 30 days. Full details are in SECURITY.md.

Both ledgers follow Clean Architecture with four layers:

┌───────────────────────────────────────┐
│ CLI Layer │
│ Argument parsing, exit codes, I/O │
└───────────────────────────────────────┘
┌───────────────────────────────────────┐
│ Application Layer │
│ Commands, verification, export │
└───────────────────────────────────────┘
┌───────────────────────────────────────┐
│ Domain Layer │
│ Entities, value objects, rules │
└───────────────────────────────────────┘
┌───────────────────────────────────────┐
│ Infrastructure Layer │
│ SQLite, DPAPI, anchoring adapters │
└───────────────────────────────────────┘
┌───────────────────────────────────────┐
│ Shared.Crypto │
│ Ed25519, SHA-256, Canonical JSON │
└───────────────────────────────────────┘

Dependencies flow inward. The Domain layer has zero external dependencies. The Application layer depends only on Domain. Infrastructure implements interfaces defined in Application.

Both ledgers use SQLite with WAL (Write-Ahead Logging) mode for concurrent read access. CreatorLedger enforces append-only semantics through database triggers that prevent UPDATE and DELETE operations on the events table.

VaultPlatformUse case
DPAPI KeyVaultWindows onlyProduction — encrypts private keys at rest using Windows Data Protection API (CurrentUser scope)
InMemory KeyVaultAll platformsTesting and cross-platform use — keys exist only in process memory
FieldValue
LicenseMIT
LanguageC# / .NET 8
Total tests590 (ClaimLedger 371 + CreatorLedger 219)
CIGitHub Actions (Windows runner for DPAPI coverage)
Repositorymcp-tool-shop-org/ledger-suite