text:
# Authenticated Append-only Skip Lists

## 1 Introduction

Dependable systems rely heavily on logs of data, system events, transactions, and security decisions. Inspecting such logs while the system is running (on-line) or after an exceptional event has caused the system to cease operations (off-line) can help maintain accountability through audit trails, repair failures through undo/redo logs, and improve performance via profiling.

In distributed systems, especially those intended for loosely-coupled communities of independent components (generally called *peer-to-peer systems*), it is frequently infeasible to maintain a central system log; in fact, often there is no central authority that can be trusted by all participating components to maintain a log faithfully. Instead, each component stores its own log of events observed locally, or of interactions with other components. The log for the entire system does not exist physically; it is made up of log fragments scattered around different system components.

These distributed log fragments must be perused for answers when a failure occurs or a component is reported as misbehaving. For example, consider a distributed file system, where component $`A`$ requests that component $`B`$ store datum $`d`$ and $`B`$ accepts. Later $`A`$ attempts to retrieve datum $`d`$ from $`B`$ and $`B`$ denies having this datum. $`A`$ can convincingly accuse $`B`$ of misbehavior only if it can show that, at first, $`B`$ agreed to hold $`d`$ and, *later*, $`B`$ denied having done so.

In such a setting, logs can be a very sensitive and vulnerable system resource. A component, along with the entity that operates it, cannot trust another component to retain the order of its locally logged events or to refrain from changing events after it has logged them. This prevents $`A`$, in the example above, from using $`B`$’s log to justify its accusation. Similarly, an arbiter must be skeptical of an accusation made by $`A`$ that relies on the integrity of $`A`$’s log.

The problem has been addressed in the literature via the use of collision-resistant hash functions to link the contents of earlier log entries to later ones . The collision-resistance property of the hash functions used makes it very difficult to “rewrite history” in a sensitive log, without causing dramatic changes in the entire log. However, with very few exceptions (notably, work by Buldas et al. ), no attention has been paid to the scalability of such hash-based techniques when logs grow very long and interesting sensitive log entries may have been created years—and billions of log entries—ago.

In this paper, we analyze the security of the *Authenticated Append-only Skip List* (AASL). The AASL is a novel data structure that is designed for the efficient maintenance of and access to very large, tamper-evident sequences of data. AASLs provide a mechanism for detecting structural corruption, such as modification, removal or reordering of data, whenever those data are accessed. We have used AASLs in Timeweave , a mechanism that allows components of a distributed system to maintain a local trustworthy view of a global system log.

A distributed system component that maintains an AASL can compute succinct one-way digests of the entire structure; these digests can serve as a *commitment* on the data structure contents and order, and can be conveyed to other system components as such. A remote component wishing to establish whether a particular datum appears in such a data sequence (membership) can request a *proof* from the maintainer of the AASL. This proof can be verified against the digest to which the maintainer has committed.

AASLs are guaranteed to prevent maintainers from proving conflicting facts about a data sequence, even at different points in the evolution of the sequence over time. In this paper, we describe the construction of AASLs and prove the security guarantees they offer.

## 2 Background

In this section, we describe related work that protects sensitive logs from tampering, and related work on securing the contents of skip lists.

The integrity of public logs or commitment sequences has traditionally been protected through the use of one-way hash functions. Spreitzer et al.  describe how to protect the modification order of a weakly consistent, replicated data system, by placing successive write and read operations in a *hash chain*; this is a linked list, where every element is annotated with a label computed by hashing together the value of the element and the label of the preceding element. Schneier and Kelsey  propose a historic integrity scheme for logs of untrusted or vulnerable machines. Their work protects access-controlled log entries against tampering or unauthorized retroactive disclosure through hash chaining. In secure digital time stamping , a digital notary places documents in a hash chain, so as to be able to derive temporal precedences between document commitments.

Unfortunately, reasoning about simple hash chains can be very expensive when they grow long. To check that a particular element occupies the beginning of the chain, all the hashes between that element and the end of the chain must be performed. Buldas et al.  improve greatly on this linear cost; they describe optimally efficient hash graphs that permit the extraction of such temporal precedences with optimal proof sizes, on the order of the logarithm of the size of the graph.

Goodrich et al.  retrofit skip lists for tamper-evidence. In that work, the authors propose an authenticated skip list that relies on commutative hashing. Anagnostopoulos et al.  extend this construct to deal with persistent data collections, where older versions of the skip list are available, and they are each, by themselves, an authenticated skip list. However, these structures are not designed to be append-only. As a result, they are not well-suited for tamper-evident logs: a malicious maintainer can remove and then reinsert elements from the “middle” of the structure across version changes. A verifier must check vigilantly that a log entry that interests him remains consistently in every new version of the structure produced by the maintainer, which can be very expensive when versions are produced frequently.

We have used the structure described in this paper in previous work  to preserve the historic integrity of a loosely coupled distributed system. Here we focus on a detailed design and analysis of the security guarantees that the structure offers.

## 3 Design

An Authenticated Append-only Skip List (AASL) is a data structure conceptually based on skip lists . Skip lists are sorted linked lists with extra links, designed to allow fast lookup of the stored data elements by taking “shortcuts.” The basic idea is to enhance linked lists, which connect each element in the data sequence to its successor, by also linking some elements to successors further down the sequence. Roughly half of the elements have links to their two-hop successor, roughly a quarter of the elements have links to their four-hop successor, and so on. As a result, during traversal from element $`a`$ to element $`b`$, the traversal path follows repeatedly the longest available link from the current element that does not overshoot the destination $`b`$, and thereby reaches $`b`$ in fewer steps than would be possible by just traversing every intervening element between $`a`$ and $`b`$. Skip list traversals achieve logarithmic traversal path lengths in the number of data elements in the structure, as opposed to the linear paths offered by regular linked lists.

### 3.1 AASL construction

AASLs take advantage of the shortcut idea, described above, albeit in a deterministic fashion as opposed to the randomized nature of the original skip lists. AASLs of $`n`$ elements consist of $`\mathrm{log}_2n`$ coexisting linked lists, each designated by a different *level* number. The linked list at level 0 is a regular linked list connecting all elements in the data sequence. The linked list at level 1 is a linked list that only contains every other element from the original data sequence. The linked list at level $`l`$ contains every $`2^l`$-th element of the original data sequence. Element $`i`$ belongs to the $`l`$-level linked list if and only if $`i`$ is divisible by $`2^l`$. Figure 1 illustrates this basic structure.

AASL elements, in addition to their datum and their index number, carry an *authenticator*. The authenticator $`T^i`$ for the $`i`$-th element is a value derived via a few applications of a one-way hash function $`h`$, such as SHA-1 , to the datum $`d_i`$ of the $`i`$-th element and the authenticators of the immediate predecessors of that element on each of the linked lists in which it appears.

More specifically, an authenticator is computed in two steps (see Figure 2). First, the *partial authenticators* for an element are computed, one for each list in which that element participates. A partial authenticator is a value computed by hashing together the current index number, the current datum, the current list level, and the authenticator of the preceding element on that list. The partial authenticator $`L_i^l`$ for the element in position $`i`$ on the list at level $`l`$ is computed by

$$L_i^l=h(ild_iT^{i2^l})$$
(1)
where $``$ denotes bit-string concatenation. Second, the partial authenticators are combined, again using the hash function, to produce the element authenticator. The authenticator $`T^i`$ of the $`i`$-th element is computed by

$$T^i=h(L_i^0L_i^1\mathrm{}L_i^{f_i})$$
(2)
where $`f_i`$ is the highest level of linked list in which the $`i`$-th element appears. $`f_i`$ is defined by the relation

$$f_i=\{n:i=2^nr\mathrm{gcd}(2,r)=1\}$$
(3)
A very useful property of skip lists is that they can be traversed from a source element $`i`$ to a destination element $`n`$ ($`in`$) in a number of steps that is logarithmic in the elements of the structure. At every step, a linked list at the highest level is picked, among those in which the current element participates, so as to travel the farthest distance towards the destination, without overtaking it. Algorithm 1 specifies how a single hop is chosen for such a traversal. The thick gray line in Figure 1 illustrates a traversal of the structure.

### 3.2 AASL Membership Proofs

The primary use of AASLs is to support authenticated answers to membership questions, such as “what is the 7-th element in the AASL?”, while maintaining the append-only property of the AASL. To accomplish this functionality, it is important, first, that the party asking the question (the *verifier*) know in which AASL she is asking that question; and, second, that once the verifier receives a response, she holds that response as unequivocal for the AASL in question.

An AASL is uniquely determined by a *digest*. This is the authenticator of the last appended element into the structure. The maintainer of an AASL conveys this short value to potential verifiers as *commitment* to the exact contents of the AASL. A verifier who receives such a digest verifies all subsequent exchanges with the maintainer against this digest.

A response to a membership question on the contents of an AASL consists of a *membership claim* and a *membership proof*. A membership claim has the form “Data element $`d`$ occupies the $`i`$-th position of the AASL whose $`n`$-th authenticator is known to the verifier,” and is denoted by $`i,n,d`$. The corresponding membership proof is denoted by $`E^{i,n,d}`$. This proof convinces the verifier that, first, the maintainer had decided what the $`i`$-th value $`d`$ would be before issuing the $`n`$-th authenticator; second, the maintainer cannot authenticate any other value $`d^{}d`$ as the value of the $`i`$-th element of the AASL with the known $`n`$-th authenticator $`T`$.

The AASL maintainer constructs the membership proof $`E^{i,n,d}`$ by traversing the AASL from the $`i`$-th to the $`n`$-th element, hop by hop, as described by SingleHopTraversalLevel. For every encountered skip list element $`j`$, the maintainer constructs a *proof component* $`C^j`$ that consists of the $`j`$-th data element and the authenticators of its predecessors on all the linked lists in which it appears: $`C^j=d_j;T^{j2^l}:0lf_j`$. The sequence of all proof components makes up the membership proof $`E^{i,n,d}=C^j:jS^{i,n}`$, where $`S^{i,n}`$ is the sequence of elements traversed from $`i`$ to $`n`$. The appendix contains Algorithm 6, which describes the construction process for a single proof component, and Algorithm 7, which outlines the overall proof construction process.

The verifier processes a membership proof against the AASL authenticator that it holds to verify the validity of a membership claim. The verification process mimics the proof construction process. The verifier’s job, however, is to make sure that the purported proof is well-formed and yields the known authenticator starting with the element datum and position in the maintainer’s membership claim. The verification may succeed with a positive result, which means that the claim is true; it may succeed with a negative result, which means that the claim is false, i.e., it *cannot* be true; and it may fail, in which case nothing is known about the claim, except that the supplied proof is inappropriate for the given claim.

For every element $`j`$ in the traversal from the $`i`$-th to the $`n`$-th element, the verifier checks that the corresponding component $`C`$ in the proof is formed as component $`C^j`$ should be formed; he then uses that component to compute what the $`j`$-th authenticator should be based on that component. Furthermore, since, during traversal, the authenticator of a traversed element is always used in the computation of the authenticator of the next traversed element, the verifier must check that the authenticators it computes in earlier steps of the verification process are consistent with those used in later verification steps. Finally, the proof must be checked for applicability, that is, it should match the claim it purportedly proves: if a membership proof claims to prove the membership claim $`i,n,d`$, then the datum in the first proof component should be $`d`$.

Algorithm 2 details how a single proof component is handled by the verification process. Algorithm 3 details the overall proof verification process, making use of the single-component proof verification from Algorithm 2.

Section 4 proves the security properties of AASLs, as described informally above. Namely, given an AASL digest known to verifiers who follow ProcessMembershipProof, the maintainer can only authenticate a single, unique membership claim per element to any of those verifiers, and he can determine that digest only after he has decided which claims he wishes to authenticate.

### 3.3 AASL Evolution

AASLs are useful in distributing the contents of fixed-forever data sequences, but can be invaluable in distributing the contents of data sequences that grow over time. In this section we address how AASLs can be used when the data sequences on which they are based evolve over time, especially when the verifier needs to access the sequence as it changes.

As new elements are appended to a data sequence that a maintainer keeps in an AASL, the AASL grows with new authenticators for the new elements. Whenever it is necessary to commit to newer versions of the AASL, the maintainer updates verifiers with the new AASL digest, i.e., the currently last AASL authenticator. In addition to the security guarantees described in the previous section, verifiers of a dynamic AASL must also be convinced that membership claims they verified in previous versions of the AASL remain true in the new version. Simply, the AASL maintainer must be unable to “rewrite history” to which he has committed in the past when he advances to a new version of the structure.

The preservation of AASL history is supported by an *advancement proof*, which accompanies the new digest in an AASL version update. An advancement proof is very similar to a membership proof. Intuitively, an advancement proof authenticates a membership claim about an authenticator, instead of a data value. We call this an *advancement claim*; it has the form “$`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$ is the $`i`$-th authenticator of the AASL whose $`n`$-th authenticator is $`T_{\mathrm{𝑛𝑒𝑤}}`$.”

Because advancement proofs are basically membership proofs, their construction is almost identical to membership proof construction, and their components have the same form. Advancement proof $`A^{i,n}`$ from the $`i`$-th to the $`n`$-th AASL authenticator is the same as membership proof $`E^{i,n,d}`$ without the first proof component. The first proof component of a membership proof computes the authenticator of the source element from the element datum and earlier AASL authenticators; this step is unnecessary when the source element authenticator is already known, as is the case with advancement. In the appendix, we outline the advancement proof construction algorithm (Algorithm 8). Figure 3 illustrates an example of advancement.

A verifier need remember three pieces of information for a given remote dynamic AASL: the latest AASL size $`n`$, the latest digest $`T`$, and a vector of earlier authenticators called a *basis*.

The basis vector is used to check consistency among the values of “reusable” authenticators included in different advancement proofs for the same AASL. Reusable authenticators are those AASL authenticators that may appear again in subsequent advancement proofs for the AASL. In the appendix, we illustrate an example of cheating that a malicious AASL maintainer can perpetrate when he is free to use inconsistent values for such reusable authenticators across advancements.

The structure of a basis vector resembles the binary representation of the AASL element index to which it corresponds. Specifically, basis $`B^i`$ for element $`i`$ is a vector of $`l`$ authenticators, where $`l=\mathrm{log}_2i`$ is the number of significant bits in the binary representation of $`i`$. The vector contains a special “empty” value in those positions in which the binary representation of $`i`$ contains a 0; the rest of the basis vector’s positions are occupied by authenticator values. These authenticator values correspond to the authenticators of the elements encountered in the traversal of the AASL from element 0 to element $`i`$. A traversal from 0 to $`i`$ proceeds in hops of decreasing length, starting with the largest power of 2 that is less than or equal to the destination. For example, for destination 9 (binary $`1001`$), the traversal from 0 first hops over $`8=2^3`$ elements to element 8, and then over one last element ($`2^0`$) to element 9 (see Figure 3). In the associated basis $`B^9`$, each non-zero “bit” position is annotated with the authenticator of the element from which the corresponding traversal hop launches, that is $`B^9=T^0,\mathrm{},\mathrm{},T^8`$. The basis $`B^0`$ for the $`0`$-th element (the initial value of the AASL) contains no values. Note that verifiers need not remember bases for a static AASLs, since the concept of advancement is meaningless in those.

Advancement proof verification occurs in two phases. First, the verifier checks whether the last digest he holds can appear in the AASL of the new digest. This check is almost identical to the verification of membership proofs, as described in Section 3.2, with the exception that what is verified is the membership of an authenticator, not a datum, in the AASL.

The second phase of checking an advancement proof deals with the basis. For every component in the proof, the authenticators included therein are checked against the values of any corresponding authenticators in the basis. If the component is consistent with remembered authenticator values, the basis is updated with any reusable authenticators seen first in the component. In the end, the basis is updated to reflect the newly acquired digest and advancement proof. Algorithm 4 provides the details, and is reminiscent of binary addition of positive integers.

ProcessAdvancementProofComponent is invoked once for every component in the advancement proof, after that component has been processed as a membership proof component. Algorithm 5 describes how the whole advancement proof verification proceeds.

A powerful use of AASLs is to determine the possible relative orders of insertion of different data in the maintainer’s tamper-evident data sequence. For example, let Molly by an AASL maintainer who claims that she did not learn value $`a`$ until after she had committed to value $`b`$. If verifier Van holds valid proofs of the membership claims $`i,j,a`$ and $`k,n,b`$ in Molly’s AASL, where $`i<j<k<n`$, then he can convince anyone who agrees on Molly’s $`j`$-th and $`n`$-th AASL authenticators that she is lying; Molly must have known value $`a`$ before her commitment to the $`j`$-th authenticator, and therefore before her commitment to $`b`$. Such temporal orderings can apply also to the data themselves, when those data contain a “freshness marker”, as is the case, for example, with signed statements containing a nonce. We detail how temporal ordering in a distributed log can be preserved in the Timeweave project .

In the next section, we prove the security properties of static AASLs, described in Section 3.2, and of dynamic AASLs, described in this section.

## 4 Security Analysis

In this section, we substantiate the security guarantees that AASLs offer to their users. Our goal is to secure the “commitment metaphor” of AASLs for verifiers who follow the membership and advancement proof verification procedures described in the previous section. Informally, this means that, first, diligent verifiers accept only a single, unique membership claim for every position in the data sequence on which an AASL is built; second, the data structure maintainer must decide which membership claims he can prove before he commits to the AASL by giving a digest to potential verifiers.

There are two distinct “roles” that a malicious adversary can take, with regards to an AASL. On one hand, the adversary may be an eavesdropper, who wishes to prove to a verifier a false membership claim of his choosing, for an AASL that he does not maintain. On the other hand, the adversary may be the AASL maintainer, who wishes either to defer choosing to which membership claim to commit until after he has apparently committed; or to prove conflicting membership claims to different verifiers (a membership claim $`i,n,d`$ conflicts with membership claim $`i,n^{},d^{}`$ if $`dd^{}`$). A malicious AASL maintainer is a more powerful adversary, because he can use arbitrary means to produce a digest before he has to relay it to potential verifiers. In what follows, we prove that AASLs are resistant to such attacks.

First, we show that an adversary is unable to construct convincing membership proofs (that he has not already seen) from a random AASL digest. This prevents a malicious eavesdropper from proving false membership claims. This also prevents a malicious AASL maintainer from committing to bogus digests and only deciding later what to prove to its unsuspecting verifiers. This property is similar to the pre-image resistance property of one-way functions.

###### Theorem 1 (AASL Membership Proof Pre-image Resistance).

Consider randomly chosen $`T`$ from the set of values of the hash function $`h`$. A computationally bound adversary cannot construct efficiently an AASL membership proof $`E^{i,n,d}`$ of any datum $`d`$ in position $`i`$ of an $`n`$-element AASL, for any $`i`$ and $`n`$ ($`0<in`$).

This result follows directly from the pre-image resistance of the hash function $`h`$.

Suppose the adversary can pick $`d`$, $`i`$ and $`n`$ and construct a membership proof $`E^{i,n,d}`$ of $`d`$ in position $`i`$, where $`T`$ is the given $`n`$-th authenticator, so that a verifier in possession of $`T`$ and following Algorithms 2 and 3 accepts the proof.

Given $`E^{i,n,d}`$, $`i`$, $`d`$, $`n`$ and $`T`$, Algorithm 3 executed by the verifier must fail to match the condition of Line 21. This means that in the last iteration of Line 8, $`T_{\mathrm{𝑐𝑢𝑟}}`$ returned from Algorithm 2 must be the random $`T`$ given to the adversary in the challenge. However, this means that, in Line 10 of Algorithm 2, the adversary must be able to find a pre-image of the pre-image resistant hash function $`h`$ for random image $`T`$. As a result, the hypothesis is false, and the adversary cannot produce a pre-image proof.∎

Theorem 1 only deals with cheap, unsophisticated malice. We proceed by addressing more sophisticated attacks that rely on the manipulation of corrupt AASLs by their maintainer or on the manipulation of observed proofs by an eavesdropper. There are three types of such attacks. First, the adversary can modify correct proofs to make them prove a false membership claim. Second, the maintainer can produce an AASL digest against which he can prove conflicting membership claims. Third, the maintainer can produce AASL digests and advancement proofs so as to prove conflicting membership claims against different versions of the AASL. We call the first two attacks second pre-image and collision, respectively. We call the third attack *evolutionary collision*, because it relies on subverting AASL evolution across versions.

In the next theorem, we prove that AASLs are resistant to the second type of attack, collision attacks (Theorem 2). AASLs are also resistant to the first type of attack, second pre-image, but the proof is a direct corollary of collision resistance, so we defer to the Appendix for it (Theorem 4).

###### Theorem 2 (AASL Membership Proof Collision Resistance).

A computationally bound adversary cannot construct two membership proofs $`E`$ and $`E^{}`$ verifiable against the same authenticator $`T`$ that authenticate different data values in the same sequence position.

Suppose that an adversary can, in fact, construct an efficient proof collision with proofs $`E`$ and $`E^{}`$ against common authenticator $`T`$. Let the two membership claims be $`t=i,n,d`$ and $`t^{}=i,n^{},d^{}`$, respectively ($`tt^{}`$). We trace ProcessMembershipProof backwards for both proofs $`E`$ and $`E^{}`$ in parallel, and reach a violation of the one-way properties of the hash function $`h`$.

Since both membership proofs can be verified against the same authenticator $`T`$ (which corresponds to a purported AASL’s $`n`$-th element in the case of $`E`$ and a different purported AASL’s $`n^{}`$-th element in the case of $`E^{}`$), in the last iteration of Line 8 of Algorithm 3, the invocation of Algorithm 2 must yield the same result $`T`$. In this last iteration, local variable $`j`$, the current element of the purported AASL, is equal to $`n`$ and $`n^{}`$, respectively.

However, this means that the adversary must be able to cause the verifier to invoke ProcessProofComponent with input $`(n,C)`$ and $`(n^{},C^{})`$ but receive the same result $`T`$ for both invocations. This is equivalent to passing to Equations 1 and 2 different $`i`$’s and $`T`$’s but calculating the same $`T^i`$. Intuitively, since the two equations use a one-way hash function, this should be impossible, i.e., ProcessProofComponent should only return the same result when invoked with identical inputs (we prove this rigorously in the Appendix, in Lemma 1). Therefore, in the last iteration ProcessProofComponent can only be invoked with $`(n,C)`$ and $`(n^{},C^{})`$ if $`n=n^{}`$. This restricts our assumed proof collision to support membership claims that only differ in the data values $`d`$ and $`d^{}`$.

Since both proofs authenticate position $`i`$ in an $`n`$-length AASL, Line 18 of ProcessMembershipProof imposes that the proof lengths must be equal to the same $`S`$. We prove inductively on the number of components in the two proofs that the two proofs must be identical. Induction follows the iterations of the loop in ProcessMembershipProof, Lines 717, from last iteration to first.

The base case for the last components $`C_S`$ and $`C_S^{}`$, respectively, follows directly from the collision resistance claim of ProcessProofComponent (Lemma 1 in the appendix) and from the supposition that both proofs are verifiable against the same authenticator $`T`$.

To establish the inductive step, consider the $`c`$-th proof components $`C_c`$ and $`C_c^{}`$ of the two membership proofs and assume they are equal. In the associated loop iteration in ProcessMembershipProof, Line 9 extracts the individual $`F`$ hash values of the $`c`$-th proof component; these are pairwise equal across the two respective proof components, since the components themselves are equal. The $`l`$-th of these hash values must be equal to the value of the respective $`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$, in Line 10. Since the $`l`$-th hash values are equal across proofs, the values of $`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$ are the same in the invocations of ProcessMembershipProof for the two membership proofs. But, in the previous loop iteration, in Line 13, $`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$ had been assigned the value of the respective $`T_{\mathrm{𝑐𝑢𝑟}}`$, computed using ProcessProofComponent in Line 8. Because of the collision resistance of ProcessProofComponent, this means that the inputs to the two respective invocations of ProcessProofComponent must also be identical in that loop iteration, which means that the $`(c1)`$-st element components $`C_{c1}`$ and $`C_{c1}^{}`$, respectively, are also identical. This proves the inductive step.

The induction applies to all but the first proof components in the two proofs, which are processed outside the loop of ProcessMembershipProof, in Lines 25. The same argument as the inductive step above can also be applied here: the $`T_{\mathrm{𝑐𝑢𝑟}}`$ returned by the respective invocations of ProcessProofComponent on the respective first proof components is the same $`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$ that ends up matching the identical $`l`$-th hash values of the respective, equal second proof components in Line 10 of the first loop iteration. Consequently, the respective first proof components must also be equal.

We have shown that two proofs $`E`$ and $`E^{}`$ authenticating the same element position $`i`$ against the same authenticator $`T`$ must be identical. But in ProcessMembershipProof, Line 25, the datum in the first component of a proof must match the one whose membership is verified. This contradicts the collision hypothesis, because the condition in Line 25 only succeeds if the algorithm is invoked with the data value that occupies the first proof component of the two proofs. $`d`$ and $`d^{}`$ cannot be different. ∎

Finally, we prove that AASLs are resistant to the third type of malicious manipulation attack, evolutionary collision, in Theorem 3. AASLs have the property of evolutionary collision-resistance if it is impossible for a computationally constrained adversary to produce advancements and membership proofs that authenticate two different data elements $`d`$ and $`d^{}d`$ for the same position $`i`$, in *any* version of the same AASL.

The definition is fairly broad in scope: it covers unrelated, mutually unknown verifiers $`𝒜`$ and $``$, who, through different sequences of advancements, arrive at the same digest $`T`$ for position $`n`$ of an AASL at different times; a malicious prover must be unable to convince $`𝒜`$ that $`d`$ is at position $`i`$ *and* convince $``$ that $`d^{}d`$ is at position $`i`$, even in different versions of the AASL in its separate evolution paths towards length $`n`$ and digest $`T`$.

Two advancements $`A^{i,j}`$ and $`A^{k,l}`$ are *connected* if the source element of the latter advancement is the destination element of the former, that is $`j=k`$. In what follows, we refer to a sequence of connected advancements as an *advancement sequence*, and the sequence of element positions traversed by that advancement sequence as an *advancement path*. In a similar manner, we define the sequence of element positions traversed by a membership proof as a *membership proof path*.

Our proof strategy for evolutionary collision resistance is to show that if two diligent verifiers have both accepted the same authenticator for the same AASL element, they must arrive at the same value for the authenticators of some other strategic AASL elements. Namely, we show that the two verifiers must “agree” on the authenticators they compute during the processing of the membership proofs with which the adversary seeks to fool them. From Theorem 2, if two verifiers agree on the authenticators computed during membership proof verification, they cannot be verifying the truth of conflicting membership claims.

To reduce authenticator agreement during the verification of independent advancement paths to authenticator agreement during the verification of independent membership proofs, we use two “authenticator agreement claims,” which we describe here informally, but prove rigorously in the Appendix.

First, if a membership proof verification and an advancement proof verification agree on the value of a particular AASL authenticator, then they must also agree on the authenticator values of all earlier AASL elements that the two paths—the advancement and the membership proof paths—have in common (see Lemma 7 in the appendix).

Second, if two runs of the advancement verification algorithm, applied to two different advancement sequences, agree on the value of a particular AASL authenticator, then they must also agree on the authenticator values of all earlier AASL elements that the two advancement paths have in common (see Lemma 8 in the appendix).

Equipped with these two claims, we now tackle evolutionary collision resistance.

###### Theorem 3 (Evolutionary collision resistance of AASL membership proofs.).

Consider two independent verifiers, $`𝒜`$ and $``$ and a computationally constrained adversary who conveys to them independently two advancement sequences. It is impossible for the adversary to produce advancement sequences and membership proofs in such a way that, first, the two verifiers, processing their respective advancement sequences, advance to element position $`n`$ with the same digest $`T`$; and, second, the two verifiers, processing separate membership proofs, authenticate, at any time, two conflicting membership claims.

It is already known, from Theorem 2, that conflicting membership claims cannot be authenticated against the *same* authenticator. Here we address the case where the two aspiring proofs authenticate different data values for the same AASL position against the authenticators of different versions of that AASL held by the two verifiers.

Let $`i`$ be the element position for whose data element the adversary wishes to fool two verifiers, $`𝒜`$ and $``$, and let $`j`$ and $`k`$ be the element positions against whose authenticators he wishes to produce the offending proofs for the verifiers; specifically, the adversary wishes to authenticate the membership claims $`i,j,d`$ to $`𝒜`$ and $`i,k,d^{}`$ to $``$. Without loss of generality, we assume $`j<k`$, so $`0<ij<kn`$.

Consider the abstract illustration of this setup in Figure 4. $`𝒜`$’s advancement path, the dark dashed line, does not necessarily go through element $`i`$, but it certainly touches element $`j`$ (since the adversary’s membership proof is authenticated to $`𝒜`$ against the $`j`$-th authenticator) and element $`n`$ (since the two verifiers agree on the value of the $`n`$-th authenticator). Similarly, $``$’s advancement path, the lighter dashed line, does not necessarily go through element $`i`$, but certainly touches elements $`k`$ and $`n`$. $`𝒜`$’s membership proof path (the thick dark line) starts from $`i`$ and ends at $`j`$, and $``$’s membership proof path (the lighter dark line) starts from $`i`$ and ends at $`k`$.

There is an element in $`[j,k]`$, element $`m`$, that is common among $`𝒜`$’s advancement path, $``$’s advancement path, and $``$’s membership proof path. This results from the fact that $``$’s membership proof and advancement paths both start before element $`j`$ and touch element $`k`$, and $`𝒜`$’s advancement path touches element $`j`$ and continues past element $`k`$. An intuitive reason for this is that $`𝒜`$’s advancement path can skip element $`k`$ only by “jumping” over it on a high-level linked list. Then, $``$’s membership proof and advancement paths must touch the jumping-off point of $`𝒜`$’s path, on their way to “lower” $`k`$. We prove this claim rigorously in Lemma 5, in the Appendix.

The two advancements agree on the value of $`T^n`$ after processing the respective advancement sequences in ProcessAdvancementProof, as per the theorem assumption. Because of the second authenticator agreement claim described above, this means that the two advancement algorithms also agree with each other on the value of $`T^m`$ after processing the corresponding part of their respective advancement sequences that brings them both to element $`m`$.

Because $``$’s membership proof verification, to succeed, must agree on the value of $`T^k`$ with the advancement verification algorithm, and because of the first authenticator agreement claim above, the membership proof verification algorithm on $``$ also agrees on the value of $`T^m`$ with $``$’s advancement verification algorithm after they both reach element $`m`$. Therefore, $``$’s membership proof verification algorithm and both advancement verification algorithms agree on the value of $`T^m`$ after reaching element $`m`$.

As above, there is an element in $`[i,j]`$, element $`r`$, that is common among $`𝒜`$’s advancement path, and $`𝒜`$ and $``$’s membership proof paths. This is because both membership proof paths start at $`i`$ and go to or past $`j`$, and $`𝒜`$’s advancement path starts before $`i`$ and touches element $`j`$ (since $`𝒜`$’s membership proof must be verifiable against the digest for element $`j`$, as per the theorem assumptions).

Because $`𝒜`$’s membership and advancement proof verification algorithms must agree on the value of $`T^j`$ for the membership proof to be accepted, and from the first authenticator agreement claim once more, the membership proof verification algorithm on $`𝒜`$ also agrees on the value of $`T^r`$ with $`𝒜`$’s advancement algorithm after reaching element $`r`$. From the same claim, since $``$’s membership and $`𝒜`$’s advancement proof verification algorithms agree on the value of $`T^m`$ after reaching element $`m`$, they must also agree on the value of $`T^r`$ after they reach element $`r`$. As a result, the two membership proof verification algorithms reach element $`r`$ with the same value for $`T^r`$.

However, this contradicts Theorem 2. If the adversary could manage to create two membership proofs starting with different data values on element $`i`$ and computing the same authenticator for element $`r`$, then he would be able to produce same-version collisions, as well, which Theorem 2 precludes. Therefore, the two data elements $`d`$ and $`d^{}`$ cannot be different.∎

## 5 Conclusions

In this work we describe, design and analyze the security of a tamper-evident, append-only data structure for maintaining secure data sequences in a loosely coupled distributed system, where individual system components may be mutually distrustful. The resulting data structure, called Authenticated Append-Only Skip List, allows its maintainers to produce one-way digests of the entire data sequence, which they can publish to others as a commitment on the contents and order of the sequence. The maintainer can produce efficiently succinct proofs that authenticate a particular datum in a particular position of the data sequence against a published digest.

AASLs are secure against tampering even by malicious structure maintainers. First, we have shown that a maintainer cannot “invent” and authenticate data elements for the AASL after he has committed to the structure. Second, he cannot equivocate by being able to prove conflicting facts about a particular position of the data sequence. This is the case, even when the data sequence grows with time and its maintainer publishes successive commitments at times of his own choosing.

We have implemented and extensively measured the performance and storage requirements of AASLs (we present a discussion of practical implementation considerations in the Appendix). We have used AASLs extensively in Timeweave , a system for preserving historic integrity in trust-free peer-to-peer systems.

## Appendix A The Need For Bases

We give here a simple example of how “forgetting” the values of reusable authenticators can allow a malicious maintainer to authenticate conflicting membership claims across AASL versions. Consider the authenticator for element 8, in Figure 5; it is used in all membership proofs verifiable against the digest of version 1 ending with element 9, since the authenticator for element 9 depends on a single partial authenticator, that for element 8. However, the authenticator for element 8 is also used in all membership proofs verifiable against the digest of version 2 ending with element 10, because the authenticator for element 10 also depends on the authenticator for element 8 for one of its partial authenticators.

A malicious maintainer can construct two authenticators $`T^8`$ and $`T_{}^{8}{}_{}{}^{}`$ for element 8 to accommodate two different elements $`d_8`$ and $`d_8^{}`$, respectively, using Equations 1 and 2, as follows:

$`T^8`$ $`=`$ $`h(h(80d_8T^7)h(81d_8T^6)`$
$`h(82d_8T^4)h(83d_8T^0))`$
$`T_{}^{8}{}_{}{}^{}`$ $`=`$ $`h(h(80d_8^{}T^7)h(81d_8^{}T^6)`$
$`h(82d_8^{}T^4)h(81d_8^{}T^0))`$
He can then construct a single authenticator $`T^9`$ for element 9 based on $`T_{}^{8}{}_{}{}^{}`$:

$$T^9=h(h(90d_9T_{}^{8}{}_{}{}^{}))$$

and use it to commit to version 1, which ends at element 9, with this $`T^9`$ and the first advancement proof $`A^{0,9}`$:

$$A^{0,9}=d_8^{};T^7,T^6,T^4,T^0,d_9;T_{}^{8}{}_{}{}^{}$$

The digest $`T^9`$ for version 1 authenticates $`d_8^{}`$ in position 8 with the following membership proof:

$$E^{8,9,d_8^{}}=d_8^{};T^7,T^6,T^4,T^0,d_9;T_{}^{8}{}_{}{}^{}$$

Now the malicious maintainer can construct a corrupt authenticator $`T^{10}`$ for the 10-th element, by mixing $`T^8`$ from the AASL that contains $`d_8`$ in position 8, and $`T^9`$, from the AASL that contains $`d_8^{}`$ in position 8:

$$T^{10}=h(h(100d_{10}T^9)h(101d_{10}T^8))$$

and publish it as the digest for version 2, with the corresponding advancement proof

$$A^{9,10}=d_{10};T^9,T^8$$

In conflict to version 1, version 2 authenticates element $`d_8`$ in position 8, with the following membership proof:

$$E^{8,10,d_8}=d_8;T^7,T^6,T^4,T^0,d_{10};T^9,T^8$$

The problem lies in the verifier’s forgetting that the value for the purported authenticator of element 8 was $`T_{}^{8}{}_{}{}^{}`$ in the first advancement $`A^{0,9}`$ to version 1, whereas the same authenticator has the value $`T^8T_{}^{8}{}_{}{}^{}`$ in the second advancement $`A^{9,10}`$ from version 1 to version 2. To avoid this problem, verifiers keep track of reusable authenticators, such as $`T^8`$ in the example above. With every advancement received, a verifier checks that any reused authenticators in the advancement agree with those known so far in the basis for the same AASL; then, the verifier updates that basis with any new reusable authenticators included in the newly received advancement.

## Appendix B Algorithms

Here we describe the proof construction algorithms in detail. They do not participate in any of the security proofs, since the security guarantees offered by AASLs have to do with what claims diligent verifiers accept.

First, Algorithm 6, describes how individual proof components are constructed. These proof components participate in both membership and advancement proofs.

Then, we proceed by describing how a whole membership proof (Algorithm 7) and a whole advancement proof (Algorithm 8) are constructed.

## Appendix C Proofs of Additional Claims

In this appendix, we prove the intuitive claims we have used in the security analysis of the paper.

First, we prove a claim necessary for the collision-resistance theorem (Theorem 2), showing that ProcessProofComponent is collision-resistant.

###### Lemma 1 (Different proof components cannot yield the same authenticator).

Consider two independent invocations of ProcessProofComponent with inputs $`(j,C)`$ and $`(j^{},C^{})`$ respectively. If the two invocations yield the same result $`T`$, then the inputs must be identical ($`j=j^{}`$ and $`C=C^{}`$).

In both invocations, Line 10 must yield the same result $`T`$. Since $`h`$ is collision resistant, the input $`P`$ to the hash function must be the same across invocations.

Input $`P`$ is constructed in the loop of Lines 6 \- 9, by concatenating a hash result, produced in Line 7, to the running $`P`$ in every iteration. To ensure that $`P`$ is the same in both invocations, the loop must be iterated the same number of times (so as to construct $`P`$’s of the same bit length), and all appended $`L`$-elements in the respective invocations must be identical.

At every iteration of the loop, Line 7 computes the current $`L`$ by hashing together the index $`j`$ of the assumed AASL element to which the current proof component should correspond, the iteration number $`l`$ (which is, by default, the same across invocations), the purported data value of the $`j`$-th AASL element, and the $`l`$-th authenticator value contained in the proof component. Again, due to the collision resistance of the hash function $`h`$, the $`L`$ values computed in the two invocations can be identical only if the input index $`j`$ is equal across invocations, and, similarly, if all parts of the input proof component $`C`$ are respectively identical. This means that two invocations of ProcessProofComponent for inputs $`(j,C)`$ and $`(j^{},C^{})`$ can yield the same $`T`$ if and only if $`j=j^{}`$ and $`C=C^{}`$. ∎

As mentioned in the paper, second pre-image resistance is a corollary of the collision resistance theorem.

###### Theorem 4 (AASL Membership Proof Second Pre-image Resistance).

Consider a membership proof $`E^{i,n,d}`$ that verifies against authenticator $`T`$ the membership claim $`i,n,d`$, where $`0<in`$, and $`d`$ is a data value. A computationally bound adversary cannot construct efficiently a different membership proof $`E^{}`$ verifiable against the same authenticator $`T`$ that authenticates a conflicting membership claim.

Suppose that an adversary can, in fact, construct efficiently such a second proof $`E^{}`$ for the membership claim $`t^{}=i,n^{},d^{}`$, where $`nn^{}`$ or $`dd^{}`$. This means that he has an efficient way to construct collisions as well: he creates a legitimate AASL, picks a random position and constructs a membership proof $`E`$ for it, then constructs another membership proof $`E^{}`$ for a different data element in the same position. The two proofs would be a collision as defined in Theorem 2. However, we have already shown that collisions are not possible, so the proof machinery must also be second pre-image resistant. ∎

Before we can prove the authenticator agreement claims, we must first establish that skip list traversal, as described by SingleHopTraversalLevel, follows the rules of the skip list, specifically that both source and destination of an $`l`$-level hop are divisible by $`2^l`$.

###### Lemma 2 (Correctness of skip list traversal).

In both advancement paths and membership proof paths, as accepted by the verification algorithms ProcessAdvancementProof and ProcessMembershipProof, respectively, every hop from element $`i`$ to element $`j`$ has length $`2^l`$, such that $`2^l`$ divides both $`i`$ and $`j`$.

We prove this claim informally, by inspection of the corresponding algorithms.

The path of an advancement is verified by ProcessAdvancementProof. The verified path starts with the source element $`i`$, given in the input parameters to the algorithm, and proceeds by increments of $`2^l`$ in Line 7 inside the loop. The exponent $`l`$ of the path length is determined by SingleHopTraversalLevel, given the current element $`j`$ and the ultimate destination $`n`$ of the advancement.

Similarly, a membership proof path is verified by ProcessMembershipProof. The path starts with the source element $`i`$ where the element to be authenticated is claimed to reside in the input parameters. Then the path proceeds by increments of $`2^l`$ in Line 5 for the first hop and Line 15 for all subsequent hops. Both lines receive their $`l`$ from the result of SingleHopTraversalLevel, given the current element $`j`$ ($`i`$ in the case of Line 5) and the ultimate destination $`n`$ of the membership proof.

For both types of paths, it suffices to show that the $`l`$ computed by SingleHopTraversalLevel is such that $`2^l`$ divides $`j`$. Then it must also divide the destination $`j+2^l`$. SingleHopTraversalLevel uses as a fall-through selection of $`l`$ the value $`0`$, which is consistent with the claim, since $`2^0=1`$ divides all elements. When the loop in the algorithm is executed at least once, the variable $`L`$ returned is always one that has passed the conditional check of the loop, that is, $`2^L`$ divides the source element $`j`$ (called $`i`$ in SingleHopTraversalLevel).

We have shown that membership proof paths, and paths of single advancements satisfy the claim. For advancement paths of multiple advancements the claim also holds, since connected advancements share an element: the earlier one ends where the later one begins. This means there are no additional hops in the resulting advancement path to those included in the individual advancements, which already satisfy the claim as we showed above. ∎

We continue by analyzing the concept of the basis. We use the two lemmata below in authenticator agreement.

###### Lemma 3 (Correspondence of bases to binary representations).

Given the $`l`$-th AASL element, if the binary representation $`b_kb_{k1}\mathrm{}b_0`$ of $`l`$ has a $`0`$ in bit position $`i`$, then the corresponding basis vector $`B^l`$ has an empty value in vector position $`i`$, and a non-empty value otherwise.

Bases are changed only via ProcessAdvancementProofComponent, so we concentrate on that to prove this lemma. We prove the lemma by induction on all AASL elements, and for every element on all hop lengths leading to that element.

By definition, the base case holds, since $`B^0`$ has only empty values, just as the binary representation of $`0`$ has only $`0`$’s.

We assume that the lemma holds for all bases up to that of element $`k1`$: that is, the basis vector for AASL element index $`mk1`$ has an empty value in position $`l`$ if and only if the binary representation of $`m`$ has a 0 in bit position $`l`$. We show that this must also hold for the basis $`B^k`$ that corresponds to element index $`k`$.

ProcessAdvancementProofComponent yields the basis $`B^k`$ for element index $`k`$ whenever its input contains the source element index $`j`$ and the hop level $`l`$ and $`j=k2^l`$. ProcessAdvancementProof expects the outcome of such an invocation to be $`B^k=B^{j+2^l}`$ in Line 6.

There are $`f_k+1`$ ways in which ProcessAdvancementProofComponent can be invoked to return $`B^k`$, one for each different level $`l`$ at which an advancement path reaches element $`k`$. This is because, as shown in Lemma 2, Line 5 of ProcessAdvancementProof can only return $`l`$s such that the source (and consequently the destination) of the level-$`l`$ hop (computed in Line 7) is divisible by $`2^l`$. Since $`f_k`$ is the exponent of the largest power of 2 that divides $`k`$, as per Equation 3, there are $`f_k+1`$ invocations of Line 6 that make variable $`j`$ in Line 7 to take the value $`k`$.

We consider invocations of ProcessAdvancementProofComponent for all $`l`$ such that $`0lf_k`$, where $`j=k2^l`$ and $`B=B^j`$. All of the possible input bases $`B=B^j`$ correspond to element indices $`j`$ that precede $`k`$, and as a result are covered by the inductive hypothesis, above.

In the “then” branch of the conditional (Line 7), the previous AASL element index $`j`$ had a 0 in the $`l`$-th bit position of its binary representation. By turning that 0 to a 1 via assigning a non-empty value to the $`l`$-th basis vector element, we add $`2^l`$ to the binary representation of $`j=k2^l`$, and we therefore reach the binary representation for $`k`$.

If, instead, the “else” branch of the conditional is executed, the previous basis vector must have had a non-empty value in its $`l`$-th position, and, as a result, the binary representation of $`j`$ must have had a 1 in the $`l`$-th bit position of its binary representation. The algorithm places empty values in all vector positions from the $`l`$-th one upwards that contain non-empty values and sets to a non-empty value (the value of the $`\mathrm{𝑐𝑎𝑟𝑟𝑦}`$ variable) the first vector position $`m>l`$ that it finds containing an empty value. This translates into zeroing out all 1 bits in the binary representation of $`j`$ from the $`l`$-th to the $`m1`$-st bit positions, and placing a 1 in the formerly 0 $`m`$-th bit. Zeroing out a 1 bit in position $`p`$ means subtraction by $`2^p`$, so the result of the operation is to add $`(2^m_{p=l}^{m1}2^p=2^l)`$ to the binary representation of $`j=k2^l`$, which again yields the binary representation of $`k`$.

This proves the inductive step, and as a result the lemma holds for all bases computed by ProcessAdvancementProofComponent.∎

###### Lemma 4 (Survival of authenticators in a basis).

Consider a portion of an advancement path that goes through elements $`e`$ and $`e^{}=e+2^l`$, for non-negative integers $`e`$ and $`l`$. If $`T^e`$ is the authenticator for element $`e`$ computed by the advancement processing algorithm after reaching that element, then the value for $`T^e`$ is preserved by the algorithm in the basis, and still regarded as that of $`T^e`$ during processing of element $`e^{}`$.

Informally, this lemma claims that while processing intermediate hops between two elements that are successive multiples of $`2^l`$, the advancement verification algorithm remembers the authenticator of the first multiple, and uses its value to check the correctness of the processed advancement component when it reaches the second multiple.

Since both $`e`$ and $`e^{}`$ are divisible by $`2^l`$, then in the binary representation of $`e`$, bits $`0`$ through at least $`l1`$ are all 0. Because of Lemma 3, all basis elements in positions $`0`$ through at least $`l1`$ must be the empty value.

#### Case 1: $`e`$ and $`e^{}`$ are consecutive elements in the advancement path.

The advancement path takes a single hop at level $`l`$ from $`e`$ to $`e^{}`$. To process this advancement hop, the verifier executes an iteration of the loop in ProcessAdvancementProof where the local variable $`j`$ is equal to $`e`$ and the level returned in Line 5 is $`l`$.

The value for $`T^e`$ was either passed as input $`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$ to the algorithm, if this hop is the first in its advancement, or computed and stored in $`T_{\mathrm{𝑐𝑢𝑟}}`$ in the previous iteration of the loop in Line 8, and then copied to $`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$ in Line 13.

Trivially, therefore, the value of $`T_{\mathrm{𝑝𝑟𝑒𝑣}}`$, which the algorithm regards as $`T^e`$ during the loop iteration that starts with $`j=e`$, is passed as input to ProcessAdvancementProofComponent in Line 6 and checked for consistency in Line 10. This proves the claim for this case.

#### Case 2: $`e`$ and $`e^{}`$ are not consecutive elements in the advancement path.

Leaving element $`e`$, the advancement path takes a hop at level $`p`$, where $`p<l`$. Therefore, during the invocation of ProcessAdvancementProofComponent that takes as input the basis of element $`e`$, Line 7 is executed. What the algorithm regards at the time as $`T^e`$ (passed to it in its input parameters) is placed in the $`p`$-th position of the basis. Since all vector positions up to position $`l1`$ contained the empty value before this modification, $`T^e`$ is the last (indeed, the only) non-empty value in the newly created basis vector in positions 0 through $`l1`$.

In what remains of the advancement path to $`e^{}`$, the value for $`T^e`$ is always the last non-empty element in vector positions 0 through $`l1`$. This is the case right after advancement element $`e`$ has been processed, as shown above. We use this fact as the base case of an inductive argument.

Assume that $`T^e`$ is the last non-empty value in the first $`l`$ elements of the basis vector, and it occupies position $`q<l`$. From Lemma 3, the current element index is only divisible, at most, by powers of 2 up to $`2^q`$. This means that the next advancement hop, as determined by SingleHopTraversalLevel in Line 5 of ProcessAdvancementProof can only proceed by a hop of length that is a power of 2 up to $`2^q`$. This only changes the $`q+1`$ least significant bits of the element’s binary representation. Therefore, even if the “else” branch of the conditional in ProcessAdvancementProofComponent is executed, the value of $`T^e`$ is the last non-empty value before the $`l`$-th element of the basis, and as a result is pushed to a higher element position of the basis.

The only advancement hop that can eliminate $`T^e`$ from the first $`l`$ elements of the basis is the last one, leading to $`e^{}`$. Then value $`T^e`$ occupies position $`(l1)`$ of the basis: we showed above there cannot be any non-empty values between itself and position $`l`$, and the value must be eliminated from the first $`l`$ positions of the basis, since $`e^{}`$ is divisible by $`2^l`$ and has no 1’s in its binary representation up to and including bit position $`l1`$.

This means that when element $`e^{}`$ is reached by the advancement proof verification algorithm, the value for $`T^e`$ is in the basis, in position $`l1`$. This is the basis vector position in which the algorithm expects to find the value for $`T^e`$ during consistency checking in Line 12 of ProcessAdvancementProofComponent. Indeed, the last advancement proof component that is processed is the one corresponding to element index $`e^{}`$, which has in the $`l`$-th position among its included authenticators what the prover sent as $`T^{e^{}2^l}=T^e`$. Note that when Line 12 is executed and eliminates value $`T^e`$ from basis vector position $`l1`$, the local loop variable $`c`$ is equal to $`l1`$.

Consequently, we have shown that the claim holds for both possible cases of advancement paths between $`e`$ and $`e^{}`$, which proves the lemma. ∎

The proofs for evolutionary collision resistance and for the authenticator agreement lemmata rely heavily on common elements in membership or advancement proof paths. We proceed with two lemmata that examine the arrangement of common elements of parallel paths. First, we look at common elements of parallel paths, regardless of the path type (advancement or membership proof). Then, we show that between two common elements in a membership proof and advancement path, the advancement path always takes shorter hops than the membership proof path.

###### Lemma 5 (Common elements of parallel paths).

Let $`i`$ and $`j`$ be positive integers, such that $`i<j`$.

1. Consider a path $`A`$ that includes element $`i`$ and continues to $`j`$ or past it. There is at least one element in $`[i,j]`$ that is shared by $`A`$ and every path that starts at or before $`i`$ and includes element $`j`$. The last element on path $`A`$ before $`j`$ (or $`j`$ if it is in path $`A`$) is such an element.
2. (The mirror case) Consider a path $`A`$ that starts at or before element $`i`$ and includes element $`j`$. There is at least one element in $`[i,j]`$ that is shared by $`A`$ and every path that includes element $`i`$ and continues to element $`j`$ or past it. The first element on $`A`$ after $`i`$ (or $`i`$ if it is in path $`A`$) is such an element.

We prove only the first part of the lemma. The proof for the second part of the lemma is a trivial “mirror image” of the proof for the first part.

If path $`A`$ contains element $`j`$, then we are trivially done.

Now, assume that path $`A`$ does not contain element $`j`$, and consider Figure 6. Path $`A`$ must be able to overshoot element $`j`$ on its way from $`i`$ to beyond $`j`$. For this to happen, path $`A`$ must advance from its last element $`m`$ before $`j`$ (i.e., $`im<j`$) past $`j`$, by a hop of level $`l`$ and length $`2^l`$, where $`2^l`$ divides $`m`$, and $`j`$ must not participate in any linked list at level $`l`$ or higher (i.e., $`2^l`$ does not divide $`j`$). The end point of this hop is $`m+2^l>j`$.

Suppose $`m`$ is not the single common element among path $`A`$ and every path that starts at or before $`i`$ and includes element $`j`$. Then there must be a path $`B^{}`$ that manages to overshoot element $`m`$ on its way to $`j`$. For this to happen, path $`B^{}`$ must advance to its first element $`n`$ after $`m`$ (i.e., $`m<nj`$) past $`m`$, by a hop of level $`l^{}`$ and length $`2^l^{}`$, and element $`m`$ must not participate in any linked list at level $`l^{}`$ or higher (i.e., $`2^l^{}`$ does not divide $`m`$). This means that $`l^{}>l`$, since $`m`$ is divisible by $`2^l`$. If $`n`$ participates in the linked list at level $`l^{}`$, it must be divisible by $`2^l^{}`$ and, as a result, also by $`2^l`$. However, that is impossible, since $`m<nj<m+2^l`$.

Therefore, every path $`B`$ that starts at or before $`i`$ and includes $`j`$ must include element $`m`$, which also belongs to path $`A`$.∎

###### Lemma 6 (Common elements of proof and advancement paths).

If a membership proof path has two common elements $`e`$ and $`e^{}`$ with an advancement path, then every element in the proof path between $`e`$ and $`e^{}`$ is also shared by that advancement path.

Consider a membership proof path and an advancement path that share elements $`e`$ and $`e>e^{}`$, but share no other elements between them.

To prove the lemma, we suppose that none of the proof elements between $`e`$ and $`e^{}`$ belong to the advancement path (see Figure 7). We show below that this hypothesis leads to a contradiction.

After common element $`e`$, the two paths diverge. The membership proof takes a hop at level $`l`$, whereas the advancement takes a hop at a lower level $`l^{}<l`$. The advancement cannot take a hop at a level higher than that of the proof; if such a hop were available that did not overshoot $`e^{}`$, then the proof would have also taken it (see SingleHopTraversalLevel). Furthermore, the advancement cannot take a hop at the same level $`l`$ as the proof, because that would make the two paths identical between $`e`$ and $`e^{}`$, which contradicts the hypothesis that intermediate membership proof elements do not belong to the advancement path. We call the next element on the advancement path $`p=e+2^l^{}`$, and the next element on the membership proof path $`q=e+2^l`$.

Because of Lemma 5, there must be a common element between the two paths in $`[p,q]`$. However, this contradicts the hypothesis that the two paths share no elements between $`e`$ and $`e^{}`$. As a result, all membership proof elements between $`e`$ and $`e^{}`$ must also belong to the advancement path. ∎

Finally, we prove the two authenticator agreement lemmata.

###### Lemma 7 (Authenticator agreement between a membership proof and an advancement proof verification).

If the membership proof verification Algorithm 3 and the advancement verification Algorithm 5, given an advancement sequence and a membership proof, respectively, agree on the value of authenticator $`T^n`$ for element $`n`$ during their independent executions, then they also agree on the authenticator value $`T^e`$ of every other earlier element $`e`$ ($`e<n`$) that the advancement path and membership proof path have in common.

Let $`k`$ be the number of common elements in the two paths up to element $`n`$, and $`n=e_1>e_2>\mathrm{}>e_k`$ the common elements, from last to first. We prove the lemma using induction on the common elements $`e_i`$, by following backwards Algorithms 3 and 5.

The base case for $`e_1`$ holds from the lemma assumption, since $`e_1=n`$.

For the inductive step, we assume that the two algorithms agree on the value of $`T^{e_i}`$. We must show that the two algorithms also agree on the value of $`T^{e_{i+1}}`$ when they process the corresponding proof component to reach element $`e_{i+1}`$.

When the two algorithms process their respective proof component to compute the common $`T^{e_i}`$ they use Equations 1 and 2. Specifically, they both compute

$`T^{e_i}`$ $`=`$ $`h(\mathrm{}L_{e_i}^l\mathrm{})`$
$`=`$ $`h(\mathrm{}\stackrel{L_{e_i}^l}{\stackrel{}{h(e_ild_iT^{e_i2^l})}}\mathrm{})`$
by invoking ProcessProofComponent in Line 8 of ProcessMembershipProof and Line 8 of ProcessAdvancementProof. Since $`h`$ is collision resistant, when the two algorithms process element $`e_i`$ they must agree on the values of all $`T^{e_i2^l}`$, for every level $`l`$ of linked lists in which element $`e_i`$ participates.

Consider what happens in the two paths between elements $`e_{i+1}`$ and $`e_i`$. Common element $`e_{i+1}`$ must be the membership proof element immediately preceding $`e_i`$, because of Lemma 6. Therefore, because of Lemma 2, $`e_i=e_{i+1}+2^l^{}`$ for some non-negative $`l^{}`$. The advancement hop that arrives at $`e_i`$ must be at the same level $`l^{}`$ or lower level. This is because a higher-level $`l^{\prime \prime }>l^{}`$ hop would have taken the advancement path from $`e_{i+1}`$ to element $`e_{i+1}+2^{l^{\prime \prime }}`$, which must lie beyond $`e_i=e_{i+1}+2^l^{}`$. Therefore, the advancement path between $`e_{i+1}`$ and $`e_i`$ follows either a single hop of level $`l^{}`$ and length $`2^l^{}`$, which is identical to that followed by the membership proof path, or a sequence of shorter hops at levels lower then $`l^{}`$.

#### Case 1: The advancement path is identical to the membership proof path.

The value for $`T^{e_{i+1}}`$ used to compute $`T^{e_i}`$ in the two algorithms while processing element $`e_i`$ is the same as that known by the algorithms while processing the previous element $`e_{i+1}`$, from Line 10 of ProcessMembershipProof and Line 10 of ProcessAdvancementProof, which proves the inductive step.

#### Case 2: The advancement path is not identical to the membership proof path.

We must establish that the value of $`T^{e_{i+1}}`$ that ProcessAdvancementProof computes while processing element $`e_{i+1}`$ is the same as that known while processing the next common element $`e_i`$. This follows from Lemma 4, since elements $`e_{i+1}`$ and $`e_i`$ are successive multiples of $`2^l^{}`$.

As a result, the value for $`T^{e_{i+1}}`$ produced by the advancement verification algorithm while processing element $`e_{i+1}`$ is the same as the value for $`T^{e_{i+1}}`$ used by the membership proof verification algorithm while processing element $`e_i`$. This is the same value as that for $`T^{e_{i+1}}`$ produced by the proof verification algorithm while processing element $`e_{i+1}`$, as seen in Line 10 of ProcessMembershipProof. This proves the inductive step.

The inductive step holds for both possible cases of advancement paths, and as a result, the inductive argument holds, proving the lemma. ∎

###### Lemma 8 (Authenticator agreement between two independent advancement paths).

If two invocations of the advancement verification Algorithm 5, given two advancement sequences, respectively, agree on the value of authenticator $`T^n`$ computed after reaching element $`n`$ during their independent executions, then they also agree on the authenticator value $`T^e`$ computed after reaching every other earlier element $`e`$ ($`e<n`$) that the advancement paths have in common.

This proof is similar in structure to that of the preceding lemma.

Let $`k`$ be the number of common elements in the two paths up to element $`n`$, and $`n=e_1>e_2>\mathrm{}>e_k`$ the actual elements, from last to first. We prove the lemma using induction on the common elements $`e_i`$, by following backwards two invocations of Algorithm 5.

The base case for $`e_1`$ holds from the lemma assumption, since $`e_1=n`$.

For the inductive step, we assume that the two algorithms agree on the value of $`T^{e_i}`$, after reaching element $`e_i`$. We must show that the two algorithms also agree on the value of $`T^{e_{i+1}}`$ after they reach element $`e_{i+1}`$.

When the two algorithms process their respective proof component to compute the common $`T^{e_i}`$ they use Equations 1 and 2. Specifically, they both compute

$`T^{e_i}`$ $`=`$ $`h(\mathrm{}L_{e_i}^l\mathrm{})`$
$`=`$ $`h(\mathrm{}\stackrel{L_{e_i}^l}{\stackrel{}{h(e_ild_iT^{e_i2^l})}}\mathrm{})`$
by invoking ProcessProofComponent in Line 8 of ProcessAdvancementProof. Since $`h`$ is collision resistant, when the two algorithm runs process element $`e_i`$ they must agree on the values of all $`T^{e_i2^l}`$, for every level $`l`$ of linked lists in which element $`e_i`$ participates.

Consider what happens in the two paths between elements $`e_{i+1}`$ and $`e_i`$.

#### Case 1: Element $`e_{i+1}`$ immediately precedes element $`e_i`$ in both paths.

Both paths advance from $`e_{i+1}`$ to $`e_i`$ in a single hop at level $`l`$, of length $`2^l`$.

As shown above, the two runs agree on the value of $`T^{e_i2^l}`$. Since $`e_i2^l=e_{i+1}`$, and from Line 10 of ProcessAdvancementProof, the value for $`T^{e_{i+1}}`$ while processing element $`e_i`$ must be identical to the value that the two runs compute for $`T^{e_{i+1}}`$ after processing the advancement at the previous element $`e_{i+1}`$.

#### Case 2: Element $`e_{i+1}`$ does not immediately precede element $`e_i`$ in at least one of the paths.

The two paths merge from two different immediate sources to element $`e_i`$ on their way from element $`e_{i+1}`$. Because of Lemma 2, for some non-negative integers $`0l<l^{}`$ without loss of generality, the element immediately preceding $`e_i`$ on the first path is $`p=e_i2^l`$, and on the second it is $`q=e_i2^l^{}`$. Note that $`q<p`$.

Lemma 5 guarantees that there must be a common element between the two paths in $`[q,p]`$, since the first path starts at or before $`q`$ and reaches $`p`$ on its way to $`e_i`$, whereas the second path starts at $`q`$ and goes past $`p`$ on its way to $`e_i`$. Since $`q`$ is the element immediately preceding $`e_i`$ on the second path, it must be the common element that Lemma 5 anticipates. Therefore, $`e_{i+1}=q`$.

Because of Lemma 4, both runs of the advancement verification algorithm agree on the value of $`T^{e_{i+1}}`$ after processing element $`e_{i+1}`$ and after reaching element $`e_i`$.

The inductive step holds for both possible cases of advancement path commonalities and, as a result, the inductive argument holds, proving the lemma. ∎

## Appendix D Implementation

We implement authenticated append-only skip lists using Java. We focus here on a disk-based implementation, since it allows much larger data sequences than any memory-only implementation can, as well as persistence in the face of machine reboots.

An AASL is stored on disk as a linear file that consists of a *preamble* and a sequence of *element entries*, one for each element currently contained in the AASL. An element entry consists of a data section and an authenticator section.

The data section primarily holds the datum stored in the associated AASL element. This is the datum that participates in the computation of authenticators, as per Equations 1 and 2. We call this the *sensitive datum*. Every element in a single AASL has sensitive data of a constant length, which is set when the AASL is initially created.

The data section of element entries may also contain an *insensitive datum*. This is also a fixed-length bit string. However, it does not participate in authenticator computations. Insensitive data may be useful information to the maintainer, collocated with the sensitive data for access efficiency, that need not be authenticated to remote verifiers of the AASL. Since insensitive data do not participate in authenticator computations, they can be changed at will by the AASL maintainer unobtrusively to AASL verifiers.

The authenticator section of an element entry contains the authenticator computed for that element.

The preamble of the AASL file contains the lengths in bytes of the sensitive and insensitive data in element entries, and the element position of the last incorporated element into the AASL.

An empty AASL contains exactly one element entry: the entry for element $`0`$, which is a special entry. Element entry $`0`$ has inconsequential sensitive and insensitive data. Only its authenticator is meaningful. This authenticator is a value from the result domain of the hash function used, and it is agreed upon among all users of the AASL in advance.

Our implementation has a deviation from the abstract design of AASLs described in Section 3. We slightly modify how authenticators are computed for elements of odd indices, which only participate in a single linked list. For such elements we skip the outer hash operation described in Equation 2, from concatenated partial authenticators to the actual authenticator of the element. Since odd elements have only a single partial authenticator, that single partial authenticator is sufficient to ensure the collision resistance of AASL digests, and can serve as the actual authenticator of the element. Furthermore, since half of the element indices are odd, this savings in computation can be significant compared to the overall computation required by AASL operations.

Another implementation optimization in the implemented AASLs deals with authenticator redundancy in membership and advancement proofs. In the idealized algorithms ProcessMembershipProof and ProcessAdvancementProof, authenticators computed for the previous proof component are compared against the corresponding authenticator included in the next proof component (see Lines 10 and 10, respectively). Since we compute these authenticators in the process of verifying membership and advancement proofs anyway, there is no need also to include them in the proofs themselves. Consequently, we skip such authenticators in the AASL implementation.

```
$Id: PODC2003.tex,v 1.23 2003/02/07 01:11:25 maniatis Exp $

```