Sie sind auf Seite 1von 13

MASHaBLE: Mobile Applications of Secret Handshakes

over Bluetooth LE

Yan Michalevsky Suman Nath Jie Liu


Stanford University Microsoft Research Microsoft Research
yanm2@cs.stanford.edu suman.nath@microsoft.com jie.liu@microsoft.com

ABSTRACT million downloads on the Google Play store. Yik-Yak has


We present new applications for cryptographic secret hand- between 1 and 5 million downloads, and the After School
shakes between mobile devices on top of Bluetooth Low- app has hundreds of thousands of downloads. These appli-
Energy (LE). Secret handshakes enable mutual authentica- cations’ iOS versions are also popular, judging by thousands
tion, with the property that the parties learn nothing about of reviews in the Apple Store. This confirms a substantial
each other unless they have been both issued credentials by and growing interest in private/anonymous messaging, and
a group administrator. This property provides strong pri- forming anonymous communities.
vacy guarantees that enable interesting applications. One of Inspired by Yik-Yak and similar applications attempting
them is proximity-based discovery for private communities. to provide anonymity and location-based message propaga-
We introduce MASHaBLE, a mobile application that en- tion, we propose a mobile application that enables the cre-
ables participants to discover and interact with nearby users ation of secret virtual communities, protects geo-location
if and only if they belong to the same secret community. privacy and provides anonymity.
We use direct peer-to-peer communication over Bluetooth More specifically, our application enables mobile users to
LE, rather than relying on a central server. We discuss the enroll in a community and obtain credentials by which they
specifics of implementing secret handshakes over Bluetooth can present themselves to other members of the secret com-
LE and present our prototype implementation. munity. These credentials allow them to perform a mu-
tual authentication procedure called secret handshake (SH),
which is reminiscent in its properties to a secret handshake
Keywords in the physical world.
Mobile security; Bluetooth LE; IoT; secret handshakes; mu- For instance, imagine a fraternity where membership is
tual authentication. kept secret. Its members want to identify fellow members
as they walk around campus, and to communicate privately
with nearby members without being exposed. In a setting
1. INTRODUCTION where one party is willing to disclose its identity first, it
Recent revelations about the extent of surveillance, as well could use a signed certificate to authenticate itself. Unfor-
as rising awareness regarding digital privacy, have increased tunately, in our setting, when two fraternity members en-
the demand for means to communicate privately and prevent counter each other, neither is willing to provide a traditional
disclosure of user data. Many mobile applications geared to signed certificate, as it may expose them to a non-member.
this purpose have been released in the past two years, in- One possible solution is for each member to have a mobile
cluding Telegram [9], Signal Private Messenger (by Open application that reports GPS coordinates to a server main-
Whisper Systems) [7], Yik-Yak [10], After School [1], and tained by the fraternity. All communication with the server
LegaTalk [5]. They aim to provide different privacy guaran- is encrypted. The server identifies two users in proximity of
tees against different adversaries. one another and notifies them. In addition, the two users
Telegram and Signal rely on cryptographic methods for use the server to exchange messages.
establishing a shared secret key between two parties. The The above approach has several disadvantages. First, any-
shared key is used for end-to-end encryption of communi- one who can eavesdrop on the mobile communication and is
cation between two users. While messages can be routed able to identify the source and origin learns the affiliation
through a central server, no one can decipher the content of of the user from the fact that it sends encrypted messages
the messages. However, the origin and destination (which to the organizational server. This could be prevented by
reveal the communicating parties) are known to the server, anonymity solutions such as ToR. However, unless there is
and by extension, to any adversary that can obtain control a large number of users, a powerful adversary can mount
of it. Yik-Yak and similar apps provide anonymity, to some timing attacks.
extent, as well as message dissemination to nearby peers. Second, interaction involving a central server assumes hav-
The messages are broadcast through the server to unknown ing internet connectivity - an assumption that is often prob-
users, and are therefore not end-to-end encrypted. There- lematic for mobile devices. It also complicates the setup
fore, an adversary that has access to the server can obtain and requires securing the server against attackers. In addi-
the content, and also de-anonymize the origin. tion, it requires entrusting location information and message
These applications have a high demand: as of July 2016, content to a third party.
Telegram messenger for Android has between 100 to 500
Finally, there is the power efficiency consideration. Us- amounts of data after the handshake is useful, and for others,
ing GPS for high-precision localization is energy consuming, like headcounting or car unlocking, the success of a hand-
as is using cellular communication for interacting with the shake protocol itself may be enough, without any further
server. data transmission.
Our proposal aims to eliminate unnecessary interaction This work aims to demonstrate the practicality of fre-
with a third party, leveraging physical proximity and mini- quently performing secret handshakes between mobile de-
mizing energy consumption, while providing strong privacy vices, using BLE technology. By implementing a library for
and anonymity guarantees. To achieve this we use crypto- secret handshakes we hope to open the door for building
graphic secret handshakes over Bluetooth Low Energy (BLE) various interesting applications. We determined a suitable
protocol. cryptographic scheme for implementing secret handshakes
Modern smartphone devices are equipped with BLE chips under the constraints imposed by BLE. We also address the
that enable transmission and scanning with very low power issue of tracking mobile devices that transmit the same or
cost. These transceivers implement the Bluetooth Smart linkable beacons over time by discussing ways to support un-
standard and enable a device to constantly transmit short linkability, based on existing cryptographic techniques and
messages, known as advertising, or scan for such advertise- on features supported by BLE.
ments from other devices. One notable example of using As a proof of concept we developed MASHaBLE, a mo-
BLE advertisements is iBeacon, standardized and promoted bile application for performing secret handshakes between
by Apple [11]. Windows Phone devices. As part of its development we
Our basic idea is that each mobile device, affiliated with also implemented a .NET wrapper for pairing-based cryp-
the secret community in our example, constantly transmits tography. This is a useful tool for any pairing-based crypto
and scans for advertisements. The advertisements seem applications for the Windows Universal platform, including
completely random to any eavesdropper whereas, in fact, mobile and desktop.
they are attempts to initiate secret handshakes with nearby While we design a protocol suitable for BLE, and imple-
devices. Nowadays, we are already surrounded by many de- ment it, we claim no novelty in the underlying cryptography.
vices that use BLE advertisements. It is therefore possible We base our protocol on proven cryptographic constructions.
to go unnoticed as yet another device. To summarize our main contributions:
There are more interesting applications to secret hand-
shakes by mobile devices over BLE. One of them is head- • We propose novel applications for mobile devices sup-
counting of attendants to a secret event. Some commer- porting BLE, based on a scheme for cryptographic se-
cial products, like Doubledutch.me [4], support headcount- cret handshakes that has previously been mostly the-
ing by putting a BLE beacon transmitter at a venue that oretic.
asks nearby mobile users to confirm attendance. However,
if we want the event to be private, we need to prevent users • We provide technical details of and identify constraints
that are not affiliated with the event from identifying that imposed by the BLE stack, and pick a suitable SH
beacon. We also want to protect the privacy of the atten- scheme. We also identify computational optimizations
dants by making sure their reply to the broadcast cannot applicable to our setting.
identify them as attending this event. Once again we can
use a secret handshake between a device transmitting the • We provide a prototype implementation of the secret
event-advertising beacon and nearby mobile users to perform handshake scheme for Windows Phone devices. We
mutual authentication and enable headcounting, attendance make our implementation available as an open-source
confirmation or any other private data exchange related to library that can facilitate development of additional
the event. pairing-based cryptographic applications for Windows
Another application is BLE-based car locking and unlock- Universal framework, including desktop and Windows
ing using a mobile device. Using a BLE beacon, an owner phone devices.
can unlock the car when in proximity to it. In addition, the
car can transmit a beacon when parked, to make it easier • Evaluate our implementation and show that it is prac-
to find it. The car can also lock automatically once it stops tical for use on mobile devices in terms of battery con-
receiving a beacon from the mobile device, making sure the sumption and performance.
car is locked once the driver walks away. Complete Key-
In the following section we provide some necessary tech-
less [2] and Connect2Car [3] are two examples of vendors
nical background. We give an introduction to BLE and
addressing this need. However, if the beacons can be as-
explain cryptographic secret handshakes constructed from
sociated with the vehicle or the mobile device, they enable
pairing-based key agreements. We then discuss the specifics
tracking. An unlinkable secret handshake1 between the two
of implementing the cryptographic scheme over BLE and
eliminates this concern.
our prototype implementation for Windows Phone. Finally,
These examples make a strong case for enabling secret
we discuss related work and possible future directions for
handshakes over BLE on modern smartphones and mobile
research.
platforms. BLE opens a new venue of possible private com-
munication and IoT applications. However, it also comes
with certain constraints, most importantly the limited amount 2. BACKGROUND
of data that can be exchanged over BLE packets. We note
that, for some applications of interest, exchanging small 2.1 Bluetooth Low Energy
Bluetooth Low Energy (BLE) was introduced as part of
1
We explain unlinkability in 2.2.3. the Bluetooth 4.0 specification. This radio standard was
2.1.1 Tracking prevention
Bluetooth packets include Bluetooth device address fields,
similar to an Ethernet MAC address. It is a 6 byte number
that uniquely identifies a device. Two types of addresses ex-
ist. The public device address is fixed for a device. A random
device address, on the other hand, can be set dynamically
and change across different connections.
If the public device address is used as the source Blue-
tooth device address, it would be possible to track the de-
Figure 1: Structure of a BLE advertisement packet. To- vice around a certain area by scanning for BLE packets and
tal size of an advertisement packet is 47 bytes. examining the source address field.
In order to prevent tracking of a certain device by its
MAC address, BLE supports randomized MAC addresses.
designed to minimize power consumption [44] and be suit- The MAC address in the transmitted packets changes over
able for low cost and low bandwidth transmitters. BLE de- time.
vices can operate for extended periods of time, powered by a
tiny energy source such as a coin cell. BLE chips are nowa- 2.2 Cryptographic secret handshakes
days present in most modern smartphones, such as Win- Cryptographic secret handshakes, introduced by Balfanz
dows phone, Google Nexus, and iPhone. It has been widely et al. [13], are related to the broader area of Automatic Trust
adopted by smartphone manufacturers. Negotiation (ATN). Secret handshakes enable two parties to
Bluetooth 4.1 is an update to the specification and is the establish that they are affiliated with a certain group, and to
current reference for developing BLE applications. It is im- disclose their respective roles in the group. They guarantee
portant to note that BLE is not directly compatible with that this information is disclosed only when the handshake
classic Bluetooth and these are, despite the similarities, two succeeds, and no information is obtained by either party
different protocols. when the handshake fails. As such, it is useful when none of
Low power consumption by design comes with a cost. The the parties are willing to be the first to reveal its affiliation.
modulation frequency of 1 Mbps [44] imposes an upper limit In this sense, the scheme offers properties similar to a phys-
on throughput. The specification states minimal and max- ical secret handshake between two people. However, there
imal intervals of 7.5 ms and 4 s respectively, before enter- is one caveat. One party learns about the success of the
ing an idle state after a connection (to save power). This handshake before the other, and if it chooses to terminate
sets up an upper limit for the number of connections per the communication without responding to the other party’s
second. Some implementations, for instance nRF51822 by challenge, the other party is left uncertain as to the success
Nordic Semiconductor, impose additional restrictions: lim- of the secret handshake.
ited number of packets can be transmitted per each connec-
tion (6 in the case of nRF51822), and each packet contains 2.2.1 Security
only a small number of bytes (20 bytes for nRF51822). The The secret handshake has to be secure against the follow-
latter is an important constraint that influenced our choice ing attacks:
of secret-handshake scheme, among the possible variants.
BLE operates well for short ranges. While it’s possible 1. Group member impersonation - an adversary who is
to configure devices to operate on a range of tens of meters unaffiliated with the group performs a successful hand-
(line-of-sight), the typical operation range would be several shake with a group member.
meters. 2. Group member detection - an adversary who intercepts
All of these are important considerations to take into ac- a broadcast from a group member identifies the group
count when designing a protocol to be executed over BLE. it is associated with.
Two modes of communication are available: broadcast and
connected modes. Broadcast mode enables a device to send 3. Tracking - an adversary is able to tell that two differ-
data to any other device listening for transmissions. As the ent handshake attempts were made by the same party.
name suggests, this is the way to transmit to multiple de- Resiliency to this attack is called unlinkability.
vices at once. Sending broadcasts is called advertising and
the broadcast packets advertisements. A device that listens Formal definitions of the security games corresponding to
to advertisements is called a scanner. In our context, using the above properties can be found in [13, 19, 12].
this mode enables attempting a handshake with all scanners
2.2.2 A concrete SH scheme
in proximity of the advertiser. Figure 1 depicts the structure
of a BLE advertisement packet. The scheme proposed in [13] takes a minimum of 3 commu-
If two devices need to exchange data they can use the nication rounds. Two messages are exchanged to establish a
connected mode. The broadcast indicates that the device shared secret key, after which another is exchanged in order
can be connected to, and the scanner can initiate a connec- to enable both parties to confirm that they indeed obtained
tion following a received broadcast. Once a connection is the same shared key. The scheme is based on pairings over
established the devices can exchange data. elliptic-curves (EC) and its security relies on the Bilinear
On Windows Phone, it is possible to do both advertising Diffie-Hellman assumption (BDH). First, let us briefly ex-
and scanning at the same time. We make use of this property plain the notion of pairings.
to implement our message exchange. A pairing [21] e is a bilinear map G1 × G2 → Gt such that
e (a · u, b · v) = e (u, v)ab
where G1 , G2 , Gt are cyclic groups, u ∈ G1 , b ∈ G2 , a, b ∈ Zn member detection and group member impersonation is based
and (·) is a group operation, e.g. multiplication over an on the assumption that Bilinear Diffie-Hellman problem is
elliptic-curve. In case G1 and G2 are the same group, the hard for all probabilistic polynomial-time algorithms. De-
pairing is called symmetric. Symmetric pairings are, in fact, tailed theorems and proofs of security can be found in sec-
slower to compute and we therefore recommend using asym- tion 5.2 of [13]. Security of our protocol implementation
metric pairings in the implementation. The most known against those attacks stems from the security of this under-
examples are the Weil and Tate pairings, which can be effi- lying cryptographic scheme.
ciently computed using Miller’s algorithm [39].
Using pairings for cryptography has resulted in applica- 2.2.3 Unlinkable secret handshakes
tions such as identity-based and attribute-based encryption One problem with the previous scheme is that a power-
[17], 3-party Diffie-Hellman key exchange [31], BLS short ful eavesdropper who monitors all communication in various
signatures [18], secret handshakes and more. locations would be able to track the users. While the eaves-
While other options exist, we use a secret handshake con- dropper doesn’t know whether the handshake succeeded or
structed from pairing-based key agreements due to Balfanz not, it sees the same pseudonym over and over again. We
et al. [13]. The scheme is simple and elegant, and the ex- would therefore like to have an untraceable, or unlinkable se-
changed credentials are short, making it a suitable candi- cret handshake scheme, one that guarantees that an eaves-
date for integration with BLE (on which we elaborate in dropper cannot draw a link between two broadcasts, cor-
section 3). rectly associating them with the same identity. Provid-
Let us sketch the protocol for performing a secret hand- ing unlinkability addresses the tracking attack, mentioned
shake between two parties. We use a hash-function H mod- in section 2.2.1, on the application level, whereas random-
eled as a random oracle that maps arbitrary strings to elliptic- ized MAC addresses (section 2.1.1) prevent tracking on the
curve points. Zq denotes an integer group of large prime datalink level. A combination of both measures has to be
order q, where q is 512 bits long. used to prevent tracking.
Two parties, Alice and Bob, want to perform a handshake. Due to the importance of this property we include a detailed
First, there is a setup stage involving interaction of both discussion of unlinkability for secret handshakes.
parties with a credential-authority (CA) service, as depicted To provide a formal definition of unlinkability, we define
in figure 2a. the following security game between a challenger C and an
The CA possesses a master secret key t ∈ Zq , called “the adversary A.
group secret”. It issues credentials to Alice in the form of
a pseudonym PA and a secret elliptic-curve point TA , i.e. i
(PA , TA ) where TA = t · H (PA ). Similarly, Bob obtains C ←−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−− A
(PB , TB ) where TB = t · H (PB ). The two parties exchange broadcast as user i
their pseudonyms without disclosing their secret points. −−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−→
Alice generates a session key by computing ..
.
KA = e (H (PB ) , TA ) = e (H (PB ) , t · H (PA ))
Challenge Phase
= e (H (PB ) , H (PA ))t (1)
broadcast according to b
−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−→
where e is a bilinear map, i.e. a pairing operation, and
Bob generates a session key by computing b0
←−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−
KB = e (TB , H (PA )) = e (t · H (PB ) , H (PA ))
The adversary is allowed to perform a polynomial num-
= e (H (PB ) , H (PA ))t (2) ber of broadcast queries to the challenger. It specifies the
Due to the properties of pairings the two keys are the identity of the user i for which it requests a broadcast. For
same, i.e. KA = KB . By sending a challenge value and get- each query, C obtains credentials as described in the secret
ting a response for it, the two can verify that the handshake handshake scheme and simulates a new user in the system
succeeded. Alternatively, one party can send to the other by sending over a valid advertisement to A. Finally, A per-
some content, which will be successfully decrypted if and forms another query. The challenger picks at random a bit
only if the handshake succeeded. These steps are illustrated b ∈ {0, 1}. If b = 0, C responds with a valid broadcast for
in figure 2b. one of the previously used identities, and if b = 1, C responds
It is important to include a “direction” bit with the re- with credentials corresponding to a new identity, previously
sponses to prevent reflection attacks on the challenge–response unused in the game. Only C knows b. A outputs a guess b0
protocol. A concrete example can be found in [13] (section for the value b picked by C.
4.2).
Definition 1. A secret handshake scheme is unlinkable
Note that since this construction involves hashing an ar-
if an efficient adversary A has only negligible advantage in
bitrary string to an element of G2 , it is important to choose
winning the game over randomly guessing b, i.e.
a type of pairing that indeed supports this kind of hash-
ing. Galbraith et al. [23] present a taxonomy of pairings 1
Adv(A) = P r(b0 = b) − < ε

and their respective properties. According to the properties 2
of the different types of pairings, we need to use Type 1
or Type 3 pairings to enable hashing arbitrary strings onto where ε is negligible in the security parameter.
elliptic-curve group elements.
A straightforward approach is generating many pseudo-
Security of this secret handshake scheme against group nyms and secret points for each client during the enrollment
Master secret
) ∈ +,
-9 = "p12465"

-. = "p93849"
-. = "p93849", 2. -9 = "p12465", 29

2. = )3 -. = )3 "p93849" 29 = )3 -9 = )3 "p12465" : = :. = ;(3 "p12465" , 2. ) : = :9 = ;(29 , 3 "p93849" )

BCDEF (DℎHII;CJ;. )

K;LMNCL;. , BCDEO DℎHII;CJ;9

K;LMNCL;9

(b) Handshake. Note that we have redundant rounds


here: the challenge message could be sent earlier to-
(a) Setup: CA issues credentials to both parties. TA gether with the pseudonym. We present it as separate
and TB are secret and each party keeps it to itself. messages for clarity.
Actual pseudonym values were added for illustration.

Figure 2: Secret handshake protocol.

phase. When the client performs handshakes, it uses differ- tracking. This has been previously argued in [28, 25], but
ent credentials each time, which prevents an eavesdropper, due to the simplicity of this randomization technique, we
or an active attacker, from linking those handshakes to each include a formal claim, and its trivial proof below.
other, and therefore prevents tracking the client. This naive
approach has obvious drawbacks. It increases the amount Claim 1. The handshake scheme presented in 2.2.3 is
of storage since the user has to store credentials for all fu- unlinkable according to Definition 1.
ture executions of the protocol. It also limits the number Proof. The unlinkability of this scheme is information
of unlinkable handshakes to the number of pairs of creden- theoretic with a trivial proof. Since each pseudonym picked
tials issued at the setup. It might be good enough when a by the challenger is multiplied by a uniformly drawn random
user is unlikely to deplete its pool of credentials, or if it is element in Zq , each broadcast is indistinguishable from a
occasionally possible to communicate with the group admin- random element to A.
istrator to obtain fresh credentials. In addition, this method
provides revocation and traitor tracing, which help protect It is important to note, that this scheme becomes vulner-
against an adversary that is capable of corrupting users. able to member impersonation in case an adversary corrupts
We can also achieve unlinkability by a simple modifica- a member of the group, as pointed out by Yoon [46]. Given
tion to the previous scheme, based on an idea introduced by a member’s permanent credentials, the adversary can gen-
Huang and Cao [28]2 and later used by Gu and Xue [25]. In- erate new ephemeral credentials that will pass a handshake.
stead of PA and PB being strings that are visible during the This, however, poses a problem even for newer SH schemes
initial message exchange between the two parties, we denote such as [12]. It is therefore important to avoid this method
by PA and PB random points on the elliptic curve. t is once for achieving unlinkability when corruption is likely, and to
again the master secret, and member secrets are computed examine new schemes that provide revocation and traitor
as tracing along with unlinkability. In the meantime, we can
TA = t · PA TB = t · PB stick to the former simple method of issuing multiple cre-
dentials to each member.
PA and PB are never sent as is in the clear. Instead, for
each handshake, Alice picks a random r ∈ Zq and sends rPA 2.2.4 Security parameters
to Bob. Bob picks a random s ∈ Zq and sends sPB to Alice. Security is quantified as the number of basic operations
Alice computes (e.g AES encryptions) needed for recovering the secret key
and breaking the cryptographic scheme.
KA = e (sPB , TA )r = e (PB , PA )rst (3)
Breaking a symmetric-key scheme with key size k requires
and Bob computes 2k basic operations. Galbraith et al. [23] summarize the
equivalence between given symmetric key sizes and the cor-
KB = e (TB , rPA )s = e (PB , PA )rst (4) responding EC group element sizes, required to provide the
same level of security. To enjoy 128-bit security3 we have
so that KA = KB .
to use EC subgroups having size of at least 256 bits, i.e. 32
None of the two learns the permanent pseudonym of the
bytes. It means that we need 32-byte long pseudonyms (for
other. An adversary that eavesdrops on the messages can-
unlinkable handshakes). Compromising for 80-bit security,
not link different handshake attempts by the same mem-
we can use 160-bit (20 byte) elements4 . For string pseudo-
ber. And yet, both parties obtain the same key that can
nyms (first scheme), 20 bytes provide 128-bit security.
now be used for encrypting communication between the two.
This scheme provides information theoretic security against
2
3. SECRET HANDSHAKES OVER BLE
Their particular scheme, however, has a flaw, as pointed 3
out in [43, 47], due to release of the group public-key. Nev- That is the expected level of security nowadays.
4
ertheless, it doesn’t affect our use of the pseudonym ran- This compromise, if affordable, can simplify the proposed
domization idea. implementation, as we will see later.
library for computing pairings5 , it also results in a relatively
In this section we discuss ways to integrate secret hand- simple implementation. Finally, it requires a single pairing
shakes into BLE. Our goal is to reuse, as much as possible, computation by each party, compared to [12] which requires
the existing BLE message exchange. This part examines the three.
ideal vs. the currently available and practical. We look into While we presented some considerations, surveying and com-
ways to reconcile the requirements of a protocol for secret paring different SH schemes was not the central goal of this
handshakes with BLE constraints and with the current state work, as much as demonstrating practicality using an exist-
of supported BLE features on popular mobile devices. ing method. A follow-up work on the subject could greatly
benefit from a thorough comparison of the different schemes
3.1 Challenges available, and in particular, comparing their performance
Implementing secret handshakes over BLE poses several and bandwidth requirements. In the following, we present
challenges. Addressing those challenges at the design stage two methods for integrating the underlying SH scheme into
is one of the main contributions of this paper. Some key BLE.
issues are the limited amount of data that is possible to
transfer between devices over BLE, the fact that we are 3.3 A new pairing mode
operating within the restrictions of a given standard, and Our first proposition for executing the secret handshake
various constraints imposed by existing BLE implementa- procedure over BLE is to reuse the Bluetooth pairing pro-
tions both in hardware and software. In addition, we had to cedure6 . Pairing, in both classic Bluetooth and BLE, es-
pick an underlying cryptographic SH scheme that fits those tablishes a short-term shared key that can be used for en-
constraints. crypted communication between two Bluetooth devices. It
can be used for a short message exchange or to establish a
1. Fitting into BLE packet size: The restriction on long-term key to be used in subsequent sessions.
the packet sizes influences our choice of the underly- BLE currently offers several pairing methods:
ing cryptographic scheme. BLE advertisement packets
can fit up to 39 bytes of payload, with further restric- • Just Works - requires no user interaction7 . Does not
tion on how many of them we can control (31 bytes on protect from man-in-the-middle (MITM) attacks.
the platform we ended up using). The messages ex-
• Numeric comparison - a 6-digit number is displayed on
changed during a pairing process can fit 16 bytes only.
both devices, which confirm the pairing if they both see
This requires choosing a scheme in which little data is
the same number. Protects from MITM attacks.
exchanged.
• Passkey entry - one device displays a 6 digit number,
2. Avoiding Bluetooth pairing: We do not want the
which has to be entered on the other device to confirm
devices to “know” each other, i.e. be paired prior to the
the pairing.
handshake attempt, as this contradicts our use-cases.
Our proposals for integration avoid this. The first one • Out-of-band (OOB) - An external method is used to
is a new pairing mode that replaces the existing BLE provide information to both devices that is used to
pairing with a secret-handshake. The second uses BLE complete the pairing. For instance, NFC can be used
advertisements, which do not require prior pairing in to provide each device with an encryption key.
order to be published or processed by a scanning party.
The numeric comparison and passkey entry methods are
3. Fitting within the standard: BLE communication not very secure, as shown by Mike Ryan [41]. Rather than
is standardized and we want to operate within the ca- relying on existing pairing methods, we propose the secret
pabilities and restrictions of the standard. While the handshake for establishing trust and obtaining a shared ses-
proposition we make in section 3.3 considers a modifi- sion key. Therefore we can simply use Just Works to estab-
cation of BLE, we also aim for a prototype that works lish the Short Term Key (STK), as we do not care about
given the currently available functionality, which we security at this step. The STK establishment process is
present in section 3.4. followed by a pairing confirmation, in the form of Pairing
Confirm messages sent by both devices.
4. Low energy consumption: Power consumption be- We use the Pairing Confirm messages to exchange pseudo-
comes a major issue since we aim for use-cases where a nyms between Alice and Bob by setting the value of the
handshake attempt is frequently initiated. While BLE Mconfirm field to be the pseudonym. This implies that we
itself is designed to consume little energy, we also need have to use 128-bit pseudonyms. At the next step we use
to make sure that our protocol doesn’t add an energy the Pairing Random message to send an encrypted challenge
overhead that is not acceptable for a mobile device. from Alice to Bob by setting Mrand to be the challenge. Bob
computes the response and sends it in the Srand field in its
3.2 Choice of the underlying SH scheme Pairing Random reply message to A, which can now verify
The scheme presented in section 2.2.2 is a good fit for 5
addressing the small packet size, since the parties only ex- One of our contributions is providing a library wrapper for
our platform of choice.
change a pseudonym in the form of a single string (or sin- 6
Not to be confused with the mathematical operation over
gle group element in the case of the modified unlinkable elliptic curves, mentioned in the explanation of secret hand-
scheme). Some other schemes discussed in section 6, such as shakes.
[12, 19], require sending more data to initiate a handshake. 7
Sometimes the user will be asked to confirm the pairing,
Moreover, this scheme is simple to understand, and given a but not to insert a PIN or to compare passkeys.
Master Slave The advertiser sends another packet in response, which pro-
vides enough space to serve a 32-byte string.
Selection of pairing method After exchanging pseudonyms, the parties derive a 128-bit
Pairing Confirm (Mconfirm) - -P
(16 bytes) long symmetric key. Any subsequent communica-
tion for “challenge-response” can therefore fit in one adver-
Pairing Confirm (Sconfirm) - -Q , RℎHII;CJ;Q
tisement packet. As previously mentioned, 80-bit security
requires only 20-byte long pseudonyms, which now can fit in
Parties calculate shared key using pairings – serves as STK a single advertisement packet. This size is also enough for
128-bit security with the first (linkable) scheme.
Pairing Random (Mrand) – S;LMNCL;Q , RℎHII;CJ;P Note that while the scheme in [13] can ultimately require
Pairing Random (Srand) S;LMNCL;P only 3 messages, it would require packing more data into
each message. We avoid it due to the limited advertisement
Figure 3: Secret handshake as a new pairing mode. length, and instead exchange pseudonyms first, and then
Pseudonyms, challenges and responses are embedded in proceed with a challenge and response phase, resulting in 4
already existing fields of messages exchanged as part of messages.
the pairing procedure.
To support simultaneous interaction between many de-
vices, we need to instantiate a separate state machine for
each handshake attempt, and associate it with the Bluetooth
the success of the handshake8 . This process is depicted in device address of the other party. That way, advertisements
figure 3. received from different parties do not interfere with each
However, despite using existing messages, this approach other while executing the protocol. Of course, when using a
requires introducing an additional pairing method and ex- randomized MAC address, we are required to maintain the
tending the BLE stack with new functionality. And since same device address across all protocol rounds.
the pseudonym sizes are limited by the length of the Mcon- While the pairing mode option (3.3) is appealing, it would
firm messages, it enables less than 80-bits security, which is require adopting our proposal and have it integrated into
not acceptable in modern cryptographic implementations. the BLE standard. Currently, it also restricts us to smaller
Achieving the desired security levels would require further security parameters. We chose to implement our prototype
modifications to the pairing protocol. using advertiser-scanner interaction, as suggested in the last
subsection (3.4).
3.4 Advertiser-scanner interaction The scanner-advertiser interaction does not require a Blue-
As mentioned in section 2, BLE supports broadcasting tooth pairing between the devices, and yet enables exchang-
advertisements. Clients can scan and filter advertisements ing small amounts of data by the same method.
of specific types. An advertisement packet allows only 31
bytes of data to be set. With passive scanning the advertised 4. IMPLEMENTATION
data is limited to the contents of one advertisement packet.
With active scanning, the scanner can request more data In this section we discuss various practical considerations
and receive another packet from the advertiser in response. that influenced our prototype implementation. We describe
Windows .NET Bluetooth API currently enables control- the chosen alternative and walk through the implementa-
ling only the Manufacturer Specific Data (AD type 0xFF), tion.
which is 20 bytes. 4.1 Implementation Challenges
This method of performing the handshake doesn’t require
extending the BLE specification. It relies on transmitting Two main factors affect the choice of platform:
data between an advertiser Alice and a scanner Bob9 in a • Custom control over BLE communication.
way that does not require a Bluetooth pairing.
The advertiser broadcasts its pseudonym and, if the client • Convenient implementation of pairings over elliptic
that receives the broadcast in a scanning state is interested curves: pairings are fairly complicated to implement
in performing a handshake, it enters the initiating state. and we would therefore like to begin with an existing,
The client that enters the connection state from an initiating tested implementation.
state acts as a Master, while the advertiser that enters it
The current state of BLE deployment on mobile platforms
from the advertising state acts as a Slave. The connection
poses challenges to our goals. Only a few smartphone models
state serves for verifying the success of the handshake by
can broadcast BLE advertisements. In addition, few fields
exchanging a challenge and a response over the encrypted
within the advertisement packets can be controlled.
link.
iOS is fairly restrictive in terms of an application’s abil-
In section 2.2.4 we mentioned that 32-byte pseudonyms
ity to control the data that is transmitted in advertisement
are required. Because an advertisement packet cannot con-
packets. While iOS provides support for Apple’s own iBea-
tain more than 31 bytes of payload, we have to submit two
con protocol, it does not allow customizing the advertise-
packets. By using Active Scanning, the scanner can initiate
ment data, which precludes using iOS as a prototyping plat-
a Scan Request once an advertisement packet is received.
form for testing our protocol.
8 The Android framework provides the APIs necessary for
Non-resolvable random Bluetooth addresses are used for all
communication mentioned above. doing BLE advertising and scanning through BluetoothLeAd-
9
Here, advertiser and scanner are terms taken directly from vertiser and BluetoothLeScanner respectively. One particu-
the BLE specification, referring to a party in advertising lar appeal of Android is the fact that applications are pro-
state and a party in a scanning state respectively. grammed in Java, and there exists a Java library, named
JPBC [20], that implements pairing operations over elliptic-
curves. It provides the functionality we need for implement-
ing pairing-based secret handshakes.
Unfortunately, most Android phones do not currently sup-
port Bluetooth advertisement broadcasting in practice, and
we had to defer this option for now. It would be highly
useful to enable this capability in future models.

4.2 Windows Phone


Windows phones, running Windows 10 OS, support pub-
lishing BLE advertisements and scanning. In addition, they
enable advertising and scanning simultaneously. We chose Figure 4: Component dependencies: PbcProxy bridges
between the protocol logic implementation and the li-
to prototype the handshake scheme on Windows Phone plat- brary providing pairing-based crypto, which uses big in-
form since at the moment it was the only widespread mobile teger operations provided by MPIR.
framework that enables advertising, provides control of the
advertisement packet data, and also enables developing rich
user interface using a high-level language. the handshake scheme.
First, we needed an implementation of elliptic curve oper- The wrapper is implemented as a Windows Runtime Com-
ations and pairings that would run on the device. Windows ponent, a DLL that exposes some of the functionality of the
Phone applications are executed on a .NET Runtime and are PBC library by bridging between managed and unmanaged
usually written in C#. It is also possible to integrate native code. All classes reside in the PbcProxy namespace. The
compiled code through Windows Runtime Components. One following interfaces are exposed by the wrapper:
direction was attempting to port the JPBC library, written
in Java, to C#. While the task can be partially automated • Element - provides multiplication and power opera-
using tools like Sharpen [8], it would still involve a signifi- tions over group elements, and serializes an element
cant effort. Most obstacles arise from the fact that not all to its byte representation. The serialization is used to
Java constructs and syntax are directly translatable to C#. obtain an encryption key.
We adapted the Stanford PBC library [36] to run on ARM
and implemented a .NET wrapper to enable using it for • Pairing - provides functions for hashing strings to group
Windows Universal applications written in C#. Specifically, elements, obtaining a random element in a given group
we used PBC v0.5.14. and applying pairings to pairs of elements, one in G1
Lynn’s PBC library [36] is a C implementation of pairings and the other in G2 .
over elliptic curves. It is easily parameterizable in terms
• Group - an interface representing an abstract group,
of choosing the algebraic fields to work with, the types of
and instantiations for representing G1 , G2 and Zn .
elliptic curves to use, and provides useful functions such as
random element generation and hashing arbitrary strings To use PbcProxy we have to first initialize it by calling
onto elliptic curves. one of the methods init() or init(seed). The first method
Its fastest benchmark indicates that a pairing computa- sets PBC to use a random number generation function that
tion can be done in 11 ms [35]. This enables performing uses CryptographicBuffer::GenerateRandom, while the sec-
about 90 pairing computations per second. Since our hand- ond sets it to use a deterministic generator passing it a seed.
shake protocol requires a single pairing computation (for Initializing two devices with a common seed is useful for test-
each party), this is unlikely to become a bottleneck. ing by simulating the common dealer using a local instance.
Originally, PBC requires the GNU Multi-Precision library In our demo application, we simulated two phones getting
(GMP) for its big-integer operations. We used the Multiple- issued credentials using the same master secret by indepen-
Precision Integers and Rationals library (MPIR) [6], which dently setting their random seed to the same value.
is compatible with GMP, since it was already adapted for We also provide a test method PBC.test() that imple-
building with Visual Studio. We did the necessary porting ments a simple pairing computation, to test that the PBC
to compile it for ARM so that it can be used on a Windows library works correctly on the Windows phone platform.
Phone platform. PbcProxy exports the classes Pairing and Element that
We replaced the random data generation function origi- expose group element operations and the pairing applica-
nally used in PBC with a modified version to support the tion. A common interface GroupIface requires implement-
new API on Windows 10. ing an initElement method for each group type we want to
We used CryptographicBuffer::GenerateRandom for gener- work with. This interface serves for decoupling the specific
ating random bytes. groups used from the implementation of the Pairing and
The ported PBC library for ARM is provided in form of Element classes. We have currently implemented subclasses
a static library that can be linked with a Windows Runtime for the groups G1 , G2 and Zn that allow using Zn elements
Component. and referring to the respective groups used in a pairing. For
example, in the secret handshake scheme, one credential is
4.2.1 PbcProxy - a .NET wrapper for PBC an element in G1 and the other is an element in G2 .
In order to integrate the ported PBC library with a .NET The dependencies between the different software compo-
implementation of the protocol logic, we have written Pbc- nents are summarized in figure 4.
Proxy - a Windows Runtime Component that links with the
library and exposes the interfaces needed for implementing 4.2.2 Handshake scheme prototype
HandshakeParty HandshakeMember
HandshakeMaster - handshakeMember - secret
- advertiser - pseudonym
- pairing - scanner - role
- masterSecret - pairing
Advertiser Scanner
+ issueCredentialsForClient() + start() + getPseudonym()
+ issueCredentialsForServer() + stop() + getRole()
- issueCredentials() - startScanning() + getChallenge()
- getRandomString() - stopScanning() + computeSharedKey()
- startAdvertising() - computeSharedKeyClient()
- stopAdvertising() - computeSharedKeyServer() StartScanning

StartAdvertising
Advertiser Scanner
MemberCredentials

+ start() + role
+ start() + stop() + pseudonym
+ stop() + sendChallenge() + secret
- respondToChallenge() + handleResponse() StartScanning

Figure 5: Class diagram of the handshake prototype im-


plementation. Each party participating in a handshake PA
instantiates both Advertiser and Scanner and alternates
between them to communicate. StopScanning

We provide documentation of our prototype application. ComputeSharedKey


It is structured as follows. A party participating in the
handshake is represented by one of the classes Advertiser or KS
Scanner. The first, as the name suggests, publishes adver- StartAdvertising
tisements and the latter is scanning for advertisement pack-
ets. A mobile application, however, can perform both roles
simultaneously. The two classes inherit common functional- PS , ChallengeS
ity from HandshakeParty. Advertiser and Scanner subclass
HandshakeParty. HandshakeParty implements the commu- StopAdvertising
nication protocol, and uses an instance of HandshakeMember
that provides the cryptographic functionality and interacts
with PbcProxy. HandshakeMaster simulates the credentials ComputeSharedKey
dealer, providing an instance of MemberCredentials upon re-
quest. The relationships between the classes are summarized KA
in the UML diagram in figure 5.
StartScanning
Figure 6 illustrates our realization of the secret handshake
protocol using interaction between an advertiser and a scan-
ner. It uses the fact that Windows Phone enables performing
advertisement and scanning at the same time. Fig. 7 illus- StartAdvertising
trates the state transition for the two parties based on the
received broadcast.
The Advertiser starts publishing its pseudonym PA , while RespA ,ChallengeA
at the same time scanning for a reply from the Scanner. The
StopScanning
Scanner, upon receiving an advertisement packet, pauses
the scanning, interprets the data as a pseudonym and com-
putes a shared key according to one of Eq. 2 or 4, depend-
ing on whether we use linkable or unlinkable handshakes. StartScanning
It then starts advertising a response packet containing its
own pseudonym PS , and a challenge ChallengeS . The chal-
lenge is AES–encrypted using the computed symmetric key. StartAdvertising
Shortly after, it reactivates scanning in order to receive a res-
ponse from the advertiser. There is a small delay between
starting to advertise and reactivating the scanning, in or- RespS
der to avoid receiving an advertisement with a pseudonym,
before the Advertiser had a change to receive the Scanner’s
pseudonym and switch to a new state. Once the Advertiser
receives an advertisement with the scanner’s pseudonym, it Figure 6: Secret handshake on top of Advertiser-Scanner
pauses scanning and computes the shared key using one of interaction. The diagram illustrates simultaneous ad-
Eq. 1 or 3. It then decrypts the challenge, using the com- vertisement and scanning by the same party at certain
stages, and switching between advertising and scanning
puted symmetric key and calculates a response RespA . It to communicate.
also generates its own challenge ChallengeA and encrypts it
using the same key. It resumes advertising to send the res-
ponse to the Scanner. The Scanner decrypts the advertise-
PS , ChlngS PA
start Send PA Send RS start Scan Await RA

delay RespS delay RespA ,ChlngA

done done

(a) Advertiser (b) Scanner

Figure 7: State machines for Advertiser and Scanner.

ment packet using its key, and if it verifies correctly, assumes Scanning Handshake 8.2%
that the handshake succeeded. It computes and encrypts
a response RespS to ChallengeA and starts advertising to Advertising Handshake 3.9%
send it to the Advertiser. Once the Advertiser receives the
response RespS , it verifies it, and if it passes, assumes that Scanning 7.5%
the handshake succeeded.
The source code of our implementation is available on Advertising 3.3%
https://github.com/ymcrcat/MASHaBLE.
Baseline 2.5%
4.3 Evaluation 0 5 10 15 20
For evaluating our implementation we created a simple
Battery Drain %
app that can broadcast, scan, and perform a secret hand-
shake with another phone running the same app.
Figure 8: Battery drain in different modes after 3 hours.
We can see that cryptographic operations add little over-
4.3.1 Functionality testing head on top of BLE energy consumption.
Our devices perform simultaneously Bluetooth advertising
and scanning. It is important to verify experimentally that
this unusual practice results in successful execution of the tisements (no advertisement is received meaning no ac-
handshake protocol with high probability. We ran our appli- tual handshake process is initiated).
cation on two Windows Phone devices, repeatedly perform-
ing handshakes between the two, for 8296 seconds (∼ 2 hours 4. Handshake Advertiser: the app, acting as an adver-
18 seconds). We performed 1 handshake every 8 seconds, re- tiser, is constantly performing handshakes with an-
sulting in a total number of 1068 handshake attempts. 1025 other phone acting as a scanner.
attempts resulted in a successful shared key establishment,
and only 43 handshake attempts have failed. The failures 5. Handshake Scanner: the app, acting as a scanner, is
were due to occasional lack of synchronization between the constantly performing handshakes with another phone
states of the two devices. Overall, in 96% of the cases the acting as an advertiser.
handshake procedure succeeded. This result suggests that We ran the experiment for 3 hours for each one of the
our protocol is fairly resistant to synchronization failures. modes, and took note of the battery drain percentage. The
results of the experiment are presented in Fig. 8. It is in-
4.3.2 Energy overhead
teresting to notice that scanning actually consumes more
We measured the energy overhead of our Windows Phone than advertising (despite the fact that advertising involves
implementation on a Nokia Lumia 920 phone. In each of transmission). This result was previously confirmed in other
the following scenarios, we started with the phone with its experiments such as [32]. The reason is the design rational
battery 100% charged, WiFi and location services off, and behind BLE modes of operation. Since it is likely that a bea-
screen dimmed to minimum brightness level: con device has to be in advertising mode for a long period
1. Baseline: the phone is not running the app. of time, it is designed for maximal energy saving. It trans-
mits a short packet each time and returns to sleep. Scanning
2. Advertising: the app is continuously publishing BLE is intended to be initiated less often. While scanning, the
advertisements of its pseudonym (no response is sent device constantly searches for beacons, performing intense
meaning no actual handshake process is initiated). processing.
The baseline we compare to is battery drain without any
3. Scanning: the app is continuously scanning for adver- activity, which was measured to be 2.5% per hour. Advertis-
ing resulted in additional 0.8% per hour. Scanning consumes the unlinkable scheme requires broadcasting two subsequent
5% per hour on top of the baseline, which is non-negligible, advertisement packets in order to transmit the pseudonym.
but nevertheless still enables almost 13 hours of operation. Having additional space in the form of the Bluetooth device
Advertising followed by handshake operations resulted in a address field enables to transmit 32-byte long credentials in
battery drain of 3.9% per hour, which enables approximately a single packet.
26 hours of operation. Finally, scanning followed by hand-
shakes resulted in a drain of 8.2% per hour, which enables 5.3 Organizational role authentication
12 hours of operation. Overall, these results are encourag- The secret handshake scheme described in 2.2 supports,
ing in the sense that they enable operation times that are with a slight modification, establishing the corresponding
on the order of what is required to be able to normally use roles of the parties within the organization, in addition to
a smartphone before recharging. proving affiliation. We do not provide the details here, but
By subtracting the results when handshakes are not per- it is described in [13]. We note, however, that the method
formed from the results when they are, we get the percentage in [13] assumes using pseudonyms which are public strings,
that the handshake logic adds on top of the power consump- to which the other party can attach an additional string
tion due to BLE scanning or advertising. In the case of indicating the role. That doesn’t settle with the unlinkable
advertising, handshakes added 0.6% per hour on top of ad- handshake scheme in 2.2.3, proposed as a countermeasure
vertising without proceeding further with the protocol. In against tracking, because it involves transmitting encodings
the case of scanning, proceeding with a handshake added of elliptic curve elements that mask the pseudonym.
0.7% on top of scanning only.
5.4 Additional applications of PbcProxy and
4.3.3 Communication overhead ported PBC library
Each advertisement packet consists of 47 bytes10 . The
PbcProxy, the glue between the .NET framework and a
handshake initiator (Alice) sends 1 packets to scanner (Bob)
C implementation of pairings compiled for the ARM proces-
containing a pseudonym. Bob sends back 1 packet with
sor, is an opening for many other Windows Phone applica-
his pseudonym and a challenge. Alice replies with 1 packet
tions that rely on pairing-based cryptography. One promi-
containing her response to Bob’s challenge and a challenge
nent application is Identity-based Encryption [17, 15, 16]. It
of her own, and finally, Bob responds to Alice’s challenge
enables encrypting sending encrypted messages to another
with 1 packet. Alice sends 47 × 2 = 94 bytes total, and Bob
party solely based on its publicly known identifier such as
sends 47 × 2 = 94 bytes. Overall we have 4 communication
an email or a phone number. For instance, a company or
rounds with 4 packets, which results in 188 bytes.
organization’s employees have each other’s contacts. Us-
Depending on Alice and Bob’s decision whether to use
ing identity-based encryption they can securely communi-
the established encrypted channel for further communica-
cate with each other without the need to exchange public
tion, e.g. exchanging messages, more data can be transmit-
keys directly. While the concept itself is not new, and even
ted. However, for all further communication, the overhead
commercialized by Voltage, the software libraries we provide
will stem solely from the Bluetooth packet structure, since
enable easy development of this application for the Windows
they use the computed symmetric key for encryption, which
Phone platform.
results in the same length as the plaintext.
5.5 Usability
5. FURTHER IMPROVEMENTS While we discuss the technical aspects of secret hand-
We propose possible enhancements to the current imple- shakes between mobile devices, usability issues were left out-
mentation. Some of them are immediately applicable, and side the scope of this work. For successful adoption of our,
some are subject to further research. or any other library and protocol, there has to be a good
understanding of how vendors and users would use this ca-
5.1 Speeding up computation pability in practice. We suggested several use cases in the
Chapter 6.11 of Lynn’s thesis [37] covers several possible introduction. It would be beneficial to validate them by
opportunities for precomputation that can speed up sub- surveying vendors and users, as well as to find additional
sequent computation of pairings. Those opportunities arise use-case scenarios.
from the fact that some of the computation steps depend en-
tirely on only one of the two inputs to the pairing. For each
handshake initiated using the same credentials, the pairing 6. RELATED WORK
G1 input is the same. Therefore, Lynn’s proposals can be We survey related work in the relevant domains, focusing
applied. Moreover, preprocessing is supported by the PBC on theoretic work applicable to our setting, and on systems
library and is part of its API. It would be beneficial to ex- projects with similar goals.
tend PbcProxy to support preprocessed pairings. Hiding the Rumor Source by Fanti et al. [22] provides mes-
sage source obfuscation by using adaptive diffusion spread-
5.2 Using BLE identifiers as pseudonyms ing. They operate under a model that assumes an adversary
As already mentioned, BLE supports using a randomized that has access to metadata, and and also to some corrupted
device address instead of the permanent public address. If nodes. Their method can be complementary to ours. If our
we could set the source device address we would be able application uses the established shared key to diffuse mes-
to use it as a pseudonym, instead of setting it in the ad- sages among society members, we can apply their scheme to
vertisement data. We saw that having 128-bit security for dictate the message diffusion policies, so that an adversary
10 that colludes with corrupted members of the secret group,
In our case we use the maximum available size for adver-
tisement packets. would not be able to identify the message source.
RevCast by Schulman et al. [42] is related to our proposal work also pertains to protecting user’s privacy, the guaran-
in the sense that it disseminates messages over a radio chan- tees provided by their Incognito system are different and are
nel11 . Thus the message transfer is independent of a central useful under different assumptions.
server. It also aims to facilitate clients’ privacy by obviating Prior work also investigated techniques for preserving pri-
requests to a server, an act that discloses a client’s interest vacy of end-users by changes of IP and MAC addresses [40,
in particular data. 38], identifier-free link layer protocol [14, 24] and short-lived
Since the scheme we have chosen [13] was proposed, there credentials or pseudonyms [30]. However, all these tech-
have been more works on the subject of secret handshakes. niques aim to ensure unlinkability only.
Some of them provide alternatives to pairing-based crypto [32] is a useful reference for understanding the intricacies
[19, 45], while others address unlinkability and more flexible of BLE scanning and advertisement. The power consump-
policies [12, 29, 34]. We discuss some of them below. tion model and design guidelines in that work can be useful
In [19] the authors propose a scheme for secret handshakes for optimizing future versions of our protocol.
based on CA-Oblivious encryption. CA-Oblivious encryp-
tion relies on providing a certificate to the user from which 7. CONCLUSION
one cannot learn about the signing authority. Its security
We propose a mobile application that enables members
proof relies on the Computational Diffie-Hellman assump-
of a secret community to discover other affiliates that are
tion (CDH). This scheme avoids using pairing-based cryp-
in proximity to their mobile device. It enables the creation
tography and can be built based on more standard PKI. This
of an authenticated and encrypted communication channel
can be useful on platforms on which it is currently difficult
over which the two members can communicate. We pro-
to run one of the existing libraries for pairing-based cryp-
vide the background needed to understand our scheme and a
tography, such as PBC or JPBC. While this scheme doesn’t
novel analysis of the technicalities related to implementing it
require pairings, more data has to be sent by the handshake
on top of a Bluetooth LE stack on a mobile device. Current
initiating party than in the scheme based on pairings that
state of BLE support poses many challenges which we exam-
only requires sending a short pseudonym. Considering the
ine. We discuss the design considerations and alternatives
very constrained amount of data we are allowed to send in an
and describe our prototype implementation of the secret
advertisement packet, the pairing-based scheme seems more
handshake scheme. The experimental evaluation of our im-
suitable for our task. Additionally, their scheme doesn’t
plementation suggests that cryptographic secret handshakes
provide unlinkability that is not based on issuing multiple
for mobile devices are highly practical. In particular, we
credentials, while the scheme of Balfanz et al. [13] is con-
show that our protocol plays well with Bluetooth LE, and
veniently transformed into an unlinkable SH scheme with
its energy overhead is acceptable for mobile devices. Finally,
reusable credentials.
we propose several ideas for further research.
Secret handshakes with dynamic and fuzzy matching, by
Ateniese et al. [12], adds the ability to specify a set of at-
tributes, required from the other party, in order for the ACKNOWLEDGMENTS
handshake to succeed. It is essentially an attribute-based We would like to thank Dan Boneh from Stanford Univer-
secret handshake scheme which also provides unlinkability sity for advice on pairing-based cryptography, identity-based
and supports roles. The authors integrated the scheme into encryption and related works, and members of the Sensing
the IPSec protocol, by extending the Internet Key Exchange and Energy Research Group at Microsoft Research: Bodhi
protocol [26]. While the scheme we chose is not the state Priyantha, for advising on Bluetooth LE and Di Wang for
of the art, as of today, it is simpler to understand, and re- helping with the mobile setup.
quires sending less data upon handshake initiation. The
applications we proposed so far can do without the addi-
tional features provided by the dynamic or fuzzy handshake
8. REFERENCES
schemes. In addition, our protocol requires performing a [1] Afterschool, http://afterschoolapp.com/app.
single bilinear pairing computation, while that scheme re-
[2] Complete keyless, www.completekeyless.com.
quires performing three pairings. However, providing addi-
tional functionality by using more novel schemes would be a [3] Connect2car, www.connect2car.com.
desirable follow-up work, as well as identifying how mobile [4] Dubbledutch.me,
applications can benefit from fuzzy attribute-based secret http://doubledutch.me/attendance-tracking.html.
handshakes. [5] Legatalk, http://legatalk.com.
Hidden Credentials by Holt et al. [27] proposes a method [6] Multiple precision integers and rationals library,
for Bob to send a message to Alice depending only on Alice’s mpir.org.
credentials, without having any credentials of his own. It is [7] Open whisper systems, https://whispersystems.org.
based on Boneh-Franklin IBE [17] which is in turn based on [8] Sharpen - Automated Java to C# coversion.
the Weil pairing. The notion of hidden credentials could be [9] Telegram messenger, https://telegram.org.
useful in case there is a messenger, who is an outsider to [10] Yik yak, https://www.yikyak.com/home.
the organization, but wants to send an encrypted message [11] ”iBeacon” technology that will make possible Internet
to any member that has a certain role or clearance in the of Things. pages 159–165. Institution of Engineering
organization. and Technology, 2014.
[33] is an example of incorporating custom identifiers in
[12] Giuseppe Ateniese, Marina Blanton, and Jonathan
the BLE MAC address, as we suggested in 5.2. While that
Kirsch. Secret handshakes with dynamic and fuzzy
11 matching. In Network and Distributed System Security
They use FM radio broadcasts to spread certificate revo-
cation updates. Symposium, pages 159–177, 2007.
[13] D. Balfanz, G. Durfee, N. Shankar, D. Smetters, [29] Stanislaw Jarecki and Xiaomin Liu. Unlinkable Secret
J. Staddon, and Hao-Chi Wong. Secret handshakes Handshakes and Key-Private Group Key Management
from pairing-based key agreements. 2003 Symposium Schemes. In Applied Cryptography and Network
on Security and Privacy, 2003., 2003. Security, volume 4521, pages 270–287. 2007.
[14] Kevin Bauer, Damon McCoy, Ben Greenstein, Dirk [30] Qi Jiang, Jianfeng Ma, Guangsong Li, and Li Yang.
Grunwald, and Douglas Sicker. Physical layer attacks An efficient ticket based authentication protocol with
on unlinkability in wireless lans. In International unlinkability for wireless access networks. Wireless
Symposium on Privacy Enhancing Technologies personal communications, 77(2):1489–1506, 2014.
Symposium, pages 108–127. Springer, 2009. [31] Antoine Joux. A one round protocol for tripartite
[15] Dan Boneh and Xavier Boyen. Secure identity based diffie–hellman. In Algorithmic number theory, pages
encryption without random oracles. In Advances in 385–393. Springer, 2000.
Cryptology–Crypto 2004, pages 443–459. Springer, [32] Philipp Kindt, Daniel Yunge, Robert Diemer, and
2004. Samarjit Chakraborty. Precise Energy Modeling for
[16] Dan Boneh, Xavier Boyen, and Eu-Jin Goh. the Bluetooth Low Energy Protocol. mar 2014.
Hierarchical identity based encryption with constant [33] Robin Kravets, Güliz Seray Tuncay, and Hari
size ciphertext. In Advances in Sundaram. For your eyes only. In Proceedings of the
Cryptology–EUROCRYPT 2005, pages 440–456. 6th International Workshop on Mobile Cloud
Springer, 2005. Computing and Services, pages 28–35. ACM, 2015.
[17] Dan Boneh and Matt Franklin. Identity-based [34] Preeti Kulshrestha and Arun Kumar. A New
encryption from the weil pairing. Advances in Unlinkable Secret Handshakes Scheme based on ZSS.
Cryptology - CRYPTO 2001, 2001. [35] Ben Lynn. Pbc benchmarks,
[18] Dan Boneh, Ben Lynn, and Hovav Shacham. Short https://crypto.stanford.edu/pbc/times.html.
signatures from the weil pairing. Advances in [36] Ben Lynn. Pbc library,
Cryptology - ASIACRYPT 2001, 2001. https://crypto.stanford.edu/pbc.
[19] Claude Castelluccia, Stanislaw Jarecki, and Gene [37] Ben Lynn. On the Implementation of Pairing-Based
Tsudik. Secret Handshakes from CA-Oblivious Cryptosystems. PhD thesis, 2007.
Encryption. In Advances in Cryptology - ASIACRYPT [38] Shrirang Mare, Jacob Sorber, Minho Shin, Cory
2004, 10th International Conference on the Theory Cornelius, and David Kotz. Hide-n-sense: preserving
and Application of Cryptology and Information privacy efficiently in wireless mhealth. Mobile
Security, Jeju Island, Korea, December 5-9, 2004, Networks and Applications, 19(3):331–344, 2014.
Proceedings, volume 3329, pages 293–307, 2004. [39] Victor S Miller. The weil pairing, and its efficient
[20] Angelo De Caro and Vincenzo Iovino. jpbc: Java calculation. Journal of Cryptology, 17(4):235–261,
pairing based cryptography. In Proceedings of the 16th 2004.
IEEE Symposium on Computers and Communications, [40] Barath Raghavan, Tadayoshi Kohno, Alex C Snoeren,
ISCC 2011, pages 850–855. IEEE, 2011. and David Wetherall. Enlisting isps to improve online
[21] Andreas Enge. Bilinear pairings on elliptic curves, privacy: Ip address mixing by default. In International
2013. Symposium on Privacy Enhancing Technologies
[22] Giulia Fanti, Peter Kairouz, Sewoong Oh, Kannan Symposium, pages 143–163. Springer, 2009.
Ramchandran, and Pramod Viswanath. Hiding the [41] Mike Ryan. Bluetooth: With Low Energy Comes Low
rumor source. arXiv preprint arXiv:1509.02849, 2015. Security. In Proceedings of the 7th USENIX
[23] Steven D. Galbraith, Kenneth G. Paterson, and Conference on Offensive Technologies, page 4, 2013.
Nigel P. Smart. Pairings for cryptographers, 2008. [42] Aaron Schulman, Dave Levin, and Neil Spring.
[24] Ben Greenstein, Damon McCoy, Jeffrey Pang, Revcast: Fast, private certificate revocation over fm
Tadayoshi Kohno, Srinivasan Seshan, and David radio. In Proceedings of the 2014 ACM SIGSAC
Wetherall. Improving wireless privacy with an Conference on Computer and Communications
identifier-free link layer protocol. In Proceedings of the Security, pages 799–810. ACM, 2014.
6th international conference on Mobile systems, [43] Renwang Su. On the security of a novel and efficient
applications, and services, pages 40–53. ACM, 2008. unlinkable secret handshakes scheme. IEEE
[25] Jie Gu and Zhi Xue. An Improved Efficient Secret Communications Letters, 13(9):712–713, sep 2009.
Handshakes Scheme with Unlinkability. IEEE [44] Kevin Townsend, Carles Cufi, and Robert Davison.
Communications Letters, 15(2):259–261, feb 2011. Getting Started with Bluetooth Low Energy, 2014.
[26] Dan Harkins and Dave Carrel. Rfc 2409: The internet [45] Damien Vergnaud. RSA-Based Secret Handshakes.
key exchange (ike), november 1998. Status: Proposed pages 252–274. 2006.
Standard. [46] Eun-Jun Yoon. Cryptanalysis of an Efficient Secret
[27] Jason E. Holt, Robert W. Bradshaw, Kent E. Handshakes Scheme with Unlinkability. Procedia
Seamons, and Hilarie Orman. Hidden Credentials. Engineering, 24:128–132, 2011.
Proceeding of the ACM workshop on Privacy in the [47] Taek-Young Youn and Young-Ho Park. Security
electronic society - WPES ’03, page 1, 2003. analysis of an unlinkable secret handshakes scheme.
[28] Hai Huang and Zhenfu Cao. A Novel and Efficient IEEE Communications Letters, 14(1):4–5, jan 2010.
Unlinkable Secret Handshakes Scheme. Ieee
Communications Letters, 13(5):363–365 ST – A Novel
and Efficient Unlinkable Sec, 2009.

Das könnte Ihnen auch gefallen