Blockchain Based Trust & Authentication For Decentralized Sensor Networks
Blockchain Based Trust & Authentication For Decentralized Sensor Networks
Abstract—Sensor networks and Wireless Sensor Networks (WSN) are key components for the development of the Internet of Things.
These networks are subject of two kinds of constraints. Adaptability by the mean of mutability and evolutivity, and constrained node
resources such as energy consumption, computational complexity or memory usage. In this context, none of the existing protocols and
models allows reliable peer authentication and trust level management. In the field of virtual economic transactions, Bitcoin has
proposed a new decentralized and evolutive way to model and acknowledge trust and data validity in a peer network by the mean of
the blockchain. We propose a new security model and its protocol based on the blockchain technology to ensure validity and integrity
of cryptographic authentication data and associate peer trust level, from the beginning to the end of the sensor network lifetime.
arXiv:1706.01730v1 [cs.CR] 6 Jun 2017
1 I NTRODUCTION
transactions
we consider the presence of a master authority in charge of
authentication and trust management, we can easily ensure
Fig. 1. Bitcoin block chaining mechanism. The Merkle root of all transac- a good security and privacy level in the network. However,
tions is included in the block header and then used as input for the next this has a major drawback, the master authority becomes
block in the chain. the central part of the network security and thus the critical
point of vulnerability in the network. In decentralized and
The chaining method used in Bitcoin (Figure 1) ensures ad-hoc networks, this approach is impossible, because we
the immutability by using the hash of the previous header don’t have a node which can assure to be connected at every
block hash in the current block. The header includes the root moment of the network life.
hash of the Merkle tree of all transactions in the block. This
way transactions cannot be changed without changing the
root Merkle hash and then invalidating the block. Due to 3.1 Our Framework
the way the blockchain is built, fork chains can append with To ensure proper organization and content management in
different valid blocks storing different transactions. The decentralized networks, we use a common content model
Bitcoin protocol resolves this issue by selecting the longest based on Service Oriented Architecture [8] adapted for our
blockchain as the correct one. Note that due to this choice, application and compatible with CoAP protocol [9]. This
even after being included in a valid block, transactions can approach allows us to design a RESTful model for inter-
be considered valid only after a subsequent block has been action with the internet, and his currently outlined at one
calculated and successfully included in the blockchain by promising approach to organize sensor networks [10].
the majority of the network [6].
3.1.1 Network services model
Before further introspection on our blockchain based model,
2.2 Secure distributed storage based on blockchains we must define the network model we use. Wireless Sensor
We consider the blockchain data structure outside of its Networks can be well described as decentralized networks
application in Bitcoin, as a generic decentralized secured composed of resource constrained nodes based on embed-
data storage structure. It is possible to use any data payloads ded devices. We choose to model the network as an undi-
other than transactions as parts of the block. The block is rected graph G = (V, E), each vertex describing a node in
then divided in two parts, (a) the block constants and header the network, and each edge links two nodes within trans-
and (b) the data payloads, as shown in Figure 2. mission range from each other. Then we associate abilities
A single modification in one payload of a block will and services to nodes, providing resources on the network.
change its Merkle root hash value, and then invalidate In this model we define two entities formalized as a set of
it. This solution thus provides secure and reliable storage characteristics vectors.
distributed among all peers in the network. Note that this • Network Node (NN) defines a vector of Node Prop-
implies that the complete blockchain and all datas linked to erties (NP) and another of Node Abilities (NA)
it must be duplicate on all peers. The size of data payloads
will influence both the hash calculation algorithm and band-
N P = name energy cpu
width used to maintain the blockchain. Due to bandwidth NN = (1)
N A = camera storage
restriction in the platform we use, we choose to limit the
total size of a block to 5 MB to ensure we have enough stor- • Available Services (AS) defines an Abilities Depen-
age for important security and trust informations without dencies (AD) vector, a Resources Dependencies (RD)
overloading the network with blockchain control data. vector and a Resources Provider (RP) vector
3
Renew Payload Blame Payload Revoke Payload For each payload type, HKT defines events and asso-
Entity UUID Entity UUID Entity UUID
ciates them reputation factors. We note Cevt the reputation
OldPubSubKey DefectiveNNUUID RevokedPubKey factor for the event, and Tevt the time the event occured.
NewPubSubKey BlameBlocksID SignedPayloadHash
SignedPayloadHash SignedPayloadHash
To make the NN reputation evolve naturally over time,
each event reputation factor must be weighted by a function
evolving in time since the event occurs. As we want to
decreasing contribution of a particular event to the NN
Fig. 4. Data payloads available in BATM. All blocks must have a Miner reputation level over time, we need to use a continuous
Approval payload to be valid, to verify which node has allowed the decreasing function such as e−x .
authentication entry.
During it first authentication, a NN has no passed action
to compute a reliable trust value. Thus we choose to grant
– Credentials a base trust value to all nodes when a trusted node gives
– Renew them access to the network by including their credentials in
– Blame the blockchain.
– Ban For the simulations, we used the following values for
– Revoke event reputation factors.
Fig. 5. Reputation level simulation over 500 hours with 3 NN. After 2 • Trenew = 168
blames, a ban is declared on the node and becomes effective for a 84 • Tblame = 42
hours. • Tbanrecover = 84
As these rules can be defined to different values regard-
• Aban ing the application using BATM, we use the first block in
• Ablame the blockchain to store values to be used. Thresholds will
• Aapproval be defined in the future to overcome a problem with a
We provide following formula to compute values of Aact malicious initial NN, and what we called the origin block
over time, with Aapp being an application factor, allowing problem.
applications to be more or less restrictive on actions.
4.3.1 Origin block problem
Aapp ∗ (Nauth − 1) At startup, the network contains no authenticated node to
Aevt = Cevt + (5)
Cevt realize BATM authentication and trust evaluation, and the
Note that reputation level simulation in Figure 5 does blockchain is empty. This means we need a method to forge
not consider minimum trust level required for a NN to the first block. We choose to let any node craft this special
fullfill an action. block from its own parameters. In fact, the main problem is
We showed how BATM with HKT provide a power- to ensure proper operation in the beginning of the network
ful solution to authenticate nodes and evaluate trust in life, then BATM will adapt itself to events occuring in the
decentralized networks. The system can be made instable network. If the first NN is malicious, it will be banned by
by malicious authenticated nodes overloading the network others node early in the network.
and submitting lots of valid payloads for inclusion in the Since the first block contains all mutable values used
blockchain. To overcome this issue, we define specific rules in BATM, a possible attack will be the inclusion of specific
for payload submission in the network to improve stability values which will tend the system to misbehave. To counter
of the system over time. this threat, future work will provide a formula to estimate
the probability of BATM instability from these values.
4.3 BATM payload rules
To avoid abuse from NN which can overload the network 5 F UTURE WORK
with payloads to be validated, we introduce specific rules We presented the concept and model of BATM, with early
on the payload exchange protocol for BATM. We consider results on reputation evaluation over time. The next step is
two type of rules : timers, key validity timeouts and event to evaluate each part of BATM completely and the global
reputation factors described earlier. Timers are limitation in model. The model itself will be improved depending on
time used to discard payloads and blocks submitted by NN the results, with the objective of more adaptative algorithms
overloading the network. taking AS and NN characteristics as defined in our model.
A set of timers defines the minimum amount of time
expected between two payloads of the same type. BATM 5.1 Trust model
currently uses 3 timers as follows.
BATM with HKT provide a simple way to manage trust
• Trenew is the usual time between two key renewal by in decentralized networks. More researches on HKT per-
a node. If needed, a node is authorized to renew its formance must be conducted, and the model itself may
keys at Trenew /2. Here we ensure there are at most 2 evolve to consider more parameters in trust and reputa-
renews in a Trenew for a given NN. tion evaluation. We think about considering NN and AS
• Tblame is the minimum time between two blames on abilities in account for specific actions, and enhance the
a NN given by the same blamer NN. reputation calculations. For example, a blamer reputation
6
could influence the reputation factor of its blame, and we [4] N. Fotiou and G. C. Polyzos, “Decentralized name-based security
may introduce a time coefficient to raise trust on the overall for content distribution using blockchains,” Proceedings - IEEE
INFOCOM, vol. 2016-September, pp. 415–420, 2016.
time presence of the NN or AS in the network. Another [5] S. Nakamoto, “Bitcoin: A Peer-to-Peer Electronic Cash System,”
possibility is to raise resilience over DoS attacks by requiring www.bitcoin.org, p. 9, 2008. [Online]. Available: https://bitcoin.
blames from different NN or AS before banning one. org/bitcoin.pdf
In this paper, we consider self-organizing networks with [6] I. Eyal, A. E. Gencer, E. G. Sirer, and R. Van Renesse, Bitcoin-ng: A
scalable blockchain protocol, 2016.
no constraints on which NN may ask to authenticate. We [7] B. Solhaug, D. Elgesem, and K. Stolen, “Why trust is not propor-
also let possible a derivative model, using a network mas- tional to risk,” pp. 11–18, 2007.
ter key to allow blockchain supervision and eliminate the [8] T. Erl, Service-oriented architecture: concepts, technology, and design.
Pearson Education India, 2005.
first block problem. A possibility may be to allow specific [9] Z. Shelby, K. Hartke, and C. Bormann, “The constrained applica-
network, for example vendor-specific networks, where NN tion protocol (coap),” Standard Track, Internet Engineering Task Force
can provide a proof of membership by prior network master (IETF), 2014.
key signature. [10] S. De, P. Barnaghi, M. Bauer, and S. Meissner, Service modelling for
the Internet of Things, 2011.
[11] P. R. Zimmermann, The official PGP user’s guide. MIT press, 1995.
[12] J. Callas, L. Donnerhacke, H. Finney, D. Shaw, and R. Thayer,
5.2 Real world testing “Rfc 4880 - openpgp message format,” Proposed Standard, Internet
If simulation results fullfill our expectations, BATM will Engineering Task Force (IETF), 2007.
[13] D. Gambetta, “Can we Trust Trust?” Trust: Making and breaking
be included in Multicast Services for Linux (MSL), an coopeative relations, pp. 213–237, 1990.
implementation our SOA network model. Note that MSL
is at development stage for now with now release date.
Moreover, MSL is intended to be used as a real world proof
of concept for our overall design including SOA model and
BATM with HKT.
6 C ONCLUSION
This paper proposes a new application for the blockchain
as a secured decentralized storage for cryptographic keys Axel Moinet is a Ph.D Student at the Le2i laboratory, Univ. Bourgogne
Franche Comté. He works on smart camera based Vision Sensor Net-
as well as trust informations in the context of autonomous works and combinatorics. He graduated from a Master of Engineering
Wireless Sensor Networks. The Blockchain Authentication on Embedded Systems and then worked for Oberthur Cash Protection
and Trust Module and its Human-like Knowledge based as Embedded Software engineer before returning on a Ph.D thesis.
Trust model shows how to use to immutability of the
blockchain to provide solutions to high problematics in the
field of decentralized ad-hoc networks. More precisely, we
show how it is possible to build a complete solution provid-
ing authentication mechanisms as well as trust evaluation
in a self-organized and evolutive network.
Resources
The Service Oriented model is currently under development Benoit Darties is an Associate Professor at the Le2i laboratory, Univ.
Bourgogne Franche Comté. He works on combinatorics and operational
into the Multicast Services for Linux (MSL) framework.
research applied to networks operations. Benoit obtained in 2007 a Ph.D
MSL is a free software and will be publicly available at in Computer Science at University from Montpellier, France. He also
https://bullekeup.github.io/MSL, under the AGPL license. works on the design of low energy consumption mac protocols for WSN.
BATM will be available in MSL in the next months. HKT
simulation files for GNU Octave and MATLAB are available
by mail on request at [email protected].
ACKNOWLEDGMENTS
The authors would like to thank the Burgundy Region and
the FEDER european fund for funding this research work.
Jean-Luc Baril Jean-Luc Baril received his Phd degree in mathematics
and computer sciences from the University of Bordeaux in 1996. He is
R EFERENCES currently Professor in the Computer Science Department of the Bour-
gogne University (LE2I), Dijon-France. His research interests are in the
[1] C. M. Medaglia and A. Serbanati, An Overview of Privacy and Secu- areas of combinatorics, graph theory and algorithmic.
rity Issues in the Internet of Things, D. Giusto, A. Iera, G. Morabito,
and L. Atzori, Eds. New York, NY: Springer New York, 2010.
[2] Y. L. Sun, Z. Han, W. Yu, and K. R. Liu, “A trust evaluation
framework in distributed networks: Vulnerability analysis and
defense against attacks.” vol. 2006, pp. 1–13, 2006.
[3] G. Zyskind, O. Nathan, and A. S. Pentland, “Decentralizing pri-
vacy: Using blockchain to protect personal data,” Proceedings -
2015 IEEE Security and Privacy Workshops, SPW 2015, pp. 180–184,
2015.