Precision-Enhanced and Encryption-Mixed Privacy-Preserving Data Aggregation in Wireless Sensor Networks

Security is always a hot topic in wireless sensor networks (WSNs). Privacy-preserving data aggregation has emerged as an important concern in designing data aggregation algorithm. This paper proposes a precision-enhanced and encryption-mixed privacy-preserving data aggregation (PEPDA). The objective is to reduce collision during data transmission and energy consumption and to compensate loss caused by the collision. Based on the Slice-Mix-AggRegaTe (SMART) scheme, it optimizes data slicing by using small data packet, node classifying, and positive and negative data slicing techniques. It also describes a randomized time slot and a data compensation algorithm. Theoretical analysis and simulation show that PEPDA demonstrates a good performance in terms of accuracy, complexity, and security.


Introduction
Wireless sensor network (WSN) has received considerable attention during last decade.It has been developed for a wide variety of applications, including military sensing and tracking, environment and security monitoring, and equipment and human monitoring and tracking.Sensor networks usually consist of a large number of ultrasmall autonomous devices.Each device, called a node, is battery powered and equipped with integrated sensors, digital signal processors (DSPs), and radio frequency (RF) circuits.Because of special characteristics and limitations of wireless sensor networks, we face an important challenge in security issue, particularly for the applications where wireless sensor networks are developed in a hostile environment or used for some crucial purposes.For example, an adversary can easily listen to the traffic and mislead communications between nodes.Usually, one of the objectives to develop a sensor network is to collect data.We have therefore to establish a secure network and data aggregation mechanism, together with designing secure protocols to deal with problems about key agreement and encryption in communications and to develop privacypreserving data aggregation algorithms.
Sensor nodes collect data from where they are deployed and forward the corresponding data to sink node.If some sensors are compromised, the aggregated result will be ill-performed; Chan et al. [1] and Yang et al. [2] have introduced intrusion detection to identify ill-performed aggregation.These are passive privacy-preserving schemes.Moreover, some positive privacy-preserving schemes then are proposed by using cryptographic mechanism to establish secure communication links.A key predistribution scheme was first presented by Eschenauer and Gligor in [3], and a series of improved key distribution schemes [4][5][6] were described after that.The predistribution keys can be used to construct a hop-by-hop secure data aggregation algorithm.It is a simple and effective way to employ the encryption in data aggregation.However, the encryption and decryption operations have to be executed at each node.Therefore, data aggregating cost is relatively high.In order to get efficiency in privacy-preserving data aggregation, homomorphic encryption was introduced to construct an end-to-end secure International Journal of Distributed Sensor Networks data aggregation algorithm.This technique allows arithmetic operations to be performed on ciphertext directly.Note that the schemes using key distribution can ensure data not to be revealed by attackers from outside of network.However, a more stringent scenario may ask for guarantees of in-network confidentiality, which means that individual sensitive data should not be disclosed to any node in the network, including parent node or neighboring node.Some approaches are presented in [7][8][9] to address these issues.Meanwhile, a typical scheme, called SMART, is proposed by He et al. in [7], which slices individual sensitive data into a set of pieces and sends them to corresponding associated nodes.The SMART scheme guarantees privacy-preserving against attacks from outside and inside of a network by using encryption with the predistributed keys and slicing the data, respectively.It has attracted much more attention in research of privacypreserving data aggregation.
The objective of this paper is to evaluate both security vulnerability and efficiency in data aggregating schemes, particularly for the SMART scheme, and to propose a novel optimal approach, because efficiency and privacy are two important factors considered in designing data aggregation algorithm.The network's whole lifetime is tied up with node's individual energy consumptions which are spent on processing instructions, computations of CPU, send and receive operations, and so forth.Based on SMART scheme, we propose a PEPDA scheme by optimizing some parameters to reduce data collision, data loss and overhead, then to prolong the lifetime of a WSN.Compared with SMART scheme, the proposed PEPDA scheme demonstrates better performances in terms of piece accepting rate, aggregation accuracy, energy consumption, and privacy-preserving efficacy.
The rest of this paper is organized as follows.Section 2 gives a summary of related work.Section 3 evaluates limitations in SMART scheme and introduces our improvement assumptions.Section 4 describes the PEPDA approach with five optimizing factors.Section 5 provides detailed PEPDA protocol.Section 6 analyzes performance of PEPDA scheme.Section 7 gives conclusions and sketches some future work.

Related Work
Security of data aggregation in WSNs has been investigated during last decade.Several references give a review about it [10].Obviously, it is a good way to use cryptography to protect privacy of data.
Privacy-preserving data aggregation schemes using cryptographic mechanisms can be classified into two types: end-to-end encryption scheme and hop-by-hop encryption scheme [2,7,8,11].The end-to-end encryption scheme aims to establish secure link between base station (BS) and individual sensor node.Sensitive data are encrypted before forwarding upstream; BS then extracts original data using agreed key with each node, making intermediate nodes transparent during data transmission process.However, end-to-end encryption without aggregation is very powerconsuming, because each encrypted data is transmitted to BS directly.Along with the fact that nodes closer to BS consume more energy as more data pass through them, the efficiency of end-to-end encryption without aggregation is debatable.To tackle this problem, homomorphic encryption technique is introduced by Castelluccia et al. in [12] and de Cristofaro in [13] to achieve in-network aggregation with end-to-end encryption.Some schemes were described to deal with addition operations in data aggregation with homomorphic encryption, such as to find sum or average value.Homomorphic encryption makes it possible to aggregate data without doing encryption and decryption at intermediate nodes.However, it is not easy to find out operation satisfying the homomorphic properties.
In hop-by-hop encryption scheme, upon receiving an aggregated data, the node decrypts it, aggregates with its own data, encrypts the newly aggregated data, and then forwards upstream.The encrypt and decrypt operations are performed by using certain key distribution scheme.Obviously, hopby-hop encryption scheme is not an efficient design due to frequent intermediate encrypt and decrypt operations which brings about extra energy consumption and computational delay.Moreover, underlying privacy vulnerability is exposed when decrypted data are eavesdropped.Particularly, we face a challenge from inner attack.Piece slicing technique in SMART is a solution to this problem.In-network aggregation with end-to-end encryption scheme, on the contrary, provides better efficiency and does not have to worry about privacy vulnerability during intermediate node aggregation.Along with the attractive advantages, in-network aggregation with end-to-end encryption scheme designs however have to deal with certain problems in key distribution phase, which are elaborated by Feng et al. in [14].
Privacy-preserving data aggregation (PDA) scheme presented by He et al. in [7] consists of two schemes: clusterbased private data aggregation (CPDA) and SMART.Privacy performance is improved in these two schemes.However, neither of them is efficient.The former one is of computational complexity and big computational burden.Limitations of the latter scheme will be investigated in Section 3. Some improved schemes are proposed based on the PDA scheme.Yang et al. present an energy-saving and privacypreserving data aggregation (ESPART) scheme [8], which shows a good performance in both energy consumption and privacy-preserving efficacy.As a result, the lifetime of network could be prolonged.Work presented in [11] introduces a scheme which applies the additive property of complex numbers in order to combine sensor data and preserve data privacy during transmissions to the query server.The performance evaluation shows that it is more efficient than the PDA scheme in terms of both communication and computation costs.Work presented in [9] specializes in nonlinear aggregation functions instead of traditional additive function.The presented K-indistinguishable privacy-preserving data aggregation (KIPDA) scheme achieves the goal of privacypreserving upon MAX and MIN aggregation functions by obfuscating data being forwarded.Zhang et al. proposed schemes to support both additive aggregation functions and nonadditive ones such as Max/Min, Median, and Histogram at the sacrifice in data accuracy [15].A formal treatment to the security of concealed data aggregation (CDA) and the more general private data aggregation (PDA) is given in [16].It analyzed security by comparing with SMART scheme.Despite the existence of schemes for privacy-preserving data aggregation, a rigorous analysis and optimization for SMART are still missing in the literature.

Background and Assumptions
3.1.SMART Scheme.Before introducing our proposal, we make a review about SMART scheme presented in [7], which consists of three steps.
Step 1 (Slicing).Each sensor node  randomly selects a set   of sensor nodes, say , within ℎ hops, and slices data   randomly into  pieces.One of the  pieces is kept at node  itself; the remaining  − 1 pieces are encrypted by using their shared keys and sent to nodes randomly selected from the node set   .
Step 2 (Mixing).When a node  receives an encrypted slice, it decrypts the data using the shared key with the sender.Then, it sums up all the received slices.
Step 3 (Aggregating).All nodes aggregate the data according to the TAG protocol in [17] and send the result to the query server.

Analysis of SMART Scheme
. This subsection evaluates SMART scheme in terms of collision and slice failed node (SFN).Assume that each node slices data into 3 pieces and forwards 2 of them to neighbors shown in Figure 1.We denote   as a piece sent from node  to node .If  14 and  41 are forwarded at the same time, a collision happened between node 1 and node 4. As a result, it influences aggregation result.The worst situation is that each piece collides with another.In fact, the aggregation accuracy is around 40% for  = 3, because the piece accepting rate is only about a quarter.This inspires us to design new accuracy oriented privacypreserving scheme.
Another problem is the SFN.In SMART scheme  − 1 pieces are encrypted and sent to nodes randomly selected from node set   .Unfortunately, for some nodes the number of nodes in the set   is less than  − 1.Therefore, the encrypted pieces could not be sent to neighbors, which influence privacy-preserving efficacy in SMART.We define these nodes as SFN.For example, for a network with size  = 600, hop size ℎ = 1, and slicing number  = 3, there exist averagely 24 nodes in SFN.If the value |  | of the node  is lower than 2, it could not find enough destination nodes to send its corresponding 2 sliced pieces.
Figure 2 shows the variation of SFN with the slicing number .The number of SFN increases with the increase of slicing number .This implies that the more pieces a node goes to slice, the more difficult it is to find enough corresponding destination nodes to send.One reason is that communication range of a sensor node is limited.Figure 2 also reveals that almost all nodes become SFN when slicing size  tends to 11, which indicates that SMART degenerates into TAG gradually [17].
The above analyses inspire us to optimize SMART scheme with some factors to reduce the collision rate and to increase data aggregation accuracy.Five factors will be evaluated, respectively, which are shown in Figure 3.In order to reduce collision rate, a randomized time slot and node choosing technique are developed, while to reduce collision loss, small data packet, positive and negative piece slicing, and compensation methods are presented.All are discussed in Sections 4 and 5.

Overview of Proposed Approach
4.1.System Model.Consider a network with  nodes.Each node is marked from 1 to , and the  of sink is 1.Assume that each node collects body temperature, which fluctuates from 35 ∘ C to 43 ∘ C, denote   as collected reading of node , and the lower-bound and upper-bound of   are 35 and 43, respectively.There are many types of aggregation functions such as SUM, MAX, and AVERAGE.Here we only deal with SUM aggregation function () = ∑   =1 (  ()) as other functions could be somehow simplified into SUM model [12].The aggregation accuracy is defined as where   1 represents the final aggregation result in sink node.
International Journal of Distributed Sensor Networks  Epoch duration presents the amount of time in data aggregation process, which is divided into four intervals: tree formatting phase, collusion phase, postback phase, and aggregation phase.Tree formatting phase expresses the time interval assigned for  nodes to establish a treelike hierarchical structure, collusion phase is a time interval for nodes to send sliced pieces to others, postback phase describes the time interval for nodes to send acknowledgment, and aggregation phase specifies the time interval for network to aggregate according to certain aggregation protocol.

The Proposed Approach.
This subsection describes how to optimize SMART scheme.Detailed algorithms will be presented in Section 5.

Randomized Time Slot Factor.
In SMART scheme, each node slices data into  pieces and sends them to neighbors.In order to reduce collision rate, a random sending time schedule is used during collusion phase, instead of spontaneously sending sliced pieces at the same time.Figure 4 demonstrates a piece forwarding time diagram.The first phase from A to B is tree build duration, while the second phase from B to D is collusion duration.Assume that slice number  is 3, therefore, every node has 2 pieces to send.The piece forwarding moments in SMART are B and C, respectively, (C is the midpoint of the line BD).In PEPDA scheme, the forwarding times are set randomly in time slots BC and CD, respectively.This forwarding mechanism demonstrates a good performance in reducing data collision which will be shown later.

Partial
Factor.Note that the node in the set of SFN cannot find enough neighbor nodes to send  − 1 pieces.Therefore, there is at least one edge used to transmit twice the pieces.This is one of the reasons to cause collision.As a remedy, we divide nodes into two subsets  and  based on the condition |  | ≥  − 1, where  = 1, . . ., .The node set  contains all SFN nodes, while the rest is in the node set .Only nodes from the set  participate in piece slicing and mixing.Therefore, communication overhead is cut down, and then collision rate and energy consumption are reduced.

Small Data Factor.
In SMART scheme,  − 1 pieces will be forwarded to neighbors.There is the possibility that large pieces are sent out while a small piece is kept by the node itself; under this circumstances, if collision occurs, most part of the data will be lost.Therefore, aggregation accuracy will be influenced.In order to improve the performance of SMART scheme, we define a small data factor  and make small fragments to be sent to neighbors.A detailed algorithm is given in the next section.(

Positive and Negative Factor
From the analysis of case 1 and case 2, we notice that aggregation accuracy can be improved if a negative piece is sent.One reason is that using a negative piece increases proportion of the data kept by the node itself and decreases the influence of data loss caused by collision.As it is shown in case 2, Σ  Positive Piece  ≥ Σ  |Negative Piece  |, aggregation accuracy will be improved.Otherwise, aggregation accuracy will be distorted (see case 3).Such a negative piece technique is used in PEPDA scheme.
International Journal of Distributed Sensor Networks

Compensation Factor.
During the collusion phase, some pieces get lost because of collision, which finally influences the aggregation result at the sink node.If a node knows whether a piece is received by a neighbor successfully or has the loss rate, it can compensate for aggregating data and forward the result upstream during the data aggregation phase.This process needs to solve two problems: one is how to get the loss rate; the other is how to calculate the compensation.In PEPDA scheme, an ACK message will be sent to the neighbor to get the loss rate, and also an algorithm is presented to determine the compensation in Section 5.

Algorithms and Their Property
This section describes details of PEPDA scheme.The randomized time slot factor, the partial factor, the positive and negative factor, and the small data factor are used in the collusion phase, while the compensation factor is taken in the postback phase and the aggregation phase.

Tree Formatting
Phase.An aggregation tree is constructed in the following way according to the standard aggregation protocol TAG [17].
Step 1. Sink node 1 marks its tree level 0 and broadcasts a Hello message which contains its level information  V .
Step 2. On receiving a Hello message, the node drops the message if it is already in the aggregation tree.Otherwise the node extracts  V value from the packet and marks its tree level  V + 1. Accordingly, the source node in the packet becomes parent node of this node.Then the node continues to broadcast Hello message containing level information  V of its own.
Step 3. Loop Step 2 until all nodes are added to the aggregation tree.
As aggregation tree is being constructed, are the node set   ( = 1, . . ., ) is established in the following way.
Upon receiving a Hello packet during the tree formatting phase, the node  records the source address number of this Hello packet into a memory space such as a neighboring table.The node set   is then selected from such kind of neighboring table according to a fixed value (say This phase establishes also shared keys used in encryption/decryption.We refer to the existing random key distribution mechanism proposed in [3].

Collusion
Phase.This phase in PEPDA scheme is quite different from that of SMART scheme.In the tree formatting phase, the node set   is set up.All nodes are then divided into two subsets according to the condition |  | ≥  − 1. Nodes satisfying or against the condition |  | ≥  − 1 are classified into node sets  or , respectively.Each node  ( = 1, . . ., ||) from the node set  slices data   into  pieces.One of the  pieces is kept at the node  itself; the remaining  − 1 pieces are encrypted and sent to nodes randomly selected from the node set   .When a node receives an encrypted piece, it decrypts the data using its shared key with the sender.Meanwhile, the node extracts the source address of this piece packet and adds it to an ACK forwarding table which is used for forwarding ACK messages later.The encrypting and decrypting operations are performed with the keys distributed by a random key distribution mechanism mentioned above.
Based on the technique of the positive and negative factor and the small data factor, the sent pieces are calculated in the following way.
(i) The odd piece is positive and the even one emerges as a negative value.
(ii) If  is an odd number, the numbers of positive and negative piece are the same, that is, ( − 1)/2; otherwise, if  is an even number, there is one more positive piece.Then, only the node from node set  sends the piece   at the time   ( = 1, 2, . . .,  − 1) to neighbor.Theorem 1.Under the same collision rate , piece loss in PEPDA is less than that in SMART.
The sum of sent pieces at th node is ∑ −1  =1   .If the rate of lost piece is , then the loss is The total loss  SMART is Similarly, in PEPDA scheme, the sum of sent pieces at th node is Then the loss is Therefore, the total loss  PEPDA is We need now to prove  SMART >  PEPDA .In fact, for  = 1, we have  SMART =  PEPDA .
For  ≥ 2 and  is an odd number, we have If  is an even number, we have This gives the conclusion.The theorem somehow indicates that under the same collision rate, aggregation accuracy in PEPDA is superior to that of SMART.Moreover, the collision rate in our proposed scheme is reduced; accordingly, the practical aggregation accuracy will be even better as a result of smaller piece loss.

Postback
Phase.This phase estimates the data loss rate for each node, which will be used in calculating the compensation factor.
During the collusion phase, an ACK forwarding table is established.After the collusion phase, each node sends ACK messages to nodes recorded in the table.We could do this step once a node is stored in the table.But this will cause more data collision.So the ACK message is sent after collusion phase to avoid collision between piece packet and ACK packet.Each node in the node set  will receive the ACK message from neighbor.Let   be the number of ACK messages received by the node , then, the difference ( − 1) −   implies the number of packet lost in the collusion phase.Then, we have the rate of lost piece: According to this rate, the node  calculates the compensation factor as follows: 5.4.Aggregation.Before aggregating, node  adds   to itself as compensation, and all nodes in the network then do innetwork aggregation following TAG protocol proposed in [17].For an individual node, the total piece to be sent is From the formulas (12) and it indicates that the compensation  used in PEPDA algorithm is the minimum of lost pieces.

Simulation and Analysis
This section evaluates performances of PEPDA scheme in terms of privacy-preserving efficacy, piece accepting rate, aggregation accuracy, and power analysis.The simulation environment is TOSSIM under TinyOS.The parameters in simulation are shown in Table 1.A topology of nodes is shown in Figure 6.

Privacy-Preserving Efficacy.
We denote by () the probability that private data is disclosed and take it as a privacypreserving efficacy metric, where  represents the probability that link level privacy is broken.
In SMART scheme, the privacy is broken only when  − 1 outgoing links and all the incoming links are cracked.Accordingly, () can be approximately defined as where (in-degree = ) is defined as the probability that the in-degree of a node is  and  in max represents the maximum in-degree in a network.According to (14), theoretical privacy-preserving efficacy is shown in Figure 7, which indicates that () decreases with  the increase of slicing number .The theoretical value cannot be reached due to the problem of SFN, which limits outgoing links, so that the incoming links get reduced as well.In fact, a practical definition of () should be calculated as where (degree = ) represents the probability that the degree of a node is , and  max is the maximum degree in a network.Note that the degree of a node includes both in-degree and out-degree values.Under this circumstance, () fluctuates according to slicing number , which is shown in Figure 8.Although there is a tiny fluctuation, () keeps decreasing with the increase of slicing number  overall.
In PEPDA scheme, only if an eavesdropper breaks all the incoming and outgoing links, along with the end-to-end encryption key of a node, will it be able to crack the private data held by this node.Therefore, () can be approximately defined as where   is the probability that an end-to-end encryption key is cracked and can be approximately valued as   = 1/,   and   are the percentages of the sets  and , respectively, that is,   = ||/ and   = ||/. max and  max are the maximums of the in-degree in the node sets  and , respectively.  (in-degree = ) is the probability that the indegree of a node in the node set  is , namely,   (in-degree = ) = (in-degree = )/||, where N(in-degree = ) is the number of node which in-degree equals to .We have the same definition for   (in-degree = ) = (in-degree= )/||.Figure 9 shows the privacy-preserving efficacy () of PEPDA scheme.As is illustrated in Figure 9, () increase as  grows, which is different from that in SMART scheme.In original SMART scheme, outgoing and incoming links of a node increases as  grows, making it tougher to crack private data.Therefore, privacy-preserving efficacy improves.Figures 8 and 9 imply that PEPDA demonstrates a better performance than SMART in terms of privacy preserving.
As mentioned in [14], applying homomorphism encryption technique in end-to-end encryption needs to tackle with several underlying issues, for example, capacity of confidentiality protection.   is illustrated in Figure 10, more than half the nodes from node set  are infected when  is lower than 7.The curve reaches its peak when slicing number  is selected as 4. The set  contains more 550 nodes when  = 8, as shown in Figure 2.Only about 50 nodes in the set  slice data into  pieces.

Piece Accepting Rate.
Because collision happens during the collusion phase, some data pieces are lost.It influences effectively aggregation accuracy.To reduce the collision rate is one of the objectives in designing data aggregation approach.As a metric, piece accepting rate is evaluated.It is defined by where    is the number of received pieces by a node , while    is the number of pieces sent by a node .
Figure 11(a) shows the relationship between slicing number  and piece accepting rate by using the partial factor.It indicates that with the increase of slicing number , piece accepting rate increases.Particularly, piece accepting rate approaches 1 when  = 11.That is because, as described in Figure 2, the set  contains almost all nodes in this case, only a few nodes need to be sliced.Therefore, piece collision is reduced.Figure 11(b) describes the influence of piece accepting rate with the factors with  = 3.The curves of both SMART scheme and the partial factor schemes overlap.The reason is that the number of nodes in the set  is too small, say || = 24 for this case.Therefore, it has little influence on the piece collision by using the technique of the partial factor.However, there is a significant increase in piece accepting rate with randomized time slot factor, because the pieces sending schedules are optimized, then the collision rate is reduced.Obviously, compared with SMART scheme, Figure 11(b) shows a good performance of piece accepting rate by using the randomized time slot factor, which in turn enhances aggregation accuracy.

Aggregation Accuracy.
Figure 12 shows the aggregation accuracy of PEPDA with respect to slicing number .The accuracy curve rises as  increases at beginning and then keeps steady, though there is tiny fluctuation within, because we use the compensation factor and the small data factor.However, for SMART scheme, the aggregation accuracy decreases as  increases.
Figure 13 gives an accuracy comparison between SMART and PEPDA schemes with  = 3. Obviously, the accuracy of PEPDA scheme is twice as that of SMART scheme.This is a result by using five factors to optimize the aggregation algorithms with different sides.The randomized time slot factor and the partial factor are used to reduce the collision rate, while the small data factor and the positive and negative factor are applied to reduce the loss caused by the collision.The compensation factor is employed to correct the loss.Figure 12 demonstrates a good performance of PEPDA scheme with the five factors.

Complexity Analysis.
This subsection focuses on evaluating complexity of schemes in terms of communication overhead and computation overhead.

Communication Overhead.
Each node needs 2 basic messages in both SMART and PEPDA schemes.One is a Hello message to accomplish tree formation; another is for data aggregation [7].Except for these common overheads, in PEPDA, an extra communication overhead consists of collusion overhead and ACK forwarding overhead.In fact, each node in the set  sends ( − 1) pieces in the collusion phase and   ACK messages in the postback phase.Then the total overhead of collusion communication is ( − 1)|| +  1 +  2 + ⋅ ⋅ ⋅ +  || , where   ( = 1, 2, . . ., ||) are the piece accepting rates.As for SMART scheme, collusion communication is exactly the extra communication overhead, which is (−1).Therefore, the computational energy consumption can be determined by the following equation: where Enc and Dec are the energy costs of doing one time encryption and decryption of 10 bits value, Cal represents the energy required to perform one time computational instructions,   ,   , and   are the numbers of operations of encryption, decryption, and computation, respectively.
In SMART, all nodes perform ( − 1) times operations in both encryption and decryption phases to achieve hopby-hop encryption.Meanwhile, it takes ( − 1) times operations to compute in both slicing and mixing phases; while in PEPDA, as a result of SFN, slice and mix computing operations, together with encrypt and decrypt operations, are    2).In order to get more precise result, we take MICAz and TelosB as examples [9].The MICAz has a bus width of 8 bits and runs at 7.37 MHz, and the TelosB features the 16-bit microcontroller running at 4 MHz.The energy consumption of encrypting and decrypting 10 bits of data on the MICAz and TelosB architectures with IDEA, RC4, and RC5 algorithms for hop-by-hop encryption can be found in [9] (Table 3).Figure 15 illustrates the total energy cost of each scheme with the change of slicing number .Total energy cost of PEPDA is lower than SMART.
Table 4 summarizes properties of SMART, ESPART, and PEPDA in terms of security, data accepting rate, aggregation accuracy, and overhead.The PEPDA scheme demonstrates a good performance compared with the other two methods.

Conclusion
Accuracy and privacy preserving are two important challenges in designing data aggregation algorithm in WSNs.Based on SMART scheme, the five factors are used to optimize the algorithms of data aggregation.The objective is  to reduce the collision rate and collision loss.From this point, the randomized time slot factor and the partial factor are developed to decrease the collision rate, while the small data factor, the positive and negative factor, and the compensation factor are designed to improve the collision loss.We propose a novel privacy-preserving data aggregation scheme based on the five optimized factors.Analysis and simulation show that the proposed PEPDA scheme demonstrates a good performance in terms of accuracy, complexity, and security.
From the point of view of security, PEPDA uses the same mechanism as that in SMART.It is interesting to design privacy-preserving data aggregation schemes by combining hop-by-hop encryption with end-to-end encryption in PEPDA.

Figure 1 :
Figure 1: An example of slicing and forwarding in SMART.

Figure 2 :
Figure 2: The relation between SFN and .
Figure 5 illustrates three special slicing cases.Assume that slicing number  is 3 and all of the corresponding sent pieces are dropped as a result of collision.Data   ( = 1, 2, 3) are 10.The numerical number on the line presents data sent or received by a node.According to the definition of the aggregation accuracy, we have the following results:  case 1 = (40 − 10 − 10)

(
iii) We have Σ  Positive Piece  ≥ Σ  |Negative Piece  |.Now we define a sending time schedule based on technique of randomized time slot factor.Let a single time slot be   =  collusion /( − 1),  collusion represents time spent in collusion phase.The forwarding moment is determined as.

Figure 11 :
Figure 11: Piece accepting rate influenced by the factors.

Figure 15 :
Figure 15: Total energy cost of SMART and PEPDA.
Our scheme would not have to worry about this problem.If    =   +   and    becomes    after collusion communication,    in node set  is no longer    , as these nodes have done slice and mix operations;    in node set  may not be    either, as these nodes may receive piece from nodes in node set .Therefore, even though the range of   is known by the adversary, it is still difficult to guess the range of   , which identifies the original private data in a node.In collusion phase, if a node belongs to node set  and receives piece from node set , it is called an infected node.We define IR (infected rate) as IR = |  |/||, where   is the number of infected node.IR reveals what the set  influences node set ; the bigger the IR value is, the more difficult it is for adversary to extract the original private data in node set .As

Table 2 :
Detailed values of parameters for (1) in SMART and PEPDA.