to scale much better with respect to key sizes (i.e. se-
curity thresholds). Our implementation is in the Java
programming language and, due to a modular design,
it can be easily extended to encompass other identity-
based schemes and protocols. Although Java cannot
achieve the performance of full-compiled languages
(e.g., C, C++), it is well suited for coding distributed
applications and services, because of its portability
and built-in security features (De Caro and Iovino,
2011). The paper is organized as follows. Section
2 discusses related work. Section 3 outlines some
notions and notations that will be used through the
rest of the paper. In Section 4 we describe our ellip-
tic version of the FG protocol. Section 5 describes
our Java implementation for the Raspberry PI device,
discussing design choices and issues. Section 6 sum-
marizes the results of various tests we have done in
order to evaluate performance. Finally, in Section 7
we draw conclusions and sketch out future work.
2 RELATED WORK
A two-party key agreement protocol allows two par-
ties, who each have a long-term key, to agree as peers
upon a common secret key by exchanging messages
with each other (Menezes et al., 2010). Later, the
shared secret key may be used to secure communica-
tion sessions among these parties, due to one or more
of the fast mechanisms offered by symmetric cryptog-
raphy.
Starting from the pioneering work of (Diffie and
Hellman, 1976), many key agreement protocols have
been proposed over the years in the literature. How-
ever, many of these protocols lack a sound secu-
rity analysis, and some of them have been actually
proven insecure. On the other hand, many provably
secure key agreement protocols are far from being op-
timal, and require a significant overhead in local com-
putations and/or communication bandwidth. Com-
prehensive surveys on key agreement can be found
in (Boyd and Mathuria, 2003) and (Menezes et al.,
2010). (Fiore and Gennaro, 2010) introduced a prov-
ably secure, very efficient protocol, which requires
only twice the amount of bandwidth and computa-
tion of the unauthenticated basic Diffie-Hellman pro-
tocol. This protocol is identity-based and outperforms
MQV (Law et al., 2003), the most efficient authen-
ticated two-party Diffie-Hellman based protocol in
the public-key model. The concept of identity-based
(ID-based) cryptography was introduced by (Shamir,
1985). The innovation was the use of identity at-
tributes, instead of digital certificates, for data en-
cryption and signature. This avoids the generation
and management of users’ certificates, reducing sig-
nificantly the complexity and computational cost of
protocols. Pioneered by the work of (Joux, 2000),
various ID-based key agreement protocols ( e.g., (Mc-
Cullagh and Barreto, 2005), (Okamoto et al., 2005),
(Chen et al., 2007)) have been proposed so far. In or-
der to work, however, these protocols require groups
over elliptic curves where special mappings, called bi-
linear pairings (Miller, 2004), are available. Such
groups must be carefully selected for getting ade-
quate performance without a downgrade in security.
Conversely, the FG protocol works over any cyclic
group. This results in the possibility of choosing
much smaller groups than in the case of pairing-
based protocols to get a given threshold of security,
since one can use “regular” elliptic curves, rather
than the ones that admit efficient pairings computa-
tions for high security levels. This paper concerns
an implementation of the FG protocol on the Rasp-
berry PI platform. Although libraries exist that sup-
port identity-based cryptography and bilinear pairing
operations (e.g., the reference benchmark C library
PBC of (Lynn, 2007) and its Java porting jPBC of
(De Caro and Iovino, 2011)), at the time being, to the
best of our knowledge, there are no known implemen-
tations of ID-based key-agreement protocols. Further,
there are few implementations also for other classes of
key-agreement protocols. Actually, only the Charm
library (Akinyele et al., 2011) implements software
components for message serialization, data transmis-
sion, and error handling.
3 PRELIMINARIES
In this section we first describe how ID-based cryp-
tosystems work, and then we give some basic notions
about elliptic curves, showing how to choose them for
our scopes.
3.1 ID-based Cryptosystems
In ID-based cryptography (Shamir, 1985), a trusted
key generation center (KGC) first generates a mas-
ter public/secret key pair, publishing the public key
alongside with any other public parameter which
uniquely identifies the Diffie-Hellmann system to be
used and the set of strings chosen as user identifiers.
In a second phase, the KGC gives to each user hav-
ing identity U a secret key S
U
, which is a function of
the string U and the KGC’s secret key. Using their
own S
U
, users can then perform cryptographic tasks.
These two phases performed by the KGC are named
Setup and Extract, respectively.
PECCS2015-5thInternationalConferenceonPervasiveandEmbeddedComputingandCommunicationSystems
118