Technical Updated 1/29/2025

How Bitcoin Timestamping Works

Deep dive into the technical implementation of Bitcoin-based document timestamping and proof-of-existence

How Bitcoin Timestamping Works

Bitcoin timestamping leverages the immutable nature of the Bitcoin blockchain to create permanent, verifiable proof that a document existed at a specific point in time. Here’s how the entire process works from upload to verification.

The Cryptographic Foundation

SHA-256 Hashing

Every digital document has a unique cryptographic fingerprint called a hash:

Document: "Hello World"
SHA-256:  a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e

Key properties of SHA-256:

  • Deterministic: Same input always produces same hash
  • Avalanche effect: Tiny changes create completely different hashes
  • One-way function: Impossible to reverse engineer the original document
  • Collision resistant: Extremely unlikely for two different documents to have the same hash

Hash as Proof-of-Existence

By timestamping the hash instead of the document itself:

  • Privacy preserved: Original content remains secret
  • Integrity guaranteed: Any modification invalidates the proof
  • Efficiency achieved: 64 characters represent files of any size

Step-by-Step Process

1. Client-Side Document Processing

// Simplified version of our hashing process
async function computeHash(file) {
  const arrayBuffer = await file.arrayBuffer();
  const hashBuffer = await crypto.subtle.digest('SHA-256', arrayBuffer);
  const hashArray = Array.from(new Uint8Array(hashBuffer));
  return hashArray.map(b => b.toString(16).padStart(2, '0')).join('');
}

What happens:

  • File loaded into browser memory as ArrayBuffer
  • Web Crypto API computes SHA-256 hash
  • Result converted to hexadecimal string
  • Original file immediately discarded from memory

Security benefits:

  • No network transmission of sensitive content
  • No server-side file processing required
  • User maintains complete control over original document

2. Payment and Metadata Storage

When payment is processed, the following metadata is stored with Stripe:

{
  "hash": "a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e",
  "filename": "important-contract.pdf",
  "size": "245760",
  "productId": "document-timestamp",
  "timestamp": "2025-01-29T10:30:45.123Z"
}

Metadata significance:

  • hash: The cryptographic fingerprint to be timestamped
  • filename: Human-readable identifier (encrypted in Stripe)
  • timestamp: When the payment was processed
  • service: Type of timestamping service requested

3. Bitcoin Blockchain Anchoring

After successful payment, the hash enters our timestamping queue:

Batch Processing

  • Multiple hashes are collected over a time period (typically 1-6 hours)
  • Hashes are combined using a Merkle tree structure
  • Only the Merkle root is embedded in the Bitcoin transaction

Merkle Tree Construction

        Root Hash
       /         \
   Hash AB     Hash CD
   /    \      /    \
Hash A Hash B Hash C Hash D

Benefits of batching:

  • Cost efficiency: One Bitcoin transaction serves multiple customers
  • Privacy: Individual hashes not directly visible on blockchain
  • Scalability: Thousands of documents per transaction

Bitcoin Transaction

The Merkle root is embedded in a Bitcoin transaction using one of these methods:

  • OP_RETURN output: Direct data embedding (80 bytes max)
  • Pay-to-Witness-Script-Hash: Embedding in script witness data
  • Taproot: Data in Taproot script tree

4. Confirmation and Finality

Once the Bitcoin transaction is mined:

  • First confirmation: Hash is permanently recorded (10-60 minutes)
  • Six confirmations: Timestamp considered final (60-360 minutes)
  • Immutable proof: Cannot be altered without rewriting entire blockchain

Verification Process

Independent Verification

Anyone can verify a timestamp proof without trusting Eternity Bits:

  1. Compute document hash using any SHA-256 tool
  2. Locate Bitcoin transaction containing the Merkle root
  3. Verify Merkle path from document hash to root
  4. Check transaction timestamp in Bitcoin block header

Verification Tools

# Command line verification example
sha256sum document.pdf
# Output: a591a6d40bf420404a011733cfb7b190d62c65bf0bcda32b57b277d9ad9f146e

# Look up transaction on blockchain explorer
bitcoin-cli getrawtransaction [txid] 1

Long-term Accessibility

Proofs remain verifiable indefinitely because:

  • Bitcoin blockchain is permanent: Cannot be deleted or modified
  • Verification is mathematical: Doesn’t require Eternity Bits to exist
  • Open standards: SHA-256 and Bitcoin are public protocols

Security Guarantees

Cryptographic Security

  • SHA-256 strength: 2^256 possible hashes (more than atoms in universe)
  • Bitcoin network security: Protected by massive computational power
  • Mathematical certainty: Based on provable cryptographic properties

Timestamp Accuracy

  • Block timestamp bounds: Bitcoin blocks have strict timing rules
  • Network consensus: Thousands of nodes agree on timing
  • Median time past: Prevents timestamp manipulation

Immutability Assurance

  • Proof-of-Work protection: Massive energy cost to alter history
  • Network effect: Global consensus makes changes practically impossible
  • Economic incentives: Miners have strong incentive to maintain integrity

Technical Limitations

Blockchain Constraints

  • Transaction fees: Bitcoin network fees affect timestamping cost
  • Block timing: Average 10-minute confirmation time
  • Data size limits: Only hashes can be timestamped, not full documents

Verification Requirements

  • Technical knowledge: Full verification requires understanding of cryptography
  • Blockchain access: Need Bitcoin node or trusted blockchain explorer
  • Tool availability: Requires SHA-256 and Merkle tree verification tools

Comparison with Traditional Timestamping

Trusted Timestamp Authorities (TSA)

Traditional approach:

  • Centralized authority signs timestamps
  • Requires ongoing trust in TSA
  • Subject to political and legal pressure
  • Can be compromised or cease operation

Bitcoin approach:

  • Decentralized global consensus
  • Mathematical proof, no trust required
  • Censorship resistant
  • Permanent operation guaranteed by economic incentives

Digital Signatures

Digital signatures prove:

  • Identity of signer
  • Integrity of signed document
  • Non-repudiation of signature

Bitcoin timestamps prove:

  • Document existed at specific time
  • Document contents (via hash)
  • No identity or authorization claims

Bitcoin timestamping complements rather than replaces digital signatures, providing an additional layer of cryptographic evidence for critical documents.

Future Enhancements

Planned Improvements

  • Lightning Network integration: Faster, cheaper micro-timestamps
  • Batch optimization: More efficient Merkle tree structures
  • Enhanced privacy: Zero-knowledge proofs for sensitive documents
  • Cross-chain compatibility: Timestamps across multiple blockchains

The foundation of Bitcoin timestamping is solid and proven, with ongoing innovations making it even more powerful and accessible for everyday use.

Ready to Start Timestamping?

Create permanent Bitcoin timestamps for your documents

Get Started →