SOLENOID.SYSTEMS [...]
SYS ENG PHI PRICING
API
├─ CATCH ├─ GATE ├─ KEY ├─ LATCH ├─ METER ├─ PULSE ├─ RELAY └─ WITNESS

Witness vs OpenTimestamps: Tamper-Proof Logs Without a Blockchain

#cryptography #comparison #witness #opentimestamps #audit-logs

OpenTimestamps and Witness both provide tamper-proof audit trails without running a blockchain. They use fundamentally different approaches.

OpenTimestamps anchors timestamps to the Bitcoin blockchain. Trustless, decentralized, open source. Proof that a document existed at a specific time, backed by Bitcoin’s consensus.

Witness uses cryptographic hash chains with Ed25519 signatures. API-based, instant proofs, offline verification. Proof that events occurred in a specific order, signed by an Ed25519 keypair generated for your chain.

Different trust models. Different tradeoffs. Here’s how to decide.

What OpenTimestamps Gives You

Bitcoin-anchored timestamps: Hash your document. Submit to OpenTimestamps calendar servers. They aggregate hashes into a Merkle tree and commit the root to the Bitcoin blockchain.

Trustless verification: Anyone with Bitcoin transaction history can verify your timestamp. No need to trust OpenTimestamps. The proof is in Bitcoin’s blockchain.

Open source and decentralized: Reference implementation is MIT licensed. Multiple independent calendar servers exist. No single point of trust.

Free forever: Calendar servers aggregate hashes for free. Bitcoin transaction fees are amortized across thousands of timestamps. No API keys, no accounts.

Immutability via Bitcoin: Bitcoin’s proof-of-work makes the timestamp immutable. Rewriting history requires outcompeting the entire Bitcoin mining network.

If you need trustless proof of existence with maximum decentralization, OpenTimestamps is the standard.

What Witness Gives You

Cryptographic hash chains: Each receipt’s chain_hash is SHA-256(prev_hash || sequence_id || content_hash). Creates an append-only chain where tampering with any entry invalidates every subsequent receipt.

curl -X POST https://api.solenoid.systems/v1/witness/log \
  -H "Authorization: Bearer sm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"log": {"event": "user.login", "user_id": "u_123"}}'

Ed25519 signatures: Every receipt is signed with the Ed25519 private key generated for your chain. The matching public key is embedded in each receipt and downloadable from /v1/witness/pubkey/:chainId for offline verification.

Self-contained receipts: Verify any single event without downloading the rest of the chain. The receipt embeds the log, content hash, prev/chain hashes, signature, and public key.

Instant proofs: No waiting for Bitcoin block confirmation. Notarize a log, get a signed receipt immediately.

Sequence IDs: Every event gets a monotonically increasing sequence number. Proves ordering, not just existence.

Offline verification: Download the chain’s public key once. Verify receipts locally with crypto.subtle — recompute the content hash, recompute the chain hash, verify the Ed25519 signature.

Edge deployment: Runs on Cloudflare Workers and Durable Objects. Global low latency for appends and verifications.

The Fundamental Difference

Trust model is the core distinction.

OpenTimestamps is trustless. You don’t trust calendar servers. You don’t trust OpenTimestamps developers. You trust Bitcoin’s proof-of-work consensus. As long as Bitcoin’s blockchain exists and is secure, your timestamp is verifiable.

Witness requires trust in Solenoid. You trust that Solenoid’s private key hasn’t been compromised. You trust that Solenoid isn’t backdating events. You trust that Solenoid’s infrastructure won’t lose chain data.

This is the tradeoff for instant proofs and API convenience.

When to Use OpenTimestamps

Choose OpenTimestamps when:

Trustless verification is required. Legal compliance demands proof that doesn’t rely on a single authority. OpenTimestamps’ Bitcoin anchoring provides this.

You need long-term immutability. Your timestamps might need verification decades from now. Bitcoin’s blockchain is designed to last. Solenoid might not exist in 30 years.

Open source is a requirement. Regulated industries or government use cases require inspectable, auditable code. OpenTimestamps is fully open source.

Cost sensitivity matters. OpenTimestamps is free. No API keys, no accounts, no billing. Perfect for academic research, journalism, or non-profits.

You can wait for Bitcoin blocks. Bitcoin confirmation takes 10-60 minutes. If your use case can tolerate this latency, OpenTimestamps works.

Decentralization is critical. No single point of failure or control. Multiple independent calendar servers. Anyone can run a server.

When to Use Witness

Choose Witness when:

You need instant proofs. Compliance workflows require immediate proof of events. Can’t wait for Bitcoin block confirmation.

Order matters, not just existence. OpenTimestamps proves a document existed at a time. Witness proves events happened in a specific sequence with monotonic IDs.

API integration is preferred. RESTful API fits your existing infrastructure. No need to run OpenTimestamps client libraries.

You want chain ordering. Sequence IDs make it trivial to identify which event came first. OpenTimestamps requires comparing block heights.

Offline verification is needed. Download the chain’s public key once and verify receipts locally with Web Crypto. OpenTimestamps requires access to Bitcoin blockchain data.

You’re already using Solenoid. Gate for flags, Meter for credits, Witness for audit logs. One API key, one vendor, one bill.

Latency is critical. Witness runs at the edge globally. Appends are sub-100ms. OpenTimestamps requires network calls to calendar servers plus Bitcoin block time.

The Hybrid Approach

Some compliance workflows use both.

Witness for operational audit trails. Instant proof for day-to-day compliance. Sequence IDs for ordering. Fast API integration.

OpenTimestamps for archival timestamps. At end of month or quarter, hash the Witness chain head and submit to OpenTimestamps. Get Bitcoin-anchored proof of the entire audit log.

// Notarize events through Witness throughout the day
async function logEvent(log: Record<string, unknown>) {
  const res = await fetch('https://api.solenoid.systems/v1/witness/log', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.SOLENOID_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ log })
  })
  return res.json() // signed receipt with chain_hash
}

// Periodic archival to OpenTimestamps
async function archiveToBlockchain(latestReceipt: { chain_hash: string; sequence_id: string }) {
  // Anchor the latest chain_hash — proves every prior receipt existed by transitivity
  const ots = await timestampHash(latestReceipt.chain_hash)

  await db.archives.insert({
    sequence_id: latestReceipt.sequence_id,
    witness_chain_hash: latestReceipt.chain_hash,
    ots_proof: ots
  })
}

Witness for speed and convenience. OpenTimestamps for trustless immutability. Both layers working together.

Technical Comparison

FeatureOpenTimestampsWitness
Proof generation10-60 minutesInstant
Trust modelTrustless (Bitcoin PoW)Trust Solenoid’s key
CostFreeAPI credits
VerificationRequires Bitcoin blockchainOffline Ed25519 + hash chain
OrderingBlock height comparisonSequence IDs
DecentralizationMultiple calendar serversCentralized (Cloudflare edge)
IntegrationClient librariesREST API
Open sourceYes (MIT)No

Migration Paths

From Witness to OpenTimestamps: Export your Witness chain hashes and submit to OpenTimestamps for archival. Both systems can coexist.

From OpenTimestamps to Witness: If you need faster proofs or API integration, start using Witness for new events. Archive to OpenTimestamps periodically.

Neither migration is destructive. Both systems can verify historical data independently.

Operational Complexity

OpenTimestamps requires running client libraries (Python, JavaScript, Java, etc.) or using CLI tools. You interact with calendar servers (run by the community). No accounts, no API keys, no infrastructure on your side.

Setup time: 5 minutes to install client library and test.

Witness is API-only. No client libraries required. Standard HTTPS requests. Manage API keys like any other Solenoid service.

Setup time: 1 minute to get API key and make first append.

Both are low-complexity solutions. OpenTimestamps requires more setup but zero ongoing cost. Witness is simpler integration but paid service.

Pricing Comparison

OpenTimestamps is free. Calendar servers are funded by the OpenTimestamps project and community. Bitcoin transaction fees are amortized across thousands of timestamps.

Witness pricing:

  • Free: 10,000 calls/month
  • Starter ($19.99/mo): 100,000 calls
  • Pro ($49.99/mo): Unlimited
  • Scale ($149.99/mo): Unlimited

Witness becomes unlimited at Pro tier. For compliance-heavy workloads logging thousands of events daily, Pro is cost-effective.

The Decision

Use OpenTimestamps if:

  • You need trustless, decentralized proof
  • Open source is required
  • Long-term archival (decades) is the goal
  • Cost is a primary concern (free is critical)
  • You can tolerate 10-60 minute proof latency
  • Bitcoin immutability is preferred

Use Witness if:

  • You need instant proofs (sub-second latency)
  • Event ordering with sequence IDs matters
  • You want API-based integration
  • Offline verification without blockchain access is needed
  • You’re building real-time compliance workflows
  • You’re already using Solenoid infrastructure

Both are good tools for different trust models and use cases.

Try Witness

If instant cryptographic proofs fit your use case:

# Initialize your chain (one time, generates the Ed25519 keypair)
curl -X POST https://api.solenoid.systems/v1/witness/sys/init \
  -H "Authorization: Bearer sm_your_api_key"

# Notarize a JSON log
curl -X POST https://api.solenoid.systems/v1/witness/log \
  -H "Authorization: Bearer sm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"log": {"event": "user.login", "user_id": "u_123"}}'

# Verify a receipt server-side (or run the same checks client-side, offline)
curl -X POST https://api.solenoid.systems/v1/witness/verify \
  -H "Authorization: Bearer sm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"receipt": {...}}'

Notarize logs. Get signed receipts instantly. Verify offline.

No Bitcoin required.