Title: Skip List Based Authentication
1Skip List Based Authentication
2Outline
- Introduction of Skip List
- Comparison with Balanced Tree
- Commutative Hashing
- Skip List Based Authentication
3Introduction of Skip List
- Proposed by William Pugh (University of
Maryland) - Commnu. ACM, 33(6)668-676,1990
- A probabilistic alternative to balanced trees
- Simple and efficient
- probabilistic balancing compared to strictly
enforced balancing - Balanced trees, such as B tree, is proposed in
1970s.
4Skip List Example
5Skip List Construction
6Skip List Construction
- Node level of pointer in one node
- Determined at creation time and never change
- According to size rules, there are two kinds of
skip list - Random of nodes between two adjacent node with
equal level is probability based - Deterministic of nodes between two adjacent
node with equal level is size rule based, i.e.
1,3
7Skip List-Query
- Find (k)
- Hop forward
- within the same level from min to max
- until maximal element not greater than k
- Drop down
- One by one
- Example
8Skip List-Insert and Delete
- Two steps query, insert (delete)
- Compared to query, insert has two different
steps - Climb up
- Move backward
- A vector update is maintained, so that when the
search is complete, updatei contains a pointer
to the rightmost node of level i or one that is
to the left of the location of the insertion
(deletion)
9Skip List-Query and Insert
return
10Comparison with Balanced Tree
- Improve query performance at the cost of
additional pointer (space cost) - Implementation of skip List is simple, while
implementation of B-tree is recursive. The
complexity of implementation is negatively
related to degree of optimization. For example. - Skip List can adapt to arbitrary input sequence,
while B-tree is inefficient when input is ordered.
11Space cost
A fraction p of nodes with level i pointers also
have level i1 pointers
return
12Time comparison
- 216 elements with integer keys
- The value in parenthesis show the results
relative to the skip list time. - Time complexity is O(logn). (Constant factor)
- Algorithm B is twice as fast as A, which means
in the time A takes to process - a query on a data set of size n, B can process
a query on a data set of size n2.
return
13Why not Skip List? (My opinion)
- B-tree is at most 3 levels in most cases (a node
is exactly a page), which makes B-tree I/O
efficient. - With the increasing of node levels, Skip list is
inefficient in I/O cost. So skip list is suitable
for in-memory data set.
14Commutative Hashing
- Collision resistant hash h(x,y)
- Hard to find (c,d)ltgt(a,b), such that
- h(c,d)h(a,b)
- commutative h(x,y) h(y,x)
- Hard to find (c,d)ltgt(a,b), (d,c)ltgt(a,b), such
that h(c,d)h(a,b) - A candidate construction
- h(x,y)f(minx,y, maxx,y)
15Skip List Based Authentication
- Proposed by Michael T. Goodrich (Johns Hopkins
University), Roberto Tamassia (Brown University) - In Proc. 2001 DARPA Information Survivability
Conference and Exposition
16Skip List Based Authentication
- Authentication dictionary includes
- A skip list data structure storing the items of
S. - A collection of values f (v) that label each
node v of the skip list, computed accumulating
the elements of S with the hash function h, for
example. - A statement signed by the source consisting of
the timestamp of the most recent label f (s) of
the start node of the skip list.
17Skip List Based Authentication
- Calculation of f (v)
- w right(v), u down(v). If right(v) null,
then f (v) 0. - 1. u null, i.e., v is on the base level
- (a) If w is a tower node, then f (v)
h(elem(v)elem(w)). - (b) If w is a plateau node, then f (v)
h(elem(v) f (w)). - 2. ultgt null, i.e., v is not on the base level
- (a) If w is a tower node, then f (v) f (u).
- (b) If w is a plateau node, then f (v) h( f
(u) f (w)).
18Skip List Based Authentication
return
19Calculation of Authentication Info
- There are two kinds of authentication
- exists, value, authentication info, for example
- non-exists, boundary value, authentication
info, for example - How to get authentication info from query info
- w1right(v1)
- if w1 is a plateau node then x0 f (w1) else
x0elem(w1) - X1x, j1
- for i 2 m-1 do
- Wiright(vi)
- if wi is a plateau node then
- jj1
- if wi ltgt vi-1 then xj f (wi)
- else if vi is in the base list S0 then
Xjelem(vi) -
else uidown(vi), xj f (ui) - Pj
20Skip List Based Authentication
return
21Skip List Based Authentication
return
22Comparison with MHT
- Update scenario skip list need O(logn), while
MHT need complete rebuilding. - Range query skip list cant support, while MHT
- can.
- Authenticate info skip list only need a
sequence, while MHT need sequence and order info.
(thats why commutative hashing is needed)
23