<!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>Block Cipher for Constrained Platforms: Specication and Benchmarking</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Marcos Simpclio Jr</string-name>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Paulo S. L. M. Barreto</string-name>
          <email>pbarreto@larc.usp.br</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Tereza C. M. B. Carvalho</string-name>
          <email>carvalho@larc.usp.br</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Cintia B Margi</string-name>
          <email>cbmargi@larc.usp.br</email>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Mats Naslund</string-name>
          <email>mats.naslund@ericsson.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Ericsson Research - Stockholm</institution>
          ,
          <country country="SE">Sweden</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Laboratory of Computer Architecture and Networks, PCS-EP, University of Sa~o Paulo</institution>
          ,
          <country country="BR">Brazil</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>Privacy is a key concern in Location Based Applications (LBAs), especially due to their intensive use resource constrained devices in which general purpose ciphers are dicult to deploy. In this paper, we address this issue by specifying a new, faster key-schedule algorithm for the Curupira block cipher. This special-purpose cipher follows the Wide Trail Strategy (such as AES) and is tailored for resource-constrained platforms, such as sensors and mobile devices. Furthermore, we present our benchmark results for both the Curupira-1 (which adopts the original key-schedule specication) and the Curupira-2 (which adopts the new one) in appropriate testbeds.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The continuous and widespread development of context-aware applications based
on Wireless Sensor Networks (WSNs) shows their potential to allow a high
level of integration between computers and the physical environment.
LocationBased Applications (LBAs) play an important role in this scenario,
automatically adapting their behaviors to the available geo-spatial location information
and the nearby sensors and devices. This way, these systems are able to provide
both novel and more eective services. However, due to the sensitive nature of
the data involved (both location information and other data collected by the
network nodes) the security of the communication in these applications is an
important concern.</p>
      <p>
        Battery-powered sensor nodes and other limited platforms normally
employed in LBAs impose several constraints over the cryptographic algorithms
that can be eectively deployed. For example, commercial motes usually have a
memory size of 8-12 KB for code and 512-4096 bytes of RAM, as well as 4-16 MHz
processors [
        <xref ref-type="bibr" rid="ref17 ref21">21, 17</xref>
        ]. Moreover, messages exchanged in these applications are
frequently small, a typical packet being 24 bytes in length [
        <xref ref-type="bibr" rid="ref22 ref30">22, 30</xref>
        ]. In this context,
complex all-purpose algorithms not only take longer to run but also consume
more energy, which motivates the research for more ecient alternatives.
      </p>
      <p>
        To date, many architectures have been proposed to provide security in WSNs.
One of the most popular is TinySec [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ], which oers link layer security to
TinyOS [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ], the de facto standard operating system for sensor networks. As
default block cipher, TinySec has chosen Skipjack [
        <xref ref-type="bibr" rid="ref33">33</xref>
        ] due to its superior
performance. Meanwhile, RC5 [
        <xref ref-type="bibr" rid="ref34">34</xref>
        ] was not considered as an alternative since it is
considered to be encumbered with patents and, even if it can run faster than
Skipjack when the round keys are pre-computed, this incurs extra RAM
requirements [
        <xref ref-type="bibr" rid="ref15">15</xref>
        ]. However, as Skipjack uses relatively small (80-bit) keys and 31 out of
its 32 rounds can be successfully cryptanalyzed [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ], it presents a very low margin
of security. These observations lead to security concerns regarding TinySec, as
well as other architectures based on the same cipher, such as TinyKeyMan [
        <xref ref-type="bibr" rid="ref24">24</xref>
        ],
MiniSec [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ] and Sensec [
        <xref ref-type="bibr" rid="ref23">23</xref>
        ].
      </p>
      <p>
        The literature includes numerous analyses of modern cryptographic
algorithms, aiming to identify those well-suited to WSNs both in terms of security
and performance. One of the most extensive is presented by [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ], which
concludes that Skipjack is the most energy-ecient of all surveyed ciphers, while
the Advanced Encryption Standard (AES) [
        <xref ref-type="bibr" rid="ref32">32</xref>
        ] and MISTY1 [
        <xref ref-type="bibr" rid="ref27">27</xref>
        ] are considered
reasonable alternatives in scenarios with higher security requirements. However,
MISTY1 is considered to be encumbered with patents, while AES has larger
code, memory, and energy requirements, as well as a block size which is too
big for sensor networks. It could also be possible to rely on cryptographic
hardware [
        <xref ref-type="bibr" rid="ref16">16</xref>
        ], but this is not a solution available in many modern devices.
      </p>
      <p>
        An alternative to address these issues is the adoption of Curupira [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ], a
special-purpose block cipher specially developed with constrained platforms in
mind. The cipher follows the Wide Trail strategy [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ], such as the AES itself,
which assures a good security against cryptanalysis. Also, it presents an
involutional structure (meaning that the encryption and decryption processes are
identical except by the key-schedule) and is very exible in terms of
implementation. This way, the cipher is well adapted to resource constrained scenarios
such as those faced by LBAs.
      </p>
      <p>In this paper, we propose a new, faster key-schedule algorithm for the
Curupira algorithm and analyze its security. We also present a benchmark
comparing Skipjack, AES and Curupira in relevant platforms. In order to discern
between the two versions of the Curupira cipher, we write ‘ Curupira-1" for
the one adopting the original key-schedule and \ Curupira-2" for the new
specication. We write simply \ Curupira" when the discussion applies to both.</p>
      <p>This document is organized as follows. We introduce basic mathematical tools
and notation in section 2. An overview of the Curupira-1, including its
keyschedule algorithm, is given in section 3. The second version of the key-schedule
is presented in section 4, which also discuss security, performance and
implementation issues for the resultant Curupira-2 block cipher. Our benchmark results
are presented in section 5. We conclude in section 6.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Mathematical preliminaries and notation</title>
      <p>The nite eld GF(2 n) will be represented as GF(2)[ x]=pn(x), where pn(x) is a
primitive pentanomial of degree n over GF(2), i.e. deg( pn(x)) n. This way, all
multiplications over GF(2 8) are made modulo p8(x) = x8 + x6 + x3 + x2 + 1.
This choice of p8(x) incurs in a simple form for the primitive cube root of unity,
c(x) = x85 mod p8(x) = x4 + x3 + x2.</p>
      <p>An element u = u7x7 +: : :+uixi +: : :+u0 of GF(28) where ui 2 GF(2) for all
i = 0; : : : ; 7, will be denoted by the numerical value u7 27 + : : : + ui 2i + : : : + u0,
written in hexadecimal notation. Thus, the polynomial c(x) is written 1C, while
p8(x) is written 14D. The multiplication by the polynomials x and c(x) are
denoted xtimes and ctimes, respectively.</p>
      <p>
        The set of all 3 n matrices over GF(2 m) is denoted by Mn. Let D and E
denote the MDS matrices (see [
        <xref ref-type="bibr" rid="ref26">26</xref>
        ] for a denition) as follows:
2
3
2
      </p>
      <p>3
3 2 2 1+c(x) c(x) c(x)
D = 4 4 5 4 5 ; E = 4 c(x) 1+c(x) c(x) 5 :</p>
      <p>6 6 7 c(x) c(x) 1+c(x)
3</p>
    </sec>
    <sec id="sec-3">
      <title>Overview of the CURUPIRA-1 structure</title>
      <p>
        This section gives a brief description of the Curupira-1 original specication.
For further details, we refer to [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>
        The Curupira is a block cipher specially tailored for constrained platforms.
It operates on 96-bit data blocks (organized as M4 matrices, mapped by columns
instead of by rows) and accepts 96-, 144- or 192-bit keys, with a variable number
of rounds. The cipher round structure is similar to the one in BKSQ [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], with
the advantage of being involutional, resulting in a more compact cipher. Its
round function structure is used for both Curupira-1 and Curupira-2 and is
composed by the following self-inverse transforms (see Figure 1:
{ Nonlinear Layer ( ): all bytes in the block pass through a highly nonlinear
      </p>
      <p>
        S-Box, identical to that used in Anubis [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ] and Khazad [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] block ciphers;
{ Linear Diusion Layer ( ): the block is left-multiplied by the MDS matrix
      </p>
      <p>D (the one dened in section 2), which results in intra-columnar diusion;
{ Permutation Layer ( ): all the bytes in the second and third rows of the
block are permuted according to the rule (a) = b , bi;j = ai;i j ; 0 6 i &lt;
3; 0 6 j &lt; n;
{ Key addition Layer ( ): the round key is XORed with the block.</p>
      <p>These transforms only involve basic operations such as table lookups, XORs
and byte shifts. Thus, they can be implemented in most platforms in a very
ecient way. Nonetheless, when space is available, they can be further accelerated
using pre-computed tables, operating over entire columns of the block instead of
byte-to-byte.
The Curupira-1 key-schedule algorithm is easily invertible and follows a
structure closely related to the one dictated by the Wide Trail Strategy, which assures
a high diusion speed. Also, it has the advantage of being cyclical, which means
that the original key is recovered after a certain number of rounds, avoiding the
need of storing any intermediary sub-key during both encryption and decryption.</p>
      <p>In this rst construction, a 48 t-bit user key K, 2 6 t 6 4 is internally
represented as a matrix K 2 M2t. To generate a sub-key Kn+1 from its predecessor
Kn, the sub-keys pass through three dierent transformations (illustrated in
Figure 2):
{ Constant Addition ( (q)): a set of nonlinear constants, incrementally taken
from the S-Box, are XORed with the bytes in the rst row of the round key;
this way, for a 48t-bit key, the rth round and the column j, the qj(r) constant
is given by: qj(0) = 0 and qj(r) = S[2t(r 1) + j], 0 6 j 6 2t;
{ Cyclic Shift ( ): rotates the second row one position to the left, and rotates
the third row one position to the right, keeping the rst row unchanged;
{ Linear Diusion ( ): the round-key is left-multiplied by the matrix E
(dened in section 2).</p>
      <p>Furthermore, the round keys (r) eectively combined with the data blocks
are chosen by the Key Selection algorithm r, which applies the S-Box to the
rst row of the sub-key Kr and truncates it to 96 bits (i.e., the size of the
block). Thus, even if the Key Selection is not part of the key evolution, it adds
nonlinearity to the key-schedule.
The Curupira-1 key-schedule specication is quite conservative, aiming for a
high security level against related-key attacks. Thus, it is reasonable to adopt a
simpler yet secure key-schedule algorithm in order to improve the overall cipher
performance. That is the approach of the Curupira-2 key-schedule, which will
be described in the following sections.
A 48t-bits long user key K (2 6 t 6 4) is internally represented as an element
K belonging to the nite eld GF(2 48t) = GF(2)=p48t(x), where p48t(x) is a
pentanomial in GF(2) chosen in such a way that x8 is a primitive root of p(x).
An element u(x) in this eld can be seen as a byte vector, i.e. u = (U6t 1; : : : ; U0),
where U0 indicates the lesser signicant byte. This way, the cryptographic key
K is directly mapped to K, starting at its most signicant byte, K6t 1.</p>
      <p>
        A pentanomial representation was chosen because primitive pentanomials are
available for all values of t used by the Curupira. In fact, the use of trinomials
would result in a better performance, but unfortunately they do not exist for
elds of type GF(2 n) when n is multiple of 8 [
        <xref ref-type="bibr" rid="ref28">28</xref>
        ] and, thus, they cannot be used
for any of the cipher key sizes.
      </p>
      <p>For reasons that will become clearer in section 4.3, the pentanomials chosen
for Curupira-2 are:
{ p96(x) = x96 + x16 + x13 + x11 + 1;
{ p144(x) = x144 + x56 + x53 + x51 + 1;
{ p192(x) = x192 + x43 + x41 + x40 + 1:
4.2</p>
      <sec id="sec-3-1">
        <title>Schedule constants</title>
        <p>The schedule constants are denoted q(s), where the index (s) indicates the round
in which they are applied. As in the Curupira-1, the constants are directly
taken from the S-box and, thus, no extra storage is needed. This time, however,
they are interpreted as elements of GF(2 48t) in such a way that q(0) = 0 and, for
s &gt; 0, q(s) = (S[s 1]; 0 : : : ; 0) i.e. a single S-box output is mapped to the most
signicant byte of q(s). As shown in the next section, this is a strategic position
that makes each constant aect exactly 3 bytes of the round key right after its
addition.
4.3</p>
      </sec>
      <sec id="sec-3-2">
        <title>The key evolution</title>
        <p>s
The sub-keys are updated during the cipher operation by means of two
operations: a reversible transform, @ : GF(248t) ! GF(248t); and an auto-inverse
transform : GF(248t) ! GF(248t). They are dened in such a way that @(u)
u x8 and, for the polynomials u = (U6t 1; : : : ; U0) and v = (V6t 1; : : : ; V0) in
GF(248t) :
v = (u) ,</p>
        <p>Vi = U11 i
Vi = Ui</p>
        <p>U12+i if 0 6 i &lt; 6t
otherwise:
12;</p>
        <p>Together with the schedule constants, these transforms compose the key
evolution function r : GF(248t) ! GF(248t), dened as r(u) @ (u q(r)), in
such a way that K(0) K and K(r+1) = r(K(r)).</p>
        <p>The transform is used to ensure a greater diusion to the schedule when
keys greater than 96 bits are adopted, since it combines some of the least
signicant bytes of the key with the most signicant ones. Without this operation,
two 144-bit keys diering only at the byte K11 would generate sub-keys whose
12 least signicant bytes would be identical for the rst 6 rounds; also, for
192bit keys, this result would hold true for the rst 12 sub-keys. As these least
signicant bytes are the ones actually selected in each round, the eect of the
transform is essential to assure a higher diusion speed for 144- and 192-bit
keys.</p>
        <p>Also, the @ transform is particularly interesting due to its performance,
specially on resource-constrained platforms, as stated in the following theorem:
Theorem 1. Let p(x) = xn + xk3 + xk2 + xk1 + 1 be a primitive pentanomial
of degree n = bw over GF(2) such that k3 &gt; k2 &gt; k1, k3 k1 6 w, and
either k3 mod w = 0 or k1 mod w = 0. Then multiplication by xw in GF(2n) =
GF(2)[x]=p(x) can be implemented with no more than 5 XORs and 4 shifts on
w-bit words. Moreover, if 2 2w bytes of storage are available, the cost drops to
no more than 2 XORs on w-bit words and 2 table lookups.</p>
        <p>Proof. For u = Ldn=01 (udxd) 2 GF(2n), let Ui = uwi+w 1xw 1 + : : : + uwi where
i = 0; : : : ; b 1, so that u = Ub 1xw(b 1) + Ub 2xw(b 2) + : : : + U0, which for
brevity we write u = (Ub 1; : : : ; U0). Then one can compute u xw as:
(Ub 1xw(b 1) + Ub 2xw(b 2) + : : : + U0) xw =
Ub 1xn + Ub 2xw(b 1) + : : : + U0xw =
Ub 2xw(b 1) + : : : + U0xw + Ub 1(xk3 + xk2 + xk1 + 1) =
(Ub 2; : : : ; U0; Ub 1) Ub 1(xk3 + xk2 + xk1 ):</p>
        <p>Assume that k3 = w(k + 1) for some k; the case k1 mod w = 0 is handled
analogously. Thus:
u xw = (Ub 2; : : : ; U0; Ub 1)</p>
        <p>Ub 1(xw + xw k3+k2 + xw k3+k1 )xwk</p>
        <p>Since deg(Ub 1) 6 w 1 and deg(xw + xw k3+k2 + xw k3+k1 ) = w, their
product is a polynomial of degree not exceeding 2 w 1, and hence it ts two
w-bit words for any value of Ub 1. Besides, multiplication of this value by xwk
corresponds to simply displacing it k words to the left. We can dene:
T1[U ]</p>
        <p>U
(U
(w
k3 + k2))) (U
(w
k3 + k1)));
T0[U ] (U
(k3
k2)) (U
(k3
k1));</p>
        <p>Thus, we can write u xw = (Ub 2; : : : ; Uk T1[Ub 1]; Uk 1 T0[Ub 1]; : : : ; U0; Ub 1).
The values T1 and T0 can be either computed on demand or else pre-computed
and stored in two 2w-entry tables. One easily sees by direct inspection that the
computational cost is that stated by the theorem.</p>
        <p>Applying this theorem for the polynomials adopted by the Curupira-2, we
can evaluate the cost of the transforms @ and its inverse:
p96(x) = x96 + x16 + x13 + x11 + 1 :
@ : (U11; : : : ; U0) x8 = (U10; : : : ; U1 T1[U11]; U0
@ 1 : (U11; : : : ; U0) x 8 = (U0; U11; : : : ; U2 T1[U0]; U1
T0[U11]; U11);</p>
        <p>T0[U0]);
p144(x) = x144 + x56 + x53 + x51 + 1 :
@ : (U17; : : : ; U0) x8 = (U16; : : : ; U6 T1[U17]; U5
@ 1 : (U17; : : : ; U0) x 8 = (U0; U17; : : : ; U7 T1[U0]; U6
p192(x) = x192 + x48 + x45 + x43 + 1 :
@ : (U23; : : : ; U0) x8 = (U22; : : : ; U5 T1[U23]; U 4
@ 1 : (U23; : : : ; U0) x 8 = (U0; U23; : : : ; U6 T1[U0]; U5
T0[U17]; : : : ; U0; U17);</p>
        <p>T0[U0]; : : : ; U1);
T0[U23]; : : : ; U0; U23):</p>
        <p>T0[U0]; : : : ; U1):</p>
        <p>For all key sizes, we have T0 = U (U 5) (U 3) and T1 = (U
3) (U 5).</p>
        <p>These equations show that both @ and @ 1 transforms have the same cost
and, thus, it is also valid for r and its inverse, r 1(u) (@ 1 (u)) q(r).
In contrast, when compared to the key-schedule of the Curupira-1, this second
schedule algorithm has one disadvantage: there is no simple way to reinitialize the
key after a reduced number of rounds. However, in many applications, its higher
speed both during encryption and decryption can be a much more interesting
feature, compensating its lack of cyclicity.
The round keys (r) 2 Mn eectively used in each round are calculated by means
of the key selection function r : GF(248t) ! Mn, dened in such a way that:
(r) =
r (K) ,
(
i(;rj) = S[Ki(+r)3j ] if i = 0;
i(;rj) = Ki(+r)3j otherwise:</p>
        <p>
          This way, only the 12 least signicant bytes are taken by r . Also, the S-box is
applied to the bytes that will be combined with the rst row of the block, adding
nonlinearity to the key-schedule, while the bytes for the other rows are taken
directly. The whole process involved in this second version of the key-schedule
algorithm is depicted in Figure 3.
Since, for both versions of our cipher, the round structure remains the same, most
of the Curupira-1 security analysis [6, section 4] also applies to the
Curupira2: the adoption of the Wide Trail Strategy in combination with a highly
nonlinear S-Box thwarts the most well known modalities of attacks, such as linear,
dierential and integral cryptanalysis. As a consequence, no attack faster than
exhaustive search was found for more than 7 rounds of the cipher. These results
were also conrmed by third party analysis [
          <xref ref-type="bibr" rid="ref31">31</xref>
          ]. The main dierence between the
two analysis concerns the existence of weak keys and the viability of related-key
attacks.
        </p>
        <p>Weak keys are keys that result in a block cipher mapping with detectable
weaknesses, which normally occurs when the nonlinear operations depend on the
actual key value. This is not the case for the Curupira, where keys are applied
using XOR and all nonlinearity is xed in the S-box. Also, the nonlinear round
constants considerably reduce the probability of xed points in the key-schedule
process, making the existence of weak keys very unlikely.</p>
        <p>
          Related-key attacks exploit a known relationship between dierent unknown
keys, leading to a predictable behavior for the sub-keys generated by the key
schedule. Some of the most widespread techniques involve key dierentials and
key rotations (cf. [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ]) in order. Due to its slower diusion, it is clear that it
is easier to nd relationships between subsequent sub-keys in Curupira-2 than
in Curupira-1, making the former less resistant to related-key attacks. In fact,
between any two rounds, the dierence in a single internal byte (i.e. in a position
that will only be shifted as a result of the multiplication by x8) results in a
difference on a single byte of the next sub-key, which could be somehow exploited.
In spite of this, some fundamental elements are introduced to the key-schedule
proposed in this paper in order to prevent attacks. First, the nonlinearity
introduced by the key selection thwarts related-key attacks involving dierentials.
Second, the generation of sub-keys does not involve simple rotations, but rather
a multiplication over GF(2 48t) after the addition of nonlinear constants. Third,
the truncation of the sub-keys make some advanced related-key attack variants
such as that described in [13, section 4] improbable. Finally, the slow diusion
in the key schedule is counterbalanced by the round function fast diusion,
assuring that each byte of the key aects many block bytes after a few rounds.
Together, these features make this kind of attacks unlikely to work against the
full cipher.
        </p>
        <p>Furthermore, for key lengths that are larger than the length of one round
key, the existence of sets of keys that produce identical values for at least one
round key is inevitable. Thus, even if the transform adds diusion power to the
key-schedule and prevents the existence of trivial sets with this property, they
should be more easy to nd than in the Curupira-1. Even so, it remains unclear
how such keys could possibly be successfully used in a related-key attack.</p>
        <p>
          As a last remark, the Curupira structure involves only simple operations
such as XORs, shifts and table lookups. As long as the running times for these
transforms are not data-dependent on the target platform, the cipher
implementation can avoid many side-channel attacks (such as timing-attacks [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]) in a
straightforward way.
4.6
        </p>
      </sec>
      <sec id="sec-3-3">
        <title>Implementation and Performance Issues</title>
        <p>The Curupira-2 algorithm is very exible in terms of implementation, oering
many memory/performance trade-os. It cannot only use the same techniques
developed for the Curupira-1 round functions [6, section 5]. These include the
usage of a few tables with pre-computed results, but its key-schedule also allow
some useful optimizations depending on resources available.</p>
        <p>The round keys can be either computed on-demand or fully pre-calculated
and stored in a table for ready access. In the rst case, the cipher requires a
reduced amount of RAM memory, since only one sub-key is stored at any given
time. However, as the key-schedule of Curupira-2 is not cyclic, there is no easy
way to compute the rst round key from the last one. An easy way to overcome
this problem is to use two arrays ka and kb to store the rst and the last
subkeys, respectively: when one wants to encrypt, it suces to copy ka into kb and
reuses ka memory space to create the encryption sub-keys; in the end, ka will
have the last key while kb will store the rst one, assuring that both sub-keys
are always available. The decryption is handled analogously. In this case, the
last sub-key could be computed during the cipher initialization. We note that
this strategy is only possible because the key schedule is easily invertible.</p>
        <p>For 6t-byte keys (2 6 t 6 4), the round sub-keys can be calculated in any
direction at the cost of one circular permutation, 2+6(t-2) XORs and one
computation of T0 and T1. Also, T0 and T1 can be either implemented using two
256-bit tables or calculated on-the-y, taking 1 XOR + 2 shifts and 2 XORs +
2 shifts, respectively. In fact, the circular permutation does not need to be
eectively implemented: the same eect can be achieved if the index corresponding
to the most signicant byte of the key is stored and used as the rst byte of
the key for every calculation; this way, it suces to update this index after each
invocation of the @ and @ 1 operations.</p>
        <p>Reviewing the Curupira preliminary calculations [6, section 5.1], the cost
of its round function is 3 R 1 XORs, 2(R 1)=3 xtimes operations and R
S-box lookups per byte. When the key-schedule and key selection are taken
into account, we add at most 1 =3 S-Box lookups, 1 =3 ctimes operations and 2
XORs per key byte and per round in the Curupira-1, while this cost drops to
at most 5=12 S-Box lookups, 5 =8 XORs and 1=12 computations of T0 and T1
per key byte and per round in the Curupira-2. In comparison, Skipjack takes
basically 48 XORs and 16 F-table lookups per encrypted byte. Thus, supposing
that the cost of any of these basic operations are approximately the same and
not counting auxiliary operations not directly related to the ciphers structures
(such as counter increments and key index updates), Curupira-1 with 96-bit
keys and 10 rounds is about (45 + 27) =64 112:5% as Skipjack when the round
keys computed on demand. On the other hand, Curupira-2 with the same
keysize corresponds to (45 + 7 :5)=64 82% of Skipjack computation in the same
conditions. This result should be expected for similar implementations of both
ciphers on byte-oriented platforms.</p>
        <p>
          Furthermore, more powerful processors (32-bit servers, for example) could
implement the s transform in a more ecient way, operating over columns
instead of bytes. Also, the multiplication by x8 can be easily implemented using
a single table that calculates T0 and T1 at the same time, an approach similar
to those adopted in some very optimized versions of AES [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
5
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Benchmark</title>
      <p>
        In this section, we present the results of our comparison between Curupira,
Skipjack and AES in terms of processing time and memory usage. As discussed
in section 1, the motivation behind the choice of Skipjack resides in the results
presented in [
        <xref ref-type="bibr" rid="ref35">35</xref>
        ] and in [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ] which shows that, in spite of its low security level, the
cipher is a very interesting choice to achieve a high performance in constrained
platforms, surpassing many other hardware-oriented ciphers like MISTY1 and
Kasumi [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. AES, on the other hand, provides higher security but is
recommended for less constrained platforms, since it is a less memory-ecient cipher.
Considering these remarks, we decided to develop a deep analysis on the
comparison of Skipjack and Curupira in both constrained and powerful platforms,
while AES is taken into account only on powerful ones. Three dierent platforms
were chosen as testbeds:
{ Microcontroller (8 bits): a RISC microcontroller PIC18F8490 [
        <xref ref-type="bibr" rid="ref29">29</xref>
        ] equipped
with a 8MHz processor, 768 bytes of RAM and a memory size of 16KB for
code. The reason behind this choice resides in its capacity, slightly superior
to the one presented by the ATmega8535 [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. This last device, with a 4 MHz
processor, 8 KB of ash memory and 512 bytes of RAM, is the one used in
the Smart Dust Project [
        <xref ref-type="bibr" rid="ref17">17</xref>
        ] for sensor networks.
{ Microcontroller Simulator (8 bits): Avrora version 1.6.0 - Beta [
        <xref ref-type="bibr" rid="ref36">36</xref>
        ],
simulating a microcontroller from the ATmega128 [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] series. The goal of using this
simulator is mainly to validate the results obtained with the PIC processor
in a more powerful, yet tiny platform.
{ Pentium 4 (32 bits): a notebook equipped with Pentium 4 (3.2GHz) and 1GB
of RAM. This platform was chosen to evaluate the proposed optimizations
of the cipher when the resources in the target platform are abundant.
5.1
      </p>
      <sec id="sec-4-1">
        <title>Implementation Characteristics</title>
        <p>For the 8-bit versions of Curupira and Skipjack, the same C-written
implementations were analyzed in both the PIC18F84908 and the Avrora simulator.
Furthermore, they adopt similar interfaces in each of these platforms, in order
to assure a fair comparison. They also are more speed-oriented than
memoryoriented, since the consumption of energy with processing is proportional to the
number of operations performed by the algorithm, and this is normally
considered the most critical resource in constrained platforms, particularly in WSNs.</p>
        <p>For the implementation running on Avrora, as recommended by its
documentation, we adopted avr-objdump and avr-gcc (both GNU utilities) as compilation
tools, while MPLAB IDE v7.60 and MPLAB C18 compiler are used together
with the PIC microcontroller. The speed-optimized versions of each cipher,
resulting from the available compiler optimizations, are the ones considered in this
document. It is important to notice that, even if both platforms include indirect
addressing in their instruction sets, our tests showed that the compilers were
not able to fully take advantage of these instructions, resulting in less than
optimal machine codes when pointers and/or matrices were used. That is the reason
why we decided to evaluate two dierent programming techniques: one that uses
pointers and matrices and another that uses basic-type variables more
intensively, avoiding indirect addressing. While the rst approach normally results
in more exible code (where the size of the keys can be more easily changed,
for example), the second allows more optimized implementations with xed-size
keys (enabling loop unrolling with little loss of compactness)</p>
        <p>The implementations running on the 8-bit platforms are detailed below:
CURUPIRA (8 bits) using the proposed optimizations for constrained
platforms, we elected two versions of the Curupira for each scheduling
algorithm:
1. Curupirac-1: complete version (meaning that it accepts all key sizes) of
the Curupira-1. It requires two 256-byte tables, one for the S-Box and
another for the ctimes operation and uses many pointers and matrices
2. Curupirac-2: complete version of the Curupira-2, using two 256-byte
tables for the S-Box and xtimes operations. Such as Curupirac-1, it is
also based on indirect addressing instructions.
3. Curupirak96 -1: Curupira-1 restricted to 96-bit keys. It uses the same
tables as the Curupirac-1, but relies on basic types instead of indirect
addressing instructions.
4. Curupirak96 -2: Curupira-2 restricted to 96-bit keys, using the same
tables as the Curupirac-2 but relying on basic-type variables.</p>
        <p>Skipjack (8 bits) two versions were developed according to the specication:
1. Skipjackc: relies on indirect instructions just like Curupirac-1 and
Curupirac-2, providing a useful source of comparison with these ciphers. It
uses a single 256-byte F-table and calculates the round keys on demand.
2. Skipjackk: adopts programming strategies similar to those present in the
Curupirak96 , strongly relying on operations over basic-type variables
instead of matrices and pointers. Such as the Skipjack c, it also uses a
256-byte F-table and calculates the round keys on-the-y.</p>
        <p>
          For the 32-bits platform, we decided to take advantage of some highly
optimized cipher implementations publicly available. The chosen algorithms, written
in Java, were compiled and run on Netbeans IDE 5.5, using the JDK 1.6. The
details of the implementations are given below:
AES (32 bits) we adopted the implementation of Barreto [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], which pre-computes
the round keys and employs ten 256-word tables to greatly accelerate the
cipher operation.
        </p>
        <p>CURUPIRA (32 bits) the optimizations in the algorithm are similar to those
present in AES, specially regarding the pre-computation of the round keys
and the intensive use of tables, in the same number as AES.</p>
        <p>
          Skipjack (32 bits) the cipher tested is a Java adaptation of Barreto’s
algorithm [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ], originally developed in C language. It operates over 16-bit words
and stores some important key-dependent pre-computed values in a
10x256word matrix; this last operation can be seen as a kind of \key-schedule",
since it must be performed each time the cipher key is changed.
5.2
        </p>
      </sec>
      <sec id="sec-4-2">
        <title>Results: 8-bits platforms</title>
        <p>The ciphers memory usage, for both 8-bit platforms, is presented in Table 1. This
table shows that all tested versions of the Curupira take more space in memory
than Skipjack, an expected result considering the higher complexity of its round
function and key-schedule algorithms. Despite this dierence, the tested ciphers
are both compact enough to be easily deployed in most constrained platforms,
taking less than 3KB as a whole.</p>
        <p>Both Curupira and Skipjack do not need to pre-compute the round keys
and, thus, they require a reduced amount of RAM. We were not able, however, to
directly measure the RAM usage with the tools available for the tested platforms.
Nevertheless, due to its greater block and key size, we speculate that Curupira
takes a higher amount of RAM than Skipjack. For example, when using two
arrays to store the rst and the last keys, Curupira-2 would take about twice
((96 + 2 96)=(64 + 80)) the amount of RAM needed by Skipjack. These numbers
remain very tiny when compared to pre-computed keys storage, though.</p>
        <p>For the PIC microcontroller, Figure 4 shows the number of CPU cycles, per
byte encrypted, of both tested ciphers. The time measured corresponds to a
single encryption of random blocks using dierent keys. Even if the Curupirac
implementations allow three dierent key sizes, only the 96-bit keys are depicted
in this graph. Also, we explicitly distinguish the processing time required for the
key scheduling and the encryption itself (as Skipjack reuses the original key
cyclically, we considered it part of the encryption instead of a \key-schedule").
The gure shows that Curupirac-1 and Curupirac-2 are respectively
20% and 45% faster than Skipjack c, with the round keys computed on
demand. Despite this very positive result, it should be carefully considered since
the measured number of cycles includes not only the operations directly involved
in the encryption process but also a non-negligible number of auxiliary ones. The
inuence of these secondary operations is less expressive on both Skipjack k and
Curupirak96 and, as depicted in the right side of Figure 4, Curupirak96 -2 is
still 18% faster than Skipjack, while Curupirak96 -1 is 12% slower. One can
see that the cost of both Curupirak96 versions in this gure are approximately
the ones theoretically calculated in Section 4.6.</p>
        <p>The results on the Avrora Simulator were slightly dierent from those in the
PIC18F8490, as depicted in Figure 5. Skipjack k speed was considerably improved
by this platform change, running about 30% and 4% faster than Curupirak96 -1
and Curupirak96 -2, respectively. A further analysis of the assembly codes show
that these results were caused by the inuence of the compiler, which were able
to apply dierent optimizations to each algorithm. In contrast, this unexpected
behavior was not observed with Curupirac and Skipjackc implementations,
which sustained the relative performances presented on the PIC18F8490.</p>
      </sec>
      <sec id="sec-4-3">
        <title>Results: 32-bits platforms</title>
        <p>The encryption speed of each cipher on the 32-bits platform, with dierent key
sizes (and, thus, number of rounds), is depicted in Figure 6. It is important to
point out that, as all round keys are computed at cipher initialization, there is
no dierence between the encryption speeds of Curupira-1 and Curupira-2.</p>
        <p>We obtained similar results for AES and Curupira with the same number
of rounds (note the additional graph entry where, for the sake of comparison,
both ciphers were tested with the same number of rounds for each key size). This
is an expected result since both ciphers adopt well-known optimizations for the
Wide Trail Strategy family. On the other hand, the modest result of Skipjack
(about 3 times slower than the other ciphers) may seem surprising at rst sight,
since its performance usually is the main factor for its adoption on constrained
platforms. However, this can be explained by its 16-bit oriented operations, very
attractive on constrained processors but less adapted to fully take advantage
of the higher number of bits available on powerful platforms. Both AES and
Curupira, though, can easily be implemented to operate over 32- and 24-bit
words (columns), respectively.</p>
        <p>The processing time involved on the ciphers key-schedules was also measured.
As depicted in Figure 7, while Curupira and AES presented similar speeds,
Skipjack was about 10 times slower. As this operation has to be performed
a single time (at initialization), the impact on the cipher overall operation is
reduced on scenarios where the keys are not frequently changed.
6</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>We have described a new and faster key-schedule proposal for the Curupira
block cipher. As a drawback, when compared to the original specication, it has
a lower level of security against related-key attacks. However, according to our
security analysis, both versions of the full cipher are secure against cryptanalysis.</p>
      <p>We also presented a benchmark comparing Curupira, Skipjack and AES in
terms of performance and memory occupation, both on constrained and
powerful platforms. According to the results obtained, the proposed block cipher is
fast and compact, especially when using the new key-schedule presented in this
paper. While Skipjack is considered a good candidate for constrained scenarios,
such as LBAs dependent on sensors and low-power mobile devices, Curupira is
a suitable alternative to increase the security level and potentially improve
performance, introducing a reduced impact in terms of memory usage. Also, when
more powerful platforms are also available, the several optimizations allowed by
the Curupira can be deployed to obtain an even higher performance in the
whole network.</p>
      <p>All together, these results show that the Curupira block cipher is a
useful solution for providing data encryption at low cost, being recommended for
constrained-resource devices and for applications based on such platforms, such
as WSNs and LBAs.
We are currently working on the deployment of Curupira on a real WSN in
order to evaluate its impact (especially in terms of energy consumption) in some
signicant scenarios. Also, we are developing a new MAC algorithm named
Marvin, designed to provide a low-cost authenticated-encryption scheme on WSNs,
particularly when used in conjunction with Curupira.</p>
      <sec id="sec-5-1">
        <title>Acknowledgments We would like to thank Richard Gold for his useful comments and the review of this paper.</title>
        <p>According to a Brazilian legend, the Curupira is a spirit of nature and protector
of the forests. It assumes the form of a boy with red hair, whose feet are turned
backwards. This way, when hunters think they are on the right trail to get it,
they in fact are going to the wrong direction, getting confused and lost. This
should also work against cryptanalysts :-).</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1. 3GPP.
          <article-title>Specication of the 3gpp condentiality and integrity algorithms document 2: Kasumi specication</article-title>
          .
          <source>Technical report, 3GPP</source>
          ,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Atmel</surname>
          </string-name>
          . AVR 8-
          <string-name>
            <surname>Bit</surname>
            <given-names>RISC</given-names>
          </string-name>
          <source>processor - ATmega8535 (90LS8535)</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Atmel</surname>
          </string-name>
          . AVR 8-
          <string-name>
            <surname>Bit</surname>
            <given-names>RISC</given-names>
          </string-name>
          <source>processor - ATmega128 e ATmega128L</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <given-names>P.</given-names>
            <surname>Barreto</surname>
          </string-name>
          .
          <article-title>The Skipjack block cipher { 32 bit implementation</article-title>
          . http://planeta.terra.com.br/informatica/paulobarreto/skipjack32.zip,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <given-names>P.</given-names>
            <surname>Barreto</surname>
          </string-name>
          .
          <article-title>The AES block cipher (rijndael) { 32 bit implementation</article-title>
          . http://planeta.terra.com.br/informatica/paulobarreto/JEAX.zip,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <given-names>P.</given-names>
            <surname>Barreto</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Simplicio</surname>
          </string-name>
          .
          <article-title>Curupira, a block cipher for constrained platforms</article-title>
          .
          <source>In Anais do 25o</source>
          Simpsio
          <string-name>
            <surname>Brasileiro de Redes de Computadores e Sistemas</surname>
            <given-names>Distribudos - SBRC</given-names>
          </string-name>
          <year>2007</year>
          , volume
          <volume>1</volume>
          , pages
          <fpage>61</fpage>
          {
          <fpage>74</fpage>
          .
          <string-name>
            <surname>SBC</surname>
          </string-name>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <given-names>P. S. L. M.</given-names>
            <surname>Barreto</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Rijmen</surname>
          </string-name>
          .
          <article-title>The Anubis block cipher</article-title>
          .
          <source>In First open NESSIE Workshop</source>
          , Leuven, Belgium,
          <year>November 2000</year>
          . NESSIE Consortium.
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <given-names>P. S. L. M.</given-names>
            <surname>Barreto</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Rijmen</surname>
          </string-name>
          .
          <article-title>The Khazad legacy-level block cipher</article-title>
          .
          <source>In First open NESSIE Workshop</source>
          , Leuven, Belgium,
          <year>November 2000</year>
          . NESSIE Consortium.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <given-names>E.</given-names>
            <surname>Biham</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            <surname>Biryukov</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A.</given-names>
            <surname>Shamir</surname>
          </string-name>
          .
          <article-title>Cryptanalysis of skipjack reduced to 31 rounds using impossible dierentials</article-title>
          .
          <source>In Advances in Cryptology { Eurocrypt'99</source>
          , volume
          <volume>1592</volume>
          of Lecture Notes in Computer Science , pages
          <volume>55</volume>
          {
          <fpage>64</fpage>
          . Springer,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>M. Ciet</surname>
            , G. Piret, and
            <given-names>J.</given-names>
          </string-name>
          <string-name>
            <surname>Quisquater</surname>
          </string-name>
          .
          <article-title>Related-key and slide attacks: Analysis, connections, and improvements - extended abstract</article-title>
          .
          <source>In 23rd Symposium on Information Theory in the Benelux</source>
          ,
          <article-title>Louvain-la-</article-title>
          <string-name>
            <surname>Neuve</surname>
          </string-name>
          , Belgium , pages
          <volume>315</volume>
          {
          <fpage>325</fpage>
          ,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <given-names>J.</given-names>
            <surname>Daemen</surname>
          </string-name>
          .
          <article-title>Cipher and hash function design strategies based on linear and dierential cryptanalysis</article-title>
          .
          <source>Doctoral dissertation</source>
          , Katholiek Universiteit Leuven,
          <year>March 1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <given-names>J.</given-names>
            <surname>Daemen</surname>
          </string-name>
          and
          <string-name>
            <given-names>V.</given-names>
            <surname>Rijmen</surname>
          </string-name>
          .
          <article-title>The block cipher BKSQ</article-title>
          .
          <source>In Smart Card Research and Applications { CARDIS'98</source>
          , volume
          <volume>1820</volume>
          <source>of Lecture Notes in Computer Science</source>
          , pages
          <volume>236</volume>
          {
          <fpage>245</fpage>
          . Springer,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <given-names>N.</given-names>
            <surname>Ferguson</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Kelsey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S.</given-names>
            <surname>Lucks</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            <surname>Schneier</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Stay</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Wagner</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Whiting</surname>
          </string-name>
          .
          <article-title>Improved cryptanalysis of Rijndael</article-title>
          .
          <source>In Fast Software Encryption { FSE'</source>
          <year>2000</year>
          , volume
          <volume>1978</volume>
          <source>of Lecture Notes in Computer Science</source>
          , pages
          <volume>213</volume>
          {
          <fpage>230</fpage>
          . Springer,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <given-names>B. R.</given-names>
            <surname>Gladman</surname>
          </string-name>
          .
          <article-title>AES second round implementation experience</article-title>
          . http://fp.gladman.plus.com/cryptography technology/aesr2/index.htm,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15. G. Guimaraes,
          <string-name>
            <given-names>E.</given-names>
            <surname>Souto</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Sadok</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Kelner</surname>
          </string-name>
          .
          <article-title>Evaluation of security mechanisms in wireless sensor networks</article-title>
          .
          <source>In ICW '05: Proceedings of the 2005 Systems Communications</source>
          , pages
          <volume>428</volume>
          {
          <fpage>433</fpage>
          . IEEE Computer Society,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>M. Healy</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          <string-name>
            <surname>Newe</surname>
            , and
            <given-names>E.</given-names>
          </string-name>
          <string-name>
            <surname>Lewis</surname>
          </string-name>
          .
          <article-title>Eciently securing data on a wireless sensor network</article-title>
          .
          <source>Journal of Physics</source>
          ,
          <volume>76</volume>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>J. Hill</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Szewczyk</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Woo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Hollar</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Culler</surname>
            , and
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Pister</surname>
          </string-name>
          .
          <article-title>System architecture directions for networked sensors</article-title>
          .
          <source>In Architectural Support for Programming Languages and Operating Systems</source>
          , pages
          <fpage>93</fpage>
          {
          <fpage>104</fpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>J. Hill</surname>
            ,
            <given-names>R.</given-names>
          </string-name>
          <string-name>
            <surname>Szewczyk</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Woo</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          <string-name>
            <surname>Hollar</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Culler</surname>
            , and
            <given-names>K.</given-names>
          </string-name>
          <string-name>
            <surname>Pister</surname>
          </string-name>
          .
          <article-title>System architecture directions for networked sensors</article-title>
          .
          <source>In Architectural Support for Programming Languages and Operating Systems</source>
          , pages
          <fpage>93</fpage>
          {
          <fpage>104</fpage>
          ,
          <year>2000</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>C. Karlof</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          <string-name>
            <surname>Sastry</surname>
            , and
            <given-names>D.</given-names>
          </string-name>
          <string-name>
            <surname>Wagner</surname>
          </string-name>
          .
          <article-title>Tinysec: a link layer security architecture for wireless sensor networks</article-title>
          .
          <source>In 2nd International Conference on Embedded Networked Sensor Systems { SenSys'2004</source>
          , pages
          <fpage>162</fpage>
          {
          <fpage>175</fpage>
          ,
          <string-name>
            <surname>Baltimore</surname>
          </string-name>
          , USA,
          <year>2004</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <given-names>P.</given-names>
            <surname>Kocher</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Jae</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Jun</surname>
          </string-name>
          .
          <article-title>Introduction to dierential power analysis and related attacks</article-title>
          .
          <source>Technical report</source>
          , Cryptography Research Inc.,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <given-names>Y. W.</given-names>
            <surname>Law</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J.</given-names>
            <surname>Doumen</surname>
          </string-name>
          , and
          <string-name>
            <given-names>P.</given-names>
            <surname>Hartel</surname>
          </string-name>
          .
          <article-title>Survey and benchmark of block ciphers for wireless sensor networks</article-title>
          .
          <source>ACM Transactions on Sensor Networks (TOSN)</source>
          ,
          <volume>2</volume>
          (
          <issue>1</issue>
          ):
          <volume>65</volume>
          {
          <fpage>93</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <given-names>P.</given-names>
            <surname>Levis</surname>
          </string-name>
          and
          <string-name>
            <given-names>D.</given-names>
            <surname>Culler</surname>
          </string-name>
          .
          <article-title>Maet: a tiny virtual machine for sensor networks</article-title>
          .
          <source>In ASPLOS-X: Proceedings of the 10th international conference on Architectural support for programming languages and operating systems</source>
          , pages
          <volume>85</volume>
          {
          <fpage>95</fpage>
          . ACM,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23.
          <string-name>
            <given-names>T.</given-names>
            <surname>Li</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H.</given-names>
            <surname>Wu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>X.</given-names>
            <surname>Wang</surname>
          </string-name>
          , and
          <string-name>
            <given-names>F.</given-names>
            <surname>Bao</surname>
          </string-name>
          .
          <article-title>SenSec design</article-title>
          .
          <source>Technical report</source>
          , InfoComm Security Department,
          <year>February 2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24. D. Liu,
          <string-name>
            <given-names>P.</given-names>
            <surname>Ning</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R.</given-names>
            <surname>Li</surname>
          </string-name>
          .
          <article-title>Establishing pairwise keys in distributed sensor networks</article-title>
          .
          <source>In CCS'03: Proceedings of the 10th ACM conference on Computer and communications security</source>
          , pages
          <volume>52</volume>
          {
          <fpage>61</fpage>
          . ACM,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>M. Luk</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          <string-name>
            <surname>Mezzour</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          <string-name>
            <surname>Perrig</surname>
            , and
            <given-names>V.</given-names>
          </string-name>
          <string-name>
            <surname>Gligor</surname>
          </string-name>
          .
          <article-title>Minisec: A secure sensor network communication architecture</article-title>
          .
          <source>In IPSN'07: Proceedings of the 6th international conference on Information processing in sensor networks</source>
          , pages
          <volume>479</volume>
          {
          <fpage>488</fpage>
          , New York, NY, USA,
          <year>2007</year>
          . ACM.
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          26.
          <string-name>
            <surname>F. J. MacWilliams</surname>
            and
            <given-names>N. J. A.</given-names>
          </string-name>
          <string-name>
            <surname>Sloane</surname>
          </string-name>
          .
          <article-title>The theory of error-correcting codes</article-title>
          , volume
          <volume>16</volume>
          .
          <source>North-Holland Mathematical Library</source>
          ,
          <year>1977</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          27.
          <string-name>
            <given-names>M.</given-names>
            <surname>Matsui</surname>
          </string-name>
          .
          <article-title>New block encryption algorithm MISTY</article-title>
          .
          <source>In Fast Software Encryption { FSE'97</source>
          , volume
          <volume>1267</volume>
          of Lecture Notes in Computer Science , pages
          <volume>54</volume>
          {
          <fpage>68</fpage>
          . Springer,
          <year>1997</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          28.
          <string-name>
            <surname>A. J. Menezes</surname>
          </string-name>
          , P. C. van
          <string-name>
            <surname>Oorschot</surname>
            , and
            <given-names>S. A.</given-names>
          </string-name>
          <string-name>
            <surname>Vanstone</surname>
          </string-name>
          . Handbook of Applied Cryptography. CRC Press, Boca Raton, USA,
          <year>1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          29.
          <string-name>
            <surname>Microchip</surname>
          </string-name>
          .
          <source>PIC18F8490 Datasheet</source>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          30.
          <string-name>
            <given-names>R.</given-names>
            <surname>Muller</surname>
          </string-name>
          , G. Alonso, and
          <string-name>
            <given-names>D.</given-names>
            <surname>Kossmann</surname>
          </string-name>
          . SwissQM:
          <article-title>Next generation data processing in sensor networks</article-title>
          .
          <source>In CIDR, pages 1{9</source>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          31.
          <string-name>
            <given-names>J.</given-names>
            <surname>Nakahara</surname>
          </string-name>
          .
          <article-title>Analysis of Curupira block cipher</article-title>
          .
          <source>In Anais do 8o Simpsio Brasileiro em Segurana da Informao e Sistemas Computacionais</source>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          32. NIST.
          <article-title>Federal Information Processing Standard (FIPS 197) { Advanced Encryption Standard (AES)</article-title>
          .
          <source>National Institute of Standards and Technology</source>
          ,
          <string-name>
            <surname>November</surname>
          </string-name>
          <year>2001</year>
          . http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          33. NSA.
          <source>Skipjack and KEA Algorithm Specications, version 2</source>
          .0 . National Security Agency, May
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          34.
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Rivest</surname>
          </string-name>
          .
          <article-title>The RC5 encryption algorithm</article-title>
          .
          <source>In Fast Software Encryption { FSE'94</source>
          , volume
          <volume>1008</volume>
          of Lecture Notes in Computer Science , pages
          <volume>86</volume>
          {
          <fpage>96</fpage>
          . Springer,
          <year>1995</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          35.
          <string-name>
            <given-names>R.</given-names>
            <surname>Roman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Alcaraz</surname>
          </string-name>
          , and
          <string-name>
            <given-names>J.</given-names>
            <surname>Lopez</surname>
          </string-name>
          .
          <article-title>A survey of cryptographic primitives and implementations for hardware-constrained sensor network nodes</article-title>
          .
          <source>Mobile Networks and Applications</source>
          ,
          <volume>12</volume>
          (
          <issue>4</issue>
          ):
          <volume>231</volume>
          {
          <fpage>244</fpage>
          ,
          <year>2007</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          36.
          <string-name>
            <given-names>B.</given-names>
            <surname>Titzer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Lee</surname>
          </string-name>
          ,
          <string-name>
            <given-names>and J.</given-names>
            <surname>Palsberg</surname>
          </string-name>
          .
          <article-title>Avrora scalable simulation of sensor networks with precise timing</article-title>
          .
          <source>Center for Embedded Network Sensing Posters - Paper 93</source>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>