<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>STaR: a Recon gurable and Transparent middleware for WSNs security</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Roberta Daidone</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Gianluca Dini</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Marco Tiloca</string-name>
          <email>marco.tilocag@iet.unipi.it</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Information Engineering University of Pisa</institution>
          ,
          <addr-line>Pisa</addr-line>
          ,
          <country country="IT">Italy</country>
        </aff>
      </contrib-group>
      <fpage>73</fpage>
      <lpage>88</lpage>
      <abstract>
        <p>Wireless Sensor Networks (WSNs) are prone to security attacks. In order to protect the network from potential adversaries, it is necessary to secure communications between sensor nodes. Also, if we consider a network of heterogeneous objects including WSNs, security requirements may be far more complex. In particular, a single application may deal with multiple di erent tra c ows, each one of which may have di erent security requirements, that possibly change over time. In this paper, we present STaR, a software component which provides security transparency and recon gurability for WSNs programming. STaR allows for securing multiple tra c ows at the same time according to speci ed security policies, and is totally transparent to the application, i.e. no changes to the original application or the communication protocol are required. Also, STaR can be easily recon gured at runtime, thus coping with changes of security requirements. Finally, we present our preliminary implementation of STaR for Tmote Sky motes, and evaluate its impact on performance, in terms of memory occupancy, communication overhead, and energy consumption.</p>
      </abstract>
      <kwd-group>
        <kwd>WSNs</kwd>
        <kwd>security</kwd>
        <kwd>middleware</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>In the recent years, Wireless Sensor Networks (WSNs) have received an
increasing amount of attention and have been adopted in many application scenarios,
from environmental to healthcare monitoring applications. In such scenarios,
sensor nodes typically collect environmental data, and transmit them to a central
base station through a wireless network. Sensor nodes are resource constrained
devices that are deployed in unattended, possibly hostile environments.</p>
      <p>Given the nature of WSNs, it is an easy task for an adversary to eavesdrop
messages as well as alter or inject fake ones. It follows that secure communication
is vital in order to assure messages con dentiality, integrity, and authenticity.</p>
      <p>
        So far, deployment of WSNs have been used chie y for scienti c purposes,
where an adversary has little incentive to attack the sensors [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. As a result,
notwithstanding the large body of academic research on WSNs security, only a
few real deployments comprise security solutions.
      </p>
      <p>
        Now things are changing. Recently, WSNs have been employed in
Cooperating Objects Systems (COS) where mobile physical agents share the same
environment to ful ll their tasks, either in group or in isolation [
        <xref ref-type="bibr" rid="ref22 ref7">7, 22</xref>
        ]. In this kind of
systems, agents not only sense the environment, being a WSN the interface to the
real world, but also act on it. Therefore, these COS become a tempting target for
an adversary, because a security infringement may easily translate into a safety
infringement, with possible consequences in terms of damages to things and
injures to people. Similar considerations hold when WSNs are used in Critical
Infrastructures [
        <xref ref-type="bibr" rid="ref16 ref18">16, 18</xref>
        ]. As an example, in [
        <xref ref-type="bibr" rid="ref22">22</xref>
        ] we consider a Highly Automated
Air eld scenario where some static sensors monitor the air eld perimeter and
communicate with an Unmanned Ground Vehicle (UGV ) which is responsible
for further investigations on alarms triggered by sensors. In such a scenario, it
is fundamental to guarantee integrity and authenticity of messages exchanged
within the network. In the asbsence of any alarm, it is reasonable to use a
lightweight authentication mechanism. Instead, in the presence of an attack,
it becomes necessary to increase the security level by introducing encryption.
To supoport dymanic changes in a scenario like this one, recon gurability is a
mandatory feature for the security middleware.
      </p>
      <p>
        In this paper, we present STaR, a modular, recon gurable and transparent
software component for secure communications in WSNs. STaR guarantees con
dentiality, integrity, and authenticity by means of encryption and/or
authentication. STaR is modular because it separates interfaces from their implementations.
This makes STaR easily portable on di erent hardware [
        <xref ref-type="bibr" rid="ref19 ref9">9, 19</xref>
        ], system software
[
        <xref ref-type="bibr" rid="ref27 ref8">8, 27</xref>
        ] and network stacks [
        <xref ref-type="bibr" rid="ref14 ref30">14, 30</xref>
        ]. Also, modularity makes it possible to easily
load/unload di erent STaR modules to match di erent security requirements,
add new features, or extend existing ones.
      </p>
      <p>By means of STaR, it is possible to protect multiple tra c ows at the same
time, according to di erent security policies. STaR is recon gurable because it
allows to change security policies on a per packet basis at runtime. That is, it
assures a ne grained adaptability to possible changes in security requirements.</p>
      <p>STaR is also transparent, because the application can still rely on the
communication interface already in use. Also, the application does not have to be
redesigned or recoded in order to exploit a certain security policy. This clearly
separates the implementation of the application from the STaR component.
STaR characteristics allow for easily reusing application components in
application scenarios where security becomes relevant. Also, STaR allows unskilled
people to secure their applications, by simply selecting security policies to be
applied. Besides, application developers need neither to implement complex
security procedures, nor to con gure unfriendly tools, such as network rewalls.</p>
      <p>
        We present our preliminary implementation of STaR [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] for TinyOS [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ],
and provide a performance evaluation on Tmote Sky motes [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], in terms of
memory occupancy, communication overhead, and energy consumption.
However, STaR features a generic architecture, and can be implemented for other
hardware platforms and operating systems tailored to WSNs, such as Contiki [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]
and ERIKA Enterprise [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
      <p>The rest of this paper is organized as follows. In Section 2 we present some
related work. Section 3 presents the STaR architecture. In Sections 4 and 5
we describe STaR interfaces providing communication and con guration
services, respectively. Section 6 presents our prototype implementation of STaR for
the TinyOS platform, and discusses our performance evaluation on Tmote Sky
motes. In Section 7 we draw our conclusive remarks.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Related work</title>
      <p>
        Many solutions have been devised for WSNs security, including [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] for secure
communication, [
        <xref ref-type="bibr" rid="ref13 ref15 ref25 ref29 ref3">3, 13, 15, 25, 29</xref>
        ] for key management, and [
        <xref ref-type="bibr" rid="ref21 ref24">21, 24</xref>
        ] for secure code
dissemination. Particular attention has been paid to component-based security
architectures tailored to WSNs.
      </p>
      <p>
        In [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ] the authors propose a middleware that includes security. The tool
is mostly focused on the opportunity to include security during application
development. In [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] a recon gurable security middleware is presented. The main
di erence between this work and STaR is that in STaR the security processing
is part of the architecture itself, while in [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ] security policies are preocessed
by a module external to the middleware. Also, our work has been implemented
and evaluated in terms of memory occupancy, network performance and power
consumption. In [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ] SMEPP Light is presented. It features group management,
group level security policies and mechanisms for query injection and data
collection for WSNs. SMEPP Light is tailored on subscribe/event scenarios. Also, it
considers peers con gured by means of XML which cannot dinamically change
their behavior. Finally, SM-Sens [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] is a secure middleware that helps in bridging
the gap between high-level application requirements and WSN. This middleware
provides the application with an API to be used when introducing security.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>STaR architecture</title>
      <p>STaR assumes the presence of multiple tra c ows, and allows for securing
them in di erent ways, according to di erent security policies. Possible security
policies include packet encryption, packet authentication, or both of them.</p>
      <p>STaR considers each application packet as belonging to one speci c tra c
ow. In order to do that, each packet belonging to a tra c ow f is associated to
a speci c label Lf . Also, each label refers to a speci c security policy SPf . Then,
STaR processes every packet belonging to ow f according to the security policy
SPf associated to label Lf . As shown in Figure 1, the STaR component stays
between the application and the rest of communication stack. STaR intercepts
both incoming and outgoing tra c, segments it into ows, and secures them
according to the corresponding security policies.</p>
      <p>STaR assures recon gurability by allowing users to dynamically change
security policies. Furthermore, STaR provides transparency of security with respect
to the application. That is, STaR exports the same interface as that of the
underlying communication stack to the application. Therefore, in order to exploit
the security services provided by STaR, it is not necessary to either re-design or
re-code the application.</p>
      <p>The STaR component consists in ve sub-components, namely
StarToApplication, StarToCommunication, StarLabelling, StarCon g, and StarEngine. The
StarToApplication component provides the application with the same
communication interface exported by the communication stack. The
StarToCommunication component makes it possible to connect STaR to the underlying
communication stack. The StarLabelling component classi es packets into tra c ows,
and determines the associated label. The StarCon g component allows users
to enable/disable security policies, and change their association to tra c ows,
thus providing recon gurability at runtime. Finally, the StarEngine component
actually processes packets, according to the security policy associated to the
tra c ow they belong to. Figure 2 shows a packet processed by STaR, with the
Label eld prepended to the packet payload. So far, the StarEngine component
relies on standard security algorithms and does not consider any key
management mechanism. We assume that key management is provided by an external
component. In other words, STaR focuses on securing communication, assuming
keys have been already deployed and are properly managed.</p>
      <p>Note that the modularity of STaR simpli es the porting of STaR onto di
erent communication stacks. Actually, a di erent communication stack requires
to customize the StarToCommunication and StarToApplication components,
whereas the other components remain unmodi ed.</p>
      <p>Although the application developer is not required to change the
application code and/or behavior, he/she has certain obligations in order to exploit
STaR, namely i) implementation of security policieres; ii) tra c segmentation;
iii) association of security policies to tra c segments; and, nally, iv) STaR
initialization. We deal with these issues in the next sections.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Secure communication services</title>
      <p>As described in Section 3, STaR assumes that each packet belongs to a speci c
tra c ow. That is, each packet is logically associated to a speci c label that
represents a particular tra c ow.</p>
      <p>STaR relies on packet labels in order to protect multiple tra c ows at the
same time. All packets belonging to a given packet ow can be associated to a
common label, and secured before transmission, according to a speci ed
security policy. Conversely, incoming packets can be unsecured upon being received,
according to the security policy associated to the tra c ow they belong to.</p>
      <p>STaR is responsible for both securing/unsecuring packets and mapping ow
labels into security policies. As shown in Section 3, these tasks are totally
transparent to the application. In fact, the application can still rely on the original
communication interface provided by the available communication stack, and
does not require to be modi ed. In order to manage associations between tra c
ows and security policies, STaR maintains two tables: i) a Security Policy Table
(SPT ), and ii) a PolicyDB.</p>
      <p>The SPT is formatted as follows. The Label eld is one byte in size and can
range from 0 to 255. That is, STaR is able to manage up to 256 di erent tra c
ows at the same time. The PolicyID eld speci es the security policy to be
adopted for a given tra c ow. PolicyID entries in the SPT refer to security
policies speci ed in the PolicyDB by the speci c STaR implementation. Finally,
the Active eld indicates whether the security policy associated to a given label
has to be applied or not to packets belonging to such tra c ow. The Active
eld is set to TRUE by default in all entries. Also, SPT s of all network nodes are
supposed to be initialized in the same way at the network startup. In order to
manage the SPT at runtime, STaR provides the user with a set of con guration
functions, which are described in Section 5. Table 1 shows an example of SPT.
Note that di erent labels can be associated to the same security policy. That is,
packets belonging to di erent tra c ows can be secured in the same way.</p>
      <p>
        The PolicyDB is formatted as follows. PolicyID values in the PolicyDB have
to match PolicyID entries of the SPT, in order to correctly retrieve the
security policy implementation provided by STaR. The EntryPoint eld contains a
reference to the code section which implements the policy (e.g. a C++ function
pointer). If we consider an environment which allows for dynamically loading
new security modules [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ], the set of available security policies can be changed
dynamically. Otherwise, if we consider a static environment like TinyOS [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ], also
such a set must be statically initialized before devices bootstrap takes place.
      </p>
      <p>Label PolicyID Active
0 SP005 TRUE
1 SP013 TRUE
2 SP152 FALSE
... ... ...
254 SP152 TRUE
255 SP020 FALSE
Table 1. Example of Security Policy Table.</p>
      <p>PolicyID EntryPoint</p>
      <p>SP005 errCode (*encrypt)(bu er)</p>
      <p>... ...</p>
      <p>SP152 errCode (*authenticate)(bu er)</p>
      <p>Table 2. Example of PolicyDB Table.
STaR provides the user with four communication functions, namely send, receive,
retrieveLabel, and retrievePolicy. In the following, we describe such functions in
terms of their parameters and behavior.
bool send(packet, size);
bool receive(packet, size);
Provide packet of size size to STaR. Return TRUE in case of success.
Provide packet of size size to the application. Return TRUE in case of success.</p>
      <p>These two functions are responsible for communication between the
application and the lower layers. Note that the signatures reported above change their
implementation according to the adopted communication protocol. As speci ed
in Section 3, the application developer has to implement both tra c
segmentation into ows and the association between security policies and tra c ows.</p>
      <p>The retrieveLabel function implements tra c segmentation whereas the
operation retrievePolicy implements the association between security policies and
tra c ows as follows.
int retrieveLabel(packet);
Return the label associated to the tra c ow which packet belongs to.
Policy retrievePolicy(label);</p>
      <p>Return the security policy associated to the label label. Firstly, access the
SPT to retrieve the PolicyID associated to label label. Then, access the
PolicyDB to retrieve the policy. Return an error code in case the Active eld in the
SPT is set to FALSE, or the policy is not present in the PolicyDB.</p>
      <p>The application developer must determine the best security policy to protect
each tra c ow, and bind each one of them to a speci c label value. Speci cally,
the retrieveLabel function must implement the criteria according to which it is
possible to infer which tra c ow a given packet belongs to.</p>
      <p>Of course, a base version of retrieveLabel can behave according to a default
set of criteria. For instance, it can consider all packets as belonging to a single
common tra c ow, and associate them a common label value. By doing so, all
packets would be protected according to the same security policy.
4.2</p>
      <sec id="sec-4-1">
        <title>STaR communication scheme</title>
        <p>In the presence of STaR, the transmission of a packet P takes place
according to the following steps. First, the application provides STaR with packet
P , through the send function. Then, STaR retrieves the label L associated to
packet P through the retrieveLabel function, and the associated security policy
SP through the retrievePolicy function.</p>
        <p>After that, STaR builds a one byte eld, lls it with the label L, and inserts
it between the header and the payload of packet P . Then, packet P is secured,
according to the security policy SP . Finally, STaR provides the secured packet
P to the communication stack, and delivers it to the scheduled recipient nodes.</p>
        <p>Note that the additional label byte must never be encrypted, in order to
assure that packet P is correctly unsecured at the recipient side. However, the
label byte can be authenticated, in order to guarantee that it has been actually
generated by the STaR component. Figure 3(a) shows how an outgoing packet
is processed in the presence of STaR.</p>
        <p>Conversely, the reception of a packet P takes place according to the following
steps. STaR receives the secured packet P from the communication stack, and
retrieves the label L from the additional label byte, which can then be removed.</p>
        <p>After that, STaR retrieves the security policy SP associated to label L,
through the retrievePolicy function, and unsecures packet P , according to SP .
Finally, STaR provides the unsecured packet to the application, that receives
it through the receive function. Figure 3(b) shows how an incoming packet is
processed in the presence of STaR.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>STaR con guration services</title>
      <p>STaR allows users to dynamically change security settings at runtime, and
provides a speci c con guration interface aimed at changing how security policies
are used, as well as their association to tra c ows.</p>
      <p>If the operating system allows for changing some program modules at
runtime, it is possible to add and remove policies and tra c ows, in order to match
new security requirements more e ectively. STaR provides seven con guration
functions, namely enablePolicy, disablePolicy, changePolicy, addPolicy,
removePolicy, addFlow, and removeFlow. In the following, we describe such functions
as to their parameters and behavior.
void enablePolicy(label);
Set to TRUE the Active eld of the SPT entry related to label label. Then
STaR starts applying such security policy to all packets belonging to the tra c
ow associated to label label.
void disablePolicy(label);
Set to FALSE the Active eld of the SPT entry related to label label. Then
STaR stops applying such security policy to all packets belonging to the tra c
ow associated to label label.
void changePolicy(label, newPolicy);
Write newPolicy in the PolicyID eld of the SPT entry related to label label.
The Active eld of the SPT entry remains unchanged.</p>
      <p>Thanks to the STaR con guration interface, the application is allowed to
change security settings at runtime. To change a security policy, a speci c
control message is needed. Such a message is injected into the network as a common
message, but belongs to a speci c ow used for STaR management. Messages
belonging to this ow are processed by STaR in a special manner and not
forwarded to the rest of communication stack, because their purpose is to change
the behavior of the StarEngine component.</p>
      <p>
        Also, STaR can dynamically change its behavior even in software platforms
which does not allow for dynamically loading/unloading modules, such as TinyOS
[
        <xref ref-type="bibr" rid="ref27">27</xref>
        ]. This is possible by lling all the implemented SPT entries and
activating/deactivating them, by simply calling the con guration interface functions.
      </p>
      <p>The following four functions can be implemented only if the operating system
allows for dinamically changing the program loaded on sensor nodes.
void addPolicy(PolicyID, EntryPoint);</p>
      <p>Add the policy identi ed by PolicyID to the PolicyDB. EntryPoint speci es
the code section to be executed to apply the speci ed policy.
void removePolicy(PolicyID);
void addFlow(label);</p>
      <p>Remove the policy identi ed by PolicyID from the PolicyDB.</p>
      <p>Add a ow with ID label to the SPT. Firstly, verify it is not a copy of another
ow, then set the PolicyID eld to UNDEFINED and the Active eld to FALSE.
These elds will be set by a policy association.
void removeFlow(label);</p>
      <p>Remove the ow identi ed by label from the SPT.
6</p>
    </sec>
    <sec id="sec-6">
      <title>STaR TinyOS implementation</title>
      <p>
        We implemented the STaR component [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ] for TinyOS 2.1.1, which is currently
available at [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ]. We have implemented the security features described in
Section 4 and Section 5, with reference to the Tmote Sky motes [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] and the
CC2420 chipset [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ]. At the moment, we have implemented the Skipjack
encryption module [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ] and the SHA-1 module for integrity hashing [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], and are
working to allow users to choose among more standard security protocols.
The amount of ROM memory available on Tmote Sky motes is 48 kB, and
may represent a severe constraint while dealing with complex modules like those
composing STaR.
      </p>
      <p>In order to evaluate memory consumption on Tmote Sky motes, we
considered the TinyOS image size wiring the STaR submodules separately.
{ S is the image size in bytes of the original TinyOS stack and the
RadioCountToLeds application, which is one of the demo applications provided
with TinyOS.
{ C^ = S + C is the image size in bytes of the original TinyOS stack and the
RadioCountToLeds application (S), wired to the StarCon g module (C).</p>
      <p>C = C^ S is the memory occupancy of the StarCon g module.
{ E^ = S + C + E is the image size in bytes of the original TinyOS stack and
the RadioCountToLeds application (S), wired to the StarCon g module (C)
and the Skipjack submodule of the StarEngine module (E). E = E^ C^ is the
memory occupancy of the Skipjack submodule of the StarEngine module.
{ A^ = S + C + A is the image size in bytes of the original TinyOS stack and
the RadioCountToLeds application (S), wired to the StarCon g module (C)
and the SHA-1 submodule of the StarEngine module (A). A = A^ C^ is the
memory occupancy of the SHA-1 submodule of the StarEngine module.</p>
      <p>Memory Memory
occupancy (B) occupancy (%)</p>
      <p>Table 3 provides more detailed information on memory occupancy. As
explained above, we considered the original TinyOS stack together with the
RadioCountToLeds application, each STaR module separately, and the amount of
memory still available. If we sum the contributions of the StarCon g, Skipjack
and SHA-1 modules, we observe that our STaR implementation totally requires
the 14:16% of the overall memory available on a Tmote Sky mote. Since the
application together with the TinyOS stack requires the 27:86% of the
available memory, we have the 57:98% of 48 kB still available for other uses. We
believe that the amount of memory required by STaR is reasonable with respect
to the available memory. Also, STaR modular implementation allows for saving
memory by loading only a few of the available modules, provided that the
speci c software platform makes it possible, and it is well known what modules are
needed.
6.2</p>
      <sec id="sec-6-1">
        <title>STaR performance evaluation</title>
        <p>
          In our analysis, we assumed that STaR is operating on top of the 2.4 GHz
physical layer, with a 250 Kb/s bit rate [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ]. Then, we modeled the impact of
security considering two main aspects: i) the network performance degradation
due to security processing and extra trasmissions overhead, and ii) the extra
energy consumption, due to extra processing and extra transmissions.
        </p>
        <p>We evaluated the security processing overhead by means of experiments,
while the extra transmission overhead has been computed analytically,
considering the bit rate and the packet size. Also, energy consumption has been evaluated
analytically, considering single energy contributions.</p>
        <p>Figure 5 shows the sequence of events which take place when we transmit
a secured packet with STaR, according to the TinyOS Send/SendDone schema.
The time interval named STaR processing overhead is the extra time required to
process the packet according to the chosen security policy. This time has been
evaluated experimentally.</p>
        <p>Policy dproc ( s) deSvitaatniodnar(d s)
NONE 142 0
ENC 1239.70 1.96</p>
        <p>HASH 32853.50 2.53
ENC + AUTH 33948.65 3.01</p>
        <p>In our experiments, we observed one sender device at a time transmitting
secured packets whose payload is 8 bytes in size. In order to increase the
accuracy of our results, we performed 10 repetitions of 20 transmissions for each
experiment. The results shown in Table 4 are averaged over all the di erent
repetitions. We also report the standard deviation we derived from the independent
replication method.</p>
        <p>The rst line shows the delay associated to the NONE policy, i.e. packets
just cross the STaR component, which adds the label corresponding to neither
encryption nor authetication. In this case we have a constant delay because
STaR always performs the same simple sequence of operations.</p>
        <p>The second line shows the delay associated to the ENC policy. In this case
packets are labelled in order to be encrypted. Then, the label is recognized by
the StarEngine module, which encrypts packets using Skipjack. We notice a
considerable increase in the delay due to the block encryption operations. If we
consider Cipher-block chaining (CBC ) Skipjack, we can use this algorithm also
for authentication.</p>
        <p>The third line shows the delay associated to the HASH policy. In this case,
packets are labelled in order to be hashed. Then, the label is recognized by the
StarEngine module, which applies SHA-1 on packets.</p>
        <p>Finally, the fourth line shows the delay associated to the ENC + AUTH
policy. In this case, packets are labelled in order to be encrypted by Skipjack as
well as authenticated by means of SHA-1 hashing. This delay should be close
to dENC + dHASH dNONE because it combines the behaviors of the encryption
policy and the hashing policy. We subtract the delay due to labelling (dNONE),
because we consider it twice when summing dENC and dHASH, but it is actually
performed just once.</p>
        <p>If we consider values in Table 4 we have dENC + dHASH dNONE = 33951:2 s
with a standard deviation of 3:20 s. Thus, we think the reported delay is
coherent, and the error acceptable. Note that considerable delays are due to the
standard encryption and authentication algorithms, while the actual STaR
contribution to the processing delay is just 142 s. This is the additional time
required to add the label eld to packets, thus assuring that each one of them
is correctly processed according to the associated security policy. We believe
that this delay is negligible if compared to the ones introduced by standard
cryptographic computations, such as those performed by Skipjack and SHA-1.</p>
        <p>
          The transmission overhead has been evaluated analytically, with a bit rate
equal to 250 Kb/s [
          <xref ref-type="bibr" rid="ref26">26</xref>
          ]. Speci cally, we have considered the time required to
transmit the additional bytes added by STaR, according to the speci c security
policy. The size of the original application packet, including the header and the
Cyclic Redundancy Check (CRC ) is 21 bytes. We computed the time dtx required
to transmit the original application packet as the ratio between the packet size
in bits and the bit-rate: dtx = 02:12580 = 672 s.
        </p>
        <p>Policy
NONE
ENC</p>
        <p>
          HASH
ENC + AUTH
voltage and current of the MSP430 microcontroller and the CC2420 chipset,
which are responsible for processing and transmission, respectively [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ].
We have presented STaR, our security software component for WSNs. It allows
for protecting multiple tra c ows at the same time, according to di erent
security policies. STaR is transparent to the application, which can rely on the same
communication interface already in use. Also, STaR allows the user to recon
gure security policies and their association to tra c ows at runtime. Finally, we
have considered our preliminary implementation of STaR for Tmote Sky motes,
and provided a performance evaluation in terms of memory occupancy,
communication overhead, and energy consumption. Our results show that STaR is
e cient as well as a ordable even in the considered resource scarce hardware
platform. In fact, the heaviest impact on performance is due to the adopted
standard security algorithms, and not to the presence of STaR. Future works
will extend STaR interfaces and services, and aim at implementing and
evaluating STaR for di erent architectures and platforms. Also we will include a Key
Manager component for distribution and management of cryptographic keys.
        </p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgment</title>
      <p>This work has been supported by the EU FP7 Network of Excellence CONET
(Grant Agreement no. FP7-224053); the EU FP7 Integrated Project PLANET
(Grant agreement no. FP7-257649); the TENACE PRIN (n. 20103P34XC) funded
by the Italian Ministry of Education, University and Research; and the
Regione Toscana POR CReO 2007 - 2013, LINEA DI INTERVENTO 1.5.a - 1.6,
BANDO UNICO R&amp;S ANNO 2012, Piattaforma Integrata per la Gestione delle
Operazioni Aeroportuali - PITAGORA. We would also like to thank Davide Di
Baccio for his help during the implementation phase of our work.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <given-names>A. A.</given-names>
            <surname>Cardenas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T.</given-names>
            <surname>Roosta</surname>
          </string-name>
          and
          <string-name>
            <surname>S.</surname>
          </string-name>
          <article-title>Sastry: Rethinking security properties, threat models, and the design space in sensor networks: a case study in SCADA systems</article-title>
          .
          <source>Ad Hoc Networks</source>
          <volume>7</volume>
          (
          <issue>8</issue>
          ),
          <volume>1434</volume>
          {
          <fpage>1447</fpage>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <given-names>A.J.</given-names>
            <surname>Menezes</surname>
          </string-name>
          , P.C. van Oorschot and
          <string-name>
            <given-names>S.A.</given-names>
            <surname>Vanstone</surname>
          </string-name>
          <article-title>: Handbook of Applied Cryptography</article-title>
          . CRC Press (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>C. K. Wong</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          <string-name>
            <surname>Gouda</surname>
            and
            <given-names>S.S.</given-names>
          </string-name>
          <article-title>Lam: Secure group communications using key graphs</article-title>
          .
          <source>IEEE J NET</source>
          <volume>8</volume>
          (
          <issue>1</issue>
          ),
          <volume>16</volume>
          {30 (
          <year>February 2000</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>C.</given-names>
            <surname>Karlof</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Sastry</surname>
          </string-name>
          and
          <string-name>
            <surname>D.</surname>
          </string-name>
          <article-title>Wagner: Tinysec: a link layer security architecture for wireless sensor networks</article-title>
          .
          <source>In: Proceedings of the 2nd international conference on Embedded networked sensor systems</source>
          . pp.
          <volume>162</volume>
          {
          <fpage>175</fpage>
          . SenSys '04,
          <string-name>
            <surname>ACM</surname>
          </string-name>
          , New York, NY, USA (
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>C.</given-names>
            <surname>Karlof</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Sastry</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Wagner: TinySec: A Link Layer</surname>
          </string-name>
          <article-title>Security Architecture for Wireless Sensor Networks</article-title>
          .
          <source>In: Second ACM Conference on Embedded Networked Sensor Systems (SenSys</source>
          <year>2004</year>
          ). pp.
          <volume>162</volume>
          {
          <issue>175</issue>
          (November
          <year>2004</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>C.</given-names>
            <surname>Vairo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Albano</surname>
          </string-name>
          and
          <string-name>
            <given-names>S.</given-names>
            <surname>Chessa</surname>
          </string-name>
          :
          <article-title>A secure middleware for wireless sensor networks</article-title>
          .
          <source>In: Proceedings of the 5th Annual International Conference on Mobile and Ubiquitous Systems: Computing, Networking, and Services</source>
          . pp.
          <volume>59</volume>
          :
          <issue>1</issue>
          {
          <issue>59</issue>
          :
          <fpage>6</fpage>
          . Mobiquitous '08,
          <string-name>
            <surname>ICST</surname>
          </string-name>
          <article-title>(Institute for Computer Sciences, Social-Informatics and Telecommunications Engineering)</article-title>
          , ICST, Brussels, Belgium (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7. CONET:
          <article-title>Cooperating objects network of excellence, european commission, 7th framework programme</article-title>
          ,
          <source>grant agreement n. 224053</source>
          . http://www.cooperatingobjects.eu/ (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8. Contiki:
          <article-title>Contiki: The open source operating system for the internet of things</article-title>
          . http://www.contiki-os.org/ (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9. Crossbow Technology Inc.:
          <string-name>
            <surname>MPR-MIB Users Manual</surname>
          </string-name>
          (
          <year>June 2007</year>
          ), http://bullseye.xbow.com:81/Support/
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <given-names>D.</given-names>
            <surname>Eastlake</surname>
          </string-name>
          and P.
          <source>Jones: RFC 3174 - US Secure Hash Algorithm</source>
          <volume>1</volume>
          (
          <issue>SHA1</issue>
          ) (
          <year>September 2001</year>
          ), http://tools.ietf.org/html/rfc3174
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11. ERIKA Enterprise:
          <article-title>Erika Enterprise</article-title>
          and
          <string-name>
            <surname>RT-Druid</surname>
          </string-name>
          (
          <year>2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>G</given-names>
            <surname>Dini and I.M.</surname>
          </string-name>
          <article-title>Savino: A Security Architecture for Recon gurable Networked Embedded Systems</article-title>
          .
          <source>International Journal of Wireless Information Networks</source>
          <volume>17</volume>
          ,
          <issue>11</issue>
          {
          <fpage>25</fpage>
          (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>G.</given-names>
            <surname>Dini and M.</surname>
          </string-name>
          <article-title>Tiloca: Considerations on Security in ZigBee Networks</article-title>
          .
          <source>In: Proceedings of the IEEE International Conference on Sensor Networks, Ubiquitous, and Trustworthy Computing</source>
          . pp.
          <volume>58</volume>
          {
          <issue>65</issue>
          (
          <year>June 2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14. Institute of Electrical and Electronics Engineers, Inc.: IEEE Std.
          <volume>802</volume>
          .15.4
          <article-title>-2006, IEEE Standard for Information technology - Telecommunications and information exchange between systems - Local and metropolitan area networks -</article-title>
          <source>Speci c requirements Part</source>
          <volume>15</volume>
          .4:
          <string-name>
            <given-names>Wireless</given-names>
            <surname>Medium Access</surname>
          </string-name>
          <article-title>Control (MAC) and Physical Layer (PHY) Speci cations for Low-Rate Wireless Personal Area Networks (WPANs)</article-title>
          . New York (
          <year>September 2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>J. Maerien</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Michiels</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          <string-name>
            <surname>Huygens</surname>
            and
            <given-names>W.</given-names>
          </string-name>
          <article-title>Joosen: MASY: MAnagement of Secret keYs for federated mobile wireless sensor networks</article-title>
          .
          <source>In: Proceedings of the 6th IEEE International Conference on Wireless and Mobile Computing, Networking and Communications</source>
          . pp.
          <volume>121</volume>
          {
          <issue>128</issue>
          (
          <year>October 2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16. L.
          <string-name>
            <surname>Buttyan</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Gessner</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Hessler</surname>
            and
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Langendoerfer</surname>
          </string-name>
          <article-title>: Application of wireless sensor networks in critical infrastructure protection: challenges and design options [security and privacy in emerging wireless networks]</article-title>
          .
          <source>Wireless Communications, IEEE</source>
          <volume>17</volume>
          (
          <issue>5</issue>
          ),
          <volume>44</volume>
          {49 (
          <year>October 2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <given-names>L.H.</given-names>
            <surname>Freitas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.A.</given-names>
            <surname>Bispo</surname>
          </string-name>
          ,
          <string-name>
            <given-names>N.S.</given-names>
            <surname>Rosa</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.R.F.</given-names>
            <surname>Cunha:</surname>
          </string-name>
          SM-Sens:
          <article-title>Security middleware for Wireless Sensor Networks</article-title>
          .
          <source>In: Proceedings of the Information Infrastructure Symposium</source>
          ,
          <year>2009</year>
          . Global. pp.
          <volume>1</volume>
          {
          <issue>7</issue>
          . GIIS '
          <volume>09</volume>
          (
          <year>June 2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>M. Albano</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Chessa</surname>
            and
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Di</surname>
          </string-name>
          <article-title>Pietro: Information assurance in critical infrastructures via wireless sensor networks</article-title>
          .
          <source>In: Proceedings of the 4th International Conference on Information Assurance and Security</source>
          . pp.
          <volume>305</volume>
          {
          <fpage>310</fpage>
          . ISIAS '
          <volume>08</volume>
          (
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19. Moteiv Corporation:
          <article-title>Tmote iv low power wireless sensor module</article-title>
          (
          <year>November 2006</year>
          ), http://www.snm.ethz.ch/snmwiki/pub/uploads/Projects/tmote sky datasheet.pdf
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <given-names>N.</given-names>
            <surname>Matthys</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Huygens</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Hughes</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Michiels</surname>
          </string-name>
          and
          <string-name>
            <given-names>W.</given-names>
            <surname>Joosen</surname>
          </string-name>
          :
          <article-title>A Component and Policy-Based Approach for E cient Sensor Network Recon guration</article-title>
          .
          <source>In: Proceedings of the 2012 IEEE International Symposium on Policies for Distributed Systems and Networks</source>
          . pp.
          <volume>53</volume>
          {
          <issue>60</issue>
          (
          <year>July 2012</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>P.E. Lanigan</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Gandhi</surname>
            and
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Narasimhan</surname>
          </string-name>
          <article-title>: Sluice: Secure Dissemination of Code Updates in Sensor Networks</article-title>
          .
          <source>In: Proceedings of the 26th IEEE International Conference on Distributed Computing Systems</source>
          . pp.
          <volume>53</volume>
          {
          <issue>62</issue>
          (
          <year>July 2006</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22. PLANET:
          <article-title>Platform for the deployment and operation of heterogeneous networked cooperating objects, european commission, 7th framework programme</article-title>
          ,
          <source>grant agreement n. 257649</source>
          . http://www.planet-ict.eu/ (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <given-names>R.</given-names>
            <surname>Daidone</surname>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            <surname>Dini and M.</surname>
          </string-name>
          <article-title>Tiloca: STaR source code</article-title>
          . http://www.iet.unipi.it/g.dini/download/code/star.
          <source>zip (March</source>
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24. S. Hyun,
          <string-name>
            <given-names>P.</given-names>
            <surname>Ning</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Liu</surname>
          </string-name>
          and W. Du:
          <article-title>Seluge: Secure and DoS-Resistant Code Dissemination in Wireless Sensor Networks</article-title>
          .
          <source>In: Proceedings of the 2008 International Conference on Information Processing in Sensor Networks</source>
          . pp.
          <volume>445</volume>
          {
          <issue>456</issue>
          (April
          <year>2008</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <given-names>S.</given-names>
            <surname>Zhong</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Chuang</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Fengyuan</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Yixin</surname>
          </string-name>
          and
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Xiaowen: An e cient scheme for secure communication in large-scale wireless sensor networks</article-title>
          .
          <source>In: Communications and Mobile Computing. WRI International Conference on. CMC '09</source>
          , vol.
          <volume>3</volume>
          , pp.
          <volume>333</volume>
          {
          <issue>337</issue>
          (
          <year>January 2009</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26. Texas Instruments:
          <source>Texas instruments cc2420 2.4 ghz ieee 802.15</source>
          .4 / zigbee ready rf transceiver (
          <year>2012</year>
          ), http://focus.ti.com/lit/ds/symlink/cc2420.pdf
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27. TinyOS Working Group:
          <article-title>Tinyos home page</article-title>
          . http://www.tinyos.net/ (
          <year>2012</year>
          ), http://www.tinyos.net/
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>U.S. National Security</surname>
          </string-name>
          <article-title>Agency (NSA): SKIPJACK and KEA algorithm speci cations</article-title>
          (May
          <year>1998</year>
          ), http://csrc.nist.gov/groups/ST/toolkit/documents/skipjack/skipjack.pdf
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29. W. Gu,
          <string-name>
            <given-names>N.</given-names>
            <surname>Dutta</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Chellappan</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Xiaole</surname>
          </string-name>
          :
          <article-title>Providing end-to-end secure communications in wireless sensor networks</article-title>
          .
          <source>Network and Service Management, IEEE Transactions on 8(3)</source>
          ,
          <volume>205</volume>
          {218 (
          <year>September 2011</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30. ZigBee Alliance:
          <article-title>ZigBee Document 053474r17</article-title>
          ,
          <article-title>ZigBee Speci cation</article-title>
          .
          <source>ZigBee Alliance</source>
          (
          <year>January 2008</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>