Content uploaded by Diego F. Aranha
Author content
All content in this area was uploaded by Diego F. Aranha on Nov 16, 2014
Content may be subject to copyright.
NanoPBC: Implementing Cryptographic Pairings on
an 8-bit Platform
Diego F. Aranha1
Unicamp, Brazil
dfaranha@ic.unicamp.br
Leonardo B. Oliveira2
Unicamp, Brazil
leob@ic.unicamp.br
Julio L´
opez
Unicamp, Brazil
jlopez@ic.unicamp.br
Ricardo Dahab
Unicamp, Brazil
rdahab@ic.unicamp.br
I. ABS TR AC T
Wireless Sensor Networks (WSNs) are networks com-
posed of thousands of resource-constrained sensor nodes
and one or more base stations. They are emerging as a
technology for monitoring different environments of in-
terest and they find applications ranging from battlefield
reconnaissance to environmental protection.
On the other hand, Pairing-Based Cryptography
(PBC) [1], is an emerging research field that allows
a wide range of applications. Pairings, for short, have
enabled the design of original cryptographic schemes and
turned well-known cryptographic protocols more effi-
cient. In the context of WSNs, particularly, PBC enables
a wide range of useful cryptographic applications:
•Identity-Based Key Distribution: WSNs cannot af-
ford the burden of establishing and maintaining a
PKI. Therefore, ID-based key distribution schemes
(e.g., [1]) seem to be most adequate way of boot-
strapping security in WSNs.
•Short Signatures: communication consumes three
orders of magnitude more energy than computation.
Energy in turn is the most constrained resource
in a sensor node. As a result, a scheme as the
Boneh-Lynn-Shacham (BLS) [2] looks like the ideal
signature scheme for WSNs.
Finally, it is worth mentioning that the use of PBC in
WSNs is specially interesting since in WSNs there is a
central and trusted entity (i.e., the base station) that can
play the role of a Private Key Generator in ID-based
protocols.
Despite of all these advantages, a question still re-
mained: are sensor nodes able to compute pairings – the
most expensive PBC operation – efficiently? And it was
only recently that pairings have been shown to be viable
in sensor devices (e.g.[3]).
1Supported by FAPESP, Grant No. 2007/06950-0.
2Microsoft Research Fellow.
In this work we present NanoPBC, a cryptographic
library for resource-constrained devices. In NanoPBC,
we have implemented all big number, finite field, and
elliptic curve arithmetic from scratch therefore allowing
us to extract the most from the platform. Besides, in
order to maximize speed, all time critical routines were
implemented using Assembly.
By using NanoPBC, one is able to compute the ηT[4]
pairing, over binary fields, on the popular MICAz sensor
node platform (8-bit/7.3828-MHz ATmega128L) in only
2.14 s, i.e., a speedup of 2.54 compared to the fastest
implementation so far [3]. Another key factor for achiev-
ing this performance was our implementation of the
L´
opez-Dahab [5] binary finite field multiplication. It was
optimized for minimizing memory access operations,
which are expensive on our target platform.
To sum up, our key contributions are:
1) Provide an in-depth description of how to imple-
ment pairings efficiently in resource-constrained
devices;
2) Show a novel implementation of the L´
opez-Dahab
binary field multiplication method; and
3) Present the fastest figures for pairing computation
on an 8-bit platform.
REFERENCES
[1] R. Sakai, K. Ohgishi, and M. Kasahara, “Cryptosystems based
on pairing,” in Symposium on Cryptography and Information
Security (SCIS’00), Jan 2000, pp. 26–28.
[2] D. Boneh, B. Lynn, and H. Schacham, “Short signatures from
the Weil pairing,” Journal of Cryptology, vol. 17, no. 4, 2004.
[3] L. B. Oliveira, M. Scott, J. L´
opez, and R. Dahab, “TinyPBC:
Pairings for authenticated identity-based non-interactive key dis-
tribution in sensor networks,” in 5th International Conference on
Networked Sensing Systems (INSS’08), 2008, pp. 173–180.
[4] P. S. L. M. Barreto, S. Galbraith, C. O. hEigeartaigh, and
M. Scott, “Efficient pairing computation on supersingular abelian
varieties,” in Designs Codes And Cryptography, 2006.
[5] J. L´
opez and R. Dahab, “High-speed software multiplication in
GF(2m),” in Lecture Notes in Computer Science: INDOCRYPT
’00. Springer-Verlag, 2000, pp. 203–212.