Skip to main content
. 2016 Feb 20;16(2):259. doi: 10.3390/s16020259
Algorithm 1: The algorithm of integrity verification
Let CS=siΨ{i} be an encrypted dataset that Sink receives from M. Sink verifies the integrity of QR as follows.
 Sink performs the following three steps to verify each i contributed by si ψ.
 (1) If i = Ø, it could not satisfy Definition 2. Thus the integrity of QR is violated. Quit the algorithm.
 (2) If i ≠ Ø, Sink decrypts all factors in i using ki,t only shared with si, and checks whether both of following two conditions are satisfied. If so, add all the data within [low, high] into QR, and then turn to Step (3). Otherwise, the integrity of QR is violated so quit the algorithm.
  1) Each factor Fi,v in i satisfies following condition:
lowLB(Fi,v) ≤ highlowUB(Fi,v) ≤ highLB(Fi,v) ≤ lowhighUB(Fi,v)

  2) Fi,k and Fi,v+1 satisfy the following formula, where Fi,v and Fi,v+1 are two adjacent factors in i.
UB(Fi,v) = LB(Fi,v+1)
(3) If all factors contributed by si ψ are processed through Steps (1) and (2), and all of them satisfy the query, then the QR satisfies the query, thus return the QR. Otherwise, continue to process the next i contributed by unprocessed sensor node, and turn to Step (1).