Download as pdf or txt
Download as pdf or txt
You are on page 1of 70

Advanced Computing and Systems for

Security Volume 14 Lecture Notes in


Networks and Systems 242 1st Edition
Rituparna Chaki (Editor)
Visit to download the full and correct content document:
https://ebookmeta.com/product/advanced-computing-and-systems-for-security-volum
e-14-lecture-notes-in-networks-and-systems-242-1st-edition-rituparna-chaki-editor/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Advanced Computing and Systems for Security Volume 13


1st Edition Rituparna Chaki

https://ebookmeta.com/product/advanced-computing-and-systems-for-
security-volume-13-1st-edition-rituparna-chaki/

Intelligent Computing Proceedings of the 2021 Computing


Conference Volume 2 Lecture Notes in Networks and
Systems 284 Kohei Arai (Editor)

https://ebookmeta.com/product/intelligent-computing-proceedings-
of-the-2021-computing-conference-volume-2-lecture-notes-in-
networks-and-systems-284-kohei-arai-editor/

Intelligent Computing Proceedings of the 2021 Computing


Conference Volume 3 Lecture Notes in Networks and
Systems 285 Kohei Arai (Editor)

https://ebookmeta.com/product/intelligent-computing-proceedings-
of-the-2021-computing-conference-volume-3-lecture-notes-in-
networks-and-systems-285-kohei-arai-editor/

Distributed Computing and Artificial Intelligence


Volume 1 18th International Conference Lecture Notes in
Networks and Systems Kenji Matsui (Editor)

https://ebookmeta.com/product/distributed-computing-and-
artificial-intelligence-volume-1-18th-international-conference-
lecture-notes-in-networks-and-systems-kenji-matsui-editor/
Architectural Wireless Networks Solutions and Security
Issues Lecture Notes in Networks and Systems 196
Santosh Kumar Das (Editor)

https://ebookmeta.com/product/architectural-wireless-networks-
solutions-and-security-issues-lecture-notes-in-networks-and-
systems-196-santosh-kumar-das-editor/

Intelligent Systems and Applications Proceedings of the


2021 Intelligent Systems Conference IntelliSys Volume 1
294 Lecture Notes in Networks and Systems Kohei Arai
(Editor)
https://ebookmeta.com/product/intelligent-systems-and-
applications-proceedings-of-the-2021-intelligent-systems-
conference-intellisys-volume-1-294-lecture-notes-in-networks-and-
systems-kohei-arai-editor/

Comprehensible Science ICCS 2021 Lecture Notes in


Networks and Systems 315 Tatiana Antipova

https://ebookmeta.com/product/comprehensible-science-
iccs-2021-lecture-notes-in-networks-and-systems-315-tatiana-
antipova/

Intelligent Sustainable Systems Proceedings of ICISS


2021 Lecture Notes in Networks and Systems 213
Jennifer S. Raj (Editor)

https://ebookmeta.com/product/intelligent-sustainable-systems-
proceedings-of-iciss-2021-lecture-notes-in-networks-and-
systems-213-jennifer-s-raj-editor/

Digital Science: DSIC 2021 (Lecture Notes in Networks


and Systems, 381) Tatiana Antipova (Editor)

https://ebookmeta.com/product/digital-science-dsic-2021-lecture-
notes-in-networks-and-systems-381-tatiana-antipova-editor/
Lecture Notes in Networks and Systems 242

Rituparna Chaki
Nabendu Chaki
Agostino Cortesi
Khalid Saeed Editors

Advanced
Computing
and Systems
for Security:
Volume 14
Lecture Notes in Networks and Systems

Volume 242

Series Editor
Janusz Kacprzyk, Systems Research Institute, Polish Academy of Sciences,
Warsaw, Poland

Advisory Editors
Fernando Gomide, Department of Computer Engineering and Automation—DCA,
School of Electrical and Computer Engineering—FEEC, University of Campinas—
UNICAMP, São Paulo, Brazil
Okyay Kaynak, Department of Electrical and Electronic Engineering,
Bogazici University, Istanbul, Turkey
Derong Liu, Department of Electrical and Computer Engineering, University
of Illinois at Chicago, Chicago, USA; Institute of Automation, Chinese Academy
of Sciences, Beijing, China
Witold Pedrycz, Department of Electrical and Computer Engineering, University of
Alberta, Alberta, Canada; Systems Research Institute, Polish Academy of
Sciences, Warsaw, Poland
Marios M. Polycarpou, Department of Electrical and Computer Engineering,
KIOS Research Center for Intelligent Systems and Networks, University of Cyprus,
Nicosia, Cyprus
Imre J. Rudas, Óbuda University, Budapest, Hungary
Jun Wang, Department of Computer Science, City University of Hong Kong,
Kowloon, Hong Kong
The series “Lecture Notes in Networks and Systems” publishes the latest
developments in Networks and Systems—quickly, informally and with high quality.
Original research reported in proceedings and post-proceedings represents the core
of LNNS.
Volumes published in LNNS embrace all aspects and subfields of, as well as new
challenges in, Networks and Systems.
The series contains proceedings and edited volumes in systems and networks,
spanning the areas of Cyber-Physical Systems, Autonomous Systems, Sensor
Networks, Control Systems, Energy Systems, Automotive Systems, Biological
Systems, Vehicular Networking and Connected Vehicles, Aerospace Systems,
Automation, Manufacturing, Smart Grids, Nonlinear Systems, Power Systems,
Robotics, Social Systems, Economic Systems and other. Of particular value to both
the contributors and the readership are the short publication timeframe and the
world-wide distribution and exposure which enable both a wide and rapid
dissemination of research output.
The series covers the theory, applications, and perspectives on the state of the art
and future developments relevant to systems and networks, decision making, control,
complex processes and related areas, as embedded in the fields of interdisciplinary
and applied sciences, engineering, computer science, physics, economics, social, and
life sciences, as well as the paradigms and methodologies behind them.
Indexed by SCOPUS, INSPEC, WTI Frankfurt eG, zbMATH, SCImago.
All books published in the series are submitted for consideration in Web of Science.

More information about this series at http://www.springer.com/series/15179


Rituparna Chaki · Nabendu Chaki ·
Agostino Cortesi · Khalid Saeed
Editors

Advanced Computing
and Systems for Security:
Volume 14
Editors
Rituparna Chaki Nabendu Chaki
University of Calcutta Department of Computer Science
Kolkata, India and Engineering
University of Calcutta
Agostino Cortesi Kolkata, West Bengal, India
Ca Foscari University
Venice, Italy Khalid Saeed
Bialystok University of Technology
Bialystok, Poland

ISSN 2367-3370 ISSN 2367-3389 (electronic)


Lecture Notes in Networks and Systems
ISBN 978-981-16-4293-7 ISBN 978-981-16-4294-4 (eBook)
https://doi.org/10.1007/978-981-16-4294-4

© The Editor(s) (if applicable) and The Author(s), under exclusive license to Springer Nature
Singapore Pte Ltd. 2021
This work is subject to copyright. All rights are solely and exclusively licensed by the Publisher, whether
the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse
of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and
transmission or information storage and retrieval, electronic adaptation, computer software, or by similar
or dissimilar methodology now known or hereafter developed.
The use of general descriptive names, registered names, trademarks, service marks, etc. in this publication
does not imply, even in the absence of a specific statement, that such names are exempt from the relevant
protective laws and regulations and therefore free for general use.
The publisher, the authors and the editors are safe to assume that the advice and information in this book
are believed to be true and accurate at the date of publication. Neither the publisher nor the authors or
the editors give a warranty, expressed or implied, with respect to the material contained herein or for any
errors or omissions that may have been made. The publisher remains neutral with regard to jurisdictional
claims in published maps and institutional affiliations.

This Springer imprint is published by the registered company Springer Nature Singapore Pte Ltd.
The registered company address is: 152 Beach Road, #21-01/04 Gateway East, Singapore 189721,
Singapore
Preface

This book collects the deeply revised version of papers accepted for oral presentation
at the Eighth International Doctoral Symposium on Applied Computation and Secu-
rity Systems (ACSS 2021). ACSS 2021 took place in Kolkata, India, on April 9–
10, 2021. The Doctoral Symposium was organized by the University of Calcutta in
collaboration with Ca Foscari University of Venice, Italy, and Bialystok University
of Technology, Poland.
This unique symposium is aimed specially to facilitate budding researchers in
pursuing their doctoral degree. Each contributed paper was required to have at least
one enrolled Ph.D. student as one of the authors. This has given an opportunity
to each Ph.D. student to express their innovative ideas and to discuss them with a
qualified scientific community of peers.
Over the years, the overall quality of the papers submitted to ACSS has been
improving dramatically, and their subjects reflect and somehow anticipate the
emerging research trends in the area of applied computation and security. In the
call for papers, the following topics of interest related to Applied Computation have
been listed: Security Systems, Software Engineering, Internet of Things, Artificial
Intelligence, Data Science, Computer Vision, and Algorithms.
The editors are greatly indebted to the members of the international program
committee for sharing their expertise and completing their careful review of the
papers in due time. Their reviews have allowed the authors not only to improve their
articles but also to get new hints toward the completion of their Ph.D. thesis.
The dissemination initiatives from Springer have drawn a large number of high-
quality submissions from scholars primarily but not exclusively from India. ACSS
used a double-blind review process and each paper received at least three reviews
either from the PC members or by external reviewers. The reviewers mainly consid-
ered the technical quality and the originality of each paper. As ACSS is a doctoral
symposium, special emphasis was given to assess the clarity of presentation. The
entire process of paper submission, review, and acceptance process was done online.
After carefully considering the reviews, the Program Committee selected only 27
papers for publication out of 45 submissions.

v
vi Preface

We thank the members of Program Committee and Organizing Committee, whose


sincere efforts before and during the symposium have resulted in strong technical
program and in effective discussions. We thank Springer Nature for sponsoring the
best paper award. In particular, we appreciate the initiative from Mr. Aninda Bose and
his colleagues in Springer Nature for their strong support toward publishing this post-
symposium book in the series “Advances in Intelligent Systems and Computing”.
We would also like to thank ACM for the continuous support toward the success
of the symposium. Last but not least, we thank all the authors without whom the
symposium would not have reached up to this standard.
On behalf of the editorial team of ACSS 2021, we sincerely hope this volume will
be beneficial to all its readers and motivate them toward better research works.

Kolkata, India Rituparna Chaki


Kolkata, India Nabendu Chaki
Venezia, Italy Agostino Cortesi
Bialystok, Poland Khalid Saeed
Contents

Security
Parallel Simulation of Cyber-Physical-Systems . . . . . . . . . . . . . . . . . . . . . . . 3
Kamal Das, Amit Gurung, and Rajarshi Ray
Attack Detection Scheme Using Deep Learning Approach for IoT . . . . . . 17
Vikash Kumar, Sidra Kalam, Ayan Kumar Das, and Ditipriya Sinha
An Efficient Authentication Scheme for Mobile Online Social
Networks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
Munmun Bhattacharya, Sandip Roy, and Samiran Chattopadhyay
GAN-Based Data Generation Approach for IDS: Evaluation
on Decision Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Sudhir Kumar Pandey, Vikash Kumar, Ditipriya Sinha, and Ayan Kumar Das

Software Engineering
Conceptualizing Re-configurable Business Process:
A Context-Driven Approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Priyanka Chakraborty and Anirban Sarkar
Dcube N N : Tool for Dynamic Design Discovery from Multi-threaded
Applications Using Neural Sequence Models . . . . . . . . . . . . . . . . . . . . . . . . . 75
Srijoni Majumdar, Nachiketa Chatterjee, Partha Pratim Das,
and Amlan Chakrabarti
Construction of Materialized Views in Non-Binary Data Space . . . . . . . . 93
Santanu Roy, Bibekananda Shit, Soumya Sen, and Agostino Cortesi
Dynamic Prioritization of Software Requirements for Incremental
Software Development . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111
Mandira Roy, Novarun Deb, Agostino Cortesi, Rituparna Chaki,
and Nabendu Chaki

vii
viii Contents

Systems Biology
A Framework for Translation and Validation of Digital
Microfluidic Protocols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135
Pushpita Roy, Ansuman Banerjee, and Bhargab B. Bhattacharya
Disease-Relevant Gene Selection Using Mean Shift Clustering . . . . . . . . . 151
Srirupa Dasgupta, Sharmistha Bhattacharya, Abhinandan Khan,
Anindya Halder, Goutam Saha, and Rajat Kumar Pal
Multiple Fault Identification and Diagnosis in Cross-Referencing
Digital Microfluidic Biochips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 165
Sagarika Chowdhury, Kazi Amrin Kabir, Debasis Dhal,
Rajat Kumar Pal, and Goutam Saha
Brain Tumor Detection: A Comparative Study Among Fast Object
Detection Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
Sunita Roy, Sanchari Sen, Ranjan Mehera, Rajat Kumar Pal,
and Samir Kumar Bandyopadhyay
MicroRNA-Based Cancer Classification Using Feature Selection
Wrapper . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197
Shib Sankar Bhowmick and Debotosh Bhattacharjee
Editors and Contributors

About the Editors

Rituparna Chaki is a Full Professor in the A K Choudhury School of Information


Technology, University of Calcutta, India since June 2015. She joined academia as
faculty member in the West Bengal University of Technology in 2005. Before that she
has served under Government of India in maintaining industrial production database.
Besides, she has served as a Visiting Professor in the AGH University of Science
& Technology, Cracow, Poland since 2013 for consecutive years. Rituparna did her
Ph.D. from Jadavpur University in 2002. She has been associated in organizing
many conferences in India and abroad as Program Chair, OC Chair or as member
of Technical Program Committee. She has published more than 60 research papers
in reputed journals and peer-reviewed conference proceedings. Her research interest
is primarily in Adhoc networking and its security. She is a professional member of
IEEE and ACM. Currently, Rituparna is the Secretary for ACMW-India.

Nabendu Chaki is a Professor in the Department Computer Science & Engineering,


University of Calcutta, Kolkata, India. He is the Editor in Chief of the Springer Nature
book series on Services and Business Process Reengineering. Besides editing about
40 conference proceedings with Springer, Dr. Chaki has authored 8 text and research
books with CRC Press, Springer Nature, etc. He has published more than 200 Scopus
Indexed research articles in Journals and International conferences. Prof. Chaki has
served as a Visiting Professor in different places including US Naval Postgraduate
School, California, and in different Universities in Italy and Poland. He is the founder
Chair of ACM Professional Chapter in Kolkata and served in that capacity for 3
years since January 2014. He has been active during 2009-2015 towards developing
several international standards in Software Engineering and Service Science as a
Global (GD) member for ISO-IEC.

Agostino Cortesi, Ph.D. is a Full Professor of Computer Science at Ca’ Foscari


University, Venice, Italy, and Dean of the PhD programme in Computer Science.
He has previously served as Department head, and as Vice-Rector for quality

ix
x Editors and Contributors

assessment and institutional affairs. His research interests include programming


languages theory, software engineering, and static analysis techniques, with partic-
ular emphasis on security applications. He serves as coordinator of the H2020 Euro-
pean project “Families_Share” and of the ITALY-INDIA project “Formal Specifica-
tion for Secured Software System”. He published more than 150 papers in interna-
tional journals and proceedings of international conferences. According to Scopus,
his h-index is 19 and his i-10 index is 39. He serves as co-Editor in Chief of the book
series “Services and Business Process Reengineering” edited by Springer-Nature.

Khalid Saeed is a full Professor of Computer Science in the Faculty of Computer


Science at Bialystok University of Technology. He was with Faculty of Mathematics
and Information Sciences at Warsaw University of Technology in 2014-2019. He
was with AGH Krakow in 2008-2014. He received the BSc Degree in Electrical and
Electronics Engineering from Baghdad University in 1976, the MSc and PhD (distin-
guished) Degrees from Wroclaw University of Technology in Poland in 1978 and
1981, respectively. He received his DSc Degree (Habilitation) in Computer Science
from the Polish Academy of Sciences in Warsaw in 2007. He was nominated by the
President of Poland for the title of Professor in 2014. He has published more than 245
publications including 98 journal papers and book chapters, 87 peer reviewed confer-
ence papers, edited 48 books, journals and Conference Proceedings, written 12 text
and reference books (h-index 15 in WoS base and 12 in SCOPUS base). He super-
vised more than 15 PhD and 130 MSc theses from and outside Poland. He gave 50
invited lectures and keynotes in different universities in Canada, China, Colombia,
Czech, Germany, India, Japan, Serbia, Slovakia and South Korea on Biometrics,
Image Processing and Analysis. He received more than 30 academic awards.
Khalid Saeed is a member of more than 15 editorial boards of international journals
and conferences. He is an IEEE Senior Member and has been selected as IEEE Distin-
guished Speaker for 2011-2016. Khalid Saeed is the Editor-in-Chief of International
Journal of Biometrics with Inderscience Publishers.

Contributors

Samir Kumar Bandyopadhyay Department of Computer Science and Engi-


neering, University of Calcutta, Kolkata, West Bengal, India
Ansuman Banerjee Indian Statistical Institute, Kolkata, India
Debotosh Bhattacharjee Department of Computer Science and Engineering,
Jadavpur University, Kolkata, West Bengal, India
Bhargab B. Bhattacharya IIT Kharagpur, Kharagpur, India
Munmun Bhattacharya Department of Information Technology, Jadavpur Univer-
sity, Salt Lake City, Kolkata, India
Editors and Contributors xi

Sharmistha Bhattacharya University of Calcutta, Acharya Prafulla Chandra Roy


Shiksha Prangan, Saltlake, Kolkata, India
Shib Sankar Bhowmick Department of Electronics and Communication Engi-
neering, Heritage Institute of Technology, Kolkata, India
Nabendu Chaki University of Calcutta, Kolkata, India
Rituparna Chaki University of Calcutta, Kolkata, India
Amlan Chakrabarti University of Calcutta, Kharagpur, West Bengal, India
Priyanka Chakraborty Department of Computer Science and Engineering,
National Institute of Technology, Durgapur, West Bengal, India
Nachiketa Chatterjee University of Calcutta, Kharagpur, West Bengal, India
Samiran Chattopadhyay Department of Information Technology, Jadavpur
University, Salt Lake City, Kolkata, India
Sagarika Chowdhury Department of Computer Science and Engineering, Univer-
sity of Calcutta, Kolkata, India
Agostino Cortesi DAIS, Ca’ Fosacari University, Venice, Italy
Ayan Kumar Das Birla Institute of Technology Mesra, Patna, Bihar, India
Kamal Das National Institute of Technology Meghalaya, Shillong, Meghalaya,
India
Srirupa Dasgupta Government College of Engineering and Leather Technology,
Saltlake, Kolkata, India
Novarun Deb Indian Institute of Information Technology, Vadodara (IIIT-V),
Gandhinagar, India
Debasis Dhal Department of Computer Science and Engineering, University of
Calcutta, Kolkata, India
Amit Gurung Martin Luther Christian University, Shillong, Meghalaya, India
Anindya Halder North-Eastern Hill University, Tura Campus, Tura, Meghalaya,
India
Kazi Amrin Kabir Department of Computer Science and Engineering, University
of Calcutta, Kolkata, India
Sidra Kalam Birla Institute of Technology, Mesra, Patna, India
Abhinandan Khan University of Calcutta, Acharya Prafulla Chandra Roy Shiksha
Prangan, Saltlake, Kolkata, India
Vikash Kumar National Institute of Technology Patna, Patna, Bihar, India
xii Editors and Contributors

Rajat Kumar Pal University of Calcutta, Acharya Prafulla Chandra Roy Shiksha
Prangan, Saltlake, Kolkata, India
Srijoni Majumdar Indian Institute of Technology, Kharagpur, West Bengal, India
Ranjan Mehera Business & Solution Consulting, Subex, Inc., Broomfield, CO,
USA
Rajat Kumar Pal Department of Computer Science and Engineering, University
of Calcutta, Kolkata, West Bengal, India
Sudhir Kumar Pandey Lok Nayak Jai Prakash Institute of Technology, Chapra,
Saran, Bihar, India
Partha Pratim Das Indian Institute of Technology, Kharagpur, West Bengal, India
Rajarshi Ray Indian Association for the Cultivation of Science, Kolkata, West
Bengal, India
Mandira Roy University of Calcutta, Kolkata, India
Pushpita Roy Indian Statistical Institute, Kolkata, India;
Calcutta University, Kolkata, India
Sandip Roy Department of Computer Science and Engineering, Asansol Engi-
neering College, Asansol, WB, India
Santanu Roy Future Institute of Engineering and Management, Kolkata, India
Sunita Roy Department of Computer Science and Engineering, University of
Calcutta, Kolkata, West Bengal, India
Goutam Saha Department of Information Technology, North-Eastern Hill Univer-
sity, Umshing Mawkynroh, Shillong, Meghalaya, India
Anirban Sarkar Department of Computer Science and Engineering, National
Institute of Technology, Durgapur, West Bengal, India
Sanchari Sen Department of Computer Science and Engineering, University of
Calcutta, Kolkata, West Bengal, India
Soumya Sen University of Calcutta, Kolkata, India
Bibekananda Shit Future Institute of Engineering and Management, Kolkata, India
Ditipriya Sinha National Institute of Technology Patna, Patna, Bihar, India
Security
Parallel Simulation of
Cyber-Physical-Systems

Kamal Das, Amit Gurung, and Rajarshi Ray

Abstract Model-based design (MBD) in systems engineering is a well-accepted


technique to abstract, analyze, verify, and validate complex systems. In MBD, we
design a mathematical model of the system to virtually execute and test systems via
model simulations to understand the system dynamics better. Computing model sim-
ulations have their challenges: one is to ensure that the simulation trajectory preserves
the model semantics. Besides, computing many simulation trajectories over a long
time-horizon must be time-efficient for rapid response to system engineers. In this
work, we address these challenges in simulating models of Cyber-Physical-Systems
(CPS), particularly systems possessing mixed discrete-continuous dynamics. We
focus on the subclass of CPS’s hybrid-automata models, where jump predicates are
restricted to polygonal constraints and present a numerical simulation engine that can
efficiently compute many random simulations in parallel by exploiting the parallel
computing capability in modern multicore processors. Our simulation engine imple-
ments a lock-free parallel breadth-first-search (BFS) like algorithm and is imple-
mented in the model-checking tool XSpeed. We demonstrate the performance gains
of our simulation engine over SpaceEx and CORA, the modern model checkers and
simulators for affine hybrid systems.

Keywords Hybrid systems · Hybrid automaton · Simulation trajectory · Parallel


simulations

K. Das (B)
National Institute of Technology Meghalaya, Shillong, Meghalaya, India
e-mail: kamaldas@nitm.ac.in
A. Gurung
Martin Luther Christian University, Shillong, Meghalaya, India
R. Ray
Indian Association for the Cultivation of Science, Kolkata, West Bengal, India
e-mail: rajarshi.ray@iacs.res.in

© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 3
R. Chaki et al. (eds.), Advanced Computing and Systems for Security: Volume 14,
Lecture Notes in Networks and Systems 242,
https://doi.org/10.1007/978-981-16-4294-4_1
4 K. Das et al.

1 Introduction

MBD in systems engineering is a well-accepted technique to abstract, analyze, ver-


ify, and validate complex systems [20, 25, 26]. In MBD, a mathematical model of
the system is designed and used to virtually execute and test systems via model sim-
ulations with the intent of gaining a better insight of the system dynamics. Model
simulation not only serves as a useful tool to assess the dynamics of a complex
system but also enables detection of bugs early in the design and development pro-
cess, without needing a physical prototype of the system in place, therefore sub-
stantially reducing the time, cost, and effort in system-engineering. There are vari-
ous modeling frameworks such as finite-state-machines (FSMs) [8], Petri-Nets [28],
ordinary-differential-equations (ODEs) [9], message-sequence-charts (MSCs) [10],
timed-automata [5], and hybrid-automata [18] to name some and each one is well-
suited to model a particular category of systems. For instance, time-automata are
well-suited to real-time systems whereas Petri-Nets are ideal for concurrent systems
modeling.
CPS is an integration of physical processes with computation [22]. The physical
processes follow continuous dynamics and are monitored and controlled by a discrete
controller implementing a control logic. There is a growing interest in CPS research
since many real-world applications and a large number of Artificial Intelligence
powered systems are cyber-physical in nature. Unmanned aerial vehicles (UAV),
self-driving cars, autonomous robots, planetary landers, and rovers are all examples
of CPS. The mathematical modeling framework that is particularly suited for CPS is
Hybrid Automaton (HA) since it can represent the discrete computation by a state-
transition system and continuous process dynamics by ODEs [4]. Depending on the
type of ODEs, hybrid-automata are broadly classified into linear, affine, or non-linear.
We present the details in the following sections.
Computing simulation trajectories of HA models of CPS poses difficulty due to
(1) the interplay of continuous and discrete dynamics and (2) computations involving
variables taking values in R. Numerical computation of a HA trajectory is compu-
tationally inexpensive in general. However, when precise trajectories at very small
time-steps are necessary over a large time-horizon, its computation may require con-
siderable time. Additionally, a system engineer may wish to simulate a model with
numerous initial conditions over a large time-horizon for the purpose of testing and
robustness evaluation, thus requiring the computation of a large number of long
simulation trajectories. In-efficient sequential computations may therefore have a
very slow response. These observations motivate us to design parallel algorithms for
computing simulations of CPS models. In this work, we propose a multi-threaded
lock-free BFS like algorithm to compute many simulation trajectories of a restrictive
class of hybrid automaton models of CPS, where the transition jump predicates are
polygonal constraints. A multi-threaded implementation exploits the inherent paral-
lel processing power in modern multicore processors. The algorithm is implemented
in the model-checker XSpeed [27], open-source software available in https://gitlab.
com/raj.ray84/XSpeed-plan. We demonstrate our simulation engine’s performance
Parallel Simulation of Cyber-Physical-Systems 5

benefits over SpaceEx [14] and CORA [2], the modern model checkers and simu-
lators for linear and affine hybrid systems.
Related Works:
Tools like HyLAA [7] and Breach [11] implement numerical simulators for linear
hybrid systems whereas C2E2 [12] is a numerical simulator for linear and non-linear
CPS. These tools, however, focus on methods of approximating reachable states of
HA models using finitely many simulations. Breach can additionally monitor the
robustness satisfaction of metric interval temporal logic (MITL) formulas. SpaceEx
[14] and CORA [2] are verification tools that implement HA simulation engines
that can compute random simulations using numerical ODE solvers. None of these
tools exploits the inherent parallelism in the modern multicore processors to accel-
erate computing simulation trajectories in parallel. This is where we contribute by
implementing a parallel simulation engine as part of the model-checker XSpeed.
We organize the paper as follows. The requisite background is discussed in Sect. 2.
The parallel algorithm to compute simulation trajectories is presented in Sect. 3. We
show the algorithm’s performance and validity evaluation in Sect. 4, and we conclude
in Sect. 5.

2 Preliminaries

An HA is a mathematical formalism to model CPS. In an HA, the discrete behavior


is abstracted by a finite state machine, whereas the continuous behavior is abstracted
by ODE assigned to the automaton’s locations. The definition of an HA is

Definition 2.1 [18] A hybrid automaton is a 7-tuple (X , G (V, E), Init, Inv, Flow,
Jump, Assign) where
– X = {x1 , x2 , . . . , xn } is a finite set of continuous variables. The number of
variables in the set is called the dimension of the hybrid automaton. The set
Ẋ = {x˙1 , x˙2 , . . . , x˙n } is the set of variables representing the first derivative of
the respective variables in X . Similarly, the set X  = {x1 , x2 , . . . , xn } is the set
of primed variables representing the reset values of the respective variables in X
after effectuating a discrete transition.
– G (V, E) is a directed multigraph of a finite automaton with the set of locations V
and the set of transition edges E.
– Init and Inv are labeling functions that assign to each location in V, a predicate
with free variables from X . The predicate assigned to a location by Inv and Init
is called the invariant and initial condition of the location respectively. Jump is a
labeling function that assigns to each transition edge e ∈ E, a predicate with free
variables from X .
– Flow is a labeling function that assigns to each location in V, a predicate with free
variables from X ∪ Ẋ .
– Assign is a labeling function that assigns to each transition edge e ∈ E, a predicate
with free variables from the set X ∪ X  .
6 K. Das et al.

Fig. 1 A pictorial representation of a general HA trajectory

The state of an hybrid automaton is a 2-tuple , v, where  ∈ V and v ∈ Rn such that
v satisfies the predicate Inv(), i.e., Inv()[X := v] = tr ue, n being the dimension
of the automaton. The state represents the location  of the HA and an assignment
of values to the variables of the HA, denoted with vector v. The state of an HA may
change either by a timed transition or by a discrete transition. A timed transition
δ
due to δ passage of time can be represented as , v − → , w such that v, v̇ and
w, ẇ satisfies the flow predicate Flow(), i.e., Flow()[X := v, Ẋ := v̇] = tr ue
and Flow()[X := w, Ẋ := ẇ] = tr ue. Note that in a timed transition, the location
of the state  ∈ V remains the same but represents the change in system variables
due to the continuous flow dynamics. A discrete transition can be represented as
e
→ 2 , v  , given that ∃e ∈ E from 1 to 2 for some 1 , 2 ∈ V, such that
1 , v −
Jump(e)[X := v] = tr ue, and Assign(e)[X := v, X  := v  ] = tr ue. We now define
a trajectory of an hybrid automaton.

Definition 2.2 A finite trajectory of an HA is a sequence of states obtained by timed


δ0 e1 δ1
and discrete transitions of a HA, represented as 0 , v0  − → 1 , v1  −
→ 0 , v1  − →
en δn
→ n , vn  −
1 , v2  . . . − → n , vn+1  such that
1. Init(0 )[X := v0 ] = tr ue.
δi ei
2. ∀i ∈ [0, n], i , vi  −
→ i , vi+1  is a timed transition and ∀i ∈ [1, n], i−1 , vi  −

i , vi  is a discrete transition of the HA.
δi τ
3. For a timed transition i , vi  −
→ i , vi+1  in the trajectory sequence, i , vi  −

τ
i , vi  is also a timed transition in the HA, for any intermediate time τ ∈ [0, δi ].

Definition 2.3 A trajectory state of an HA trajectory beginning from an initial state


0 , v0  is a state , v obtained from a finite sequence of timed and discrete transi-
tions from the initial state.

An exemplary trajectory of a two-dimensional HA with two timed transitions and


one discrete transition is shown pictorially in Fig. 1. The labeled shaded regions depict
the vectors satisfying the corresponding predicate. The curve vi − vi+1 and vi+1 

Parallel Simulation of Cyber-Physical-Systems 7

Fig. 2 An HA modeling a Thermostat

vi+2 depicts the trajectory in location 1 and 2 due to timed transition, satisfying
Flow(1 ) and Flow(2 ) respectively. The figure shows a discrete transition due to an
edge e from 1 to 2 . Since the end-point vi+1 of the trajectory in 1 satisfies the
Jump(e) predicate, the transition is enabled. The result of taking the transition is an

update of vi+1 to the new vector vi+1 due to the assignments defined in the Assign(e)
predicate. An important point here is that it is not obligatory to effectuate a discrete
jump when the Jump predicate is satisfied since HA has may transition semantics.
In other words, the may transition semantics in HA says that if a state , v is such
that v satisfies Inv() as well as the Jump(e) predicate for some e ∈ E, then there is
a choice to either take a timed transition or take a discrete transition due to e from
the state , v in the HA.
Definition 2.4 A polygonal constraint over the variables in X = {x1 , x2 , . . . , xn } is
of the form A.x ≤ b, where An×n is a real-valued matrix, xn×1 is a column vector
comprising of the variables x1 , x2 , . . . xn and b ∈ Rn is a real-valued column vec-
tor. The vectors v ∈ Rn satisfying a polygonal constraint defines an n-dimensional
polytope.
An HA, modeling a thermostat is shown in Fig. 2. It has two locations, ON and OFF,
to represent the thermostat’s switched-on and switched-off state, respectively. It is a
two-dimensional HA with variables T and time, representing the temperature and
the elapsed time. The invariant T ≥ 60 in OFF location signifies that during the
switched-off state of the thermostat, the temperature can be 60 or above. Similarly
the invariant T ≤ 70 in the ON location signifies that during the switched-on state
of the thermostat, the temperature can be 70 or below. The Flow in the OFF location
is Ṫ = −k2, time˙ = 1 and signifies that the temperature decreases in a constant rate
k2 while the time progresses during the switched-off state of the thermostat. Simi-
larly, during the switched-on state, the temperature increases following the dynamics
Ṫ = k1(70 − T ) while the time progresses (time˙ = 1) as represented with the Flow
predicate. The Jump predicate on the OFF to ON transition is T ≤ 62 indicating that
the transition may take effect only when the temperature of the thermostat is 62 or
8 K. Das et al.

below. On effectuating the transition, the Assign predicate T  := T , time := time


depicts that the updated value of the temperature and time is the same as its value
before taking the transition. Similarly, the transition from ON to OFF may take effect
only when the temperature is 68 or above and taking the transition does not modify
the value of the variables. Overall, we see that the thermostat’s temperature will vary
in the interval [60, 70] due to the invariant constraints imposed on the two locations.
We now present our contribution in the following section. This HA is an example
where the Jump predicates are polygonal constraints since they form A.x ≤ b.

3 Parallel HA Simulation

This section presents our proposed parallel trajectory simulation algorithm. We first
briefly describe the computation of timed and discrete transitions.
Evaluating Timed Transition: Trajectory-states due to time-transitions are com-
puted numerically using an ODE solver [29]. The present-day ODE solvers can simu-
late first-order linear as well as non-linear ODEs very efficiently. We can improve the
trajectory’s precision by choosing smaller time-steps but at the cost of performance
and memory.
Evaluating Discrete Transition: In the may transition semantics of HA, there
may be infinitely many next trajectory-states possible after taking a discrete transi-
tion. This is due to the non-determinism involved in either choosing or not choosing
to take a transition when an HA state satisfies both the Jump and I nv predicates.
In our algorithm, we follow as soon as possible semantics where a discrete tran-
sition is effectuated as soon as the trajectory satisfies a Jump predicate. There are
two numerical problems involved in the implementation: (1) detecting whether a
trajectory-state , x satisfies the Jump() predicate, and (2) computing the next
trajectory-state  , x   such that Assign(e)[X = x, X  = x  ] is satisfied. If a Jump
predicate is a hyperplane, then successive trajectory points computed at time-step
δ may cross the guard failing to detect an intersection. To deal with this crossover
detection problem, we convert the predicate from a hyperplane to a half-space [17] in
the region opposite to the region containing the trajectory’s initial point. This ensures
crossover detection. In the case of polygonal predicates other than hyperplanes, the
satisfaction is easily checked from the satisfiability of AX − b ≤ 0. As soon as a
trajectory-state is detected to satisfy Jump(e), for some e, we compute the successor
state following Assign(e). The computation of a simulation trajectory due to timed
transition is shown in Algorithm 1. The algorithm terminates as soon as a successor
state due to a discrete transition is found, or all states in the time-horizon have been
computed.
For a chosen point pt and a given time-horizon T , the algorithm computes a simu-
lation trajectory, T race, consisting of a sequence of trajectory-states. The trajectory-
states are computed using an ODE solver according to the location dynamics, dis-
cretized at a fixed time-step, δ. The data structure pt consists of a field τ that holds
the elapsed time in the simulation. For any T race, the successive pt.τ holds the time
Parallel Simulation of Cyber-Physical-Systems 9

at which pt is attained in the model. Therefore, the number of discrete trajectory-


states for a given time-horizon T is computed as N = (T − τ )/δ (see line 2). The
algorithm computes trajectory-states until a point (v) intersects with a transition’s
Jump predicate (Jump(e)) or all the trajectory-states in the given time-horizon have
been computed (see lines 8–17). Line 8 computes the successor trajectory-state using
an ODE solver. This is added to the trace (in line 9) and is tested for intersection
with each transition’s (Loc.trans) jump predicate g (at line 12). If the intersection
is not {∅}, then, a successor state due to discrete transition is evaluated for fur-
ther exploration. The time elapsed, τ is computed as k × δ, k being the number of
trajectory-states computed at a finite time-step δ. This value is appended in the point
p (in line 14) and returned by the routine. When a trajectory does not satisfy any of
the transition’s jump predicate, it returns an empty point p. This indicates that no
new successor states due to discrete transition are present and the trajectory evalua-
tion is complete for the full time-horizon. We now present the algorithm to compute
multiple trajectories in parallel.

Algorithm 1 Simulation of HA from a state pt


1: procedure ODE- sim( pt, ha, T )
2: N = (T − pt.τ )/δ number of trajectory states
3: Loc ← pt.get Location() from ha
4: I nv ← invariant from Loc
5: T race. push( pt); v = pt; v: initial trajectory state
6: k = 1; p = ∅;
7: repeat
8: Compute next trajectory state v use ODE solver
9: T race. push(v)
10: for each t in Loc.trans do
11: g ← J ump(t)
12: if (v ∩ g) != ∅ then
13: p←v
14: p.τ = k × δ time elapsed in this loc
15: done = tr ue;
16: k =k+1
17: until done OR v ∈ / I nv(Loc) OR k ≥ N
18: return p

Parallel Algorithm: The inputs to our algorithm are N —the number of random
simulation trajectories to compute, the HA model to simulate, and the time-horizon T
for simulation. Random vectors N pts ⊂ Rn are obtained such that for any v ∈ N pts,
Init()[X := v] = tr ue, for some  ∈ V. Our algorithm is motivated by the parallel
BFS implemented in the model checkers XSpeed [15] and Spin [19]. The algorithm
maintains a shared data-structure W ait, a list of states of the HA, from which further
trajectory needs to be generated via timed and/or discrete transitions. We use W ait of
size (N × N ) to randomly distribute the trajectory-states among N available threads
for efficient load balancing. However, simultaneous read and write access must be
controlled with semaphores or locks to avoid a race condition with a shared W ait.
10 K. Das et al.

Locking incurs extra overhead in terms of performance. Our algorithm proposes to


have a shared W ait, yet, with no locking overhead by adapting the parallel lock-free
BFS algorithm proposed in [16, 19] for HA simulation. The routine ODE- sim (line
10) computes the numerical simulations of a trajectory-state with a fixed time-step
δ and generates new successor trajectory-state pts, which must satisfy the jump
condition. We read a trajectory-states from the W ait[t] copy at each iteration and
write a successor trajectory-states to the W ait[1 − t] copy. Initially, t is assigned
0, and at each successive iteration, it is reset to 1 − t (see line 17). In this manner,
the write W ait copy transforms to the read W ait copy and vice-versa after each
iteration. The algorithm terminates when no successor trajectory-states remains in
W ait[1 − t] or when the BFS reaches a user-defined depth bound. The algorithm
also terminates when the trajectory-states have elapsed the time-horizon (T).

Algorithm 2 Parallel BFS Algorithm for Parallel Simulations of HA


1: procedure PAR- SIMU(ha, N pts, T )
2: t = level = 0, N = Cor es
3: W ait[2][N ][N ] 2 × N × N vector
4: Distribute N pts equally in W ait[t][i][0], for i = 0 to N − 1
5: repeat
6: Fork threads with id w = 0 to N − 1 and execute
7: for q = 0 to N − 1 do
8: for each s in W ait[t][w][q] do
9: delete s from W ait[t][w][q]
10: pts ← ODE- sim (s, ha, T )
11: w  = select random 0 . . . N − 1
12: add pts to W ait[1 − t][w  ][w]
13: Thread synchronization Threads sync here to ensure BFS
14: if W ait[1 − t] is ∅ then
15: done = true;
16: else
17: t =1−t Read/Write transformation
18: level ← level + 1
19: until done OR level = depth

4 Evaluation

Benchmark Description:
We consider Bouncing-Ball [23], Navigation benchmark [13], Thermostat [3], Heli-
copter Controller [30], Five Dimensional dynamical system [1], Vehicle platoon
[24], Drivetrain [21], and Building [6] benchmarks for evaluation. The Bouncing-
Ball models the motion of a ball under gravity together with bouncing upon hitting
the ground. The navigation-benchmark depicts a moving object in a grid of n × n
partition in a plane. A Thermostat is a model of a temperature controller. The Heli-
Parallel Simulation of Cyber-Physical-Systems 11

Table 1 Performance comparison of computing 1000 random simulations over SpaceEx


Time (in secs) Speedup Vs
Benchmark Dim #Loc SpaceEx XSpeed XSpeed XSpeed SpaceEx
Seq Par Seq
B. Ball 3 1 13.50 1.84 1.29 1.43 10.46
Nav (1) 4 9 11.54 0.95 0.33 2.88 34.97
Nav (2) 4 25 63.64 2.52 0.83 3.04 76.67
Nav (3) 4 81 85.73 3.61 1.15 3.14 74.55
Helicopter 29 1 58.16 18.30 4.13 4.43 14.08
Building 48 1 32.48 73.21 13.39 5.47 2.43

copter controller represents the controller of a Westland Lynx military helicopter.


The Five-dimensional system is a continuous linear dynamical system. The Vehi-
cle platoon models a platoon of three vehicles with a leader vehicle, the vehicles
communicate with each other and aim to maintain a safe distance with each other,
under an occasional loss of communication. The Building is a Los Angeles hospital
building model with eight floors, each having three degrees of freedom. This is a
48-dimensional HA model. The Drivetrain models the engine of a vehicle together
with the other rotating components such as the gears, clutches, and differentials. The
backlash between the components is modeled via discrete transitions in the HA. For
each benchmark, the HA model parameters such as the number of locations and the
dimension are mentioned in the experiment tables below.
Experiment Setup:
The experiments of Table 1 are on Intel i7-4770, 3.40 GHz, 8 cores (hyper-threading
enabled), 8 GB RAM. The experiments of Table 2 are on a VM with 4 cores, 4 GB
RAM. The trajectories are computed with a time-step of 0.01. The simulation time
is computed for a fixed time-horizon or until reaching a fixed bound on the discrete
transitions.
Performance Evaluation:
Table 1 shows the performance comparison of computing 1000 random simulations
in the parallel simulation engine with the sequential counterpart and SpaceEx. In
the table, Nav(1), Nav(2), and Nav(3) denotes different instances of the Navigation
benchmark. We observe a maximum speedup of 5× and 76× in Building and Nav
(2) in the parallel-engine (XSpeed Par) over sequential (XSpeed Seq) simulation
and SpaceEx respectively. Table 2 shows a similar comparison over CORA. The TH
column shows the considered time-horizon of the computed simulations. A maximum
of 52× speedup is observed over CORA in Bouncing-Ball model.
12 K. Das et al.

Table 2 Performance comparison of 1000 random simulations over CORA


Time (in secs) Speedup
Benchmarks Dim. #Locs TH XSpeed CORA
Thermostat 2 2 30 1.84 50.25 27.31
B. Ball 3 1 30 1.82 94.91 52.15
FiveDimSys 5 1 10 0.88 5.68 6.45
Platoon 10 2 30 1.04 16.83 16.18
Drivetrain 10 4 10 3.51 135.29 38.54
Helicopter 29 1 20 6.79 23.17 3.41
Building 48 1 5 21.58 23.90 1.11

(a): Nav (3) (b): Thermostat (c): Helicopter (d): Drivetrain

Fig. 3 Computed simulation trajectories in XSpeed for various benchmarks

4.1 Correctness Evaluation

To evaluate the semantic correctness of our simulator, we compare the generated


trajectories with that of SpaceEx and CORA and found them to be matching. Some
of the computed trajectories on selected variables from four benchmarks are reported
in Fig. 3. During the evaluation, we detected few bugs in the SpaceEx simulator. For
example, Fig. 4a shows the trajectory in SpaceEx for Nav (2) that did not complete
till the time-horizon since it failed to detect the satisfaction of the jump condition
(x1 = 1 & x2 ∈ [3, 4]) for a simulation time-step of 0.05. For the same time-step,
our simulator in XSpeed correctly computes the entire trajectory shown in Fig. 4b.
In addition, the trajectory in SpaceEx for Nav (3) splits as shown in Fig. 4a. The
expected trajectory is computed by our simulator in XSpeed as shown in Fig. 5b.
The Green region in the figures denotes the vectors satisfying the Init predicate.

5 Conclusion

We present a parallel simulation engine for hybrid automaton models of CPS which
can compute random simulations in parallel on multicore processors. Our simula-
tion engine implements a multi-threaded lock-free algorithm in order to efficiently
Parallel Simulation of Cyber-Physical-Systems 13

Fig. 4 Premature termination of trajectory computation in SpaceEx

Fig. 5 SpaceEx trajectory splits for a single start state in Nav (3)

compute the simulations. We demonstrate performance speedup over SpaceEx and


CORA on standard CPS benchmarks.

Acknowledgements Rajarshi Ray gratefully acknowledges financial support from the Science and
Engineering Research Board (SERB) project with file number IMP/2018/000523. Amit Gurung is
grateful to Martin Luther Christian University, Shillong, Meghalaya, for partially supporting the
work under project grant No. Seed-Grant/559/2017-5567.
14 K. Das et al.

References

1. Althoff M (2010) Reachability analysis and its application to the safety assessment of
autonomous cars. PhD thesis, Technische Universität München
2. Althoff M, Grebenyuk D (2016) Implementation of interval arithmetic in cora 2016. In:
ARCH@ CPSWeek, pp 91–105
3. Alur, R.: Principles of cyber-physical systems. MIT Press (2015)
4. Alur R, Courcoubetis C, Henzinger TA, Ho PH (1992) Hybrid automata: an algorithmic
approach to the specification and verification of hybrid systems. In: Hybrid systems. Springer,
pp 209–229
5. Alur R, Dill DL (1994) A theory of timed automata. Theoretical computer science 126(2):183–
235
6. Antoulas AC, Sorensen DC, Gugercin S (2001) A survey of model reduction methods for
large-scale systems. Contemporary Mathematics 280:193–219
7. Bak S, Duggirala PS (2017) Hylaa: a tool for computing simulation-equivalent reachability
for linear systems. In: Proceedings of the 20th international conference on hybrid systems:
computation and control. ACM, pp. 173–178
8. Brand D, Zafiropulo P (1983) On communicating finite-state machines. Journal of the ACM
(JACM) 30(2):323–342
9. Coddington EA, Levinson N (1955) Theory of ordinary differential equations. Tata McGraw-
Hill Education
10. Damm W, Harel D (2001) Lscs: Breathing life into message sequence charts. Formal methods
in system design 19(1):45–80
11. Donze A (2010) Breach: a toolbox for verification and parameter synthesis of hybrid systems.
In: In Computer-aided verification, pp 167–170
12. Duggirala PS, Mitra S, Viswanathan M, Potok M (2015) C2e2: a verification tool for stateflow
models. In: International conference on tools and algorithms for the construction and analysis
of systems. Springer, pp 68–82
13. Fehnker A, Ivancic F (2004) Benchmarks for hybrid systems verification. In: HSCC, vol 4.
Springer, pp 326–341
14. Frehse G, Le Guernic C, Donzé A, Cotton S, Ray R. Lebeltel O, Ripado R, Girard A, Dang
T, Maler O (2011) SpaceEx: scalable verification of hybrid systems. In: Proceedings of CAV.
LNCS, vol 6806. Springer, pp 379–395
15. Gurung A, Deka A, Bartocci E, Bogomolov S, Grosu R, Ray R (2016) Parallel reachability
analysis for hybrid systems. In: 2016 ACM/IEEE international conference on formal methods
and models for system design (MEMOCODE). IEEE, pp 12–22
16. Gurung A, Ray R, Bartocci E, Bogomolov S, Grosu R (2018) Parallel reachability analysis of
hybrid systems in XSpeed. Int J Softw Tools Technol Transf 1–23
17. Hainry E (2008) Reachability in linear dynamical systems. In: Conference on computability
in Europe. Springer, pp 241–250
18. Henzinger TA (2000) The theory of hybrid automata. In: Verification of digital and hybrid
systems. Springer, pp 265–292
19. Holzmann GJ (2012) Parallelizing the SPIN model checker. In: Proceedings of SPIN 2012.
LNCS, vol 7385. Springer, pp 155–171
20. Jensen JC, Chang DH, Lee EA (2011) A model-based design methodology for cyber-physical
systems. In: 2011 7th international wireless communications and mobile computing conference.
IEEE, pp 1666–1671
21. Jin X, Deshmukh JV, Kapinski J, Ueda K, Butts K (2014) Powertrain control verification bench-
mark. In: Proceedings of the 17th international conference on Hybrid systems: computation
and control. ACM, pp. 253–262
22. Lee EA, Seshia SA (2016) Introduction to embedded systems: a cyber-physical systems
approach. MIT Press
23. Lygeros J, Tomlin C, Sastry S (1999) Hybrid systems: modeling, analysis and control. preprint
Parallel Simulation of Cyber-Physical-Systems 15

24. Makhlouf IB, Kowalewski S (2014) Networked cooperative platoon of vehicles for testing
methods and verification tools. In: ARCH@ CPSWeek, pp 37–42
25. Mathworks: Model-Based Design (2020). https://www.mathworks.com/solutions/model-
based-design.html
26. Paterno F (1999) Model-based design and evaluation of interactive applications. Springer Sci-
ence & Business Media
27. Ray R, Gurung A, Das B, Bartocci E, Bogomolov S, Grosu R (2015) Xspeed: accelerating
reachability analysis on multi-core processors. In: Piterman N (ed) Hardware and software:
verification and testing—11th international haifa verification conference, HVC 2015, Haifa,
Israel, November 17-19, 2015, Proceedings. Lecture Notes in Computer Science, vol. 9434.
Springer, pp 3–18. https://doi.org/10.1007/978-3-319-26287-1_1
28. Reisig W (2012) Petri nets: an introduction, vol 4. Springer Science & Business Media
29. Serban R, Hindmarsh AC (2005) Cvodes: the sensitivity-enabled ode solver in sundials. In:
ASME 2005 international design engineering technical conferences and computers and infor-
mation in engineering conference. American Society of Mechanical Engineers, pp 257–269
30. Skogestad S, Postlethwaite I (2005) Multivariable Feedback Control: Analysis and Design.
John Wiley & Sons
Attack Detection Scheme Using Deep
Learning Approach for IoT

Vikash Kumar, Sidra Kalam, Ayan Kumar Das, and Ditipriya Sinha

Abstract In recent years, the major concern of Internet of Things is cybersecurity


as attacks are increasing at an alarming rate with the rapid increase in connectivity
and integrity of various devices. It is necessary to detect the attack on the IoT devices
in real time as undetected attack on IoT devices for a longer period of time can result
in system unavailability to the end-users. In this paper, fog layer is introduced to
manage the resource constraint devices. The proposed Intrusion Detection System
is implemented in the fog layer. Deep learning is used to train the proposed system
so that it can classify the network traffic as attack and benign. The proposed scheme
is evaluated using the UNSW-NB15 and Bot-IoT dataset, which confirms that the
proposed model is able to classify the network traffic as attack and benign effectively.

Keywords Deep learning · Intrusion detection system · IoT · Security · Dataset

1 Introduction

Internet of Things (IoT) is an emerging technology that enabled the communica-


tion and processing of data in smart applications such as smart city, e-health, smart
agriculture, etc. The increasing application of IoT results in a huge increment in the
number of unknown cyber-attacks. Various sensitive and confidential data of users
are prone to numerous types of attacks from both internal and external attackers.
These types of attacks can be generated by either human or machine. For example,
the data breach of bitcoin leads to the loss of almost $70M and data breach of yahoo

V. Kumar · D. Sinha
National Institute of Technology Patna, Patna 800005, India
e-mail: vika96snz@gmail.com
D. Sinha
e-mail: ditipriya.cse@nitp.ac.in
S. Kalam · A. K. Das (B)
Birla Institute of Technology, Mesra, Patna campus, Patna 800015, India
e-mail: das.ayan@bitmesra.ac.in

© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 17
R. Chaki et al. (eds.), Advanced Computing and Systems for Security: Volume 14,
Lecture Notes in Networks and Systems 242,
https://doi.org/10.1007/978-981-16-4294-4_2
18 V. Kumar et al.

caused the loss of $350M [1]. Traditional security measures cannot be applied to
IoT as they are low power and resource constrained. These issues can be resolved by
implementing fog layer, which is the extension of the cloud computing that enables
computing service to reside at the edge of the network. In fog layer, the deployed IoT
devices are of high capacity in terms of computational power and energy resource.
Thus, the task of Intrusion Detection System can be easily done in this layer, whereas
the low capacity devices of data sensing layer are deployed to sense different events.
This reduces the burden of the IoT as the storage, pre-processing and computation are
shifted to the nearby fog nodes. The security issue of the IoT generates the need for a
reliable Intrusion Detection System (IDS). An IDS is an application that detects the
malicious activity and classifies the data as malicious and benign at host level and at
network level. Network Intrusion Detection System (NIDS) uses network behavior to
detect attack and Host-based Intrusion Detection System (HIDS) uses system activ-
ities for the detection of attack. The proposed scheme will focus on the former one.
Network traffic is analyzed using anomaly detection and misuse detection. Misuse
detection matches the incoming traffic with already stored signatures for detecting
the attack. Database needs to be updated regularly for new types of attack. It cannot
detect an unknown attack on its own. Anomaly detection detects unknown attack
using behavioral analysis. In the proposed scheme, NIDS uses deep learning for the
training and classification of the attack and benign. The working of deep learning
is inspired by the way human brain thinks and takes the decision. It is an advanced
version of machine learning that is comprised of multiple layers. These layers are
used for feature extraction from the raw data. Each layer is trained to transform the
raw data into more intellectual and composite representation. The main motives of
this research are:
• Develop an anomaly-based intrusion detection model using deep learning
approach.
• Evaluation of the model for checking its efficiency.
The remainder of the paper is divided as—Sect. 2 deals with the study of related
field, Sect. 3 explains the overview of deep learning, Sect. 4 describes the proposed
work, Sect. 5 evaluates the performance of the proposed scheme, and the paper is
concluded in Sect. 6 followed by references.

2 Literature Survey

As IoT is nowadays a buzzword for the entire world, there come many barriers
along with it. Security is a major concern as it makes the system vulnerable to
many cyber-attacks. In order to resolve this issue, deep learning is used. Deep
learning has emerged as an advanced technique of machine learning. The tradi-
tional machine learning algorithms are less capable of attack detection as compar-
ative to the deep learning algorithm [2]. Multiple layer deep learning comprises of
multiple hidden layers, which encourages the model to detect the attacks in the IoT
Attack Detection Scheme … 19

network. There are many research works that discuss about the intrusion detection
using deep neural network. Nathan Shone and Tran Nguyen Ngoc use the non-
symmetric deep auto encoder (NDAE) for the intrusion detection [3]. They stacked
NDAEs in order to form deep learning hierarchy to deal with the complicated rela-
tionships between the features. NDAEs are comprised of multiple hidden layers,
which are non-symmetrical to learn the features from unlabeled data. Classification
of network traffic as normal or benign can be easily done by the neural network
concept. One more approach regarding this is Recurrent Neural Network (RNN)
that can also be used for malware detection [4]. Now a day, many new attacks are
attempting to exploit the system. In an attempt to protect the system against the
attack, first, we need to detect the attacks then only it can be prevented. Many deep
learning-based intrusion detection systems are developed [5] for this implementa-
tion. The attacker keeps on changing their methods every time, IoT network needs
an IDS, which should be flexible to deal with these issues. An intelligent intrusion
detection system is developed to detect and classify these unpredictable attacks [6]
in which network-based intrusion detection system (NIDS) and Host-based intrusion
detection system (HIDS) are combined to detect the cyber-attacks more efficiently.
When attacks are not detected for a longer period of time, it will affect the availability
of the system for the end user. It is very important to deal with these attacks in real
time to minimize the loss. An anomaly based intrusion detection system is devel-
oped, which implemented deep learning [7] to deal with these issues. This approach
worked successfully against wormhole attack, black hole attack, sinkhole attack,
DDoS and opportunistic service attack. DDoS attack is mostly common as it can be
easily spread on a larger scale. Restricted Boltzmann machines (RBM) specifically
handle the DDoS attack [8]. RBMs have the ability to learn the complex features in
an unsupervised learning system. In case of supervised learning, deep convolutional
neural network (DCNN) is also used. Hyun Min Song and Jiyoung Woo have also
developed a model, which uses DCNN in the IDS to provide security in Controller
Area Network (CAN) [9]. CAN is basically used to broadcast the information of the
current status of the vehicle. There are many more ways in which malicious activities
can govern the IoT system. It becomes very important to secure it from the various
types of cyber-attacks as it may lead to risk of life. Multiple IDS frameworks based
on deep learning are already in trend as it is successfully detecting the attacks and
simultaneously preventing the system with higher accuracy rate. Table 1 describes
the attacks detected in the existing schemes.

3 Deep Learning Overview

Deep learning is the breakthrough of the machine learning with increased accuracy
as compared with traditional learning algorithms. It is used for feature extraction and
training of the system. It is comprised of multiple consecutive layers that are used to
perform various operations. Each layer is interconnected to one another and output of
the previous layer is fed as an input to the next consecutive layer. Various application
20 V. Kumar et al.

Table 1 Attacks detected in the existing schemes


Authors Dataset Name of attack detected
Abebe et al. [10] NSL-KDD Probe, Remote to Local (R2L),
User to Root (U2R), Denial of
Service (DoS)
Nathan et al. [2] KDD CUP’99 and NSL-KDD Probe, R2L, U2R, DoS
Thamilarasu et al. [7] Dataset generated from smart home DDos, opportunistic, blackhole,
network wormhole and sinkhole
Moustafa et al. [11] NSL-KDD and UNSW-NB15 Probe, normal, Dos, R2L, exploits,
U2R, fuzzer, backdoor, generic,
normal, reconnaissance, shellcode,
and worms
Feng et al. [12] KDD CUP’99 DoS, cross site scripting (XSS)
and SQL

areas of deep learning are vehicle automation, natural language processing, image
processing, medical customer relationship management automation, etc. The most
common form of deep learning algorithm is multi-layer deep network. Activation
function computes the output of the previous layer and bias for the formation of
weighted input for the next layer. In deep learning algorithm, the value of output is
usually is set to either equal to input or less than the input. During feature extraction
in deep model, loss function is optimized to improve the efficiency of the model as
formulated in Eq. (1), which calculates the average of squared difference between
the predicted and actual resultant.
n  2
i=1 χ − χ̂i
Loss = (1)
n
The cumulative loss function for a set of n number of training data is defined in
Eq. (2).

1 n  2 λ l nl nl+1 (l)2


L(w) = χi − χ̂i + Wmk (2)
2n i=0 2 j=1 k=1 m=1

where, l denoted the number of layers and nl represents the number of nodes in each
layer.
Stochastic Gradient Descent method is used to minimize the loss. Error minimiza-
tion is done using weight and activation function as in Eq. (3) where ωij represents
the updated weight of the link connecting ith and jth neuron of two consecutive layers
δε
and δω ij
represents the error gradient with respect to the weight ωij .

δε
ωi j = η (3)
δωi j
Attack Detection Scheme … 21

4 Proposed Work

Fog layer is responsible for the communication between the users and sensor. Attack
detection system is deployed in the fog layer as they are at the edge of the cloud layer
and close to the interacting users. The proposed intrusion detection model is depicted
in Fig. 1. Deep neural network is used in IDS for attack detection, which is better
than other traditional machine learning algorithm. DNN is best suited for resource-
constrained low power IoT devices because of their thin and layered structure. Three
phases of the intrusion detection system that are used in the proposed scheme are
feature extraction, training and decision-making, which is described in the below
subsection.

4.1 Feature Set and Data Pre-processing

IDS categorizes the malicious and benign communication on the basis of behavior
of the message. A single message cannot determine the behavior of the message.
Feature of communication cycle needs to be observed for a period of time for deter-
mining the behavior of the message. In a normal communication between a pair
of sender and receiver, rate of message sent and rate of message received must be
similar. If there is a difference between the rate of transmission and reception then
there must be some attack taking place like Denial of service attack, Replay attack,
sinkhole attack, etc. Based on the training, IDS classifies the message as malicious
and benign message. IDS classifies the message as malicious and benign on the
basis of reception rate, transmission rate, IP of source, IP of destination, transmis-
sion mode, duration, information of data value, etc. All these features are selected

Fig. 1 Proposed intrusion-detection model


22 V. Kumar et al.

Fig. 2 Overview of the proposed DNN training

according to the computational capability of the low-powered resource constrained


IoT devices. In the data pre-processing phase, label encoding is used to translate the
data into machine readable format and feature scaling is used for the standardization
of the distinct features that are available in the data into a fixed range. The features are
feed to the deep neural learning model for the training purpose so that it can classify
the traffic as malicious and benign. The working model of the proposed scheme is
depicted in Fig. 2.

4.2 Training

The proposed model consists of five-layer deep learning model, which consists of
one input layer, three hidden layers and one output layer, which classifies the network
traffic as malicious and benign. The first layer consists of 1024 neurons and hidden
layers consist of 768, 512 and 256 neurons, respectively. Feature vector f v is fed
to the Deep Neural Network (DNN) in the first layer and it passes through all the
Attack Detection Scheme … 23

layers. Each hidden layer is connected to the next hidden layer and provides the
filtered output to the next layer using ReLu activation function as defined in Eq. (4).
The output is calculated by the output layer and it uses Softmax activation function
for the generation of output, which is defined in Eq. (5).

x = max(0, z) (4)

∈χi
ρ(χi ) = κ (5)
j=1 ∈χ j

In the training phase, feature vector is fed through the external node to DNN,
which is present at the bottom of the DNN. The weight attached to each neural node
is initialized. As data pass from the DNN layers in each cycle of training, weight
needs to be modified consequently.

4.3 Decision-Making

Once the training phase is done, the system makes the decision regarding the catego-
rization of the network traffic. It, this phase network traffic, is classified as malicious
and benign on the basis of the training provided to the DNN layer.

5 Experimental Results

In this section, the proposed scheme is validated and evaluated. Keras is used for the
implementation of DNN, which is an open source neural network library [4].

5.1 Dataset

KDDCUP99, NSL-KDD, CICIDS, Bot IoT and UNSW-NB15 are the widely used
datasets for the research work of intrusion detection. The proposed scheme has used
the UNSW-NB15 and Bot-IoT dataset, which is available in .csv format for the
purpose of evaluation of the model. UNSW-NB15 has resolved the issues found in
KDDCUP99 and NSL-KDD. UNSW-NB15 dataset is available in two forms. One
consists of 2 million records and the second is a partition of full record dataset, which
consists of 42 features and class is categorized as normal and nine types of attacks.
Detailed analysis of the dataset is described in Table 2.
24 V. Kumar et al.

Table 2 Testing record distribution of UNSW_NB15


Class Description Number of records
Normal Legitimate user data 37,000
Fuzzers It attempts to suspend the network or program by feeding 6,062
the randomly generated data. It consists of the attacks
related to html file penetration, spams, etc.
Analysis It contains attacks related to spam, port scan and html file 677
penetration
Backdoor It is a technique in which security of the system is evaded 583
to access the system
DoS Attacker makes the network resource unavailable to the 4,089
legitimate user by interrupting the services
Exploits In this, the attacker is aware of the loophole of the 11,132
operating system or the application software and its aim
is to exploit the vulnerability
Generic It works against all block cipher irrespective about the 18,871
structure of the block cipher
Reconnaissance An attacker observes the target system for gathering 3,496
information for vulnerability
Shellcode It is a small piece of the program used as the payload for 378
the exploitation of software vulnerability
Worms It replicated itself and spread to other computer using 44
computer networks. It relies on security failures of the
target system

Bot IoT dataset was created by deploying a real network environment, which
consists of botnet and normal traffic. The dataset consists of various attack details,
which are discussed in Table 3.

Table 3 Testing record distribution of Bot-IoT dataset


Class Description Number of records
Normal Legitimate user data 107
DoS Attacker makes the network resource unavailable to the 330,112
legitimate user by interrupting the services
DDoS Distributed Denial of service makes the network 385,309
resource unavailable by using multiple sources
Reconnaissance Attacker observes the system to gather the information 18,163
for vulnerability
Theft It refers to the stealing of confidential data or 14
information
Attack Detection Scheme … 25

5.2 Results Analysis

The proposed scheme is evaluated using the evaluation metrics such as accuracy,
precision, recall and F-1 score where TP represents true positive, TN represents true
negative, FP represents false positive and FN represents false negative.
Accuracy is defined as the total number of correct prediction of data to the
total number of data instances. It is one of the important factors for evaluating the
performance of any IDS, which is defined in Eq. (6).

TP + TN
Accuracy = (6)
TP + TN + FP + FN

The ratio of correctly predicted positive data and total number of data in the
actual class is called Recall. It basically indicates the number of attacks returned by
the system, which is defined in Eq. (7).

TP
Recall = (7)
TP + FN

Precision is defined as the ratio of correctly predicted positive data and total
predicted positive data. It predicts the number of attacks returned correctly, which is
defined in Eq. (8).

TP
Precision = (8)
TP + FP

The harmonic mean of recall and precision is called F1 score, which reflects the
stability between both of them, which is defined in Eq. (9).

2 ∗ (precision ∗ recall)
F1 score = (9)
precision + recall

Table 4 describes the performance of the system for two classes, namely, Normal
and Attack on UNSW-NB15 dataset for six hidden layers, whereas Table 5 describes
the performance for nine classes on the same dataset for three hidden layers. Table
6 describes the performance of the system for five classes on Bot-IoT dataset and
Table 7 describes the performance for seven class attack subcategories on the same
dataset for three hidden layers. Finally, Fig. 3 compares the accuracy of the proposed
system for both the dataset.
26 V. Kumar et al.

Table 4 Performance of 2-class on UNSW-NB15


Architecture Neurons Class Precision (%) Recall (%) F1 score (%)
Hidden layer 0 0 Normal 97 58 73
Attack 74 99 85
Hidden layer 1 768 Normal 97 67 79
Attack 79 98 87
Hidden layer 2 512 Normal 97 93 95
Attack 94 98 96
Hidden layer 3 256 Normal 97 84 90
Attack 88 98 93
Hidden layer 4 128 Normal 94 58 72
Attack 74 97 84
Hidden layer 5 64 Normal 97 49 65
Attack 70 99 82
Hidden layer 6 32 Normal 100 89 94
Attack 92 100 96

6 Conclusion

In this paper, a network intrusion detection system is proposed for fog assisted IoT
system. The proposed model is implemented using python and extensive evaluation
is performed. The benchmark UNSW-NB15 and Bot IoT dataset is used for the eval-
uation of the model. The experiment shows that DNN is implemented successfully
for the attack detection in fog-assisted IoT. The model is evaluated on the basis of
precision, recall and F1 score and obtained promising results. To evaluate the perfor-
mance, we have followed two test cases: classification of records as normal and attack
with all the features and classified the attack into its categories with all the features.
Attack Detection Scheme … 27

Table 5 Performance of 9-class on UNSW-NB15


Architecture Class Precision (%) Recall (%) F1 score
Hidden layer 1 Normal 100 100 100
Backdoor 0 0 0
Analysis 0 0 0
Fuzzers 62 61 61
Shellcode 0 0 0
Reconnaissance 44 46 45
Exploits 57 91 70
DoS 0 0 0
Worms 0 0 0
Generic 100 95 98
Average score: 85.41
Hidden layer 2 Normal 100 100 100
Backdoor 0 0 0
Analysis 0 0 0
Fuzzers 87 48 62
Shellcode 0 0 0
Reconnaissance 47 72 57
Exploits 53 94 67
DoS 52 87 65
Worms 0 0 0
Generic 100 89 94
Accuracy score: 80.28
Hidden layer 3 Normal 100 72 84
Backdoor 0 0 0
Analysis 0 0 0
Fuzzers 83 56 67
Shellcode 0 0 0
Reconnaissance 47 58 52
Exploits 45 94 61
DoS 0 0 0
Worms 0 0 0
Generic 100 100 100
Accuracy score: 78.72
28 V. Kumar et al.

Table 6 Performance of 5-class on Bot IoT


Architecture Class Precision Recall F1 score
Hidden layer 1 Normal 100 100 100
Reconnaissance 81 100 90
DDoS 100 100 100
DoS 100 100 100
Theft 0 0 0
Accuracy score: 99.98
Hidden layer 2 Normal 100 100 100
Reconnaissance 88 100 94
DDoS 100 100 100
DoS 100 100 100
Theft 33 7 12
Accuracy score: 99.99
Hidden layer 3 Normal 100 100 100
Reconnaissance 99 100 100
DDoS 100 100 100
DoS 100 100 100
Theft 27 100 43
Accuracy score: 99.99
Attack Detection Scheme … 29

Table 7 Performance of 7-class of attack subcategories on Bot IoT


Architecture Class Precision Recall F1 score
Hidden layer 1 UDP 100 98 99
TCP 100 100 100
Service_Scan 28 21 24
OS_Fingerprint 11 26 15
HTTP 4 53 8
Normal 2 34 3
Keylogging 0 0 0
Accuracy score: 96.70
Hidden layer 2 UDP 100 21 35
TCP 58 100 73
Service_Scan 98 42 59
OS_Fingerprint 29 96 44
HTTP 1 94 1
Normal 0 0 0
Keylogging 0 0 0
Accuracy score: 97.39
Hidden layer 3 UDP 100 100 100
TCP 100 100 100
Service_Scan 98 13 22
OS_Fingerprint 22 93 35
HTTP 39 96 55
Normal 22 88 36
Keylogging 0 0 0
Accuracy score: 98.08

100

80 UNSW NB-15
Accuracy

60
Bot IoT
40

20

0
1 2 3
Number of Hidden Layers

Fig. 3 Accuracy of UNSW NB-15 and Bot IoT


30 V. Kumar et al.

References

1. Larson D (2016) Distributed denial of service attacks–holding back the flood. Netw Secur
3:5–7
2. Shone N, Ngoc TN, Phai VD, Shi Q (2018) A deep learning approach to network intrusion
detection. IEEE Trans Emerg Top Comput Intell 2:41–50
3. Thomson C, Romdhani I, Al-Dubai A, Qasem M, Ghaleb B, Wadhaj I (2016) Cooja simulator
manual. Edinburgh Napier University, Edinburgh, UK
4. HaddadPajouh H, Dehghantanha A, Khayami R, Choo KKR (2018) A deep recurrent neural
network based approach for internet of things malware threat hunting. Futur Gener Comput
Syst 85:88–96
5. Karatas G, Demir O, Sahingoz OK (2018) Deep learning in intrusion detection systems. In:
International congress on big data, deep learning and fighting cyber terrorism (IBIGDELFT).
IEEE, Turkey, pp. 113–116
6. Vinayakumar R, Alazab M, Soman KP, Poornachandran P, Al-Nemrat A, Venkatraman S (2019)
In: Deep learning approach for intelligent intrusion detection system, vol. 7. IEEE, pp. 41525–
41550
7. Thamilarasu G, Chawla S (2019) Towards deep-learning-driven intrusion detection for the
Internet of Things. Sensors 19(9):1977
8. Elsaeidy A, Munasinghe KS, Sharma D, Jamalipour A (2019) Intrusion detection in smart
cities using restricted Boltzmann machines. J Netw Comput Appl 135:76–83
9. Song HM, Woo J, Kim HK (2020) In-vehicle network intrusion detection using deep
convolutional neural network. Veh Commun 21:100198
10. Diro AA, Chilamkurti N (2018) Distributed attack detection scheme using deep learning
approach for internet of things. Futur Gener Comput Syst 82:761–768
11. Feng F, Liu X, Yong B, Zhou R, Zhou Q (2019) Anomaly detection in ad-hoc networks based
on deep learning model: a plug and play device. Ad Hoc Netw 84:82–89
12. Muna AH, Moustafa N, Sitnikova E (2018) Identification of malicious activities in industrial
internet of things based on deep learning models. J Inf Secur Appl 41:1–11
An Efficient Authentication Scheme
for Mobile Online Social Networks

Munmun Bhattacharya, Sandip Roy, and Samiran Chattopadhyay

Abstract With the immense growth of smartphones and mobile Internet, it has
become easier to access online social networking sites, such as Facebook, Twitter,
LinkedIn, and so on. At the same time, attackers also utilized this opportunity very
well by introducing the innovative idea of attacks. Phishing was a classical technique
of information stealing. According to the published reports [1], the rate of phishing
attacks has increased much more during the last few years. Earlier an adversary sends
an email with malicious URLs in it. But in OSN, an attacker creates a scam website of
an important website and posts the link on the wall of the OSN users. When the user
tries to open and login into the site, the attacker easily steals the private information,
such as passwords and credit card numbers. In this paper, we proposed an efficient
authentication scheme that can resist phishing attacks and some other known security
threats also. Finally, we analyze and show that the scheme provides better security
against phishing attacks and other known attacks.

Keywords Mobile online social networks · Security attack · Phishing · User


biometrics · Session key

1 Introduction

With the immense growth of mobile Online Social Networks (mOSNs), there is a
huge change in our personal and professional life. OSN can be defined as some
communities over the Internet where people with common interests can join or share
their interests. Millions of mobile users access their OSN account, upload their
information, photos, videos, and so on from their mobile device with a perception

M. Bhattacharya (B) · S. Chattopadhyay


Department of Information Technology,Jadavpur University,
Salt Lake City, Kolkata 700 098, India
S. Roy
Department of Computer Science and Engineering, Asansol Engineering College,
Asansol, WB 713305, India

© The Author(s), under exclusive license to Springer Nature Singapore Pte Ltd. 2021 31
R. Chaki et al. (eds.), Advanced Computing and Systems for Security: Volume 14,
Lecture Notes in Networks and Systems 242,
https://doi.org/10.1007/978-981-16-4294-4_3
32 M. Bhattacharya et al.

that they are connected only with their friends, family, and colleagues, so they are
secured. But in reality, mOSN is more insecure than the OSN browsing in laptop or
desktop computer exposing information from different social domains—personal,
professional, etc. making it more insecure [10].
The adversary can spread spam, malware, and phishing attacks with the help of
the trusted nature of OSN relationships. Attackers can promote different types of
attacks by generating fake profiles, using stolen OSN account credentials sold by the
OSN providers or deploying automated community bots, etc. [5, 11].
Phishing attacks are a classical technique of information stealing but still, it is
in practice. Attackers design a web page and address which looks identical to the
original website and post the web links on the OSN [8, 9]. When an OSN user
clicks on the link it redirects the user to that fake website and collects the protected
information, such as account id, passwords, credit or debit card numbers, and many
more private data [12].
Authentication is a crucial safety provision in any system or network. The orig-
inality of any user can be verified through authentication. A good authentication
scheme can resist several types of attacks. The security attacks are a critical problem
in the current generation of the mobile environment [6]. Security attacks not only
disturb the user’s privacy, but they also hampered the performance of the mobile
device [7]. E. Munivel et al.[3] try to provide an authentic mobile cloud environment
that can be more secure against phishing attacks. S. Bojjagani et al. in their work [4]
proposed an authentication protocol for preventing phishing attacks in the mobile
environment.

1.1 Paper Organization

In this paper, we have described an efficient authentication scheme that can resist
phishing and various other security attacks in the mobile online social network.
Section 2 describes the proposed system model. Section 3 presents the proposed
authentication scheme for mobile Online Social Networks (mOSN). The informal
security verification is presented in Sect. 4. The performance analysis is shown in
Sect. 5. And the last, Sect. 6 describes the conclusion and future works of the paper.

2 Proposed Model

In this section, we describe the model of mobile online social networks (mOSN) and
the basic outline of the security attacks. The architecture of mOSN network model
is outlined in Fig. 1. The network has three basic entities:
1. Mobile user (Ui ) : Ui can register as an authorized OSN user and can surf the
website.
An Efficient Authentication Scheme for Mobile Online Social Networks 33

Fig. 1 Framework of the proposed scheme. 1: Ui will send a request message for registration to
C T ; 2: C T will forward that message to O S N Ser ver ; 3: O S N Ser ver will send a reply message
to C T ; 4: C T will forward that response to Ui

2. Online Social Network Server (O S N Ser ver ): O S N ser ver provides services,
stores, and shares Ui ’s information.
3. Cellular Tower (C T ) : C T acts as an coordinator between Ui and O S N Ser ver .
It verifies and register Ui as a genuine user and O S N Ser ver too.
In the basic attack model, we assume that C T is a completely trusted participant. But
an adversary A can be there between Ui and O S N Ser ver . The model is as follows
(Table 1):
1. An adversary A can create a duplicate website that is identical to the original
website and post the link on the website or send the link via emails. When a
mobile user Ui , tries to login into that duplicate website with its credentials such
as user id, password, etc. A can acquire that information. The adversary can also
launch all other security attacks.
2. A genuine user also can convert into a malicious attacker and can try to access or
disclose social information of other authorized users.

3 The Proposed Scheme

In this section, we described a secure prevention-based authentication scheme for the


mOSN environment, which can resist phishing attacks as well as other security attacks
possible in the networks. There are three phases in this scheme. (1) Registration
Phase, (2) Mobile User Login Phase, and (3) Authentication and Key Establishment
Phase.
34 M. Bhattacharya et al.

Table 1 Notations used in the proposed scheme


Symbol Description
CT Cellular tower
Ui ith Mobile user
O Sk kth OSN server
Mid Identity of Ui
O Sid Identity of O Sk
Sk 1024-bit master secret key of OSN server O Sk
S Mik 1024-bit random number selected by
C T for Ui and O Sk pair
p 128-bit random number chosen by Ui
Msn Serial number of Ui ’s mobile device
H (·) One-way cryptographic hash function
||, ⊕ Concatenation, bitwise XOR operations
T Sm Timestamp generated by Ui
T Sos Timestamp generated by O Sk
Mr n 128-bit Ui ’s random number
R Ns 128-bit O Sk ’s random number
msg
X −−−→ Y Message (msg) transmission from X to Y
T Maximum transmission delay

3.1 Registration Phase

How mOSN users and OSN servers get registered with the cellular tower C T indi-
vidually are described here. In the beginning, we will describe the mOSN user’s
registration phase. After that, we will describe the registration phase of the OSN
server. These two phases are independent and need to execute only once. All mes-
sages will be transmitted through a secure channel.

3.1.1 MOSN User Registration Phase

A mOSN user Ui completes the registration process to the C T by performing the


following steps:
1. Ui selects its own identity Mid , password M pw , biometrics Bi , and two new 128-
bit random numbers p and q.
2. Ui produces (δi , ρi ) = Generation(Bi ) and calculates a masked password
R M B pwi = H (Mid || H (M pw || δi || p)). Ui then sends the registration request
message {Mid , (R M B pwi ⊕ q)} to the C T via a secure channel.
Another random document with
no related content on Scribd:
Thanks to Odin’s protection, Sigi soon won the glorious empire
of the Huns and became a powerful monarch. But when he had
attained extreme old age his fortune changed, Odin suddenly
forsook him, his wife’s kindred fell upon him, and after a short
encounter he was treacherously slain.
His death was soon avenged, however, for his son Rerir,
Rerir. returning from a journey, put all the murderers to
death and claimed the throne. But, in spite of all
outward prosperity, Rerir’s dearest wish, a son to succeed him,
remained unfulfilled for many a year. Finally, however, Frigga
decided to grant his constant prayer, and to vouchsafe the heir he
longed for. Her swift messenger Gna, or Liod, was dispatched to
carry him a miraculous apple, which she dropped into his lap as he
was sitting alone on the hillside. Glancing upward, Rerir recognized
the emissary of the goddess, and joyfully hastened home to partake
of the apple with his wife. The child thus born in answer to their
prayers was a handsome little lad called Volsung, who, losing both
parents in early infancy, became ruler of all the land.
Every year Volsung’s wealth and power increased, and, as he
Volsung. was the boldest leader, many brave warriors rallied
around him, and drank his mead sitting beneath the
Branstock, a mighty oak, which, rising in the middle of his dwelling,
pierced the roof and overshadowed the whole house.

“And as in all other matters ’twas all earthly houses’ crown,


And the least of its wall-hung shields was a battle-world’s renown,
So therein withal was a marvel and a glorious thing to see,
For amidst of its midmost hall-floor sprang up a mighty tree,
That reared its blessings roofward and wreathed the roof-tree dear
With the glory of the summer and the garland of the year.”

Volsung did not long remain childless, for ten stalwart sons and
one lovely daughter, Signy, came to brighten his home. As soon as
this maiden reached marriageable years, many suitors asked for her
hand, which was finally pledged to Siggeir, King of the Goths, whom,
however, she had never seen.
The wedding day came, and when the bride first beheld her
destined groom she shrank back in dismay, for his
The wedding
of Signy. puny form and lowering glances contrasted oddly with
her brothers’ strong frames and frank faces. But it was
too late to withdraw,—the family honor was at stake,—and Signy so
successfully concealed her dislike that none except her twin brother
Sigmund suspected how reluctantly she became Siggeir’s wife.
The wedding feast was held as usual, and when the
The sword in merrymakings had reached their height the guests
the Branstock. were startled by the sudden entrance of a tall, one-
eyed man, closely enveloped in a mantle of cloudy
blue. Without vouchsafing word or glance to any in the assembly, the
stranger strode up to the Branstock and thrust a glittering sword up
to the hilt in its great bole. Then, turning slowly around, he faced the
awe-struck assembly, and in the midst of the general silence
declared that the weapon would belong to the warrior who could pull
it out, and that it would assure him victory in every battle. These
words ended, he passed out and disappeared, leaving an intimate
conviction in the minds of all the guests that Odin, king of the gods,
had been in their midst.

“So sweet his speaking sounded, so wise his words did seem,
That moveless all men sat there, as in a happy dream
We stir not lest we waken; but there his speech had end,
And slowly down the hall-floor and outward did he wend;
And none would cast him a question or follow on his ways,
For they knew that the gift was Odin’s, a sword for the world to
praise.”

Volsung was the first to recover the power of speech, and,


waiving his own right to try to secure the divine weapon, he invited
Siggeir to make the first attempt to draw it out of the tree-trunk. The
bridegroom anxiously tugged and strained, but the sword remained
firmly embedded in the oak. He resumed his seat, with an air of
chagrin, and then Volsung also tried and failed. But the weapon was
evidently not intended for either of them, and the young Volsung
princes were next invited to try their strength.

“Sons I have gotten and cherished, now stand ye forth and try;
Lest Odin tell in God-home how from the way he strayed,
And how to the man he would not he gave away his blade.”

The nine eldest sons were equally unsuccessful; but when


Sigmund, the tenth and youngest, laid his firm young
Sigmund.
hand upon the hilt, it easily yielded to his touch, and
he triumphantly drew the sword out without making the least
exertion.

“At last by the side of the Branstock Sigmund the Volsung stood,
And with right hand wise in battle the precious sword-hilt caught,
Yet in a careless fashion, as he deemed it all for naught;
When, lo, from floor to rafter went up a shattering shout,
For aloft in the hand of Sigmund the naked blade showed out
As high o’er his head he shook it: for the sword had come away
From the grip of the heart of the Branstock, as though all loose it
lay.”

All present seemed overjoyed at his success; but Siggeir’s heart


was filled with envy, for he coveted the possession of the weapon,
which he now tried to purchase from his young brother-in-law.
Sigmund, however, refused to part with it at any price, declaring that
the weapon had evidently been intended for him only. This refusal so
offended Siggeir that he secretly resolved to bide his time, to
exterminate the proud race of the Volsungs, and thus secure the
divine sword.
Concealing his chagrin therefore, he turned to Volsung and
cordially invited him to visit his court a month later, bringing all his
sons and kinsmen with him. The invitation so spontaneously given
was immediately accepted, and although Signy, suspecting evil,
secretly sought her father while her husband slept, and implored him
to retract his promise and stay at home, he would not consent to
appear afraid.
A few weeks after the return of the bridal couple Volsung’s well-
Siggeir’s manned vessels came within sight of Siggeir’s shores,
treachery. and Signy perceiving them hastened down to the
beach to implore her kinsmen not to land, warning
them that her husband had treacherously planned an ambush,
whence they could never escape alive. But Volsung and his sons,
whom no peril could daunt, calmly bade her return to her husband’s
palace, and donning their arms they boldly set foot ashore.

THE BRANSTOCK.—Hoffmann.
“Then sweetly Volsung kissed her: ‘Woe am I for thy sake,
But Earth the word hath hearkened, that yet unborn I spake;
How I ne’er would turn me backward from the sword or fire of bale;—
—I have held that word till to-day, and to-day shall I change the tale?
And look on these thy brethren, how goodly and great are they,
Wouldst thou have the maidens mock them, when this pain hath
passed away
And they sit at the feast hereafter, that they feared the deadly
stroke?
Let us do our day’s work deftly for the praise and the glory of folk;
And if the Norns will have it that the Volsung kin shall fail,
Yet I know of the deed that dies not, and the name that shall ever
avail.’”

Marching towards the palace, the brave little troop soon fell into
Siggeir’s ambuscade, and, although they fought with heroic courage,
they were so overpowered by the superior number of their foes that
Volsung was soon slain and all his sons made captive. Led bound
into the presence of Siggeir, who had taken no part in the fight (for
he was an arrant coward), Sigmund was forced to relinquish his
precious sword, and he and his brothers were all condemned to die.
Signy, hearing this cruel sentence, vainly interceded for them,
but all she could obtain by her prayers and entreaties was that her
kinsmen should be chained to a fallen oak in the forest, there to
perish of hunger and thirst if the wild beasts spared them. Then,
fearing lest his wife should visit and succor her brothers, Siggeir
confined her in the palace, where she was closely guarded night and
day.
Early every morning Siggeir himself sent a messenger into the
forest to see whether the Volsungs were still living, and every
morning the man returned saying a monster had come during the
night and had devoured one of the princes, leaving nothing but his
bones. When none but Sigmund remained alive, Signy finally
prevailed upon one of her servants to carry some honey into the
forest and smear it over her brother’s face and mouth.
That very night the wild beast, attracted by the smell of the
honey, licked Sigmund’s face, and even thrust its tongue into his
mouth. Clinching his teeth upon it, Sigmund, weak and wounded as
he was, struggled until his bonds broke and he could slay the nightly
visitor who had caused the death of all his brothers. Then he
vanished into the forest, where he remained concealed until the daily
messenger had come and gone, and until Signy, released from
captivity, came speeding to the forest to weep over her kinsmen’s
remains.
Seeing her evident grief, and knowing she had no part in
Siggeir’s cruelty, Sigmund stole out of his place of concealment,
comforted her as best he could, helped her to bury the whitening
bones, and registered a solemn oath in her presence to avenge his
family’s wrongs. This vow was fully approved by Signy, who,
however, bade her brother abide a favorable time, promising to send
him a helper. Then the brother and sister sadly parted, she to return
to her distasteful palace home, and he to seek the most remote part
of the forest, where he built a tiny hut and plied the trade of a smith.

“And men say that Signy wept


When she left that last of her kindred; yet wept she never more
Amid the earls of Siggeir, and as lovely as before
Was her face to all men’s deeming: nor aught it changed for ruth,
Nor for fear nor any longing; and no man said for sooth
That she ever laughed thereafter till the day of her death was come.”

Years passed by. Siggeir, having taken possession of the


Volsung kingdom, proudly watched the growth of his
Signy’s sons.
eldest son, whom Signy secretly sent to her brother as
soon as he was ten years of age, bidding Sigmund train the child up
to help him, if he were worthy of such a task. Sigmund reluctantly
accepted the charge; but as soon as he had tested the boy and
found him deficient in physical courage, he either sent him back to
his mother, or, as some versions relate, slew him.
Some time after this Sigmund tested Signy’s second son, who
had been sent to him for the same purpose, and found him wanting
also. Evidently none but a pure-blooded Volsung could help him in
his work of revenge, and Signy, realizing this, resolved to commit a
crime.

“And once in the dark she murmured: ‘Where then was the ancient
song
That the Gods were but twin-born once, and deemed it nothing
wrong
To mingle for the world’s sake, whence had the Æsir birth,
And the Vanir, and the Dwarf-kind, and all the folk of earth?’”

This resolution taken, she summoned a beautiful young witch,


exchanged forms with her, and, running into the forest, sought
shelter in Sigmund’s hut. Deeming her nothing but the gypsy she
seemed, and won by her coquetry, he soon made her his wife. Three
days later she vanished from his hut, returned to the palace,
resumed her own form, and when she gave birth to a little son, she
rejoiced to see his bold glance and strong frame.
When this child, Sinfiotli, was ten years of age, she herself made
Sinfiotli. a preliminary test of his courage by sewing his
garment to his skin. Then she suddenly snatched it off
with shreds of flesh hanging to it, and as the child did not even
wince, but laughed aloud, she confidently sent him to Sigmund. He,
too, found the boy quite fearless, and upon leaving the hut one day
he bade him take meal from a certain sack, and knead and bake the
bread. On returning home Sigmund asked Sinfiotli whether his
orders had been carried out. The lad replied by showing the bread,
and when closely questioned he artlessly confessed that he had
been obliged to knead into the loaf a great adder which was hidden
in the meal. Pleased to see that the child, for whom he felt a strange
affection, had successfully stood the test which had daunted his
predecessors, Sigmund bade him refrain from eating of that loaf, as
he alone could taste poison unharmed, and patiently began to teach
him all a Northern warrior need know.

“For here the tale of the elders doth men a marvel to wit,
That such was the shaping of Sigmund among all earthly kings,
That unhurt he handled adders and other deadly things,
And might drink unscathed of venom: but Sinfiotli was so wrought
That no sting of creeping creatures would harm his body aught.”

Sigmund and Sinfiotli soon became inseparable companions,


and while ranging the forest together they once came
The
werewolves. to a hut, where they found two men sound asleep.
Wolf skins hanging near them immediately made them
conclude that the strangers were werewolves (men whom a cruel
spell forced to assume the habits and guise of ravenous wolves, and
who could only resume their natural form for a short space at a time).
Prompted by curiosity, Sigmund donned one of the wolf skins,
Sinfiotli the other, and they were soon metamorphosed into wolves
and rushed through the forest, slaying and devouring all they saw.
Such were their wolfish passions that they soon attacked each
other, and after a fierce struggle Sinfiotli, the younger and weaker,
fell down dead. This sudden catastrophe brought Sigmund to his
senses. While he hung over his murdered companion in sudden
despair, he saw two weasels come out of the forest and fight until
one lay dead. The live weasel then sprang back into the thicket, and
soon returned with a leaf, which it laid upon its companion’s breast.
At the contact of the magic herb the dead beast came back to life. A
moment later a raven flying overhead dropped a similar leaf at
Sigmund’s feet, and he, understanding that the gods wished to help
him, laid it upon Sinfiotli, who was restored to life.
Afraid lest they might work each other further mischief while in
this altered guise, Sigmund and Sinfiotli now crept home and
patiently waited until the time of release had come. On the ninth
night the skins dropped off and they hastily flung them into the fire,
where they were entirely consumed, and the spell was broken
forever.
It was now that Sigmund confided the story of his wrongs to
Sinfiotli, who swore that, although Siggeir was his father (for neither
he nor Sigmund knew the secret of his birth), he would help him to
take his revenge. At nightfall, therefore, he accompanied Sigmund to
the palace; they entered unseen, and concealed themselves in the
cellar, behind the huge beer vats. Here they were discovered by
Signy’s two youngest children, who were playing with golden rings,
which rolled into the cellar, and who thus suddenly came upon the
men in ambush.
They loudly proclaimed the discovery they had just made to their
father and his guests, but, before Siggeir and his men could don
their arms, Signy caught both children by the hand, and dragging
them into the cellar bade her brother slay the little traitors. This
Sigmund utterly refused to do, but Sinfiotli struck off their heads ere
he turned to fight against the assailants, who were rapidly closing
around him.
In spite of all efforts Sigmund and his brave young companion
soon fell into the hands of the Goths, whose king, Siggeir, sentenced
them to be buried alive in the same mound, a stone partition being
erected between them so they could neither see nor touch each
other. The prisoners were already confined in their living graves, and
the men were about to place the last stones on the roof, when Signy
drew near, bearing a bundle of straw, which they allowed her to
throw at Sinfiotli’s feet, for they fancied that it contained only a few
provisions which would prolong his agony a little without helping him
to escape.
When the workmen had departed and all was still, Sinfiotli undid
the sheaf and shouted for joy when he found instead of bread the
sword which Odin had given to Sigmund. Knowing that nothing could
dull or break the keen edge of this fine weapon, Sinfiotli thrust it
through the stone partition, and, aided by Sigmund, sawed an
opening, and both soon effected an escape through the roof.
“Then in the grave-mound’s darkness did Sigmund the king upstand,
And unto that saw of battle he set his naked hand;
And hard the gift of Odin home to their breasts they drew;
Sawed Sigmund, sawed Sinfiotli, till the stone was cleft atwo,
And they met and kissed together: then they hewed and heaved full
hard
Till, lo, through the bursten rafters the winter heavens bestarred!
And they leap out merry-hearted; nor is there need to say
A many words between them of whither was the way.”

Sigmund and Sinfiotli, free once more, noiselessly sought the


palace, piled combustible materials around it, and
Sigmund’s
vengeance. setting fire to it placed themselves on either side the
door, declaring that none but the women should be
allowed to pass through. Then they loudly called to Signy to escape
ere it was too late, but she had no desire to live, and after kissing
them both and revealing the secret of Sinfiotli’s birth she sprang
back into the flames, where she perished.

“And then King Siggeir’s roof-tree upheaved for its utmost fall,
And its huge walls clashed together, and its mean and lowly things
The fire of death confounded with the tokens of the kings.”

The long-planned vengeance had finally been carried out,


Volsung’s death had been avenged, and Sigmund,
Helgi.
feeling that nothing now detained him in Gothland, set
sail with Sinfiotli and returned to Hunaland, where he was warmly
welcomed and again sat under the shade of his ancestral tree, the
mighty Branstock. His authority fully established, Sigmund married
Borghild, a beautiful princess, who bore him two sons, Hamond and
Helgi, the latter of whom was visited by the Norns when he lay in his
cradle, and promised sumptuous entertainment in Valhalla when his
earthly career should be ended.
“And the woman was fair and lovely, and bore him sons of fame;
Men called them Hamond and Helgi, and when Helgi first saw light
There came the Norns to his cradle and gave him life full bright,
And called him Sunlit Hill, Sharp Sword, and Land of Rings,
And bade him be lovely and great, and a joy in the tale of kings.”

This young Volsung prince was fostered by Hagal, for Northern


kings generally entrusted their sons’ education to a stranger, thinking
they would be treated with less indulgence than at home. Under this
tuition Helgi became so fearless that at the age of fifteen he ventured
alone into the palace of Hunding, with whose whole race his family
was at feud. Passing all through the palace unmolested and
unrecognized, he left an insolent message, which so angered
Hunding that he immediately set out in pursuit of the bold young
prince. Hunding entered Hagal’s house, and would have made Helgi
a prisoner had the youth not disguised himself as a servant maid,
and begun to grind corn as if it were his wonted occupation. The
invaders marveled somewhat at the maid’s tall stature and brawny
arms, but departed without suspecting that they had been so near
the hero whom they sought.
Having thus cleverly escaped, Helgi joined Sinfiotli; they
collected an army, and marched openly against the Hundings, with
whom they fought a great battle, during which the Valkyrs hovered
overhead, waiting to convey the slain to Valhalla. Gudrun, one of the
battle maidens, was so charmed by the courage which Helgi
displayed, that she openly sought him and promised to be his wife.
Only one of the Hunding race, Dag, remained alive, and he was
allowed to go free after promising never to try to avenge his
kinsmen’s death. This promise was not kept, however, for Dag,
having borrowed Odin’s spear Gungnir, treacherously made use of it
to slay Helgi. Gudrun, now his wife, wept many tears at his death,
and solemnly cursed his murderer; then, hearing from one of her
maids that her slain husband kept calling for her in the depths of his
tomb, she fearlessly entered the mound at night and tenderly
inquired why he called and why his wounds kept on bleeding even
after death. Helgi answered that he could not rest happy because of
her grief, and declared that for every tear she shed a drop of his
blood must flow.

“Thou weepest, gold-adorned!


Cruel tears,
Sun-bright daughter of the south!
Ere to sleep thou goest;
Each one falls bloody
On the prince’s breast,
Wet, cold, and piercing,
With sorrow big.”
Sæmund’s Edda (Thorpe’s tr.).

To still her beloved husband’s sufferings, Gudrun then ceased to


weep, but her spirit soon joined his, which had ridden over Bifröst
and entered Valhalla, where Odin made him leader of the Einheriar.
Here Gudrun, a Valkyr once more, continued to wait upon him,
darting down to earth at Odin’s command to seek new recruits for
the army which her lord was to lead into battle when Ragnarok, the
twilight of the gods, should come.
Sinfiotli, Sigmund’s eldest son, also came to an early death; for,
Death of having quarreled with and slain Borghild’s brother, she
Sinfiotli. determined to poison him. Twice Sinfiotli detected the
attempt and told his father there was poison in his
cup. Twice Sigmund, whom no venom could injure, drained the bowl;
but when Borghild made a third and last attempt, he bade Sinfiotli let
the wine flow through his beard. Mistaking the meaning of his
father’s words, Sinfiotli immediately drained the cup and fell to the
ground lifeless, for the poison was of the most deadly kind.

“He drank as he spake the words, and forthwith the venom ran
In a chill flood over his heart, and down fell the mighty man
With never an uttered death-word and never a death-changed look,
And the floor of the hall of the Volsungs beneath his falling shook.
Then up rose the elder of days with a great and bitter cry,
And lifted the head of the fallen; and none durst come anigh
To hearken the words of his sorrow, if any words he said
But such as the Father of all men might speak over Balder dead.
And again, as before the death-stroke, waxed the hall of the
Volsungs dim,
And once more he seemed in the forest, where he spake with naught
but him.”

Speechless with grief, Sigmund tenderly raised his son’s body in


his arms, and strode out of the hall and down to the shore, where he
deposited his precious burden in the skiff of an old one-eyed
boatman who came at his call. But when he would fain have stepped
aboard also, the boatman pushed off and was soon lost to sight. The
bereaved father then slowly wended his way home again, knowing
that Odin himself had come to claim the young hero and had rowed
away with him “out into the west.”
Sigmund repudiated Borghild in punishment for this crime, and
Hiordis. when he was very old indeed he sued for the hand of
Hiordis, a fair young princess, daughter of Eglimi, King
of the Islands. Although this young maiden had many suitors, among
others King Lygni of Hunding’s race, she gladly accepted Sigmund
and became his wife. Lygni, the discarded suitor, was so angry at
this decision, that he immediately collected an army and marched
against his successful rival, who, overpowered by superior numbers,
fought with the courage of despair.
Hidden in a neighboring thicket, Hiordis and her maid anxiously
watched the battle, saw Sigmund pile the dead around him and
triumph over every foe, until at last a tall, one-eyed warrior suddenly
appeared, broke his matchless sword, and vanished, leaving him
defenseless amid the foe, who soon cut him down.

“But, lo! through the hedge of the war-shafts, a mighty man there
came,
One-eyed and seeming ancient, but his visage shone like flame:
Gleaming gray was his kirtle, and his hood was cloudy blue;
And he bore a mighty twi-bill, as he waded the fight-sheaves
through,
And stood face to face with Sigmund, and upheaved the bill to smite.
Once more round the head of the Volsung fierce glittered the
Branstock’s light,
The sword that came from Odin: and Sigmund’s cry once more
Rang out to the very heavens above the din of war.
Then clashed the meeting edges with Sigmund’s latest stroke,
And in shivering shards fell earthward that fear of worldly folk.
But changed were the eyes of Sigmund, the war-wrath left his face;
For that gray-clad, mighty Helper was gone, and in his place
Drave on the unbroken spear-wood ’gainst the Volsung’s empty
hands:
And there they smote down Sigmund, the wonder of all lands,
On the foemen, on the death-heap his deeds had piled that day.”

All the Volsung race and army had already succumbed, so Lygni
immediately left the battlefield to hasten on and take possession of
the kingdom and palace, where he fully expected to find the fair
Hiordis and force her to become his wife. As soon as he had gone,
however, the beautiful young queen crept out of her hiding place in
the thicket, ran to the dying Sigmund, caught him to her breast in a
last passionate embrace, and tearfully listened to his dying words.
He then bade her gather up the fragments of his sword, carefully
treasure them, and give them to the son whom he foretold would
soon be born, and who was destined to avenge his death and be far
greater than he.

“‘I have wrought for the Volsungs truly, and yet have I known full well
That a better one than I am shall bear the tale to tell:
And for him shall these shards be smithied; and he shall be my son,
To remember what I have forgotten and to do what I left undone.’”

While Hiordis was mourning over Sigmund’s lifeless body, her


watching handmaiden warned her of the approach of a party of
vikings. Retreating into the thicket once more, Hiordis
Elf, the viking.
exchanged garments with her; then, bidding her walk
first and personate the queen, they went to meet the viking Elf
(Helfrat or Helferich), and so excited his admiration for Sigmund that
he buried him with all pomp, and promised them a safe asylum in his
house.
As he had doubted their relative positions from the very first
moment, he soon resorted to a seemingly idle question to ascertain
their real rank. The pretended queen, when asked how she knew the
hour had come for rising when the winter days were short and there
was no light to announce the coming of morn, replied that, as she
was in the habit of drinking milk ere she fed the cows, she always
awoke thirsty. But when the same question was put to the real
Hiordis, she answered that she knew it was morning because the
golden ring her father had given her grew cold on her hand.
Elf, having thus discovered the true state of affairs, offered
Sigurd. marriage to the pretended handmaiden, Hiordis,
promising to foster her child by Sigmund—a promise
which he nobly kept. The child was sprinkled with water by his hand
—a ceremony which our pagan ancestors scrupulously performed—
received from him the name of Sigurd, and grew up in the palace.
There he was treated as the king’s own son, receiving his education
from Regin, the wisest of men, who knew all things and was even
aware of his own fate, which was to fall by a youth’s hand.

“Again in the house of the Helper there dwelt a certain man,


Beardless and low of stature, of visage pinched and wan:
So exceeding old was Regin, that no son of man could tell
In what year of the days passed over he came to that land to dwell:
But the youth of king Elf had he fostered, and the Helper’s youth
thereto,
Yea, and his father’s father’s: the lore of all men he knew,
And was deft in every cunning, save the dealings of the sword:
So sweet was his tongue-speech fashioned, that men trowed his
every word;
His hand with the harp-strings blended was the mingler of delight
With the latter days of sorrow; all tales he told aright;
The Master of the Masters in the smithying craft was he;
And he dealt with the wind and the weather and the stilling of the
sea;
Nor might any learn him leech-craft, for before that race was made,
And that man-folk’s generation, all their life-days had he weighed.”

Under this tutor young Sigurd grew up to great wisdom. He


mastered the smith craft, and the art of carving all manner of runes,
learned languages, music, and eloquence, and, last but not least,
became a doughty warrior whom none could subdue. By Regin’s
advice, Sigurd, having reached manhood, asked the king for a war
horse—a request which was immediately granted, for he was bidden
hasten to Gripir, the stud-keeper, and choose from his flock the steed
he liked best.
On his way to the meadow where the horses were at pasture,
Sigurd encountered a one-eyed stranger, clad in gray and blue, who
bade him drive the horses into the river and select the one which
could breast the foaming tide most successfully.
Sigurd, acting according to this advice, noticed that one horse,
after crossing, raced around the meadow on the opposite side; then,
plunging back into the river, he returned to his former pasture without
showing any signs of fatigue. The young hero selected this horse,
therefore, calling him Grane or Greyfell. This steed was a
descendant of Odin’s eight-footed horse Sleipnir, and, besides being
unusually strong and indefatigable, was as fearless as his master. A
short time after this, while Regin and his pupil were sitting over the
fire, the former struck his harp, and, after the manner of the Northern
scalds, sang or recited the following tale, which was the story of his
life:
Hreidmar, king of the dwarf folk, was the father of three sons.
The treasure Fafnir, the eldest, was gifted with a fearless soul and a
of the dwarf powerful hand; Otter, the second, with snare and net,
king. and the power of changing form at will; and Regin, the
third, could, as we have already seen, command all knowledge and
skillfully ply the trade of a smith. To please the avaricious old
Hreidmar, this youngest son fashioned for him a house which was all
lined with glittering gold and flashing gems, and guarded by Fafnir,
whose fierce glances and Ægis helmet none dared encounter.
Now it came to pass that Odin, Hoenir, and Loki once came
down upon earth in human guise for one of their wonted expeditions
to test the hearts of men, and soon reached the land where
Hreidmar dwelt.

“And the three were the heart-wise Odin, the Father of the Slain,
And Loki, the World’s Begrudger, who maketh all labor vain,
And Hönir, the Utter-Blameless, who wrought the hope of man,
And his heart and inmost yearnings, when first the work began;—
The God that was aforetime, and hereafter yet shall be
When the new light yet undreamed of shall shine o’er earth and sea.”

These gods had not wandered very far before Loki perceived an
otter basking in the sun. Animated by his usual spirit of destruction,
he slew the unoffending beast—which, as it happened, was the
dwarf king’s second son, Otter—and flung its lifeless body over his
shoulders, thinking it would furnish a good dish when meal time
came.
Following his companions, Loki came at last to Hreidmar’s
house, entered with them, and flung his burden down upon the floor.
The moment the dwarf king’s glance fell upon it he flew into a
towering rage, and before the gods could help themselves they were
bound by his order, and heard him declare that they should never
recover their liberty unless they could satisfy his thirst for gold by
giving him enough of that precious substance to cover the otterskin
inside and out.

“‘Now hearken the doom I shall speak! Ye stranger-folk shall be free


When ye give me the Flame of the Waters, the gathered Gold of the
Sea,
That Andvari hideth rejoicing in the wan realm pale as the grave;
And the Master of Sleight shall fetch it, and the hand that never
gave,
And the heart that begrudgeth forever, shall gather and give and rue.
Lo, this is the doom of the wise, and no doom shall be spoken
anew.’”

As this otterskin had the property of stretching itself out to a


fabulous size, no ordinary treasure could suffice to cover it. The gods
therefore bade Loki, who was liberated to procure the ransom,
hasten off to the waterfall where the dwarf Andvari dwelt, and secure
the treasure he had amassed by magical means.

“There is a desert of dread in the uttermost part of the world,


Where over a wall of mountains is a mighty water hurled,
Whose hidden head none knoweth, nor where it meeteth the sea;
And that force is the Force of Andvari, and an Elf of the dark is he.
In the cloud and the desert he dwelleth amid that land alone;
And his work is the storing of treasure within his house of stone.”

In spite of diligent search, however, Loki could not find the dwarf;
but perceiving a salmon sporting in the foaming waters, he shrewdly
concluded the dwarf must have assumed this shape, and borrowing
Ran’s net he soon had the fish in his power. As he had suspected, it
was Andvari, who, in exchange for liberty, reluctantly brought forth
his mighty treasure and surrendered it all, including the Helmet of
Dread and a hauberk of gold, reserving only the ring he wore, which
was gifted with miraculous powers, and, like a magnet, helped him to
collect the precious ore. But the greedy Loki, catching sight of it,
wrenched it away from him and departed laughing, while the dwarf
hurled angry curses after him, declaring that the ring would ever
prove its possessor’s bane and would cause the death of many.
“That gold
Which the dwarf possessed
Shall to two brothers
Be cause of death,
And to eight princes,
Of dissension.
From my wealth no one
Shall good derive.”
Sæmund’s Edda (Thorpe’s tr.).

On arriving at Hreidmar’s hut, Loki found the mighty treasure


none too great, for the skin widened and spread, and he was even
forced to give the ring Andvaranaut (Andvari’s loom) to purchase his
and his companions’ release. The gold thus obtained soon became a
curse, as Andvari had predicted, for Fafnir and Regin both coveted a
share. As for Hreidmar, he gloated over his treasure night and day,
and Fafnir the invincible, seeing that he could not obtain it otherwise,
slew his own father, donned the Helmet of Dread and the hauberk of
gold, grasped the sword Hrotti, and when Regin came to claim a part
drove him scornfully out into the world, where he bade him earn his
own living.
Thus exiled, Regin took refuge among men, to whom he taught
the arts of sowing and reaping. He showed them how to work
metals, sail the seas, tame horses, yoke beasts of burden, build
houses, spin, weave, and sew—in short, all the industries of civilized
life, which had hitherto been unknown. Years elapsed, and Regin
patiently bided his time, hoping that some day he would find a hero
strong enough to avenge his wrongs upon Fafnir, whom years of
gloating over his treasure had changed into a horrible dragon, the
terror of Gnîtaheid (Glittering Heath), where he had taken up his
abode.
His story finished, Regin suddenly turned to the attentive Sigurd,
told him he knew that he could slay the dragon if he wished, and
inquired whether he were ready to help his old tutor avenge his
wrongs.
“And he spake: ‘Hast thou hearkened, Sigurd? Wilt thou help a man
that is old
To avenge him for his father? Wilt thou win that treasure of gold
And be more than the kings of the earth? Wilt thou rid the earth of a
wrong
And heal the woe and the sorrow my heart hath endured o’er long?’”

Sigurd immediately assented, declaring, however, that the curse


must be assumed by Regin, for he would have none
Sigurd’s
sword. of it; and, in order to be well prepared for the coming
fight, he asked his master to forge him a sword which
no blow could break. Twice Regin fashioned a marvelous weapon,
but twice Sigurd broke it to pieces on the anvil. Then, declaring that
he must have a sword which would not fail him in time of need, he
begged the broken fragments of Sigmund’s weapon from his mother
Hiordis, and either forged himself or made Regin forge a matchless
blade, whose temper was such that it neatly severed some wool
floating gently down the stream, and divided the great anvil in two
without being even dinted.
After paying a farewell visit to Gripir, who, knowing the future,
foretold every event in his coming career, Sigurd took leave of his
mother, and accompanied by Regin set sail from his native land,
promising to slay the dragon as soon as he had fulfilled his first duty,
which was to avenge his father Sigmund’s death.

“‘First wilt thou, prince,


Avenge thy father,
And for the wrongs of Eglymi
Wilt retaliate.
Thou wilt the cruel,
The sons of Hunding,
Boldly lay low:
Thou wilt have victory.’”
Lay of Sigurd Fafnicide (Thorpe’s tr.).

You might also like