Blockchain-Based Proof of Location
Blockchain-Based Proof of Location
Blockchain-Based Proof of Location
Abstract—Location-Based Services (LBSs) build upon geo- higher privacy levels, as it removes the central authority
graphic information to provide users with location-dependent knowing both the geographic location of users and the
functionalities. In such a context, it is particularly important information they exchange. In the following, peer-to-peer
that geographic locations claimed by users are trustworthy.
Centralized verification approaches proposed in the last few network, overlay network, peer-to-peer overlay and network
years are not satisfactory, as they entail a high risk to are equivalent expressions we use with reference to the same
the privacy of users. In this paper, we present and evalu- concept.
ate a novel decentralized, infrastructure-independent proof-of- Our proof-of-location scheme is based on blockchain
location scheme based on blockchain technology. Our scheme technology [6]. A blockchain is a cryptographically secure
guarantees both location trustworthiness and user privacy
preservation. distributed ledger that maintains a continuously growing list
of ordered data blocks. Each block header contains the hash
Keywords-Location-Based Services; Blockchain; Proof of Lo- of the previous block header, a hash value related to its data
cation
and a timestamp. Once recorded, the data in a block cannot
be altered retroactively.
I. I NTRODUCTION
The main feature that differentiates the blockchain from
In recent years, an increasing number of Location-Based all other distributed databases is its completely decentralized
Services (LBSs) have been released, mostly because of the nature, which escapes the presence of a trusted central
rapid expansion of the mobile device market [1]. LBSs authority. Indeed, blockchain maintenance is performed by a
take advantage of geographic location to provide users with network of communicating nodes, which validate transactions,
accurate and targeted information for locating friends on a add them to their own local copy of the blockchain, and then
map, discovering nearby social events [2], generating alerts broadcast block additions to other nodes. All these operations
about traffic jams along a route [3], and more. are performed in such a way that distributed consensus
To ensure that such services work properly, it is necessary emerges among network nodes, about the information stored
that geographic locations claimed by users are factual. For in the blockchain. If a forged block (i.e., a block with false
example, LBSs with location-based access control that allow proofs of location) is added to the chain, other nodes will
users to obtain a discount coupon, require that users cannot find the data to be untrue. In the Bitcoin virtual currency
cheat on their position, to avoid delivering coupons to those system (www.bitcoin.org), the blockchain is used to store
who really have no right to obtain them. Similarly, social transaction records [6]. Ethereum (www.ethereum.org) is
networks that enable users to discover where their friends are, another virtual currency system with a public blockchain,
are meaningful only if geographic locations are trustworthy. which stores not only transactions, but also programs denoted
A proof of location can be seen as a digital certificate that as smart contracts.
attests someone’s presence at a certain geographic location, at Both Bitcoin and Ethereum use a proof of work (PoW)
a certain time. Different proof-of-location schemes have been algorithm that rewards participants who solve cryptographic
proposed, either infrastructure-dependent or infrastructure- puzzles in order to validate transactions and create new blocks
independent. It is worth nothing that most proof-of-location (i.e., mining). However, Ethereum is moving toward proof of
schemes are centralized, i.e., they rely on servers for storing stake (PoS), a category of consensus algorithms for public
proofs of location, which users have to trust either explicitly blockchains that depend on a validator’s economic stake in
or implicitly. the network. More precisely, a set of validators take turns
With the objective of achieving a system that, at the proposing and voting on the next block, and the weight of
same time, provides verification of geographic location of each validator’s vote depends on the size of its deposit (i.e.,
its users and ensures a high level of privacy to them, we stake).
have designed a completely decentralized and infrastructure- In the proposed scheme, a customized PoS-based
independent proof-of-location scheme for LBS-oriented peer- blockchain is used to store proofs of location. The benefits
to-peer networks (like Overdrive [4] or ADGT [5]). The of PoS as opposed to PoW are, in short:
decentralized nature of peer-to-peer systems guarantees 1) no need to consume large quantities of electricity in
147
otherwise, peers start a synchronization process via the
peer-to-peer network to align their blockchains.
Once all checks have been fulfilled, a proof-of-location
response is produced by the Witness, wrapping the received
request into a new message, together with its geographic
Figure 2. Proofs of location recorded in blocks of a blockchain. Every location and identifier (i.e., its public key Kjpu ). The proof-
block contains a hash of the previous block. of-location response is also signed with the private key of
the Witness, as illustrated in Figure 5.
148
using Brandes’ algorithm [11], where |V | is the number nT . The latest T blocks of the chain cannot include more than
of vertices and |E| is the number of edges. As suggested by one block produced by the same peer. This is to prevent the
Zhu and Cao [10], any peer with low B may be considered monopoly problem, i.e., a peer that keeps out the proofs of
as malicious and its proofs of location discarded. location that concern other peers from the block it produces,
Every peer in the network puts all known valid unac- in order to remain the owner of most proofs of location and,
knowledged proofs of location into a block, together with therefore, to take control of the blockchain.
a reference to the previous valid block known to that peer. Preserving all block headers is sufficient to enable a
In addition to proofs of location and the reference to its simplified verification of the blockchain. Peers are not forced
predecessor, the block contains the identifier of the peer that to maintain a copy of all proofs of location stored in the
generated it. Moreover, the block is signed with the private blockchain (similarly to lightweight Bitcoin clients [12]). The
key of the peer that generated it, as shown in Figure 6. distributed consensus procedure requires that peers preserve
the latest T blocks. In order to handle forks of the blockchain,
⎧ ⎫ it is prudent to maintain the latest 2T blocks. The blocks
⎪
⎪ Resj→i ⎪ ⎪
⎪
⎪ ⎪ that precede the latest 2T blocks may be pruned, as depicted
⎪
⎪ Resj→k ⎪ ⎪
⎪
⎪
⎨ .. ⎪
⎬ in Figure 7.
Blockt : . The value of T is application-dependant. When it is
⎪
⎪ Resk→i ⎪ ⎪ important to store several past geographic locations, such
⎪
⎪ ⎪
⎪
⎪
⎪ Kipu ⎪
⎪ as in applications for tracking and monitor vehicle fleets, T
⎪
⎩ ⎪
⎭
h(Blockt−1 ) K pr has a larger value, compared to applications that localize
i
nearby friends. Forensic applications may be interested to
Figure 6. t-th block, produced and signed by the peer i. store the whole blockchain, in order to provide effective and
trusted alibis for people under investigation. On the other
Afterwards, the newly created block is broadcasted to the hand, the lower is the value of T , the smaller is also the
peers of the network, which decide whether to add the block space occupied in memory. Apart from this, the protocol is
to the end of the blockchain or not. If most peers add the independent from the application layer and highly versatile,
block to the blockchain, then consensus is achieved, therefore supporting the realization of a wide range of LBSs.
proofs of location are made persistent. Otherwise, the block
is discarded and not attached to the blockchain. IV. ROBUSTNESS A NALYSIS
Whereupon, it is verified that the hash of the referenced In the following, we analyze the robustness of the proposed
block matches the end block in the chain, otherwise a fork in scheme with respect to all major LBS-related attacks [13].
the blockchain occurs. Which one branch will become part Once detected, malicious peers may be penalized by the
of the main blockchain depends on the distributed consensus community of honest peers. For example, an honest peer
algorithm explained below. may generate a special-purpose proof-of-location attestation
Last but not least, every peer makes sure that proofs of to inform other peers it will distrust future activities of the
location specified in a new block are not already present malicious peer.
in previous blocks of the blockchain. In case a proof of
location concerns the geographic location of the peer itself, A. Cheating on own geographic location
it is checked that signatory peers of the proof of location are A peer could declare a false geographic location, in order
known (i.e., they belong to the contact list provided by the to obtain a false proof of location. Our scheme prevents this
peer-to-peer overlay). If these conditions are not respected, kind of attack, since each peer that receives a proof location
the block is discarded, instead of being propagated into the request or response verifies that the specified geographic
network. location is not farther than the maximum distance covered
by the short-range communication technology.
C. Distributed Consensus A user with multiple identities (i.e., controlling multiple
In the proposed system, the blockchain is built by means of peers) may produce false proof of location in a selfish way.
a PoS approach, whereby, to decide the peer that must create However, betweenness analysis, illustrated in Section III.B,
next block in the blockchain, a pseudo-random selection is will allow honest peers to detect such kind of malicious
performed, taking into account the number nT of proofs of behavior.
location in the latest T blocks of the blockchain. The larger
the nT , the higher the probability for a peer to be chosen. B. Cheating on another peer’s geographic location
No time-consuming and energy-hungry work is required Another possible attack could hail from a peer that
for creating valid blocks. If a peer receives more than one produces false claims about other peers’ geographic locations.
valid block from its neighbors, it will add to the end of its Our scheme precludes such an attack, thanks to the asymmet-
blockchain the block produced by the peer with the largest ric cryptography mechanism, whereby all the declarations
149
Figure 7. Valid proofs of location are persisted in the main blockchain (white blocks). Proofs of location that precede the latest 2T blocks are no longer
significant. Grey blocks compose a fork competing to become the main blockchain. Dashed blocks are part of a past fork that has become invalid and
ignored.
concerning geographic locations stated by peers are digitally a geographic location that is different from the one
signed with their private keys and easily verifiable using their provided by the peer-to-peer overlay, such a proof of
public keys that correspond to their identifiers. location is immediately discarded.
3) Two peers collude to build a false proof of location
C. Replaying proofs of location
for one of them. The proof may be received by a
Outdated proofs of location could be re-broadcasted in honest peer that is far from the considered location and
the network by malicious peers, with the purpose to forge cannot contact the colluding nodes with the short-range
the geographic location of other peers. Since every peer of communication technology. In this case, the honest peer
the network checks that the proof of location is not already may either immediately discard the proof of location
contained inside the blockchain before retransmitting it, it is (conservative approach) or make a more contemplated
not possible to successfully complete this attack. Moreover, decision, by evaluating the betweenness of the two
inasmuch every proof of location contains a reference to a suspect peers, according to the procedure illustrated in
block of the blockchain, it is immediately discarded in case Subsection 3.2.
the referenced block is older that the latest 2T blocks of the Hence, collusion is hindered by information provided by
blockchain. peers belonging to the LBS-oriented peer-to-peer overlay.
D. Colluding with other peers Moreover, large groups of colluding peers (Sybil groups)
Another threat exists when two or more malicious peers occupying a specific geographical space and discarding all
collude to generate false proofs of location. In literature, proof of location requests from honest peers, would be be
this kind of attack is denoted as Sybil attack [14]. Let easily detected. Indeed, colluding peers should move in a
us consider a malicious peer that tries to prove itself in a coordinated way, which is not easy especially for very large
geographic location that is not the actual one, with the help of groups. On the other hand, if they don’t move, they would
another malicious peer. The two peers agree upon producing be highly suspect.
a proof of location attesting that their geographic locations E. Determining real identities of peers
are different from the actual ones. Then, they broadcast the An attacker could attempt to determine the real identity
false proof of location into the network. of peers through full observation of proofs of location in the
In most cases, colluding peers can be detected by honest blockchain. Actually, in our scheme there is no limit on the
peers, thanks to the short-range communication technology. number of identifiers. In the same way as Bitcoin users are
Moreover, it is unlikely that the whole list of peers provided allowed to adopt different receiving addresses, our users can
by the peer-to-peer neighborhood monitoring protocol is freely decide to change their peer identifiers. As proved by
made of colluding peers. For the sake of precision, the Zhu and Cao [10], if a peer has the possibility to periodically
following three scenarios are possible. change its identifier according to a Poisson distribution, it
1) Proof of location and location declared in the peer- gains unobservability and an attacker cannot determine the
to-peer overlay are identical and both false. If a peer real identity of the peer by observing location proof records.
receives a proof of location concerning two other peers
that claim to be close to it, it verifies that at least one F. Dealing with highly dynamic environments
of the two peers can be contacted with the short-range Suppose to have two close peers located inside two
communication technology; if not, the proof of location different vehicles. When the proof-of-location request is sent
is discarded. by one of the two peers, the vehicles are in contact (in the
2) Proof of location and location declared in the peer- short-range). But, when the reply is computed, the Witness is
to-peer overlay are different; one of them or both are just outside the range of transmission. To avoid such kind of
false. If a peer receives from another peer a proof problem, the peer that issues the request should use the peer-
of location concerning the latter peer and related to to-peer overlay to detect the most suitable Witness among
150
the moving peers that will be met with high probability, and Simulation results for each (P1 , P2 ) combination have been
send the proof-of-location request in suitable advance. obtained by averaging over 25 simulation runs.
In Figures 8 and 9 the effects of full-cheating and less-
V. P ERFORMANCE E VALUATION cheating behaviors are illustrated. We can observe that with
Using OSMobility [15], a simulation platform for study- full cheating, even a reduced percentage of cheaters is able
ing distributed/mobile systems within realistic geographical to sculpt false proofs of location into the blockchain, if not
spaces, we have made a preliminary performance evaluation detected in time. Anyway, full cheating peers are easy to
of our blockchain-based proof-of-location scheme. detect and isolate before they can cause a serious damage,
The simulated scenario consists of a network with 100 because of their systematic discard of denial of location
peers, each one monitoring a circular area with a radius messages. The less cheating strategy, which is more difficult
of 2 km by means of the ADGT protocol. The fraction of to detect, on the other hand requires the majority of Witnesses
correctly pinpointed neighbors (Coverage Percentage) is 75%, to be cheaters, in order to sculpt false proofs of location into
in line with previous results by Brambilla et al. [5]. Moreover, the blockchain.
the radius of the simulated short-range communication
technology is 150 m. A fraction P1 of peers act as Witnesses, 100
i.e., produce and broadcast the proofs of location. A fraction
P2 of these Witnesses represent a group of colluding cheaters. 75
Cheating behavior is:
TP [%]
1) create a proof for a false location, with the help of a 50
cheater that is located nearby that false location, and
geocast the resulting proof of location; 25
P1=10%
2) manage received messages as follows: P1=30%
P1=50%
• if the message is a denial of location, either discard 0
0 25 50 75
it (full-cheating behavior) or propagate it (less- P2
cheating behavior);
• if the message is a proof of location produced by
100
other cheaters, propagate it without checking it;
• if the message is a proof of location produced by
75
a honest peer, verify that it is consistent with the
FP [%]
151
100
Regarding future work, we will study possible variants of
the proposed scheme, for example the possibility that the
75
proof-of-location service has a cost for the users and that
block creators are rewarded. Moreover, we plan to implement
TP [%]
50
the proposed scheme in a plug-in for ADGT.js [16], our cross-
platform, WebRTC-based realization of the ADGT peer-to-
25
peer overlay protocol. To this purpose, we will adopt the
P1=10%
P1=30% Web Bluetooth API (https://webbluetoothcg.github.io/web-
P1=50% bluetooth/), a specification that allows web pages to discover
0
0 25 50 75 and communicate with devices over the Bluetooth 4 wireless
P2
standard.
100
ACKNOWLEDGEMENTS
The work of Michele Amoretti was partially supported by
75 the University of Parma Research Fund - FIL 2016 - Project
“NEXTALGO: Efficient Algorithms for Next-Generation
FP [%]
In this paper, we have presented a novel approach for [6] S. Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash
producing proofs of location, i.e., digital certificates that attest System,” https://bitcoin.org/bitcoin.pdf, 2008.
someone’s presence at a certain geographic location, at some
point in time whereby LBSs can validate user locations. We [7] C. Javali, G. Revadigar, K. B. Rasmussen, W. Hu, and S. Jha,
“I Am Alice, I Was in Wonderland: Secure Location Proof
have illustrated a completely decentralized, blockchain-based Generation and Verification Protocol,” in Proceedings of the
peer-to-peer scheme that guarantees location trustworthiness 41st IEEE Conference on Local Computer Networks, ser. LCN
and preserves user privacy, at the same time. We have 2016, 2016.
analyzed the robustness of the proposed scheme against all
major LBS-related attacks. Furthermore, we have presented [8] Y. Li, L. Zhou, H. Zhu, and L. Sun, “Privacy-Preserving
Location Proof for Securing Large-Scale Database-Driven
a preliminary simulation-based performance evaluation of Cognitive Radio Networks,” IEEE Internet of Things Journal,
the proposed scheme. vol. 3, no. 4, pp. 563–571, Aug 2016.
152
[9] C. Lyu, A. Pande, X. Wang, J. Zhu, D. Gu, and P. Mohapatra,
“CLIP: Continuous Location Integrity and Provenance for
Mobile Phones,” in Proceedings of the 12th IEEE International
Conference on Mobile Ad Hoc and Sensor Systems, Oct 2015,
pp. 172–180.
153