Research Article

A Clone Detection Algorithm with Low Resource Expenditure for Wireless Sensor Networks

Algorithm 1

A clone detection algorithm with low resource expenditure.
1 Initialization:
2 Preset encryption mechanism
3 Obtain the relative locations to the BS and the identification of each ring
4 Predefine the nonhotspot area width k
5 Exchange the relative information with neighbors
6 PHASE 1: Witness chain establishment
7 Xa=Encrypt (IDa, la)
8
9 while do
10 Forward Xa to the ring
11 
12 end while
13 if do
14 Forward Xa ξ hops randomly to node b in the same ring
15 node b records (IDa, la) in Xa
16 
17 for ; j-- do
18  Forward Xa to node x in j-1 ring
19  node x records (IDa, la) in Xa
20  
21 end for
22 for ; u++ do
23  Forward Xa to node x in u + 1 ring
24  node x records (IDa, la) in Xa
25  
26 end for
27 end if
28 PHASE 2: Detection route generation
29 Xa=Encrypt (IDa, la)
30
31 if do
32 Select a ring Rw in nonhotspot randomly
33 while do
34  Forward Xa to node x in i + 1 ring
35  
36 end while
37 end if
38 node x broadcast Xa in the ith ring
39 for each node in Wa that hears Xado
40 if (IDa, la) stored in w ≠ (IDa, la) in Xado
41  Trigger revocation procedure
42 end if
43 end for