21.08.2013 Views

Protocols for Secure Communication in Wireless Sensor Networks

Protocols for Secure Communication in Wireless Sensor Networks

Protocols for Secure Communication in Wireless Sensor Networks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

166 Chapter 6. Integrity-Preserv<strong>in</strong>g <strong>Communication</strong>s<br />

Algorithm 4 canvas-accept(A,P,m,C)<br />

Global values:<br />

X: ID of current node<br />

k: Parameter of the Canvas schme<br />

Input:<br />

A: message source<br />

P: dest<strong>in</strong>ation location<br />

m: message text<br />

C: authentication <strong>in</strong><strong>for</strong>mation, a set of tuples<br />

Output:<br />

Return true if Canvas authentication succeeds<br />

1: if ∃(A,X,c,a) ∈ C then ⊲ Is there a MAC from the source?<br />

2: b := {A,P,m,c}KXA<br />

3: if a = b ∧ c > cAX then<br />

4: cAX := c<br />

5: return true<br />

6: else<br />

7: return false<br />

8: end if<br />

9: else<br />

10: <strong>for</strong> i <strong>in</strong> {1,...,k} do ⊲ Otherwise, check attestations<br />

11: if ∃V.(V,X,c,a) ∈ C ∧V ∈ neighbours(i) then<br />

12: b := {A,P,m,c}KXV<br />

13: if a = b ∨ c ≤ cV K then<br />

14: return false<br />

15: else<br />

16: cV K := c<br />

17: end if<br />

18: else<br />

19: return false<br />

20: end if<br />

21: end <strong>for</strong><br />

22: end if<br />

23: return true<br />

M = 〈 flag, source, dest, data, mac 〉<br />

flag DIRECT (mark<strong>in</strong>g a Canvas-authenticated message)<br />

source purported source node’s identifier<br />

dest dest<strong>in</strong>ation specifier<br />

data data payload of the message<br />

mac Canvas message authentication codes<br />

Table 6.2: Canvas message <strong>for</strong>mat<br />

d distance function<br />

τ allowed acceptance distance from a dest<strong>in</strong>ation<br />

δ allowed <strong>for</strong>ward<strong>in</strong>g distance from dest<strong>in</strong>ation<br />

Table 6.3: Auxiliary rule parameters

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!