Knowledge Base

Browse the concepts behind Truestamp. Follow the links between concepts, or search across everything.

Efficient Data Structures for Tamper-Evident Logging

Crosby and Wallach's 2009 USENIX Security paper introducing the history tree: an append-only Merkle tree with frozen complete subtrees, logarithmic membership and incremental (consistency) proofs, and post-order write-once storage, a precursor of what was later called a Merkle Mountain Range.

Open resource

Overview

“Efficient Data Structures for Tamper-Evident Logging” is a paper by Scott A. Crosby and Dan S. Wallach of Rice University, presented at the 18th USENIX Security Symposium in 2009. It addresses an untrusted logger that stores events for many clients and is checked by one or more auditors, and asks how the logger can prove cheaply that every logged event is still present and that the log it shows today agrees with every version it showed in the past. The paper’s answer is the history tree, a versioned Merkle tree whose proofs are logarithmic in the size of the log, where a hash chain needs proofs that grow linearly. The authors report that proving one random event in an 80 million event log takes about 3 KB with the history tree, against roughly 800 MB with a classic hash chain.

The history tree is an early, fully worked description of the append-only Merkle structure that Certificate Transparency standardized in RFC 6962 in 2013 and that Peter Todd described in 2012 under the name Merkle Mountain Range. Its frozen complete subtrees are an MMR’s peaks, its incremental proof is RFC 6962’s consistency proof, and its post-order, write-once storage layout is the flat array an MMR is usually stored in. The paper does not use the MMR name, which came later.

Key points

  • Security model. The logger is the sole author of the log and is fully untrusted. After each append it signs a commitment to the whole log so far. Clients pass the commitments they receive on to auditors, by gossip or because the logger publishes them somewhere public, so a logger that shows different histories to different parties (a fork) is caught when an auditor asks it to reconcile two commitments.
  • Two proofs. A membership proof shows that event i is in the log fixed by commitment Cj. An incremental proof shows that commitments Ci and Cj (i before j) fix the same shared past, which is what RFC 6962 later calls a consistency proof. Both are sent as a pruned tree of at most about 2d hashes for a tree of depth d, so O(log n). An auditor that remembers its last commitment needs only O(log(n - j)) hashes for the next check.
  • Tree shape. Events fill the leaves of a binary tree from left to right, and a new root level is added when the tree fills. Leaves hash as H(0 || X) and interior nodes as H(1 || left || right), the same leaf and node prefix scheme RFC 6962 adopted. A subtree whose leaves are all present is frozen: its hash never changes again, and only the unfrozen nodes along the right edge are recomputed as events arrive.
  • The root differs from RFC 6962 and from an MMR. An interior node whose right subtree is still empty is hashed with a fixed placeholder standing in for the missing child, all the way up a tree of fixed depth. RFC 6962 instead carries a lone child up unchanged, and an MMR combines its peaks (“bagging the peaks”) in a separate step. The three agree on which complete subtrees exist at every size and differ only in how the incomplete right edge reaches a single root, so their roots are not interchangeable.
  • Write-once storage. Because frozen nodes never change, each one can be written out the moment it freezes. The paper notes that this order is a post-order traversal of the tree, and the prototype stores the tree as an append-only array in exactly that order, with event bodies kept in a separate append-only value store.
  • Merkle aggregation. Nodes can carry attributes (flags, maximum values, Bloom filters of keywords, time ranges) combined from the children up and covered by the hash. This gives tamper-evident queries (“every event matching this predicate, with proof that none were left out”) and safe deletion: old events can be purged while the logger proves that every purged event failed the policy for keeping it.
  • Timestamping. The paper sketches a round-based time-stamping service built on the history tree: after each round the logger publishes its latest commitment “in public medium such as a newspaper”, and a client proves its document was submitted within a given round, and its order inside that round, with a pruned tree holding paths to the previous round’s last event, its own event, and the current round’s last event. Built with one tree per round, the design reduces to the threaded authentication trees of Buldas and colleagues.
  • Prototype. A Python and C++ syslog logger using SHA-1 and DSA-1024 on a 2.4 GHz Core 2 Duo inserted about 1,750 events per second while signing every commitment, about 10,500 per second with signing moved elsewhere, and stored an 80 million event log in about 27 GB.
  • Related work. The paper compares the history tree with hash-chain audit logs (Schneier and Kelsey), Haber and Stornetta’s linked timestamping and the newspaper-published chain behind Surety, and Maniatis and Baker’s skip-list logs and timeline entanglement, arguing that only the tree gives logarithmic proofs to auditors that do not download every event.

Relevance to Truestamp

Truestamp’s Merkle hashing follows RFC 6962’s 0x00 leaf and 0x01 node prefixes, and its tree shape is RFC 9162’s: split at the largest power of two below the leaf count, with no padding (see Truestamp’s Merkle tree). That tree has the same complete subtrees as a history tree of the same size, though its root is computed differently. Truestamp issues inclusion proofs, which correspond to the paper’s membership proofs. It does not issue the paper’s incremental proofs: tamper evidence over time comes instead from the block hash chain, the signature on each block record, and the commitment of each epoch’s hash to Stellar and Bitcoin.

The paper’s round-based time-stamping sketch is close in spirit to how Truestamp places a subject in its submission window: an earlier published record fixes the submitted-after edge, and a later public commitment fixes the submitted-before edge. Truestamp’s rounds are its blocks, and the public medium is a public blockchain rather than a newspaper. The paper also belongs in the line of tamper-evident record keeping that begins with Haber and Stornetta.

Citations

  1. Efficient Data Structures for Tamper-Evident Logging. Scott A. Crosby and Dan S. Wallach, Rice University, 18th USENIX Security Symposium, Montreal, August 2009.
  2. Merkle Mountain Ranges. Peter Todd’s description of the structure and the origin of the name, in the opentimestamps-server repository; its earliest visible commit is dated 31 October 2012.