Linearly Time Efficiency in Unattended Wireless Sensor Networks

In the past decades, wireless Sensor Networks (WSNs) attracted many researchers. A lot of them considered important issues such as: routing, security, power awareness and data abstraction, But security is prior common assumption in the most of works. On the other hand, WSNs should collect small size and especially secure data in real-time manner. This problem is considered because sensor nodes are small, low power with low storage. Therefore, classical algorithms maybe inapplicable, i.e. considering constrained sensor, these algorithms cannot guarantee the security of data. The aforementioned problem is very critical in the new generation of WSNs referred to as Unattended or disconnected wireless sensor networks.


Introduction
In the past decades, wireless Sensor Networks (WSNs) attracted many researchers.A lot of them considered important issues such as: routing, security, power awareness and data abstraction, But security is prior common assumption in the most of works.On the other hand, WSNs should collect small size and especially secure data in real-time manner.This problem is considered because sensor nodes are small, low power with low storage.Therefore, classical algorithms maybe inapplicable, i.e. considering constrained sensor, these algorithms cannot guarantee the security of data.The aforementioned problem is very critical in the new generation of WSNs referred to as Unattended or disconnected wireless sensor networks.
The disconnected networks are established in critical or military environments.Hence, sink or collector is unable to gather data in real-time manner.Moreover, the network will be leaved unattended and will be periodically visited.This property provides some threats such as discovering and compromising sensor nodes by adversary without detection.Moreover, adversary invisibly performs to be intractable and unpredictable.Also, some adversary is curious and aims just to disclose data, while some aims search data to replace them with forged.The third kind of network adversary whiles to inject invalid data to corrupt network called DoS attack or mislead sink.In such setting, the main challenge is assurance about data survival for long time.
In this research, we propose scheme that firstly shares generated data and encodes them to provide confidentiality and integrity.Moreover, utilizing efficient mathematical solution, every sensor with unique identification encodes shares, in which encoding process is oneway with initial boundary conditions.Then a linear signing algorithm applies to provide authentication and prevent DoS attack.In addition, in order to defend curious adversary, the signed generated data will be broadcasted to the neighbour sensors.Every neighbour uses network-encoding for received shares and homomorphic signs to remove previous signature and generate unique signature.This process decrease size of total received shares.
Organization: Section 2 reviews the related work of UWSNs.Section 3 sketches our proposed algorithm including applied network coding, homomorphic and mathematical solution.In section 4 we have demonstrated our scheme efficiency implemented by Maple.We have ended this chapter with conclusion section.

Related works
In this setting, the adversary may have different goals.Reactive adversary is the adversary who starts compromising sensors after he identifies the target.More exactly, such an adversary is inactive until it gets a signal that certain data must be erased, then it wakes up and starts compromising up to l sensors per round unlike the proactive adversary who can compromise sensors before identifying the target i.e. he essentially starts compromising sensors at round 1, before receiving any information about the target sensor and the target data collection round.He would choose and compromise different sensors in a geographic area even before such signal is received.This powerful adversary who usually referred to as mobile adversary can even roam around the network and change from one set of compromised nodes to another, making such attacks more difficult to delete and prevent.
Di Pietro et al. in [1] investigated the data survival for the first time.They proposed a straight-forward non-cryptographic technique to hide the sensed data from the adversary.In [1], the adversary was actively hunting data and was not afraid to delete/erase any data he found.They claimed that they could achieve surprising degree of data survival with respect to the time between successive sink visits but they considered small number of compromised sensors including k=2, 3, 5, 10 which make it non-realistic.So when l increases, the benefits of replication attack are magnified.Observing that the simple technique has certain basic limitations, they proposed a more advanced approach based on standard cryptographic tools.They discussed the effects of encryption and claimed that regardless of the encryption type, the adversary has equally diminished capacity to detect and erase target data as it inspects the memory of compromised nodes.
To defend reactive adversary, many papers have been proposed encryption based schemes.Encryption can be employed to hide the collected information as well as the identity of the sensors that collect it.If the key of compromised node is not available, the reactive adversary is unable to distinguish the specific piece of collected data but proactive adversary can restore the keys of the other earlier compromised nodes to memorize encrypted data.These keys help adversary to encrypt some forged data and place them with the target data.Therefore encryption is not enough to defend proactive adversary.[2] evaluated proposed cryptographic based schemes on a real sensor platform.They measured some basic operation usage and presented results for encryption, super-encryption and key evolution which are feasible for protecting UWSNs against mobile adversary.Encryption is the central tool in the design of any symmetric scheme and is usually implemented by means of a block-cipher.Therefore, it becomes necessary to choose a suitable block-cipher for the development of secure and efficient schemes for super encryption.

Mateus et al. in
Finally they calculated that if super-encryption is applied many rounds by different nodes, an adversary would have to make a great effort in order to find and destroy the targeted data.However the number of rounds and the payload size in super-encryption have significant impact over the performance of this technique.These disadvantages presented in figure 1 and table 1 in terms of time and energy consumption.Table 1.Super-encryption energy consumption (100 executions) [2] In order to implement and evaluate some key operations for re-encryption process, the code of the MIRACL library [3] is adapted.They measure inversion and exponentiation operations through the polynomial arithmetic which depend on the field chosen.The algorithm used for inversion is a polynomial version of the Extended Euclidian algorithm from Lim and Hwang [4].They have chosen a general algorithm for exponentiation.
Although the symmetric algorithms are not expensive, the re-encryption strategy is still the main alternative against proactive adversaries.Moreover, according to [2], the Elliptic Curve Cryptography (ECC) schemes show an important drawback of the re-encryption solutions,since the exponentiation is not as suitable as polynomial operations.Hence Public Key Cryptography (PKC) should be considered.

Proposed scheme
Ren et al. [5] prove that in order to achieve perfect security, data sharing between neighbours is suitable way.Therefore, in our scheme, sensor node collects data data and breaks it to equal shares d 1 , d 2 …, d n .Using following process, the sensor sends signed encoded Y i to the randomly selected neighbours.

Share generation, encoding, signing and broadcasting processes
After sensor v i collects data data, it proceeds following steps to achieve data integrity, confidentiality and also authenticity.and CNT=β respectively.Also, TS is time stamp of producing time.We define tupleUID={TS||t}, that can uniquely identify a share.

Network coding
In this paper, we use two kinds of sensors that were called source sensor and forwarder sensor; source sensor should collect data and broadcast them, while forwarder sensor receives the data packets from other sensors and then transforms theses data packets into one packet; Moreover, since communications consume more energy than computation, forwarding nodes probability encode received packets into one using network coding solution.Clearly, network coding technique increases overall computation energy instead it significantly decreases communication consumption.Finally the forwarding sensor signs the packet through homomorphic signature (refer to section 3.4).

Basic setting
In this setting, we show the network with G=(V,E).Source nodes and forwarding nodes are = { , , … , } and = { , , … , } respectively.The inputs of forwarding nodes are Y i , [1, ] of pk i and output packets are Z j , [1, ].Source nodes (s i ) propagate packets pk i to the forwarding nodes.Each forwarding sensor, after receiving Y i of pk i from p incoming channels, computes following linear combination Y j to transmit it to the j-the channel.The linear combination formula is: In formula (1), α = (α 1 , α 2 ,…,α p ) is encoding vector.The node randomly generatesα or α is predeployed, (depend on static network topology).It is proven that random coefficient optimises network performance with high probability because of independency of network topology.

Random linear network coding algorithm
In proposed scheme, every forwarding node receives some Y i s [1, ]and encodes them via network coding with probability p nc .Finally, it sends one packet contained p encoded vectors.For simplicity, we let pre-deployed encoding vector (α).Consider, Alg. 1, for encoding p packets.The final outputs are encoded vectors Z j and the same inputs.

Fig. 2. Encoder Matrix
Our scheme is able to reconstruct thoroughly the primary data from all received packets.Moreover, by using aforementioned equation data i will be recovered in polynomial time (adapted [5]).In section 3.5, we propose a new algebraic algorithm to easily encoding shares with time efficiency.This innovation solution is considerable either for sink or forwarding nodes, i.e. our scheme either in node side or in sink side is efficiently ran.

Applied linear homomorphic signature over
In this paper, we utilize Boneh et al. scheme which is inspired by Gentry, Peikert and Vaikuntanathan [6] defined linearly over binary field [7].This signature is a short vector in Λ .(∆), i.e. δ is in both Λ (∆) and Λ (∆) simoltaneusly.Mod 2 relates the signature to the message while mod q is designed to prove unforgeability of the scheme.This Δ is different for signing every packet.
The source sensor signs every Y i using its identity based private key and then sends (Y i , δ i ) to the forwarding neighbour node.Forwarding node receives Y i s along with their signatures.
Firstly, it checks the validity of signature.If it is not valid, forwarding sensor removes it as bogus data.Receiving enough valid data, forwarding sensor re-encodes them to the e' and generates a homomorphic signature from share signatures without knowing the original messages (d i ) or the private key of source nodes.The detail of scheme is as follow:

Parameter setup phase
Following, we define parameters that used in [7] to describe applied signature.Λ is an mdimensional lattice whose points are defined on ℤ .Also, Λ is a full-rank discrete subgroup of ℝ and consist of vectors either generated by or orthogonal to a certain "parity check matrix" ∆ ℤ × modular integer q.The utilized lattices are defined: In formula (3), Λ (∆)is a coset of lattice Λ (∆) of formula ( 2) such that Λ (∆) = Λ (∆) + in which t holds in ∆. = .

Signature scheme
Firstly, we describe following functions that used in the Boneh et al. scheme: TrapGen(q, n): this algorithm receives an integer q and n holds in = [6 ].Also this algorithm outputs (∆ ℤ × , ℤ × ), where Δ is statistically close to a uniform matrix in ℤ × and S is a basis for Λ .

•
Signing algorithm 1-Choose a ← {0, 1} randomly.If id has already been queried to the hash function H, then abort.(The simulation has failed).
On input of a security parameter n and a maximum data set size k, do the following: 1. Choose two primes p, q = poly(n)with q ≥ (nkp) 2 .Define l :=[n/6 log q]. 2. Set Λ 1 := pZ n .3. Use TrapGen(q;l; n) to generate a matrix ∆ × along with a short basis T q of Λ (∆).
The public key pkey defines the following system parameters: • The message space is and signatures are short vectors in Z n .

•
The set of admissible functions F is all F p -linear functions on k-tuples of messages in .
On input of a secret key skey, a tag {0,1} , a packet and an index i, do: Verify( , , , , ) c.
After sink receives all signed encoded shares, it verifies the homographic signature and decodes them to reconstruct data.
In this signing algorithm, we apply linear signing and encoding algorithms.More exactly, we firstly encode d i into Y i included in pk i = {Y i ||δ i ||t||TS||CNT }by proposed mathematic function.This encoding solution prevents adversary to read data because our mathematical encoding solution (equation 4) is a differential equation and insolvable without knowing boundary conditions.Boundary conditions are initial values of the equation 4 which is available for either sender or receiver.We discuss about our mathematical technique in following section.

Mathematical encoding solution
In this section, we used the Ordinary Differential Equation(denoted as ODE) for encoding the data shares.This ODE is solvable (or received data is decodable) just with presence of boundry conditions.Moreover, we solve this equation by modified generalized Laguerre which is orthogonal function.The utilization of colocation method reduces the solution of our problem to the solution of algebratic equation.Applying our technique, we show that the encoding process is time efficient, more accurate and converges faster.
We basicallywork on an equation of flow and diffusion of chemical reactive species over a nonlinearly stretching sheet problem.this non-linear ordinary differential equation is [8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23]35]: Subject to boundary conditions, Where is identification of every sensor and d 1 ,d 2 ,..,d n are data shares.Considering unique id for every sensor, the equation 4 releases new equation which is unique for every sensor.Moreover, all of equation replaced in sensors, are different as well as the whole equations are hard to invert.These issues gurantee the security against curious adversary.
Different techniques have been used to obtain analytical and numerical solutions for this problem.Raptis and Perdikis [13] used the shooting method for this problem.Kechil and Hashim [15] obtained approximate analytical solution via Adomian decomposition method.Recently, in [16] and [14] the homotopy analysis method was also applied for solving the above equation [14].

Modified generalized Laguerre functions
This section is devoted to the introduction of the basic notions and working tools concerning orthogonal modified generalized Laguerre.It has been widely used for numerical solutions of differential equations on infinite intervals.( ) ( ) (generalized Laguerre polynomial) is the n-th eigenfunction of the Sturm-Liouville problem [24][25][26][27]: The generalized Laguerre in polynomial manner are defined with the following recurrence formula: These are orthogonal polynomials for the weight function = .We define Modified generalized Laguerre functions (which we denote MGLF) as follows [24]: This system is an orthogonal basis [35,36] with weight function ( ) = and orthogonality property [24]: where is the Kronecker function.

Function approximation with Laguerre functions
A function ( ) defined over the interval = [0, ∞) can be expanded as: If the infinite series in Eq. ( 10) is truncated with N terms, then it can be written as [24].In this condition, the time of solution was reported 3.96s which is more efficient than other solutions.Also, solving this problem is not possible without boundary conditions; therefore, only the owner of these boundary conditions can solve this in efficient time.

Conclusion
In this paper, we proposed an efficient scheme including special technique to defend adversary against curious, search-replace and injection attacks.Actually, we shared data (defence against curious attack) and code them using a mathematical function (defence against search and replace), and efficiently sign every unit of data to prevent injection attack.Mathematical function is designed for initializing with the sensor properties such as id.Therefore, we use one-to-one function that hold in equation 4.
Moreover, based on this equation and boundary conditions, a new function for every sensor is released.This equation is general as well as the adversary knows this equation but the calculated function is hard to obtain without knowing boundary condition.Hence, variable encoded packet of every function detects no information about the original data.This technique is firm against injection attack which is the most rampant attack in general unattended wireless sensor network.Totally, we can claim that, our work is applicable and secure against various attacks.

Fig. 2 .
Fig. 2. Graph of Error by MGLFMs solution for id=0.6In addition, The codes of MAPLE software of this implementation are mentioned in Appendix A. This implementation was executing in a computer whose information was: • Windows Seven • Proccesor: Intel(R) Core(TM) i3 CPU 2.53 GHz • RAM: 4.00 GB • System type: 32-bit Operating System 1. Shares data into equal d 1 ,d 2 ,…,d n .2.Using our mathematical encoding solution (refer to section 3.5), the sensor encodes every d i to Y i .3.Every Y i will be signed by sensor v i (δ i ).4.Lastly, sensor v i broadcasts every δ i to the each neighbour.Below we describe mathematically this algorithm.Set i is the set of all neighbours of sensor i.Every signedY i should disperse enough to defend against mobile adversary.To determine β value, DLE variable is defined to determine the entropy of data d i location entropy.This concept makes trade-off between hops steps and energy communication.Moreover, more β consumes much energy communication but makes higher security against mobile adversary.DLE helps us to determine suitable value.Finally, pk i = {Y i ||δ i ||t||TS||CNT} is output of sensor v i to another neighbour, e.g.v j in which Y i , δ i, t, CNT are encoding vector of data share, signature of Y i , sequence order of d t