Diff Pri Deception
Diff Pri Deception
Guangdong Bai
Cristina Alcaraz
Suryadipta Majumdar (Eds.)
LNCS 13787
Network and
System Security
16th International Conference, NSS 2022
Denarau Island, Fiji, December 9–12, 2022
Proceedings
Lecture Notes in Computer Science 13787
Founding Editors
Gerhard Goos
Karlsruhe Institute of Technology, Karlsruhe, Germany
Juris Hartmanis
Cornell University, Ithaca, NY, USA
Network and
System Security
16th International Conference, NSS 2022
Denarau Island, Fiji, December 9–12, 2022
Proceedings
Editors
Xingliang Yuan Guangdong Bai
Monash University The University of Queensland
Clayton, VIC, Australia Queensland, QLD, Australia
© The Editor(s) (if applicable) and The Author(s), under exclusive license
to Springer Nature Switzerland AG 2022
This work is subject to copyright. All rights are reserved 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 Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface
This volume contains the papers selected for and presented at the 16th International
Conference on Network and System Security (NSS 2022) held in Denarau Island, Fiji,
during December 9–12, 2022.
The mission of NSS is to provide a forum for presenting novel contributions related
to all theoretical and practical aspects related to network and system security, such as
authentication, access control, availability, integrity, privacy, confidentiality, dependabil-
ity, and sustainability of computer networks and systems. NSS provides a leading-edge
forum to foster interaction between researchers and developers within the network and
system security communities, and gives attendees an opportunity to interact with experts
in academia, industry, and government.
There were 83 submissions for NSS 2022. Each submission was reviewed by at
least 3, and on average 3.1, Program Committee members. The evaluation process was
based on significance, novelty, and technical quality of the submissions. After a rigorous
double-blind review process and thorough discussion of each submission, the Program
Committee selected 23 full papers and 18 short papers to be presented during NSS 2022
and published in the LNCS volume 13787 proceedings. The submission and review
processes were conducted using the EasyChair system.
The selected papers are devoted to topics such as secure operating system archi-
tectures, applications programming and security testing, intrusion and attack detection,
cybersecurity intelligence, access control, cryptographic techniques, cryptocurrencies,
ransomware, anonymity, trust, and recommendation systems, as well machine learning
problems.
In addition to the contributed papers, NSS 2022 included invited keynote talks by
Robert Deng, Willy Susilo, Joseph Liu, Cong Wang, Raymond Choo, and Surya Nepal.
We would like to thank our general and local co-chairs Shawkat Ali and Kim-Kwang
Raymond Choo; our publication chair Shangqi Lai; our publicity co-chairs Weizhi Meng,
Guanquan Xu, and Ruitao Feng; our special issues co-chairs Yanjun Zhang, Chao Chen,
and Wei Zhou; the local organization team; and all the Program Committee members
for their support to this conference.
Finally, we also thank The University of Fiji, for their full support in organizing NSS
2022.
Program Co-chairs
Cristina Alcaraz University of Malaga, Spain
Guangdong Bai The University of Queensland, Australia
Suryadipta Majumdar Concordia University, Canada
Xingliang Yuan Monash University, Australia
Publication Chair
Shangqi Lai Monash University, Australia
Publicity Co-chairs
Weizhi Meng Technical University of Denmark, Denmark
Guanquan Xu Tianjin University, China
Ruitao Feng Nanyang Technological University, Singapore
Registration Chair
Kunal Kumar The University of Fiji, Fiji
Web Chair
Minfeng Qi Swinburne University of Technology, Australia
Program Committee
Alban Gabillon Université de la Polynésie Française, France
Arcangelo Castiglione University of Salerno, Italy
Cheng-Kang Chu Institute of Infocomm Research, Singapore
Chunhua Su Osaka University, Japan
Chunpeng Ge Nanjing University of Aeronautics and
Astronautics, China
Derek Wang CSIRO’s Data61, Australia
Ding Wang Peking University, China
Fatemeh Rezaeibagha Murdoch University, Australia
Guido Schmitz Royal Holloway, University of London, UK
Guomin Yang University of Wollongong, Australia
Haibo Zhang University of Otago, New Zealand
Haoyu Wang Huazhong University of Science and Technology,
China
Hagen Lauer Fraunhofer SIT, Germany
Helei Cui Northwestern Polytechnical University, China
Hongxin Hu University at Buffalo, SUNY, USA
Hung-Min Sun National Tsing Hua University, Taiwan
Jianfeng Wang Xidian University, China
Jiangshan Yu Monash University, Australia
Jin Hong University of Western Australia, Australia
Joonsang Baek University of Wollongong, Australia
Jose Morales Carnegie Mellon University, USA
Kailong Wang National University of Singapore, Singapore
Kouichi Sakurai Kyushu University, Japan
Kun Sun George Mason University, USA
Kwok Yan Lam Nanyang Technological University, Singapore
Lei Xue The Hong Kong Polytechnic University, China
Leo Yu Zhang Deakin University, Australia
Luca Caviglione CNR - IMATI, Italy
Maurantonio Caprolu Hamad Bin Khalifa University, Qatar
Mauro Conti University of Padua, Italy
Meisam Mohammady CSIRO’s Data61, Australia
Mengyuan Zhang The Hong Kong Polytechnic University, China
Nora Cuppens-Boulahia Polytechnique Montréal, Canada
Panayiotis Kotzanikolaou University of Piraeus, Greece
Paria Shirani Ryerson University, Canada
Pino Caballero-Gil University of La Laguna, Spain
Organization ix
Network Security
Mobile Security
IoT Security
Blockchain Security
Blockchain-Powered Systems
Attacks
1 Introduction
third-party vendors are not security experts, the customized functions (functions
that are defined by programmers instead of standard libraries) and encapsulated
APIs are error-prone and might be vulnerable to attacks [8,37,43,45].
To exploit these vulnerabilities, most existing research works [6,14,21,22,49]
rely on abstracted patterns to identify one or two specific types of vulnerabilities.
Unfortunately, with thousands of vulnerabilities being reported daily, analysis
through pattern abstraction and matching is time-consuming and unscalable,
which is unable to reduce the vulnerability propagation. Static analysis is pro-
posed as a promising approach to explore vulnerabilities from source code timely,
through which developers can sweep out the signs of vulnerabilities during the
design and implementation stages. Therefore, many efforts have been made in
this direction, such as pattern-based methods and code similarity-based methods.
Pattern-based analyses [6,31,48,49] require relevant experts to define the vulner-
ability patterns to represent the features of vulnerabilities, which are error-prone
and burdensome. Code similarity-based analyses [14,21] can check vulnerabilities
that are caused by code cloning. When vulnerabilities are not incurred by code
cloning, such methods will have high false-negative rates shown in [22]. There-
fore, a feasible and ideal detection method should not only effectively detect
various vulnerabilities but also require little manual effort. Deep learning is good
at reducing manual work, thus becoming a great candidate to meet the above
requirements.
Since its brilliant performance in the ImageNet LSVRC-2010 contest [16],
deep learning has attracted more and more attention. Deep learning mod-
els, including convolutional neural networks (CNNs), recurrent neural networks
(RNNs) and deep belief networks (DBNs), have achieved impressive performance
in the task of image classification [9,16,39,54], video scene parsing [17,25,34,51],
natural language processing (NLP) [7,32,42] and so on. Thus, it is attractive
to use deep learning models to help detect software vulnerabilities. In recent
years, some deep learning-based methods have been proposed for detecting soft-
ware vulnerabilities. Russell et al. [35] used CNNs and random forest classifier
to learn the deep representation of source code and detect vulnerabilities with
labeled vulnerability datasets. Li et al. [22] presented a deep learning-based vul-
nerability detection system, dubbed VulDeePecker, to detect vulnerabilities at
the slice level. However, these methods need much manual effort to define the
representation of the source code. Besides, these methods can only detect one
type of vulnerability.
Motivated by the superior performance of deep learning classifiers and the
idea of separate detection of different types of vulnerabilities, we propose a new
vulnerability detection method using deep learning classifiers in source code,
which will only focus on the function prototypes instead of the specific implemen-
tation of the functions. Firstly, we process and segment the function prototypes
in the target source code, obtaining semantic texts. Then, we use labeled data
of the Linux Kernel source code and some functions obtained online to train
seven deep classifiers, and these classifiers are fused into an integrated classi-
fier. The integrated classifier is used to classify the semantic texts of the target
Vulnerability Detection Using Deep Learning Based Function Classification 5
source code into seven pre-defined categories. At last, we utilize static scanning
analyzers to separately detect vulnerabilities or misuses of functions from each
category. Instead of analyzing all the source code, our method only scans a few
partial codes to detect vulnerabilities. Moreover, our method can detect different
kinds of vulnerabilities.
In order to evaluate our method, we used the OpenHarmony OS source code
as our target source code. We analyzed all the code to find all the vulnerabilities
as benchmarks. And we used our method to analyze functions from four different
categories to detect vulnerabilities. Results show that our method detected 5 of 7
memory corruptions, 13 of 18 cryptography vulnerabilities, 5 of 6 data processing
errors, and 13 of 18 random number issues with less time cost.
Contributions. The main contributions of this paper are listed as follows.
Organization. The rest of this paper is organized into five sections. In Sect. 2,
we present our motivation as well as some challenges of detecting software vul-
nerabilities in source code and offer corresponding perceptions to settle down
these challenges. Section 3 displays the proposed deep learning-based vulnera-
bility detection method. Moreover, experimental results are shown in Sect. 4.
Section 5 reviews some related works. Finally, Sect. 6 concludes this paper.
2 Background
In this section, we introduce the security flaws that are analyzed and further dis-
cuss the challenges of detecting these security flaws in an efficient way. Referring
to each challenge, we propose a solution to address it.
2.2 Challenges
2.3 Perceptions
3 Method
We propose a semantic-based analyzer, FunDL, to infer the functionalities
through the function prototypes and further analyze whether the corresponding
implementations are secure. The overview of FunDL is demonstrated in Fig. 1,
which includes three components, Function Processing, Function Classification,
and Vulnerability Detection.
identify the semantic meaning of each function. However, function prototypes are
generally different from natural language texts, which impairs the performance
of the deep text classifiers to some extent. Therefore, we preprocess function
prototypes in two steps:
– Step 1. Invalid information removal. FunDL removes the invalid infor-
mation that is useless while training the classifier such as the namespace and
special symbols (e.g., ‘~’ and ‘_’).
– Step 2. Text Segmentation. FunDL further segments the string refer-
ring to the word weight-based segmentation algorithm [11,36]. To construct
a word corpus that is suitable for segmenting programming language, we
include the natural language corpus, Google Web Trillion Word corpus [5],
and the programming corpus, Windows API sets [29] as well as Microsoft
API reference library [27] (Perception I). The natural language corpus is
adopted to understand the semantic meanings of the commonly used words.
FunDL relies on the programming corpus to identify the abbreviations and
informal words.
For an n-letter prototype, there are 2n−1 possible segmentation. FunDL com-
putes the frequency of each segmentation by comparing it with the integrated
corpus:
|W |
Fseg = f (wi ), (1)
i=1
After segmenting the function names, FunDL refers to the semantic meaning of
each word in the segmentation to classify the functions into different categories.
Since different deep learning models have different expressive abilities while pro-
cessing data, FunDL combines the advantages of different classifiers to obtain
an integrated classifier with the benefits of all these classifiers. In this work, we
focus on seven deep text classifiers with the training set and fuse these classifiers
into an integrated classifier for better classification performance.
12 H. Gong et al.
Deep Classifiers. FunDL consists of the following seven deep text classifiers:
TextCNN [15], TextRCNN [19], TextRNN [24], TextRNN with Attention (Tex-
tRNN_Att) [55], FastText [13], DPCNN [12], Transformer [42].
TextCNN applies the convolutional neural networks to the task of text classi-
fication and utilizes many kernels of different sizes to extract the key information
from the input sentences. Three parts are included:
– Word embedding: Because deep learning models are good at handling vec-
tors but not good at handling texts, texts should be converted to vectors
(embeddings). Specifically, FunDL randomly maps the training texts to vec-
tors as initialization and updates the vectors throughout the training process.
– Representation learning: Multiple kernels with different sizes are used
to extract the features of the embedded vectors in the convolutional layers.
Besides, key features are selected in the max-polling layer.
– Classifcation: The selected feature inputs to the fully connected layer and
softmax layer, outputting the probability of each category.
unnecessary risk that may result in the exposure of sensitive information. For
functions of Category DataProc, we mainly detect the CWE–19 vulnerability
(data processing errors) and some specific data processing vulnerabilities, such as
improper handling of elements, case sensitivity, values, parameters, data types
and so on. For functions of Category Random, we focus on the CWE–1213
vulnerability (random number issues) and some specific random number vulner-
abilities, like small space of random values and use of a predictable algorithm in
random number generator.
Table 1. Number of functions of each category and number of total functions in the
two data sets.
LKSC+ OpenHarmony
Mem 4,866 1,171
Crypto 1,163 710
DataProc 821 1,297
Random 92 97
Plain 27,566 10,993
Total 34,508 14,268
Table 2. F 1-score of each classifier, the average of the seven classifiers and the inte-
grated classifier for each category, where DP denotes DataProc; Rd denotes Random.
The results of function classification is shown in Table 2. Among the seven clas-
sifiers, TextCNN achieved the best classification performance of Category Ran-
dom; TextRCNN obtained the best classification results of Categories Mem,
Crypto, DataProc and Plain. By manually inspecting DataProc whose F 1-
score is much lower than the other categories, we found that the functions
involved for training are quite different from the functions used for testing, which
decreases the classification performance in this category. The integrated classi-
fier, performance almost achieved the best performance for every single classifier,
which is good for avoiding the shortcomings of a single model.
Vulnerability Detection Using Deep Learning Based Function Classification 15
To detect vulnerabilities, we used two static analyzers, TscanCode [40] for detect-
ing vulnerabilities related to Mem and DataProc, and Flawfinder [46] to detect
vulnerabilities related to Crypto and Random. To set up the benchmarks,
we executed each analyzer to detect vulnerabilities in the whole OpenHarmony
source code. Then, we run analyzers in the found functions of different cate-
gories. Besides, we asked the two experienced programmers to help us confirm
the detected vulnerabilities. The vulnerability detection and confirmation results
are illustrated in Table 3.
By manually checking the results of vulnerability detection, the vulnerability
detection accuracy rates of FunDL of analyzing the four categories are 71.4%,
72.2%, 83.3% and 72.2%, while the corresponding accuracy rates of analyzing
the whole source code are 61.5%, 63.0%, 52.9%, 55.6%. Specifically, FunDL
successfully detected 5 out of 7 memory corruption vulnerabilities, 13 out of
18 cryptographic misuses, 5 out of 6 data processing errors, and 13 out of 18
pseudo-random number issues. It indicates that FunDL effectively improves the
performance of the existing vulnerability analyzers.
We assessed the overall runtime for FunDL to classify function prototypes. Note
that we did not consider the time of classifier training because the training step
is only a one-time effort. The results are shown in Table 4, which displays that
for every type of vulnerability, the efficiency of FunDL improves by about 50
percent.
16 H. Gong et al.
FunDL Benchmarks
Mem 1,747 s 2,952 s
Crypto 162 s 365 s
DataProc 1,339 s 2,952 s
Random 238 s 365 s
4.6 Limitations
The proposed method can effectively and efficiently detect some software vul-
nerabilities. Nevertheless, it has several limitations.
1. Our method cannot cope with the function prototypes that have no semantic
information. For example, if a memory operation function is named as abcd,
our method will classify it into Category Plain and will not detect whether
it has memory corruptions, thus causing detection failure.
2. The training set can be further expanded to train a better integrated classifier.
3. Our experiments only use static analyzers to detect vulnerabilities. Future
work should investigate the effectiveness of other useful analyzers.
4. We concentrate on detecting vulnerabilities in C/C++ program source code,
which means that the method may need to be adapted to deal with code
written in other programming languages.
5 Related Work
There are many prior studies that analyze or scan source code to identify vul-
nerabilities. Here, we introduce four kinds of them that relate to our work:
1) data-flow based analyzers [4,18,26]; 2) pointer information based analyzers
[38,50]; 3) code similarity based analyzers [14,21]; 4) deep learning based ana-
lyzers [10,20,22,23,35,44,52,56].
Data Flow-Based Analyzers. Some tools detect vulnerabilities by compar-
ing data flows with some pre-defined rules or violations. The C bounded model
checker of CBMC [18] checks the safety of the assertions under a given bound.
It translates assertions and loops into formulas. If the formulas meet any pre-
defined violations, then a violated assertion will be recognized. Besides, data
flow-based analyzers are also utilized in the Linux Kernel: Dr. Checker [26] and
K-Miner [4], which are developed to analyze a large amount of code in Linux Ker-
nel more effectively and more efficiently. Dr. Checker leverages a soundy method
18 H. Gong et al.
Appendices
For random number issues, Listing 1.4 (in the file rand.c) presents an example
with the CWE–1241 vulnerability, which is about using a predictable algorithm
in random number generation. The random number function rand (Lines 12–15)
calls the function rand_r (Lines 3–10), which uses a constant value 1U (Line 1)
as the random number seed and an invariable algorithm (Lines 5–7) to generate
random numbers, which is predictable/non-random and vulnerable.
20 H. Gong et al.
1 s t a t i c unsigned i n t y = 1U;
2 unsigned i n t rand_r ( unsigned i n t ∗ s e e d p )
3 {
4 ∗ s e e d p ^= ( ∗ s e e d p << 1 3 ) ;
5 ∗ s e e d p ^= ( ∗ s e e d p >> 1 7 ) ;
6 ∗ s e e d p ^= ( ∗ s e e d p << 5 ) ;
7 return ∗ s e e d p ;
8 }
9 unsigned i n t rand ( void )
10 {
11 return rand_r(&y ) ;
12 }
Listing 1.4. A random number issue example in OpenHarmony.
References
1. Apple: Clang Static Analyzer. https://clang-analyzer.llvm.org/
2. Atwood, J., Spolsky, J.: Stack overflow. https://stackoverflow.com/
3. Corporation, C.P.B.: The Linux Kernel Archives. https://www.kernel.org/
4. Gens, D., Schmitt, S., Davi, L., Sadeghi, A.R.: K-Miner: Uncovering memory cor-
ruption in Linux. In: Network and Distributed System Security Symposium (2018)
5. Google: Google Web Trillion Word Corpus. https://ai.googleblog.com/2006/08/
all-our-n-gram-are-belong-to-you.html
6. Grieco, G., Grinblat, G.L., Uzal, L.C., Rawat, S., Feist, J., Mounier, L.: Toward
large-scale vulnerability discovery using machine learning. In: ACM Conference on
Data and Application Security and Privacy (2016)
7. Gu, Y., et al.: Domain-specific language model pretraining for biomedical natural
language processing. arXiv preprint arXiv:2007.15779 (2020)
8. Gu, Z., Wu, J., Li, C., Zhou, M., Gu, M.: SSLDoc: automatically diagnosing incor-
rect SSL API Usages in C Programs. In: International Conference on Software
Engineering and Knowledge Engineering (2019)
9. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition.
arXiv preprint arXiv:1512.03385 (2015)
10. Huo, X., Li, M., Zhou, Z.: Learning unified features from natural and programming
languages for locating buggy source code. In: International Joint Conference on
Artificial Intelligence (2016)
11. Jenks, G.: Python word segmentation. https://pypi.org/project/wordsegment/
12. Johnson, R., Zhang, T.: Deep pyramid convolutional neural networks for text cat-
egorization. In: Annual Meeting of the Association for Computational Linguistics
(2017)
13. Joulin, A., Grave, E., Bojanowski, P., Mikolov, T.: Bag of tricks for efficient text
classification. In: Conference of the European Chapter of the Association for Com-
putational Linguistics (2017)
14. Kim, S., Woo, S., Lee, H., Oh, H.: VUDDY: a scalable approach for vulnerable
code clone discovery. In: IEEE Symposium on Security and Privacy (2017)
15. Kim, Y.: Convolutional neural networks for sentence classification. In: Conference
on Empirical Methods in Natural Language Processing (2014)
16. Krizhevsky, A., Sutskever, I., Hinton, G.E.: ImageNet classification with deep con-
volutional neural networks. In: International Conference on Neural Information
Processing Systems (2012)
Vulnerability Detection Using Deep Learning Based Function Classification 21
17. Kroeger, T., Timofte, R., Dai, D., Van Gool, L.: Fast Optical flow using dense
inverse search. In: Leibe, B., Matas, J., Sebe, N., Welling, M. (eds.) ECCV 2016.
LNCS, vol. 9908, pp. 471–488. Springer, Cham (2016). https://doi.org/10.1007/
978-3-319-46493-0_29
18. Kroening, D., Tautschnig, M.: CBMC-C bounded model checker. In: International
Conference on Tools and Algorithms for the Construction and Analysis of Systems
(2014)
19. Lai, S., Xu, L., Liu, K., Zhao, J.: Recurrent convolutional neural networks for text
classification. In: AAAI Conference on Artificial Intelligence (2015)
20. Li, J., He, P., Zhu, J., Lyu, M.R.: Software defect prediction via convolutional
neural network. In: IEEE International Conference on Software Quality, Reliability
and Security (2017)
21. Li, Z., Zou, D., Xu, S., Jin, H., Qi, H., Hu, J.: VulPecker: an automated vulner-
ability detection system based on code similarity analysis. In: Annual Conference
on Computer Security Applications (2016)
22. Li, Z., et al.: VulDeePecker: a deep learning-based system for vulnerability detec-
tion. In: Annual Network and Distributed System Security Symposium (2018)
23. Lin, G., Zhang, J., Luo, W., Pan, L., Xiang, Y.: POSTER: vulnerability discovery
with function representation learning from unlabeled projects. In: ACM SIGSAC
Conference on Computer and Communications Security (2017)
24. Liu, P., Qiu, X., Huang, X.: Recurrent neural network for text classification with
multi-task learning. In: International Joint Conference on Artificial Intelligence
(2016)
25. Long, J., Shelhamer, E., Darrell, T.: Fully convolutional networks for semantic
segmentation. In: IEEE Computer Society Conference on Computer Vision and
Pattern Recognition (2015)
26. Machiry, A., Spensky, C., Corina, J., Stephens, N., Kruegel, C., Vigna, G.:
Dr.Checker: a soundy analysis for Linux Kernel drivers. In: USENIX Security Sym-
posium USENIX Security (2017)
27. Microsoft: API reference docs for Windows Driver Kit (WDK). https://docs.
microsoft.com/en-us/windows-hardware/drivers/ddi/
28. Microsoft: GitHub. https://github.com/
29. Microsoft: Windows API sets. https://docs.microsoft.com/en-us/windows/win32/
apiindex/windows-apisets
30. MITRE: Common Weakness Enumeration. https://cwe.mitre.org/data/index.html
31. Neuhaus, S., Zimmermann, T., Holler, C., Zeller, A.: Predicting vulnerable software
components. In: ACM Conference on Computer and Communications Security
(2007)
32. Neumann, M., King, D., Beltagy, I., Ammar, W.: Scispacy: fast and robust models
for biomedical natural language processing. arXiv preprint arXiv:1902.07669 (2019)
33. Qiu, S., Chang, G.H., Panagia, M., Gopal, D.M., Au, R., Kolachalama, V.B.: Fusion
of deep learning models of MRI scans, mini-mental state examination, and logical
memory test enhances diagnosis of mild cognitive impairment. Diag. Assess. Prog.
10, 737–749 (2018)
34. Qiu, Z., Yao, T., Mei, T.: Learning deep spatio-temporal dependence for semantic
video segmentation. IEEE Trans. Multim. 20, 939–949 (2018)
35. Russell, R.L., et al.: Automated vulnerability detection in source code using deep
representation learning. In: IEEE International Conference on Machine Learning
and Applications (2018)
36. Segaran, T., Hammerbacher, J.: Beautiful Data: The Stories Behind Elegant Data
Solutions. O’Reilly Media, Inc. Beijing (2009)
22 H. Gong et al.
37. Shar, L.K., Tan, H.B.K., Briand, L.C.: Mining SQL injection and cross site script-
ing vulnerabilities using hybrid program analysis. In: International Conference on
Software Engineering (2013)
38. Shi, Q., Xiao, X., Wu, R., Zhou, J., Fan, G., Zhang, C.: Pinpoint: fast and precise
sparse value flow analysis for million lines of code. In: ACM SIGPLAN Conference
on Programming Language Design and Implementation (2018)
39. Simonyan, K., Zisserman, A.: Very deep convolutional networks for large-scale
image recognition. arXiv preprint arXiv:1409.1556 (2014)
40. Tencent: TscanCode. https://github.com/Tencent/TscanCode
41. Tutorial, C.: Finding Declarations. https://xinhuang.github.io/posts/2014-10-19-
clang-tutorial-finding-declarations.html
42. Vaswani, A., et al.: Attention is all you need. In: Conference on Neural Information
Processing Systems. In: 36th Proceedings of the Conference on Advances in Neural
Information Processing Systems (NIPS 2017) (2017)
43. Wang, J., et al.: NLP-EYE: detecting memory corruptions via semantic-
aware memory operation function identification. In: International Symposium on
Research in Attacks, Intrusions and Defenses (2019)
44. Wang, S., Liu, T., Tan, L.: Automatically learning semantic features for defect
prediction. In: International Conference on Software Engineering (2016)
45. Wei, X., Wolf, M.: A survey on HTTPS implementation by Android Apps: Issues
and countermeasures. Appl. Comput. Inform. 13, 101–117 (2017)
46. Wheeler, D.A.: Flawfinder. https://dwheeler.com/flawfinder/
47. Xing, H.: Chinese-Text-Classification-Pytorch. https://github.com/649453932/
Chinese-Text-Classification-Pytorch (2020)
48. Yamaguchi, F., Lottmann, M., Rieck, K.: Generalized vulnerability extrapolation
using abstract syntax trees. In: Annual Computer Security Applications Conference
(2012)
49. Yamaguchi, F., Wressnegger, C., Gascon, H., Rieck, K.: Chucky: exposing missing
checks in source code for vulnerability discovery. In: ACM SIGSAC Conference on
Computer and Communications Security (2013)
50. Yan, H., Sui, Y., Chen, S., Xue, J.: Spatio-temporal context reduction: a pointer-
analysis-based static approach for detecting use-after-free vulnerabilities. In:
IEEE/ACM International Conference on Software Engineering (2018)
51. Yan, X., et al.: Video scene parsing: An overview of deep learning methods and
datasets. Comput. Vis. Image Underst. 201, 103077(2020)
52. Yang, X., Lo, D., Xia, X., Zhang, Y., Sun, J.: Deep learning for just-in-time defect
prediction. In: IEEE International Conference on Software Quality, Reliability and
Security (2015)
53. Yunlongs: Clang-function-prototype. https://github.com/Yunlongs/clang-
function-prototype
54. Zagoruyko, S., Komodakis, N.: Wide residual networks. arXiv preprint
arXiv:1605.07146 (2016)
55. Zhou, P., et al.: Attention-based bidirectional long short-term memory networks
for relation classification. In: Annual Meeting of the Association for Computational
Linguistics (2016)
56. Zou, D., Wang, S., Xu, S., Li, Z., Jin, H.: µVulDeePecker: a deep learning-based
system for multiclass vulnerability detection. IEEE Trans. Depend. Sec. Comput.
18 (2019)
RAIDER: Reinforcement-Aided Spear
Phishing Detector
1 Introduction
Phishing is a type of cyber attack in which the adversary uses social engineering
techniques to either convince a user to do something they should not do or
motivate them to abstain from doing something they are supposed to do. In other
words, adversaries attempt to disguise themselves as trusted individuals to elicit
sensitive information from a target, or get them to perform some specific task
like installing malware on their computer or transferring money to the attacker.
Spear Phishing, a variant of phishing attacks, targets a specific individual with an
attack crafted based on prior information about the target and their relationship
with the impersonated sender [1]. This differs from traditional phishing attacks
which blindly target a large number of people with a generic attack, and results
in a more effective disguise, making it difficult in a lot of cases to discern between
what is a spear phishing attack and what is a legitimate email. It is estimated
that over 80% of organisations in the US alone have experienced a spear phishing
attack, and that they account for billions of dollars in losses annually [2]. While
spear phishing attacks are effective on their own, they may also be used to
gain a foothold into a network as a part of a more extensive attack [3,4]. Spear
phishing attacks are conducted across many forms of Internet communication
but are most commonly delivered by means of an email [5].
There are a variety of different spear phishing techniques used by attackers
to masquerade themselves as another (trusted) sender. Effective spear phishing
attacks are two-pronged attacks which involve both (1) manipulating the head-
ers of an email to forge certain fields to more closely resemble an email of the
sender they are trying to impersonate, and (2) psychologically manipulating the
recipient of the email (e.g., by mentioning a third party or an individual a poten-
tial victim trusts, enticing a sense of urgency, using common knowledge facts,
etc.). Email address spoofing is one of the most common forgery techniques,
requiring low effort on the part of an adversary. This technique involves manip-
ulating the header of an email to make the email appear to be from a different
sender than the individual or entity who actually sent the email. Email address
spoofing in itself is not a spear phishing attack, but it is a commonly used tool
in spear phishing helping the attacker to masquerade as another sender they
are impersonating. Considering that email address spoofing techniques are com-
monly used in spear phishing emails [6], observing spoofing could be considered
a reliable indicator of a spear phishing attack in progress.
Existing defences against spear phishing include both (a) “patching with peo-
ple” techniques - i.e., educating end-users to identify spear phishing attacks; as
RAIDER: Reinforcement-Aided Spear Phishing Detector 25
well as (b) “patching with tech” (which is a focus of this paper) - i.e., building
detection algorithms for reliable spear phishing identification [7,8] and develop-
ment of software solutions to scan emails and predict whether they are spear
phishing or benign. Software solutions can make use of blacklists of IP addresses
and URLs associated with phishing attacks [9–11], as well as Machine-Learning
(ML) based solutions [12–15].
While general phishing and spear phishing are somewhat related, the design
of ML based detection models for them differs significantly. Unlike general phish-
ing where ML detection is a binary classification problem with emails either
being ‘phishing’ or ‘benign’ [16], spear phishing ML detection is a more complex
multi-class classification problem in which each class corresponds to a sender.
To create the spear phishing detection model, one, therefore, needs to look at
the metadata and extract features from each class (sender) within every mail-
box. Then, once a new email is received, features would be extracted from that
email’s metadata and the model would measure how close those features align
to all possible senders to detect discrepancies between the features of the email
and the features of the alleged sender. The existence of these discrepancies is an
indication of a potential spear attack.
So while on the surface the problem may seem like only a 2-class binary classi-
fication problem in which an email is being classified as either ‘spear phishing’ or
‘benign’, in actuality, there are two phases to the classification of spear phishing.
The first phase is a multi-class classification problem where an incoming email
is being classified as one of the existing sender classes, and the second phase
is to determine whether an email is spear phishing or not based on the result
of the first classification problem. Therefore the spear phishing problem is a lot
more complex than the binary classification problem of general phishing attacks,
with the complexity of the multi-class classification problem being variable and
dependent on the number of senders within a mailbox/organisation/etc.
Despite the efficacy of ML as a defence against spear phishing, we have
identified several challenges that limit the practical implementation of these
solutions. Existing implementations produce large feature vectors for each indi-
vidual sender within a mailbox [12]. This limits scalability, as each new email in
a mailbox will produce another large vector, which consumes significant amounts
of memory and is impractical beyond small-scale implementations; that is as the
number of senders increases, so does the number of classes and dimensions of
the feature vectors. Current research also neglects changes within the dataset.
Zero day attacks can cause a performance reduction in classifiers as they can
differ significantly from the initial training data. To the best of our knowledge,
no prior research has attempted to evaluate nor update features in response to
emerging threats within spear phishing.
This motivates us to address the following research question:
How can a spear phishing detection system operate efficiently as
well as effectively over time while keeping feature vector dimensions
low and continuously detecting new attacks?
26 K. Evans et al.
2 Background
In this section, we provide the prior knowledge for K Nearest Neighbours and
Reinforcement Learning.
a new data point belongs to, KNN finds the k most similar training samples to
that data point and then facilitates a ‘voting’ selection procedure to determine
the predicted class of the data. An example is shown in Fig. 1, k = 3 means that
the 3 data points nearest to the incoming data will be counted in the vote. Each
data point ‘votes’ on behalf of its class. Two of the three data points belong
to the ‘spear phishing’ class (in blue), and the rest represents ‘benign’ (in red).
The new data point (in green) will be classified as ‘spear phishing’. The value
of k and the specific algorithm used to calculate the distance between points is
dependent on the type of data that KNN is working with, and therefore varies
between use cases.
k=3 Blue
x2
???
x1
Fig. 1. KNN makes predictions based on a vote between the k nearest data points.
(Color figure online)
actions is called a policy, and it defines how a reinforcement agent acts in any
given situation.
For RAIDER, we propose an RL algorithm based on Fard et al.’s Average of
Rewards (AOR) policy from their RL-based feature selection model [23]. In par-
ticular, they propose an approach to select the best subset of features to use in
a classification model. We adapt their approach to select the best feature collec-
tion to detect email spear phishing. Each feature has an AOR, which is defined
to be the average increase/decrease in accuracy incurred by using that feature.
We choose the features based on exploring the action space and its impact on
the bottom line accuracy by randomly selecting a new subset of features at a
time. When a feature is chosen 2 times within subsets, the increase/decrease in
accuracy for each of these actions will be summed and divided by 2. The formula
for AOR is as follows:
We build on the previous work by Gascon et al. [12] as their research offers
very promising results for ML-based detection of spear phishing emails (these
results appear to outperform many competitive models). We first reproduce
Gascon et al. results by implementing a KNN-based system as reported in their
paper, making use of a subset of their 46 features. Our experimental approach
also utilizes the attack methods Gascon et al. used to test and evaluate their
security ecosystem. By reproducing this state-of-the-art spear phishing detection
mechanism, we are able to gain two insights into the challenges that are faced
by traditional feature engineering in the detection of spear phishing emails: the
RAIDER: Reinforcement-Aided Spear Phishing Detector 29
first insight is related to the feature vector stability and the second insight to
the feature importance.
Insight (1): Feature Vector Stability. We found that the features produced
by manual feature engineering are unstable, sparse and high-dimensional. This
causes high memory consumption and is not a scalable solution. As more classes
are added to the initial classifier (through the addition of new senders’ charac-
teristics to the model), the number of feature vectors will also grow. This can
quickly become impractical and difficult to manage as there will be a signifi-
cant number of high dimensional feature vectors. Figure 2 visualises the features
generated by the state-of-the-art manual feature engineering over time in a 2D
space using the PCA (Principal Component Analysis). The distribution of the
data points illustrates that the feature vectors have different spreads, which are
unstable and sparse over the years.
phishing attacks change over time, and that phishing campaigns are modified
throughout their life span in order to evade detection. Heijden et al. [25] recently
demonstrated how over the period of a phishing campaign, there were intentional
attempts to modify and alter spear phishing emails in order to avoid detection.
It is therefore important to have a method for autonomously evaluating the effi-
cacy of features for detecting spear phishing attacks, and updating these features
in response to changes within the data and the emergence of new threats.
This problem presents the question of how can we determine the most impor-
tant features for detecting spear phishing emails while ensuring the efficiency and
practicality of our solution by reducing the size of our feature vectors as much
as possible?
From: Bob From: Carol From: Bob From: Bob From: Bob
To: Alice To: Mallory To: Alice To: Mallory To: Alice
Fig. 3. The three simulated attack methods borrowed from Gascon et al. [12]. In Blind
Spoofing the attacker crafts a spear phishing email without any external information
about the structure of the emails of the impersonated sender or their email domain. In
Known Domain the attacker has access to emails from other individuals from within the
impersonated sender’s email domain and uses this information to forge spear phishing
attacks with traits unique to this domain. In Known Sender the attacker has access
to previous emails from the impersonated sender and this information to forge spear
phishing attacks with traits unique to the impersonated sender.
We target three attacks scenarios similar to [12]. These are (i) Blind Spoofing,
(ii) Known Domain, and (iii) Known Sender. These attacks represent different
scenarios in which the attacker has different levels of information about the
impersonated sender. (i) The simplest of these attacks, Blind Spoofing, attempts
RAIDER: Reinforcement-Aided Spear Phishing Detector 31
to simulate a scenario in which the attacker has very little information about
the sender they are claiming to be. In this scenario we simply take a legitimate
email and forge the sender address to that of a different sender. This aims to
simulate a scenario in which the attacker doesn’t have any information about the
sender they are trying to impersonate beyond the sender’s email. While blind
spoofing is a common technique deployed in other email-based attacks and not
unique to spear phishing, it is used here because it is a crucial component of a
large amount of spear phishing attacks and has shown to be capable of bypassing
various security protocols and authentication methods [6].
(ii) The second, more sophisticated attack, is a Known domain attack. In this
scenario, the attacker has access to emails that belong to different senders within
the same domain as the sender they are trying to impersonate. Therefore, the
attacker will be able to forge transport features that are common between senders
within the same domain. To simulate this attack, we take legitimate emails and
change the sender address to a different address within the same domain. The rea-
soning behind this is that the emails of two different senders from within the same
domain will have composition and transportation features that are the same but
will still have behavioural features that are unique to the two senders. So by simply
changing the email address to a different sender within the same domain, we can
simulate a scenario where the domain-specific features that could have been used
to successfully detect blind-spoofing attacks are no longer adequate for detecting
this more advanced spear phishing attack. Essentially we limit the avenues that
the classifier can take to identify spear phishing attacks and see how they perform
when there are less clues to work with.
(iii) The final attack method, which is the hardest to detect, is the Known
sender. In this scenario the attacker has access to emails from the sender they
are impersonating, allowing them to incorporate the sender’s features into their
crafted emails and accurately impersonate the sender. This is replicated by tak-
ing an email from the sender to be impersonated, and changing the intended
recipient. This is done under the assumption that with access to prior emails
sent by the impersonated sender, the attacker would be able to forge all previ-
ous domain-specific features as well as the behavioural features that are unique
to the sender with very little difference between the crafted spear phishing email
and a legitimate email from the impersonated sender. As such this kind of attack
is very difficult to detect and is intended to push the classifiers to their limits.
Benign Training
Raw Feature Chosen Feature Feature Feature
Features Subset Action Accuracy Table Subset Data
Dataframe Classifier
Represen-
Emails tation
Crafted Average Feature
Spear of Vector Phish Classifier
Phishing Rewards Prediction
Learning
Fig. 4. Overview of RAIDER. Emails are taken as input. From here a feature subset
is generated based on what features get the highest accuracy when detecting spear
phishing attacks. From here the final feature subset is used for future predictions.
32 K. Evans et al.
1 Raw Feature Extraction. The first phase in RAIDER is the feature subset
generation. In this phase, each field within an email is extracted and considered
a ‘raw’ feature. The raw features are then evaluated for their importance in
detecting spear phishing attacks using our RL-based system. The features most
useful for detecting spear phising attacks are those that can uniquely identify
the behaviour of individual senders. Composition and transportation features
that are unique to different email domains and email clients can also help flag
incoming emails are spear phising attacks. While RAIDER does not directly
interact with the body of the email, and therefore does not directly interact
with email attachments, by using information and metadata from the header it
can learn sender behavioural characteristics and detect spear-phishing attacks
from non-text based features.
When a representation of the email dataset is produced, the features are
organized in a vector form according to the bag-of-words model2 , where each
email is represented as a matrix of integers, each integer denoting the frequency
at which a specific word from within the dataset appears within that email. The
matrix contains integers for every word within the dataset. The bag-of-words
approach is used simply as a way to represent the header data of an email and
determine the existence of certain traits within the header. This results in the
aforementioned array which represents the existence and frequency of certain
traits within an email.
2 RL Agent. Choosing the specific feature to evaluate is decided by our RL
agent. The RL agent chooses an action either by getting the best possible action
from the feature table, or by randomly choosing an action from the action space.
This process of selecting a feature, adding it to the feature subset, determining
the feature effect, and updating the feature table represents a single step within
the RL environment. After a step is performed, the resulting state is returned to
the agent. In RAIDER the state is the current feature subset and correspond-
ing accuracy. After a specified number of steps, the round finishes. After each
round, the feature subset up to that point is discarded and the RL agent starts
2
https://artsandculture.google.com/entity/bag-of-words-model.
RAIDER: Reinforcement-Aided Spear Phishing Detector 33
will be removed. Any features that were not called during the RL phase will also
be removed. This process allows us to generate a set of features to identify
spear phishing attacks without any manual feature engineering. The process
is fully automated by simply determining how each feature affects accuracy.
This method also allows us to generate the features best suited for different
attacks, and can adapt to zero-day attacks. A new feature subset can simply be
generated as new threats emerge without the need for manual feature evaluation
and engineering.
5 Spear Prediction. After the RL process is complete and a feature subset has
been generated, RAIDER can then make predictions on incoming emails. At this
point the algorithm is no longer being trained, and simply makes predictions on
whether an incoming email is spear phishing or not. These emails are represented
according to the feature subset. So for every incoming email a feature vector is
generated that represents each email using only the features specified during the
RL phase. RAIDER can be retrained and new features produced automatically
if there are changes within the incoming data and the initial model can no longer
adequately detect spear phishing emails.
Table 1. Datasets used in the evaluation of RAIDER. During training sender profiles
were built using emails in these datasets, with the exception of the CSIRO dataset
where it is independently used as a measure for feature dimensions analysis. During
testing spear phishing emails were crafted based on information obtained from these
emails.
5 Evaluation
This section describes the experimental setup and performance evaluation for
RAIDER.
Accuracy
(88%)
b
Accuracy
Run (90%) Reward
Predictions Accuracy -
= 90% = 0.2
Testing Emails KNN
Accuracy
(88%)
State
=
c
Reward
Return = 0.2
State
+ Accuracy
(90%)
Reward
Update Average of
Rewards AOR (AOR+0.2)/(y+1)
table (AOR)
No. of
Rewards (y) y y+1
emails and 1201 crafted spear phishing emails are used for making predictions,
therefore giving the testing dataset a 50/50 split between benign and spear
phishing emails. These 1201 benign emails are different from those used during
training and are used to see whether the algorithm can correctly identify benign
emails it hasn’t seen before. Therefore of the total 8719 benign emails, 80% of
these are used for training and the remaining 20% are used for testing. The 1201
spear phishing emails are crafted according to the attack method being used for
the experiment and are used to see whether the algorithm can correctly identify
spear phishing attacks.
Experimental Settings. RAIDER utilises an off-policy algorithm in which the
behaviour policy is the Epsilon-Greedy policy. The behaviour policy is followed
by the agent while the target policy is improved. This allows us to sufficiently
explore all of our large numbers of features. Exploiting previous values too much
would result in our agent neglecting the yet unexplored features.
To simulate a zero-day attack, the RL algorithm is trained on one attack type
and then during the testing phase one of the other previously unseen attack types
is introduced. We compared accuracy between static training in which the feature
subset is never updated, and online learning in which the subset is generated in
response to new attacks.
Evaluation Metrics. To evaluate the results of our experiments the primary
metric we make use of is accuracy. Accuracy in regards to Spear Phishing classi-
fication refers to the proportion of emails that were correctly predicted as either
spear phishing or benign. Accuracy is defined as:
Effectiveness of RAIDER
Table 2 shows that by using automatically generated features RAIDER is able
to detect spear phishing emails with slightly better or comparable accuracy
to the state of the art [12]. Obtaining equal (and in the case of blind spoofing,
superior) results while eliminating the need to manually engineer features results
in considerable time and effort saved. Data preparation such as cleaning data
and engineering features accounts for 80% of the work for data scientists and
76% of data scientists view this as the least enjoyable part of their work [30].
It has also been demonstrated that different classifiers produce different results
with the same set of features [31], so in order to maximise the efficacy of a
classifier, features will have to be engineered specially for that classifier and not
reused. Therefore, being able to automatically generate features saves a lot of
38 K. Evans et al.
Table 2. Comparison of accuracy results for RAIDER and KNN with manually engi-
neered features across a variety of attacks. Percentages represent the number of emails
RAIDER correctly predicts as either spear phishing or benign.
Attack scenario RAIDER (Automatic feature subset) KNN (Manually engineered features)
Blind spoofing 94% 90%
Known domain 83% 83%
Known sender 62% 62%
time and effort when engineering lots of features. Manually engineering features
also limit the transferability of the feature set as features are built according to
the problem being solved and can not be applied to other use cases.
We compared the true positive rate and false positive rate of RAIDER with
Gascon et al.’s [12] KNN implementation when detecting spear phishing emails.
This is depicted in Fig. 6, where the True and False Positive (TP/FP) rates of
both systems are presented alongside one another. It is obvious that RAIDER
performs better in detecting TP. RAIDER also has less FP in the two more
realistic threat models named Blind Spoofing and Known Domain, but performs
worse than the state of art when it comes to the hardest yet rare threat model
named Known Sender.
Figure 7 shows that RAIDER and the manual KNN implementation obtain
comparable precision and recall, with the manually extracted features just beat-
ing the automatically extracted features. Across all three attacks the manually-
extracted features slightly beat the automated feature extraction when it comes
to precision. I.e. of all the emails labeled as spear phishing more of these clas-
sifications were correct when using the manually extracted features than auto-
matic. The recall shows that for all three attacks a higher percentage of the total
spear phishing attacks were detected using the manually extracted features with
the exception of the known sender attack. For the known sender attack, more
than half of the spear phishing emails were correctly identified by RAIDER’s
automatically extracted features, whereas less than 20% were correctly identi-
fied by KNN using the manually-engineered features. While the overall accuracy
is about equal between the two systems, this suggests that RAIDER’s auto-
matically generated features are better identifying known sender spear phishing
attacks whereas the manually engineered features more commonly identify spear
phishing emails as benign.
Figure 8 shows the ROC curve for RAIDER’s automatically generated fea-
tures and the manual KNN implementation against the three different attack
types. The results suggest that there is very little difference in the performance
of the two feature sets with RAIDER performing slightly better in two of the
three attacks.
RAIDER: Reinforcement-Aided Spear Phishing Detector 39
Fig. 6. Comparison of (A) TP rate and (B) FP rate of RAIDER with [12].
The evaluation metrics performed suggest that the two feature subsets have
comparable performance in terms of accurately classifying spear phishing emails.
This shows that we are able to obtain classification accuracy comparable with
state-of-the-art systems while automatically extracting features and eliminating
the need for the manual feature engineering process. This not only saves time,
but allows us to eliminate possible manual errors.
40 K. Evans et al.
Robustness of RAIDER
Figure 9 indicates that for any given attack method (with the exception of known
domain attack), the feature subset that was generated using attacks of the same
type always returns the highest level of accuracy. This trend is most signif-
icant in the case of blind spoofing and known domain attacks. The ‘Updating
features’ column shows an implementation of RAIDER where a new feature sub-
set is generated every time a new attack type is encountered. So if the system
was originally trained using blind spoofing attacks, when known domain attacks
appear RAIDER will retrain using known domain attacks and produce a new
feature subset. The 3 other columns train using only one type of attack and never
update regardless of what attacks they encounter. The updating features column
consistently obtains the highest accuracy whereas the systems that don’t retrain
experience lower accuracy when detecting attacks they have not previously seen.
The blind spoofing subset returned an accuracy rate of 94% when pre-
dicting blind spoofing spear phishing emails, while the known sender subset
returned a rate of 78% and known domain returned 77% -A difference of 16%
and 17% respectively. Testing known sender attacks with the known sender sub-
set returned an accuracy rate of 62%, an increase of 14% over the known domain
subset, and 13% over the blind spoofing subset. We believe this demonstrates
our system’s ability to adapt to different attack methods and previously unseen
threats by generating a new feature subset in response to changes within the
data. In this scenario, the subset from one kind of attack being applied to another
kind of attack represents a prediction system that has been previously trained
statically at one point in time and is now encountering previously unseen data.
Therefore, we believe that by leveraging RAIDER’s ability to automatically gen-
erate feature subsets, the system can be updated to better detect new types of
attacks. Although it is also worth noting that while this method provides higher
accuracy than statically trained models, there is still a decrease in accuracy
between attack types, regardless of whether the feature subset is generated or
not. This is expected as each attack has a varying level of sophistication and
complexity.
RAIDER: Reinforcement-Aided Spear Phishing Detector 41
Fig. 9. Accuracy of the different feature vectors over time. Feature subsets are gener-
ated based on one kind of attack, then are tested with crafted spear phishing emails
from all the different attack types. Graph shows how the accuracy of predictions changes
when new attacks are introduced. Accuracy refers to the percentage of emails that are
correctly identified as either benign or spear phishing. The x axis describes the attack
type used for the testing of RAIDER, with the accuracy on the y axis showing the
accuracy of each variation of RAIDER against the type of attack on the x axis. Each
bar represents a different variation of raider where the independent variable is the
type of training data used. Training data can either be blind spoofing attacks, known
domain, known sender, or updating features. For any of the first 3 the features were
derived using only spear phishing emails using that type of attack. So for blind spoof-
ing, a feature subset was generated using only blind spoofing spear phishing emails.
For updating features, the feature subset is updated every time a new type of attack
occurs. So when known domain attacks are introduced to RAIDER, it then retrains
using known domain attacks and produces a new feature subset. This attempts to sim-
ulate a scenario where RAIDER updates the feature subset in response to new attacks.
Our experiments thus far have simply compared the prediction abilities of
a statically-trained implementation of RAIDER to that of a dynamic one that
updates the feature set to adjust to new attacks. To comprehensively demon-
strate RAIDER’s zero-day capabilities further testing may need to be done to
compare state-of-the-art statically trained systems to RAIDER, to see how accu-
racy is affected by the emergence of new threats. However, the detailed 3 attack
methods we picked are not suitable for testing the ability of Gascon et al’s sys-
tem [12] to detect zero-day attacks, as all of their manually engineered features
are intended to be used across all 3 of these attack types. Therefore, to suf-
ficiently test the state-of-the-art manual feature engineering system, we would
need to craft a variety of different attacks that the current feature set is not
based around which we found to be very challenging to achieve in practice.
42 K. Evans et al.
Fig. 10. Principal Component Analysis (PCA) scatterplot of the two feature engineer-
ing methods. Here PCA projects the data points into a new 2D space while the axes do
not have physical meaning. The new values on x-axis and y-axis (Principal Component
1 and 2) contribute most to the variation through a transformation.
RAIDER: Reinforcement-Aided Spear Phishing Detector 43
The runtime cost was recorded for making predictions with our manual feature
extraction process as well as RAIDER’s automated feature extraction. For both
methods, we recorded the time it takes to pre-process and prepare the datasets,
as well as the time taken to train and perform predictions using KNN. Addi-
tionally, we also recorded the time taken by RAIDER to evaluate and extract
features using the reinforcement learning process. Due to the difficulty of quan-
tifying the time requirements of the manual feature engineering process, it is dif-
ficult to make a meaningful comparison between manual and automated feature
engineering. The automated feature extraction process is more computation-
ally demanding and results in a longer runtime but circumvents the prolonged
real-world time and labour requirements of manual feature engineering. It also
alleviates the risk of human error.
44 K. Evans et al.
Table 3. The runtimes for both the system using manually engineered features and
the system using automated feature extraction. All times are in seconds.
In its current implementation RAIDER analysis and classifies each unique email
independently. This means that if an email being analysed by RAIDER is a part
of a conversation in which previous emails have already been sent between the
sender and the victim, RAIDER would neglect the previous correspondence and
make predictions using only the single email that is currently being analysed.
I.e. it would attempt to classify the email based only on that email’s similarity
to the training data, and would not take into consideration its context within
the ongoing conversation between the sender and the victim.
This could potentially limit the efficacy of RAIDER as the existence of a spear
phishing attack may only be apparent using information sourced from multiple
emails. It is also possible that if an attacker sends multiple emails, some of these
may be flagged as spear phishing while others avoid detection. Obviously, if one
RAIDER: Reinforcement-Aided Spear Phishing Detector 45
email within a chain is a spear phishing email, the legitimacy of the other emails
sent by this sender should be called into question and the sender be considered
untrustworthy.
This could also improve the accuracy at which the more sophisticated known
sender attacks are detected. By taking into consideration entire conversations
rather than just individual emails it may be more difficult for attackers to dis-
guise themselves as a legitimate entity as they would require more information.
Scenarios in which the attacker has access to a single email from the sender
(Known sender attacks) may no longer deal such a critical blow to RAIDER, as
behavioural characteristics that only become apparent across conversations may
be difficult to replicate with limited information, thus increasing the information
required by the attacker to create a deception possible of fooling RAIDER.
Possible further work for RAIDER involves expanding on this functional-
ity and seeing how the efficacy of RAIDER is affected by a more contextually
aware classification algorithm. At the very least a system to flag senders who
have previously sent phishing attacks as untrustworthy could help prevent false
negatives.
7 Related Work
Current literature regarding the identification of spear phishing utilises technical
controls and software solutions such as email authentication [34], black-listing
IP addresses [35], and ML techniques [36]. ML-based approaches have proved
an effective method of detecting spear phishing attacks, but as far as we are
aware there has been no previous work on detecting zero-day attacks with these
systems. The current landscape of ML-based spear phishing detection is sum-
marised based on the information that different implementations make use of to
make predictions.
Stylometric Features. Stylometric or linguistic analysis involves generating
features that represent a sender’s style of writing. The idea here is that, an email
sent by an attacker will have subtle differences in their style of writing than the
sender they are impersonating, and that the presence of these differences sug-
gests a spear phishing attack. Dewan et al. [13] and Stringhini and Thonnard [37]
implement systems that analyse the linguistic style and behavioural patterns of
emails such as the number of paragraphs a sender typically uses or whether they
use a space after punctuation. [14] performed similar research into using stylo-
metric features from the subject and body of an email to detect spear phishing
attacks. Their solution also considers different deployment options such as hav-
ing a remote trusted server that users can query when they receive an incoming
email.
Email Header Metadata. Previous research has also been done into analysing
email header metadata to detect spear phishing attacks. Gascon et al. [12] lever-
aged a variety of email headers as means to identify spear phishing attacks.
They found that composition features such as the encoding of an email and
transportation features such as the timezone path an email takes to reach its
destination provide a means of validating an email when other fields have been
spoofed. Bhadane and Mane [38] made use of email metadata within an organ-
isational setting, looking at scenarios where a spear phishing attack is being
launched from a compromised legitimate account within a network. They made
use of information such as IP addresses and an email’s travel route to detect
spear phishing attacks within a real-world scenario. Samad and Gani [15] used
the metadata of email attachments to detect spear phishing emails.
Misc. In addition to extracting information from the email in order to pre-
dict spear phishing attacks, there also exist studies that make use of external
information sources when evaluating incoming emails. In addition to stylometric
features, Dewan et al. [13] also made use of information sourced from senders’
RAIDER: Reinforcement-Aided Spear Phishing Detector 47
8 Conclusion
In this paper, we have explored the possibility of using reinforcement learning to
detect zero-day spear phishing attacks. We have devised a spear phishing email
detection system (RAIDER) which uses reinforcement learning to automatically
evaluate and select important features, while using KNN to make predictions
on incoming emails. By simulating different spear phishing attack techniques of
varying sophistication, we have demonstrated how our classifier responds when
trained with different datasets. We have shown that our automatically generated
feature sets (based on a reinforcement-learning algorithm) are of equal or better
accuracy than systems, which use manually engineered features. We have also
provided evidence that RAIDER saves time and effort in spear phishing iden-
tification tasks. The process of generating features takes, on average, 24.83 min
and allows for a prediction accuracy of 94% for blind spoofing attacks, which
48 K. Evans et al.
References
1. Benenson, Z., Gassmann, F., Landwirth, R.: Unpacking spear phishing susceptibil-
ity. In: Brenne, M., et al. (eds.) FC 2017. LNCS, vol. 10323, pp. 610–627. Springer,
Cham (2017). https://doi.org/10.1007/978-3-319-70278-0 39
2. Thomas, J.E.: Individual cyber security: empowering employees to resist spear
phishing to prevent identity theft and ransomware attacks. Int. J. Bus. Manag.
12(3), 1–23 (2018)
3. O’Gorman, B., et al.: Internet security threat report volume 24 — February 2019,
April 2019
4. Ho, G., et al.: Detecting and characterizing lateral phishing at scale. In 28th
{USENIX} Security Symposium ({USENIX} Security 19), pp. 1273–1290 (2019)
5. Kim, B., Abuadbba, S., Kim, H.: DeepCapture: image spam detection using deep
learning and data augmentation. In: Liu, J.K., Cui, H. (eds.) ACISP 2020. LNCS,
vol. 12248, pp. 461–475. Springer, Cham (2020). https://doi.org/10.1007/978-3-
030-55304-3 24
6. Shen, K., et al.: Weak links in authentication chains: a large-scale analysis of email
sender spoofing attacks. In 30th {USENIX} Security Symposium ({USENIX} Secu-
rity 21) (2021)
7. Caputo, D.D., Pfleeger, S.L., Freeman, J.D., Johnson, M.E.: Going spear phishing:
exploring embedded training and awareness. IEEE Sec. Privacy 12(1), 28–38 (2013)
8. Canova, G., Volkamer, M., Bergmann, C., Borza, R.: NoPhish: an anti-phishing
education app. In: Mauw, S., Jensen, C.D. (eds.) STM 2014. LNCS, vol. 8743, pp.
188–192. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11851-2 14
9. Ghafir, I., Prenosil, V.: Advanced persistent threat and spear phishing emails. In:
Proceedings of the International Conference Distance Learning, Simulation and
Communication (DLSC), pp. 34–41 (2015)
10. Ramachandran, A., Feamster, N., Vempala, S.: Filtering spam with behavioral
blacklisting. In: Proceedings of the 14th ACM Conference on Computer and Com-
munications Security, pp. 342–351 (2007)
11. Parmar, B.: Protecting against spear-phishing. Comput. Fraud Sec. 2012(1), 8–11
(2012)
12. Gascon, H., Ullrich, S., Stritter, B., Rieck, K.: Reading between the lines: content-
agnostic detection of spear-phishing emails. In: Bailey, M., Holz, T., Stamatogian-
nakis, M., Ioannidis, S. (eds.) RAID 2018. LNCS, vol. 11050, pp. 69–91. Springer,
Cham (2018). https://doi.org/10.1007/978-3-030-00470-5 4
13. Dewan, P., Kashyap, A., Kumaraguru. P.: Analyzing social and stylometric features
to identify spear phishing emails. In 2014 APWG Symposium on Electronic Crime
Research (Ecrime), pp. 1–13. IEEE (2014)
RAIDER: Reinforcement-Aided Spear Phishing Detector 49
14. Duman, S., Kalkan-Cakmakci, K., Egele, M., Robertson, W., Kirda, E.: Email-
profiler: Spearphishing filtering with header and stylometric features of emails. In:
2016 IEEE 40th Annual Computer Software and Applications Conference (COMP-
SAC), vol. 1, pp. 408–416. IEEE (2016)
15. Samad, D., Gani, G.A.: Analyzing and predicting spear-phishing using machine
learning methods. Multidiszciplináris Tudományok 10(4), 262–273 (2020)
16. Thapa, C., et al.: Performance measurement of privacy-friendly phishing detection
enabled by federated learning. arXiv preprint arXiv:2007.13300 (2020)
17. Sutton, R.S., Barto, A.G.: Reinforcement Learning: An Introduction. MIT Press,
London (2018)
18. Machado, M.C., Bellemare, M.G., Talvitie, E., Veness, J., Hausknecht, M., Bowl-
ing, M.: Evaluation protocols and open problems for general agents: revisiting the
arcade learning environment. J. Artif. Intell. Res 61, 523–562 (2018)
19. Chou, P.-W., Maturana, D., Scherer, S.: Improving stochastic policy gradients in
continuous control with deep reinforcement learning using the beta distribution.
In: International Conference on Machine Learning, pp. 834–843, PMLR (2017)
20. Lowrey, K., Kolev, S., Dao, J., Rajeswaran, A., Todorov, E.: Reinforcement learn-
ing for non-prehensile manipulation: transfer from simulation to physical system.
In: 2018 IEEE International Conference on Simulation, Modeling, and Program-
ming for Autonomous Robots (SIMPAR), pp. 35–42. IEEE (2018)
21. Zhu, Y., et al.: Target-driven visual navigation in indoor scenes using deep rein-
forcement learning. In: 2017 IEEE International Conference on Robotics and
Automation (ICRA), pp. 3357–3364. IEEE (2017)
22. Cunningham, P., Delany, S.J.: k-nearest neighbour classifiers-. arXiv preprint
arXiv:2004.04523 (2020)
23. Fard, S.M.H., Hamzeh, A., Hashemi, S.: Using reinforcement learning to find an
optimal set of features. Comput. Math. Appl. 66(10), 1892–1904 (2013)
24. Smadi, S., Aslam, N., Zhang, L.: Detection of online phishing email using dynamic
evolving neural network based on reinforcement learning. Decis. Support Syst. 107,
88–102 (2018)
25. Van Der Heijden, A., Allodi, L.: Cognitive triaging of phishing attacks. In: 28th
{USENIX} Security Symposium ({USENIX} Security 2019), pp. 1309–1326 (2019)
26. Ocampoh, D.: diegoocampoh/machinelearningphishing, November 2017
27. Batra, S., Chowdhury, M.: Bread secured. And the Quality is Good (2018)
28. The Apache Software Foundation. Index of /old/publiccorpus, June 2004
29. Ganesh, B., Balakrishnan, H.: Barathiganesh-hb/iwspa-ap, April 2018
30. Foebes: Cleaning Big Data: Most time-Consuming, Least Enjoyable Data Science
Task, Survey Says. Gil Press, March 2016
31. Heaton, J.: An empirical analysis of feature engineering for predictive modeling.
In: SoutheastCon 2016, pp. 1–6. IEEE (2016)
32. Hu, H., Wang, G.: End-to-end measurements of email spoofing attacks. In: 27th
{USENIX} Security Symposium ({USENIX} Security 2018), pp. 1095–1112 (2018)
33. Gori Mohamed, J., Visumathi, J.: WITHDRAWN: predictive model of machine
learning against phishing attacks and effective defense mechanisms. In: Materials
Today: Proceedings (2020)
34. Xiujuan, W., Chenxi, Z., Kangfeng, Z., Haoyang, T., Yuanrui, T.: Detecting spear-
phishing emails based on authentication. In 2019 IEEE 4th International Con-
ference on Computer and Communication Systems (ICCCS), pp. 450–456, IEEE
(2019)
35. Ecclesie Agazzi, A.: Phishing and spear phishing: examples in cyber espionage and
techniques to protect against them. arXiv preprint arXiv:2006.00577 (2020)
50 K. Evans et al.
36. Han, Y., Shen, Y.: Accurate spear phishing campaign attribution and early detec-
tion. In: Proceedings of the 31st Annual ACM Symposium on Applied Computing,
pp. 2079–2086 (2016)
37. Stringhini, G., Thonnard, O.: That ain’t you: blocking Spearphishing through
behavioral modelling. In: Almgren, M., Gulisano, V., Maggi, F. (eds.) DIMVA 2015.
LNCS, vol. 9148, pp. 78–97. Springer, Cham (2015). https://doi.org/10.1007/978-
3-319-20550-2 5
38. Bhadane, A., Mane, S.B.: Detecting lateral spear phishing attacks in organisations.
IET Inf. Sec. 13(2), 133–140 (2018)
39. Das, A., Baki, S., El Aassal, A., Verma, R., Dunbar, A.: SoK: a comprehensive
reexamination of phishing research from the security perspective. IEEE Commun.
Surv. Tutor. 22(1), 671–708 (2019)
40. Ho, G., Sharma, A., Javed, M., Paxson, V., Wagner, V.: Detecting credential
spearphishing in enterprise settings. In: 26th {USENIX} Security Symposium
({USENIX} Security 2017), pp. 469–485 (2017)
41. Gadat, S., Younes, L.: A stochastic algorithm for feature selection in pattern recog-
nition. J. Mach. Learn. Res. 8, 509–547 (2007)
42. Dai, W., Guo, D.: Beta distribution-based cross-entropy for feature selection.
Entropy 21(8), 769 (2019)
43. Yamada, Y., Lindenbaum, O., Negahban, S., Kluger, Y.: Feature selection using
stochastic gates. In: International Conference on Machine Learning, pp. 10648–
10659. PMLR (2020)
Network Intrusion Detection Adversarial
Attacks for LEO Constellation Networks
Based on Deep Learning
Yunhao Li1 , Weichuan Mo1 , Cong Li1 , Haiyang Wang1 , Jianwei He2 ,
Shanshan Hao2 , and Hongyang Yan1(B)
1
Guangzhou University, Guangzhou, Guangdong, People’s Republic of China
[email protected]
2
CASIC Space Engineering Development Co., Ltd., Hubei 430416,
People’s Republic of China
1 Introduction
Satellites are receiving increasing attention as a new type of broadband Internet
access. The biggest difference between LEO communication satellites compared
to conventional communication satellites is their altitude from the ground and
the complexity of their systems. Indeed, satellite communication has been used
for decades in television, telephone, radio, internet and military applications [2].
Support by the Key Research and Development Program of Guangzhou (No.
202103050003).
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 51–65, 2022.
https://doi.org/10.1007/978-3-031-23020-2_3
52 Y. Li et al.
Train
Train
Fig. 1. Architecture
2 Related Work
LEO satellite networks are able to break geographical limitations and achieve
global wireless coverage [17]. Therefore, it is of great practical importance to
study LEO satellites. In order to ensure the work of LEO satellites in specific
communication, its reliability and security are particularly prominent. If there
are design flaws in the software and hardware design of a satellite and the faults
are not discovered until the satellite is sent into actual operation in space, then
all previous efforts may be wasted and the satellite may become space junk [5] or
even interfere with the work of other satellites and disrupt space [16]. Simulation
of LEO satellite satellites allows problems in the design process of LEO satellites
to be exposed early and corrected in time, thus achieving maximum cost savings;
it also helps one to evaluate whether the space planning is feasible, whether the
overall objectives are met, and whether the constraints are satisfied, etc. The
satellite simulation constructed by Roberto et al. [14] platform models satellite
networks for broadband Internet service access, which generates different types
of traffic, interferes with them, classifies the traffic, and assigns different levels
of priority to them.
The training data used in the LEO satellite traffic classification model and the
adversarial sample-based traffic classification defense model constructed in this
paper all come from our LEO satellite simulation platform. The traffic capture
module is deployed in each simulated satellite of the platform to listen to and
capture the traffic packets sent by satellite and collected by the simulation sys-
tem.
Distributed Denial of Service (DDoS) [22] can expose many computers to attack
at the same time, rendering the target hosts under attack unable to use properly
54 Y. Li et al.
[10]. This attack can spoof the source IP address, making it difficult to detect
when such an attack is generated, and it is also very difficult to detect the attack,
making it a very difficult attack to prevent [22].
SSH and FTP Brute Force Attacks (BFA) [19] are attacks in which an
attacker attempts to obtain user credentials via the SSH and FTP protocol.
The attack attempts to exhaust different combinations of usernames and pass-
words until they succeed by finding valid credentials or terminating when all
expected possibilities have been tried [4]. Brute-force attacks can be easily auto-
mated, and an attacker can launch an aggressive attack on the target host with
a small amount of attack information and intervention.
Port Scan refers to the hacker’s attempt to invade a computer by sending a
series of port scanning information, so as to understand and obtain the network
service types provided by the computer, thus obtaining the key information of
the attacked host [18].
Web Directory Scan uses word lists to perform brute-force attacks on direc-
tories and files on web and application servers [9]. If the backend of a website is
discovered through this method, security tests such as storming libraries, SQL
injection, and even gaining access to the website can be attempted.
Traffic classification is the first step to help identify the different applications
and protocols present in the network. Segmentation operations such as mon-
itoring and optimization can be performed on the identified traffic to improve
network performance. Gao et al. [6] introduce an intrusion detection system using
machine learning methods and define a set of attributes in their proposed method
and use different thresholds to obtain better classification accuracy. Shafiq et al.
[15] used different types of packet sizes to extract information and employed var-
ious machine learning based cross-identification methods to test and identify the
packets that can be used to obtain traffic identification and classification stages
through various tests to compare different datasets to obtain better performance
of the system.
FGSM. FGSM was proposed by Goodfellow et al. [7] and is one of the basic
methods for generating adversarial samples. It is based on the principle of gra-
dient descent by adding increments in the direction of the gradient so that the
deep learning model misclassifies. The perturbation is calculated as Eq. 1
where ε is the constraint limiting the perturbation to be too large, ||P || <
varepsilon (different parametrizations generate perturbations with different
effects). I(θ, x, y) is the loss function used in training the neural network, θ
is the parameter of the classification model, x is the input to the model, and
y is the correct label corresponding to the model input. sign(I(θ, x, y)) is the
direction of the gradient of the loss function at the point x, and ε can be seen
as the offset of the generated perturbation in that direction.
I-FGSM. The FGSM contains only one gradient update, and sometimes one
update is not enough to enable the attack to succeed, so Kurakin et al. [11]
propose an iterative FGSM based on the FGSM, namely the I-FGSM, whose
perturbation is calculated as Eq. 2
X adv
0 = X,
(2)
N +1 = ClipX, X N − α sign ∇X J X N , yLL
X adv adv adv
So with a constant noise amplitude e, you can set the α and N parameters
directly with α = Ne . The Clip in the formula means that the overflowing values
are replaced with boundary values. This is because in iterative updates, as the
number of iterations increases, some of the pixel values may overflow, and it is
then necessary to replace these values with zeros or ones. YLL is the class with
the lowest classification probability in the classification model for the original
input image, which can be calculated by the formula 3
56 Y. Li et al.
Apply this formula multiple times in smaller steps and crop the pixel values
of the intermediate results after each step to ensure they lie in the value domain
of the original image.
MI-FGSM. FGSM is a linear assumption that applies the sign of the gradi-
ent to a practical example by determining the decision boundary near the data
point, thus producing an adversarial sample. However, when large distortions are
produced, the linearity assumption of the method does not hold and therefore
the adversarial sample produced by FGSM does not fit the model well, thus lim-
iting the power of the FGSM attack. Conversely, during each iteration, I-FGSM
causes the adversarial samples to move greedily along the gradient direction.
Therefore, the adversarial samples can easily fall into local optima and produce
overfitting, which is unlikely to transfer between models. In contrast, Yinpeng
Dong [3] et al. proposed a method based on momentum iteration to enhance
adversarial attacks. The momentum method is a technique to speed up the
gradient descent algorithm by accumulating velocity vectors in the direction of
the gradient of the loss function during the iterative process, which eliminates
the defect of local maxima by combining the momentum term with the attack
iteration process to make the update direction stable. Thereby producing more
transferable adversarial samples. Its perturbation is calculated as Eq. 4
∇x J (x∗t , y)
g t+1 = μ · g t + (4)
∇x J (x∗t , y)1
gt collects the gradients of the previous t iterations using the decay factor
μ defined in Eq. 4. If μ = 0, the MI-FGSM degenerates to I-FGSM. At each
iteration, the current gradient ∇x J (x∗t , y) is normalized by its own L1 distance.
In the process of PGD, first find the adversarial sample by calculating the
loss gradient of the original image, subtracting the adversarial sample from the
original image to obtain the perturbation value and restrict the perturbation to
the sphere, and then combine the original image with the perturbation value to
form the final adversarial sample.
Network Intrusion Detection Adversarial Attacks 57
3 Methods
3.1 LEO Traffic Simulation System
Network
Monitor
Routing schedule
Topology
Link Constellation
Visualization
Node
This paper we designs a real-time, complete simulation framework for LEO satel-
lite constellation network, which is simple to operate and fully functional com-
pared to other simulation platforms. Shown in Fig. 2. The system generates and
crawls network traffic, classifies it in real-time, and adds perturbations to nor-
mal traffic to generate adversarial samples for spoofing attacks, in addition to
designing a detection system for adversarial sample-based attacks.
The overall algorithm flow of this paper is shown in Algorithm 1, we will crawl
the satellite network traffic and convert the traffic into images, attack the traffic
images to determine whether the attacked category matches the original cate-
gory, if it matches the original category, the attack is successful.
Based on the deep learning and the perturbation generation algorithm, this
paper designs a spoofed traffic countermeasure sample generation algorithm.
The algorithm first requires traffic crawling and format conversion of the LEO
satellite traffic, and numerical normalization of each feature in the traffic data
to facilitate subsequent training of the traffic classification model. Traffic visu-
alization is then performed, treating the stream of traffic as a grey-scale value
of the image.
Next, a convolutional neural network is constructed and trained so that it
can classify the visualized flow data and test the correctness of the model. A
58 Y. Li et al.
3.3 Datasets
The dataset used in this paper is a self-built dataset, the traffic characteristics of
LEO satellites may not be the same as normal traffic, we use the LEO satellite
simulation platform to simulate LEO satellite traffic, capture traffic from it and
manually classify the traffic into one of the six application categories.
Flow Image Pre-processing. Based on the traffic grab packets within the
LEO satellite system, the grab packet data was extracted and serialised into
images by the method proposed by Wang et al. [20] for converting traffic packets
into images. In order to make the deep learning model have a larger perceptual
field and facilitate model classification, an image size of 224 × 224 is used in
this paper. The final construction of the LEO satellite traffic dataset has 22,363
normal traffic, 32,239 DDos traffic, 17,471 FTP bursts, 11,381 port scans, 24,882
SSH bursts, and 18,183 Web directory scans. The traffic images are shown in
the following Table 1. In the experiments of this paper, 80% were used as the
training set and 20% as the validation set.
Network Intrusion Detection Adversarial Attacks 59
The traffic image classification model used in this paper is the ResNet-18 [8]
model, which consists of an input layer, a convolutional layer, a pooling layer,
and a fully connected layer. In this paper, we improve the ResNet-18 model
by designing the input layer as a 224 × 224 matrix, which corresponds to the
visualized traffic, and the output layer as six neurons, which corresponds to the
classification results.
In the process of designing the model input layer, we fully consider the LEO
satellite traffic characteristics. When converting LEO satellite traffic into pic-
tures, considering the continuity and continuity of traffic characteristics, a model
input of 224 × 224 is used. The model can sense 50176 bits of traffic information
in one picture, which helps the model to fully learn the attack traffic character-
istics of LEO satellites and improve the accuracy of the model.
We eventually trained a traffic picture classification model with an accu-
racy of 99.838%, which basically meets the requirements of LEO satellite traffic
classification.
The defender identifies the adversarial samples of traffic generated in LEO satel-
lites based on the adversarial sample defense model, determines whether the
traffic picture samples are adversarial or not, and achieves efficient detection of
the adversarial samples.
In training the adversarial sample defense model, the traffic adversarial sam-
ple dataset is generated by the adversarial sample generation algorithm described
in this paper, which is combined with the original traffic dataset to form the
adversarial sample defense dataset. The dataset contains two categories, adver-
sarial samples, and non-adversarial samples. The defense detection model has
60 Y. Li et al.
the same structure as the traffic classification model so that the defense model
can obtain a better fit with the traffic classification model.
Based on the above traffic picture and the traffic picture adversarial sample,
it is possible to construct the LEO satellite traffic classification defence dataset.
The dataset is divided into two categories, one for normal LEO satellite traffic
and one for LEO satellite traffic adversarial samples. The traffic defence dataset
is shown in Table 2.
The adversarial sample defence model used in this paper is the ResNet-18
model, which has the same structure as the traffic picture classification model,
so as to obtain a better similarity with the picture classification model, and also
to facilitate training and validation. In the end, our trained adversarial sample
defence model achieves an accuracy of 99%. Almost all traffic adversarial samples
in the LEO satellite system can be identified by the defence model, achieving
efficient detection of adversarial samples.
4 Experiment
The attack and defence scenarios built in this paper are divided into four parts:
traffic sending, attack perturbation, traffic identification and counter sample
defence. The traffic sending side sends normal traffic, SSH burst traffic, FTP
burst traffic, WEB directory scan traffic, port scan traffic and DDos traffic. On
the attack scrambling side, the PGD [13], FGSM [7], I-FGSM [11], MI-FGSM [3]
methods are used to add scrambling to the traffic on the traffic sending side. On
the traffic identification side, a deep learning based classification model is used
to classify the traffic, and different perturbations are added to the traffic sender
so that the traffic is misclassified for spoofing purposes. On the counter-sample
defence side, it determines whether a perturbation has been added to the traffic
picture.
Network Intrusion Detection Adversarial Attacks 61
Table 3. Distribution of single class deception rate and classification for different
methods
Table 4 shows the visual difference between the spoofed traffic after adding
perturbations and the original real traffic, and the most obvious perturbations
and the highest success rate of perturbation attacks using I-FGSM generated
samples. Table 4 shows the visual difference between the spoofed traffic after
adding perturbations and the original real traffic, and the most obvious per-
turbations and the highest success rate of perturbation attacks using I-FGSM
generated samples.
Based on the above traffic picture and the traffic picture adversarial sample, it
is possible to construct the LEO satellite traffic classification defence dataset.
The dataset is divided into two categories, one for normal LEO satellite traffic
and one for LEO satellite traffic adversarial samples. The traffic defence dataset
is shown in Table 2.
The adversarial sample defence model used in this paper is the ResNet-18
model, which has the same structure as the traffic picture classification model,
so as to obtain a better similarity with the picture classification model, and also
to facilitate training and validation. In the end, our trained adversarial sample
defence model achieves an accuracy of 99%. Almost all traffic adversarial samples
in the LEO satellite system can be identified by the defence model, achieving
efficient detection of adversarial samples.
where Acci is the classification accuracy of the ith class of samples, GAcc is the
overall classification accuracy of the test samples, T Pi is the number of samples
of actual type i that are predicted normally by the classification model, F Ni is
Network Intrusion Detection Adversarial Attacks 63
the number of samples of actual type i that are misclassified as other classes by
the classification model, and m = 6 indicates that there are six classes in total.
The overall deception rate is shown in Table 4.
The accuracy of the attacker’s classification of the real network using the
traffic classification model before the spoofed traffic was generated was 99.83%.
The corresponding spoofing rates for the four different perturbation generation
methods are shown in Table 4. It can be seen that after the implementation
of the perturbation, the probability of the type of traffic being misclassified is
greatly increased regardless of which perturbation generation method is used,
taking the FGSM method as an example, the attacker uses the ResNet traffic
picture classification model to classify the traffic The error rate reached 82%
when using the FGSM method.
According to the formula 7, the statistical single-class spoofing rate corre-
sponding to the four perturbation generation methods and the post-spoofing
classification distribution are shown in Table 3.
In Table 3, the distribution of raw traffic being classified as different traffic is
depicted in the classification distribution. For normal traffic, for example, when
using the PGD attack method, 0.008% is misclassified as DDoS class, 5.652% is
misclassified as FTP-Burst class, 42.382% is misclassified as SSH-Burst, 49.572%
were misclassified as PortScan, 0.657% were misclassified as WebScan, and for
normal traffic, they were mainly misclassified as PortScan.
Using the FGSM method as an example, the highest spoofing rate among
the six traffic applications was 92.344% for normal traffic and the lowest rate
was 62.192% for PortScan.
The following conclusions can be drawn from the above experimental results.
– For the ResNet convolutional neural network model, the different perturba-
tion generation methods chosen all have good spoofing effects, with I-FGSM
having the best spoofing effect and PGD having the worst spoofing effect
– for the overall deception rate of the dataset, the FGSM series methods show
high adversarial properties, mainly because the FGSM series are generated for
non-target specific adversarial samples, while the PGD methods are slightly
worse in terms of overall deception rate compared to the other three methods
– Comparing the different perturbation generation methods, the sample pertur-
bations generated using the FGSM series are significantly more than those
generated by PGD, illustrating the subtlety of the perturbations generated
by PGD
– In terms of the single-class spoofing rate for traffic, although the spoofing
effects of the four methods differ, the four methods have roughly the same
tendency to misclassify traffic types, for example, traffic has a higher proba-
bility of being misclassified to PortScan, followed by a higher probability of
not misclassifying to FTP-Burst, all of which reflect some similarity in the
timing of traffic types.
64 Y. Li et al.
5 Conclusion
In this work, we study a real-time LEO satellite traffic classification system and
then proposes a spoofing traffic generation method based on four adversarial
attack methods. A unified defence framework for adversarial attack samples is
also studied, enabling efficient detection of adversarial attack samples through
deep learning models.
These techniques are applied to the field of LEO satellite communication,
thus guaranteeing the security and robustness of LEO satellite data communi-
cation and avoiding malicious traffic attacks.
Experiments have verified the feasibility of the proposed approach for LEO
satellite platforms, and in future work, this paper will address the following areas
for further research.
References
1. RAKS: robust authentication and key agreement scheme for satellite infrastruc-
ture | SpringerLink. https://link.springer.com/article/10.1007/s11235-022-00923-
0#citeas
2. Darwish, T., Kurt, G.K., Yanikomeroglu, H., Lamontagne, G., Bellemare, M.:
Location management in internet protocol-based future Leo satellite networks:
a review. IEEE Open J. Commun. Soc. 3, 1035–1062 (2022). https://doi.org/10.
1109/OJCOMS.2022.3185097
3. Dong, Y., et al.: Boosting adversarial attacks with momentum (2017). https://doi.
org/10.48550/ARXIV.1710.06081, https://arxiv.org/abs/1710.06081
4. Fahrnberger, G.: Realtime risk monitoring of SSH brute force attacks. In: Phillip-
son, F., Eichler, G., Erfurth, C., Fahrnberger, G. (eds.) I4CS 2022. CCIS, vol. 1585,
pp. 75–95. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-06668-9_8
5. Fung, T.Y., Roy, S.S., Shi, Q., DeLaurentis, D.A.: Space junk aggregation, neutral-
ization, in-situ transformation, and orbital recycling. In: 2022 17th Annual System
of Systems Engineering Conference (SOSE), pp. 239–245 (2022). https://doi.org/
10.1109/SOSE55472.2022.9812659
6. Gao, J., Senchun, C., Zhang, B., Xia, Y.: Research on network intrusion detection
based on incremental extreme learning machine and adaptive principal component
analysis. Energies (2019)
7. Goodfellow, I.J., Shlens, J., Szegedy, C.: Explaining and harnessing adversarial
examples (2014). https://doi.org/10.48550/ARXIV.1412.6572, https://arxiv.org/
abs/1412.6572
Network Intrusion Detection Adversarial Attacks 65
8. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. In:
Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition,
pp. 770–778 (2016)
9. Huizinga, T.: Using machine learning in network traffic analysis for penetration
testing auditability (2019)
10. Mohmand, M.I., et al.: A machine learning-based classification and prediction tech-
nique for DDoS attacks. IEEE Access 10, 21443–21454 (2022). https://doi.org/10.
1109/ACCESS.2022.3152577
11. Kurakin, A., Goodfellow, I., Bengio, S.: Adversarial examples in the physical world
(2016). https://doi.org/10.48550/ARXIV.1607.02533, https://arxiv.org/abs/1607.
02533
12. Lopez-Martin, M., Carro, B., Sánchez-Esguevillas, A., Lloret, J.: Network traffic
classifier with convolutional and recurrent neural networks for internet of things.
IEEE Access (2017)
13. Madry, A., Makelov, A., Schmidt, L., Tsipras, D., Vladu, A.: Towards deep learning
models resistant to adversarial attacks (2017). https://doi.org/10.48550/ARXIV.
1706.06083, https://arxiv.org/abs/1706.06083
14. Puddu, R., Popescu, V., Murroni, M.: An open source satellite network simula-
tor for quality based multimedia broadband traffic management. In: 2022 IEEE
International Symposium on Broadband Multimedia Systems and Broadcasting
(BMSB), pp. 01–07 (2022). https://doi.org/10.1109/BMSB55706.2022.9828566
15. Shafiq, M., Yu, X.: Effective packet number for 5g im WeChat application at early
stage traffic classification. Mob. Inf. Syst. (2017)
16. Singh, S., Purbey, S.: Space debris - it’s effect on the earth. Int. J. Recent Adv.
Multidiscipl. Top. 3(6), 13–16 (2022). https://www.journals.resaim.com/ijramt/
article/view/2135
17. Tang, Q., Fei, Z., Li, B., Han, Z.: Computation offloading in Leo satellite networks
with hybrid cloud and edge computing. IEEE Internet Things J. 8(11), 9164–9176
(2021). https://doi.org/10.1109/JIOT.2021.3056569
18. Tundis, A., Mazurczyk, W., Mühlhäuser, M.: A review of network vulnerabilities
scanning tools: types, capabilities and functioning. In: Proceedings of the 13th
International Conference on Availability, Reliability and Security. ARES 2018.
Association for Computing Machinery, New York (2018). https://doi.org/10.1145/
3230833.3233287
19. Vykopal, J., Drašar, M., Winter, P.: Flow-based brute-force attack detection.
Department of Mathematics & Computer Science (2013)
20. Wang, W., Zhu, M., Zeng, X., Ye, X., Sheng, Y.: Malware traffic classification
using convolutional neural network for representation learning. In: International
Conference on Information Networking (2017)
21. Wang, X., Liu, Y., Su, W.: Real-time classification method of network traffic based
on parallelized CNN. In: 2019 IEEE International Conference on Power, Intelligent
Computing and Systems (ICPICS) (2019)
22. Zargar, S.T., Joshi, J., Tipper, D.: A survey of defense mechanisms against dis-
tributed denial of service (DDoa) flooding attacks. IEEE Commun. Surv. Tutor.
15(4), 2046–2069 (2013). https://doi.org/10.1109/SURV.2013.031413.00127
A Proof of Concept Implementation
of Explainable Artificial Intelligence
(XAI) in Digital Forensics
1 Introduction
The field of IT forensics faces significant challenges related to increases in data
sources and volume, data access, data sophistication, data standardization, the
implementation of standardized processes and associated practitioner certifica-
tions, and the legitimacy of digital evidence production and processes [3,5,10,14].
Increases in the volume and sources of data have severely impacted the time
required for IT forensic service delivery [20,21]. In response to these challenges,
IT Forensic software developers have integrated proprietary Artificial Intelli-
gence (AI) functions into their products to assist investigators in identifying
evidentiary data of interest faster. These AI models, while useful, do not provide
explanations for their predictions [12]. In response to trust issues posed by ‘black-
box’ AI implementations, Explainable Artificial Intelligence (XAI) research has
become an area of significant academic interest. The creation of reasoned and
justifiable explanations for predictions made on IT forensic data could be trans-
formative for the industry and the wider justice system.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 66–85, 2022.
https://doi.org/10.1007/978-3-031-23020-2_4
An Implementation of XAI in Digital Forensics 67
the case through an AI model (or models) working with XAI technologies. After
enriching this data with secondary sources (such as an organization’s intelligence
holdings), the XAI should then output a set of reasoned assertions based on tem-
poral and geographic data points observed (e.g. Suspect A was at Location B on
dates C, D, E, and undertook browsing activity F, G, and sent messages H, I,
etc.). Assertions and their associated explanations would be based on contextual
elements of the case (e.g. date of offence, known parties and locations of interest
and their relationships, etc.), which would assist in highlighting the most signifi-
cant attributes that could significantly impact an investigation. These examples
raise the following important questions:
How could XAI be integrated into a DF workflow? What would be the impact
of such integration in the context of DF investigations?
This paper first sets aspirations for the integration of XAI technology in address-
ing challenges extant in the IT Forensics industry. In particular, we provide a
proof of concept for the implementation of XAI in IT forensics. We also demon-
strate how Local Interpretable Model-Agnostic Explanations (LIME), a widely
used XAI technology, can enhance the performance and investigative capabili-
ties of AI’s implemented to assist DF forensic practitioners. The tests developed
use manufactured IT forensic data to evaluate how XAI tools can be applied to
image, video and file metadata classification tasks in the context of IT forensic
investigations. The results of these tests are then used as the basis for a discussion
of XAI and its impacts on the IT forensic industry. The manufactured IT foren-
sics data, which can be of independent interest for educational purposes, and
AI models trained as part of this project use open-source and non-proprietary
technologies that could one day be used as evidence in a court following further
developments in legislation and policy.1
More recently, [24] provided a series of recommendations for overcoming the trust
threshold for AI in DF, specifically by insuring that AI tools are contextualized
to the scenario; that intrinsically explainable AI tools (e.g. Decision Trees) are
used were possible, especially for well-structured forensic data; that interpretable
models be used as necessary for unstructured data tasks (e.g. image/video/audio
examination), but be selected based on their capacity to be explained; and that
AI tools in DF must be modular in nature and data type specific.
perform certain actions for a short period of time, such as visiting several web-
sites, including a suspicious website under the creators’ control, searching some
keywords, downloading text files and editing the files etc. Four main Windows
Registry files were exported and copied to the virtual disk for each image. Stu-
dents were challenged to recover key forensic information about the system and
user activity within the image through examination of the files and filesystem,
metadata and the Windows Registry hives for the image assigned to them. The
analysis of the Windows Registry, however, is outside the scope of this research.
In addition to the above educational cases and the use in this research, we
see the creation of manufactured IT forensic data of great potential as it can
be considered as a way to train AI without requiring ethics or going through
the steps of getting real data. We also note that these sample images could
be greatly expanded for further creation of data. For example, the number of
images can increase easily, the variety of implanted artifacts can change, and
similar techniques can be adapted to expand this to Mobile and/or Memory
Forensics.
that are used to explain individual predictions of black box machine learning
models’ [16]. LIME takes a model and specific predictions and provides expla-
nations for those predictions. It does not directly alter the prediction or model’s
performance. Specifically, LIME was designed ‘to identify an interpretable model
over the interpretable representation that is locally faithful to the classifier’ [22,
p. 3]. Local faithfulness means features impacting individual predictions can be
determined based on predictions that fall in their local area within the predic-
tion space, but not across all predictions. LIME generates perturbations of a
local instance in the vicinity of a prediction, which is then classified and used
as training data for an interpretable model. Each data point is weighted based
on its distance from the original predictor. For images, LIME can be used to
highlight the super-pixels (small regions of pixels within an image that share
common characteristics) that are most influential in a model making a specific
prediction [9, p. 1][22, p. 3]. For classifying text, LIME can identify the signifi-
cance of individual words when assigning a predictive label but does not account
for feature interactions (e.g. combinations of words) [6]. LIME’s model-agnostic
nature makes it an excellent solution for XAI implementations in IT forensics.
Evidentiary forensic artefacts indicating specific user behaviours can come from
file content and metadata (both file system created/modified/access dates and
e.g. Embedded Exchangeable Image File Format (EXIF) data). XAI solutions
for IT forensics must therefore have the flexibility to deal with multiple file for-
mats, aggregate overall data, and make meaningful and explained predictions.
Another advantage of LIME was its implementation in Python and integration
with TensorFlow and Keras, allowing for easier data analysis and visualization
when paired with powerful Python modules like matplotlib, pandas, and numpy.
3 Forensic Processing
Each VHD file contained target files that needed to be successfully identified
and analyzed by students. These target images had EXIF data that students
also needed to recover and record to receive full marks. For image files within
the Virtual Hard Disk, the target file of interest was denoted with a white square
and 16-character hexadecimal code. Similarly, the target video files contained a
16-character hexadecimal code appearing during the video for a few seconds.
The VHD files were initially processed using the Autopsy Command Line
Interface [4]. The created Autopsy cases were used for result validation and con-
firmation of data structures. The Project VIC media export dataset was created
using GetData Forensic Explorer, which has inbuilt functionality for exporting
hashed files in the Project VIC 1.3 and 2.0 formats [11]. All VHD files were added
72 S. W. Hall et al.
to the same Forensic Explorer Case with the same import configuration, which
expanded compound files (e.g. archives, thumbnails caches, open office XML
files, etc.), conducted file signature analysis, hashed files using MD5 and SHA-1
algorithms and cached image and video thumbnails for more efficient review.
Once pre-processing was complete, all hashed files available to be exported by
the software were used to create the VIC 2.0 dataset.
Images. Images were first divided into “target” and “ignorable” images. The
target images were images with the 16-digit hexadecimal flag visible in the files’
content. The ignorable images were all other images without said tag. Due to
An Implementation of XAI in Digital Forensics 73
the nature of the source dataset, there were only 23 target image files across
the 23 VHD files from which the media files were exported. The first attempts
at training a model with such a small target dataset were unsuccessful, with all
testing files classified as ignorable. To assist in strengthening the significance of
the tag feature within image files, an additional 2,559 target image files were
produced. Python Image and Random libraries were used to generate a tag and
add it to randomly sampled images from the Wiki-Art Visual Art Encyclopedia
dataset [15]. Some of these images were also processed as additional test data
ran against the developed model. All image files were then resized to 256 × 256
pixels to enable their ingest as training data into a TensorFlow Keras Sequential
model.
Videos. It was decided that video files would also be processed through the
same predictive model as the image files. To facilitate this, each video from the
VIC 2.0 dataset was processed using the CV2 python library to sample every 25
frames. These frames were then resized and ran against the predictive model. A
video was deemed to be a target or ignorable based on the modal prediction for
all its sampled frames. As with images, videos were deemed to be target videos
if the hexadecimal tag was visible in any of their frames’ content.
File System Metadata. Different files’ file system and embedded metadata
can form the basis for compelling digital forensic evidence. Often specific forensic
artefacts are created, updated or modified without the user’s knowledge when
specific activities take place. Being able to correctly interpret the significance
and meaning of specific features is a key aspect of IT forensic analysis. The
Project VIC metadata was processed into usable training and testing datasets
for this research. Features with homogeneous values were removed to streamline
processing. Half of the exported Project VIC dataset was randomly assigned for
use as training data. To inflate target training data scores beyond files identified
by the hexadecimal tag extant in the original dataset, a set of arbitrary rules was
devised to approximate a training set of roughly half target and half ignorable
data. The following target features were selected:
– The files had a Created Date (NTFS Created Date/time - ’Created’ feature
in the VIC 2.0 dataset) between 00:00:00 hrs on the 4th of September 2021
and 12:00:00 hrs on the 4th of September 2021, and;
– The files were from images 4, 5, 6, 15, 16, 17 or 18, and;
– The files did not contain ’OneDrive’ in any field (only present in FilePath
and FileName parameters)
All other files in the training dataset were classified as ignorable.
and converted into a numpy.ndarray. This array is then provided to the model,
which in turn returns a numpy array of the shape (1,2)(e.g. [[0.4,0.6]]) contain-
ing ignorable and target scores in the first and second positions, respectively.
The label for the prediction is then determined by using the np.argmax func-
tion to return the index of the higher of the two predicted scores, which is the
same index as the class label for that score in a python list. The TensorFlow
softmax method was then used to generate the softmax activations for each cat-
egory (thus expressing an image’s scores as an np.array [[i,t]] where 0 ≤ i, t ≤ 1
and i + t = 1.). This ensured that the dominant label and the strength of the
prediction could be easily recognized.
For the classification of file system metadata, a TensorFlow Keras Basic Text
Multi-class classification model was trained. By handling metadata as a string
processed through a text classification model, unique features of the ’FilePath’
Feature (containing the NTFS File Path information) were able to be individ-
ually assessed to measure their impact on the prediction. Similar to the image
classification model, the text classification model returned a numpy.ndarray of
shape (1,2) containing ignorable and target probabilities in the first and second
positions, respectively, with these scores adding to a total of one.
4 Results
To assess the models’ performance in their tests, the testing data was used to
generate predicted labels, which were then compared to the expected result. The
results of these tests were collated into a confusion matrix, a table that displays
the totals of correctly classified data for the positive and negative predictions,
as well the totals of false positive and false negative predictions [8, p. 234]. The
following key metrics were also calculated for the purpose of evaluating the two
models’ performance across their tests:
– Precision: ‘Denotes the proportion of predicted positive cases that are cor-
rectly real positives’, thus allowing for the evaluation of how well a model
correctly finds the target data [18, p. 38].
– Recall: ‘The proportion of real positive cases that are correctly Predicted Pos-
itive’, used for evaluating the likelihood of target data being misclassified [18,
p. 38].
An Implementation of XAI in Digital Forensics 75
Table 1. Table of results for image, video and metadata cassification tasks.
Image classification models in IT forensics are often used to increase the efficiency
with which significant data can be identified. Beyond the general identification
and tagging of target data, LIME presents a unique tool through which further
analysis can be undertaken on individual files to determine how different features
influence a prediction. The trained image classification model was produced using
2,566 ignorable files from the original dataset, and 2,506 target files of which 10
were sourced as original target files and the rest were created for the purpose of
training the model. The testing dataset consisted of 7,476 image files, containing
both files extant in the VIC 2.0 dataset and those created from the ‘Wiki-Art:
Visual Art Encyclopedia’ dataset. Table 1 shows the confusion matrix and key
performance metrics for image classification testing. Of the tested files, 50 from
each of the True Positive (TP), True Negative (TN), False Positive (FP) and
False Negative (FN) datasets were randomly selected for processing by LIME
and additional examination. As LIME is a local surrogate model, its outputs are
best for interpreting the quality of individual predictions. From these predictions,
inferences about trends within the entire model can be made with additional
analysis of results [7]. The evaluation of LIME results have been used to make
inferences about how XAI can impact the IT forensic industry.
Examination of the 50 TP results from LIME indicated that in 35 of the
50 images, the target label was not identified as one of the top five segments
indicative of the image being a target. All of the sampled images were files created
for this project and did not originate from the VHD files. All files classified were
therefore images depicting works of art. Segments incorporating the hexadecimal
tag were only highlighted in 15 of the images examined in LIME. Each of these
76 S. W. Hall et al.
images shared a similar colour palette but varied in style, shape and structure. In
the remaining images, the prediction of a target was based on segments external
to the tag. These performance statistics show that the AI model has not been
sufficiently trained to recognize the hexadecimal tag as the significant target
feature in every image.
To measure the degree of impact the data tag had on predicted labels, addi-
tional analysis was undertaken on the 50 TN results processed through LIME.
This sample contained no images depicting artwork. Four images were Windows
OS system icons, two images were of movie posters and 46 were of photos sourced
from the original VHD files. In manufacturing additional target files using the
‘Wiki-Art: Visual Art Encyclopedia’ dataset, the model appeared to have been
trained to recognize unquantifiable features of artwork (e.g. brushwork patterns,
blocks of colours, etc.) as features indicative of an image being a target. These
fifty files were reprocessed with a data tag attached, and the differences between
their ignorable and target probabilities were measured. This showed that, on
average, adding a data tag to an image shifted both the predicted probabilities
of an image being ignorable and it being a target .26 towards being a target.
Fifteen of the fifty images changed prediction from ignorable to target after the
tag was added, thus proving its presence could affect predicted scores.
The performance of the video classification model in the tests are summarised in
Table 1. As was previously stated, video classification was undertaken by sam-
pling frames from the video files from the VIC 2.0 dataset and processing these
through the Image Classification Model. There was a total of 76 video files
within the dataset. Predictions were derived by taking the modal prediction for
all a video’s sampled frames. This approach is reflected in the predictive models
poorer performance at this classification task than the image classification task.
In most cases within the testing sample, the hexadecimal data tag was only
present for eight to ten sampled frames of footage. As the video files examined
varied in length, the proportion of target frames to the overall number of frames
also varied widely across the dataset. The ability of the Image Classification
model to identify the data tag’s presence or absence is therefore not well rep-
resented in the statistical performance of the model. This may not be a major
problem for standard feature identification in IT forensic datasets, where video
classification implementation may simply look for the presence of specific objects
(as data features) in ranges of frames, but does undermine the ability to suc-
cessfully evaluate the model’s performance when examining binary categorical
features like ‘target’ and ‘ignorable’ in this case. Frames returning the highest
and lowest target and ignorable scores were processed through LIME to identify
the top five segments influencing a target and ignorable prediction.
An Implementation of XAI in Digital Forensics 77
There were 7,056 randomly sampled metadata records used for testing the Text
Classification model, all of which came from the VIC 2.0 Export. Of these,
5,340 were ignorable records and 1,716 were target records. The remaining 7,056
records from the dataset were used for training the model.
Overall, the Text Classification model performed very well, with high accu-
racy and recall, as shown in Table 1. This was made easier by the homogenous
nature of the dataset and the arbitrary rules employed for the creation of target
data. When processing these records through LIME, it was therefore expected
that these arbitrary rules would be displayed in the LIME output data. To
measure the most influential words (and therefore features) of an ignorable or
target prediction, all instances of the testing data were processed via the LIME
78 S. W. Hall et al.
Text Explainer, and their six most influential features recorded, along with their
impact on the overall prediction expressed as a decimal between zero and one.
From the results, the Text Classification Model performed better at identify-
ing key features influencing a record being ignorable than it did it being a target.
The 20 top features indicative of a record being classified as ignorable are shown
in Table 2. The presence of the volume names of ignorable volumes 0, 1, 3, 7,
8, 9, 10, 11, 12, 13, 19, 20, 22, and 23 all averaged between .25 and .31 in their
Fig. 4. Results for segments indicating a target label for frames 500 and 600 from video
fdcdd12198760a0599319e8407cb85c8. NOTE: Heatmap scales are not the same
Table 2. The Top 20 Features present in testing data that were indicative of a record
having the ignorable label, and their average impact on the overall prediction.
Table 3. The Top 20 Features present in testing data that were indicative of a record
having the target label, and their average impact on the overall prediction.
date feature as ‘2021-09-04’ and a time feature between ‘00:00:00’ and ‘12:00:00’
as together being indicative of a target label when parsed via the Lime Text
Explainer [6]. Integrating and better handling diverse datatypes present in IT
Forensic metadata is an area for future research.
5.1 Limitations
A key challenge of this research was gaining access to appropriate forensic data to
use for testing and training of AI models and XAI tools. The dataset selected was
identified as the best available for the proof of concept but is limited in its appli-
cability to real forensic data. Firstly, the dataset is very limited in size and scope.
IT forensic practitioners often analyze data that vary in the source (e.g. smart-
phones, PCs, portable storage devices, cloud data, etc.) and quality (e.g. a rudi-
mentary ‘advance logical’ smartphone extraction targeting key user data versus a
full file system extraction). The simplified Windows OS presented in the datasets is
not representative of the practical challenges extant in IT forensic analysis. When
analysing forensic data, not all data from a device may be available for forensic
examination. Also, practitioners often encounter a variety of devices and operat-
ing systems requiring varied forensic techniques to facilitate data access.
Another limitation of the dataset is that though it is homogeneous, it is not
linked by narrative, content, or metadata. This significantly limits the dataset’s
use for creating a production-ready AI model on which to test XAI tools. Mod-
els developed with our dataset could not be trained to identify relationships
between devices, users, and other identifiers that could be indicative of device
interaction, file knowledge, and patterns of behaviour, etc. Case information
based on DF artifacts that contain geospatial and temporal metadata is key in
using forensic analysis for investigative or judicial purposes. This metadata is
used to inform aspects of the investigation in the real world, such as a specific
device’s (and, therefore a suspect’s) location during the offence period. Images
and videos present in these datasets have file system metadata reporting cre-
ation, modification and access dates over three days between the 4th and 7th of
September 2021. In a real case, this temporal metadata could span years before
and after an offence date. Developing an AI which can process narrative features
such as date of offence and suspects is outside the scope of this proof of concept
but should be an aspiration of future research.
For this research, the limited diversity of features made contextualising anal-
ysis to the case circumstances and type of offence impossible. This was identified
by Hall, Sakzad, and Choo [12] as a key requirement for the implementation of
justified and reasoned explanations in relation to case specifics in the form of
profiling user and device activities. Even if this is not feasible, future research in
this area should attempt to make use of more appropriate training data for the
creation of AI models and associated XAI testing, recognizing, of course, that
accessing data related to the investigation of criminal offences (including surveil-
lance footage or CSAM) has its own legal and ethical requirements. This training
data should also be appropriately tagged and labelled, meaning that data already
being processed and reported on for IT forensic investigations would likely make
for the highest quality training dataset.
An Implementation of XAI in Digital Forensics 83
Another avenue for expansion of this research is the inclusion of additional foren-
sic artefact types from both Windows systems and other types of devices. Foren-
sic data of interest can be found in a plethora of locations across the Windows
OS. This research, for example, does not examine the integration of artefacts
from the Windows Registry, which is often thoroughly examined by IT forensic
investigators to determine OS configurations and profile user behaviour. Another
area where XAI may be of assistance is in the processing of web data. Some of
the VIC 2.0 datasets used for Image and Video Classification were files exported
from the Internet Explorer Cache, but information such as web and file access his-
tory stored in the WebcacheV01.dat Extensible Storage Engine (ESE) database
can also be crucial in understanding user activities in the context of criminal or
civil IT forensic investigations. Other modern browsers, such as Microsoft Edge,
Google Chrome and Mozilla Firefox, as well as most smartphone applications on
the iOS and Android platforms, store user data in SQLite databases. Using XAI
tools to intelligently join and highlight specific records within these databases
with reasoned justifications as to their significance to an investigation could
greatly assist IT forensic investigators and potentially help identify significant
user data from less known applications that may not be automatically parsed
by IT forensic tools and/or manually examined by investigators. Other signifi-
cant artefacts recording information about users and applications on smartphone
devices are often stored in Property Lists (.plist files, widely used in Apple OS
environments like MacOS and iOS/iPadOS) or in JSON and Extensible Markup
Language (.xml) files, both widely used in the Android OS. These file types could
also be parsed by future AI/XAI tools. This approach could even be expanded
to include other data types beyond media file types to collate and analyze an
entire filesystem. Each of these differing artefact types would likely need specific
models to be trained to recognize and locate specific data for specific investiga-
tive types. Given the diversity of data types and devices that are now subjected
to IT forensic investigation, integration or interaction with IT Forensic software
suites that already successfully parse diverse data sources could form part of an
XAI data processing pipeline.
With such diversity in the data sources and data types for processing, there
is also a need for the aggregation and comparison of the significance of results
from across varied, processed data sources. Indeed, adding AI and XAI process-
ing into the standard IT forensics workflow without some kind of data reduc-
tion and prioritisation mechanism in place would only exacerbate, rather than
resolve, industry challenges related to data volume and processing time [21].
Implementations of AI and XAI in IT forensics need to be developed to meet
differing requirements for granularity, depending on the analysis activities being
undertaken (e.g. triage or a more thorough examination). To facilitate this, AI
predictive model results and their associated explanations (such as LIME out-
put) could be used as input data for additional AI aggregate models with imple-
mented XAI capabilities. The arrangement of AI models and XAI tools would
feed results from specialized models built for analyzing specific data types at
84 S. W. Hall et al.
References
1. Abadi, M., et al.: TensorFlow: Large-scale machine learning on heterogeneous sys-
tems. arXiv preprint arXiv:1603.04467 (2015)
2. Arrieta, A.B., et al.: Explainable Artificial Intelligence (XAI): concepts, tax-
onomies, opportunities and challenges toward responsible AI. Inf. Fusion 58, 82–
115 (2020)
3. Belshaw, S., Nodeland, B. (2021). Digital evidence experts in the law enforcement
community: understanding the use of forensics examiners by police agencies. Secu-
rity Journal, 1–15
4. Carrier, B.: Autopsy (2022). https://www.sleuthkit.org/autosy/. Accessed 27 Oct
2022
5. Casey, E.: The chequered past and risky future of digital forensics. Aust. J. Forensic
Sci. 51(6), 649–664 (2019)
6. Chen, H., Zheng, G., Ji, Y.: Generating hierarchical explanations on text classifi-
cation via feature interaction detection. arXiv preprint arXiv:2004.02015 (2020)
7. Dieber, J., Kirrane, S.: Why model why? Assessing the strengths and limitations
of LIME. arXiv preprint arXiv:2012.00093(2020)
8. Ertel, W.: Introduction to Artificial Intelligence, 1st edn. Springer, Cham (2011).
https://doi.org/10.1007/978-3-319-58487-4
9. Liu, H., Qu, Y., Wu, Y., Wang, H.: Class-specified segmentation with multi-scale
Superpixels. In: Park, J.-I., Kim, J. (eds.) ACCV 2012. LNCS, vol. 7728, pp. 158–
169. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-37410-4 14
10. Forensic Capability Network, Transforming Forensics, National Police Chiefs’
Council, Association of Police and Crime Commissioners. (2020). Digital Foren-
sic Science Strategy. https://www.npcc.police.uk/Digital%20Forensic%20Science
%20Strategy%202020.pdf.. Accessed 27 Apr 2022
11. GetData Forensics: Forensic Explorer (FEX)’. https://getdataforensics.com/
product/forensic-explorer-fex/.. Accessed 27 Oct 2022
12. Hall, S., Sakzad, A., Choo, K.K.R.: Explainable artificial intelligence for digital
forensics. WIREs Forensic Sci. 4(2), e1434 (2022)
13. Islam, S.R., Eberle, W., Ghafoor, S.K., Ahmed, M.: Explainable artificial intelli-
gence approaches: a survey. arXiv preprint arXiv:2101.09429(2021)
14. Jarrett, A., Choo, K.K.R.: The impact of automation and artificial intelligence on
digital forensics. WIREs Forensic Sci. 3, e1418 (2021)
15. Innat, M.: Wiki-Art: visual Art Encyclopedia, 1, 2020, September. https://www.
kaggle.com/datasets/ipythonx/wikiart-gangogh-creating-art-gan. Accessed 3 Jan
2022
16. Molnar, C.: terpretable Machine Learning: A Guide for Making Black Box Models
Explainable, 2nd ed. (2022). https://christophm.github.io/interpretable-ml-book/
An Implementation of XAI in Digital Forensics 85
Wei Hong1 , Jiao Yin2(B) , Mingshan You2 , Hua Wang2 , Jinli Cao3 ,
Jianxin Li4 , and Ming Liu4
1
School of Artificial Intelligence, Chongqing University of Arts and Sciences,
Chongqing 402160, China
[email protected]
2
Institute for Sustainable Industries and Liveable Cities, Victoria University,
Melbourne, VIC 3011, Australia
{jiao.yin,mingshan.you,hua.wang}@vu.edu.au
3
Department of Computer Science and Information Technology,
La Trobe University, Melbourne, VIC 3086, Australia
[email protected]
4
School of Information Technology, Deakin University, Melbourne, VIC 3125,
Australia
{jianxin.li,m.liu}@deakin.edu.au
1 Introduction
In recent years, cyber-security has been gaining attention from time to time with
data breach incidents or system sabotage events that affected users worldwide
[19,41]. With covid-19 plaguing the world unprecedentedly, cybercrime seems to
see a rise-up due to an abrupt shifting to remote work. According to Accenture’s
recent report for 2021 [1], each responding company experienced 270 attacks on
average in this year, an increase of 31% compared with 2020.
Among those cyber attacks, a survey from PwC shows that 68% respondents
consider inadvertent actions of insiders is the greatest threat to the organisa-
tion’s information security [18]. Another early survey also shows nearly 30%
respondents think insider attacks were more costly than outsider attacks, and
nearly one-third of participants experienced an insider incident [15].
Generally speaking, malicious insider refers to current or former personnel
who has or had authorised access to an organisation’s network, system, or data
and has intentionally used that access to affect the confidentiality, integrity, avail-
ability, or physical well-being of the organisation’s information and information
systems [27,40].
Access control methods are fundamental technology for data privacy and
security protection [12,24,31,33]. It has been applied in various areas such as
healthcare system and data publications [25,26,30,32]. With authorised access,
however, insider threat normally can not be blocked out by traditional security
measures [23,34]. Therefore, detecting those malicious behaviours from inside is
the key to preventing or recovering loss in time. Common approaches consider
this a classification problem if labelled data are available [16,20]. User behaviour
logs are first engineered in various ways to extract the most valuable features [10,
22]. Then machine learning algorithms such as support vector machine (SVM),
gaussian naive bayes (GNB), linear regression (LR) and random forest (RF), or
deep learning models such as long short-term memory (LSTM) or convolutional
neural networks (CNN) are introduced to perform the classification task [37,39,
42].
However, when doing feature engineering, most approaches only consider user
behaviour to be isolated ones, missing the fact that users in a similar organi-
sational structure (e.g. shared supervisor, same department, working relation-
ship) may behave similarly. Therefore, we argue that incorporating organisa-
tional structure information into feature engineering will help boost traditional
classification algorithm performance.
In contrast with the traditional data representation method, which facili-
tates characteristic analysis of individual actors, graph representations are more
powerful in exploiting relationships between actors [2,38]. Popular GNN mod-
els for node and graph embedding include graph convolutional networks (GCN)
[11], GraphSAGE [7], graph attention networks (GAT) [29], EdgeGCN [35] and
GINGCN [36].
In recent years, graph-based techniques are gaining popularity in many fields.
Inspired by these works, we propose a bi-channel insider threat detection (B-
CITD) framework to investigate the influence of GNN-based graph intelligence
88 W. Hong et al.
2 Related Works
2.1 Insider Threat Detection
Previous works on insider threat detection have contributed in two directions:
conceptual and operational. Conceptual works focus on how to detect and assess
Graph Intelligence Enhanced Bi-Channel Insider Threat Detection 89
3 Methodology
In this section, we illustrate the whole process of the proposed bi-channel
insider threat detection framework. The detailed inner-user and inter-user fea-
ture extraction, including organisational graph construction, will be presented
in Sect. 4, taking the CERT 4.2 dataset as a use case implementation.
Previously, different works defined insider threat detection in different gran-
ularity. In our paper, considering that users’ behaviours are evolving and a mali-
cious user can act harmless on most days and only act abnormally in a few
days, we follow the common practice of examining user behaviours on a daily
basis. Therefore, insider threat detection in this paper aims to detect malicious
user-days.
Malicious users can act in different patterns compared with benign users.
These patterns are hidden in users’ daily behaviours, such as the log-on frequency
and times, the domain of websites they visited, the email contacts, and the
connection of removable devices. Therefore, we first extract inner-user features
from user behavioural log files to perform effective insider threat detection. The
detailed behavioural feature extraction method is given in Subsect. 4.2. As shown
in Fig. 1, the inner-user feature matrix, denoted as Xb , is extracted from daily
behaviours of isolated user-days, where Xb ∈ Rm×nb , m is the total number of
user-days and nb is the dimension of extracted inner-user features. For a single
user-day, the extracted feature vector can be denoted as xb,i ∈ Rnb (i ∈ {1, 2,
· · · , m}).
To extract the inter-user features, we first construct a graph G = {V, A, Xb },
where V is the vertex set of the graph, A is the adjacency matrix indicating the
organizational connections between different user-days and Xb is the behavioural
user-day feature matrix. The total number of nodes in G equals the total number
of user-days, which is to say, |V| = m. A single user-day, denoted as a node v ∈ V
and the node attribute is xb,i ∈ XB (i ∈ {1, 2, · · · , m}).
As shown in Fig. 1, after constructing graph G, we employ a GNN model
as a graph feature extractor. The process of extracting latent organizational
connection features can be described in Eq. (1).
X = concatenate(Xb , Hc ), (2)
m×(nb +nc )
where X ∈ R is the final user-day feature matrix for insider threat
detection, and the dimension of the final feature equals nb + nc .
Finally, we choose a binary classifier as the insider threat detector. The pre-
dicted values of the detector can be calculated as Eq. (3).
Ŷ = fc (X, Θc ), (3)
where Ŷ ∈ Rm is the predicted results on whether a user-day is malicious or
not, fc is the mapping function of the chosen classifier, and Θc is the trainable
parameters of the classifier. The parameters Θc can be optimised on the training
set by comparing the predicted results Ŷ with the true labels, Y ∈ Rm , and min-
imising the loss function. Finally, the performance of the B-CITD architecture
can be evaluated on the test set, as shown in Fig. 1.
Since the original data set is extremely imbalanced, while our goal is to
investigate the power of latent graph information, we first reconstructed a smaller
balanced dataset by downsampling the normal users. Then the dataset is split
into 70% for training and 30% for testing.
– First logon time: extracted from the logon.csv file by mapping the timestamp
of the first login activity to the range of [0, 1] according to a 24 h basis;
– Last logoff time: extracted from the logon.csv file by mapping the timestamp
of the last logoff activity to the range of [0, 1] according to a 24 h basis;
Graph Intelligence Enhanced Bi-Channel Insider Threat Detection 93
– First device activity time: extracted from the device.csv file by mapping the
timestamp of the first device activity (connect or disconnect) to the range of
[0, 1] according to a 24 h basis;
– Last device activity time: extracted from the device.csv file by mapping the
timestamp of the last device activity (connect or disconnect) to the range of
[0, 1] according to a 24 h basis;
– Number of off-hour device activities: extracted from the device.csv file by
counting the number of the device activities (connect or disconnect) during
off-hour time (18:00 pm - 8:00 am).
Those five features work as, on the one hand, the inner-user channel fea-
tures and, on the other hand, the original node attributes in the constructed
organizational graph.
5 Experiments
To investigate the effectiveness of the proposed B-CITD framework, we con-
ducted comparative experiments between B-CITD and inner-user channel in
Sect. 5.1, and then between B-CITD and inter-user channel in Sect. 5.2, respec-
tively. An in-depth analysis of the experimental findings is listed in Sect. 5.3.
All experiments are implemented in Python programming language. The
package PyTorch Geometric1 is used to implement GNN models, PyTorch2 is
used to implement CNN model and scikit-learn3 is for binary classifier implemen-
tation. We adopt default parameter settings for all CNN, GNN and classifiers
unless otherwise specified.
Table 3. Performance between inner-user channel and bi-channel for different classifiers
(%)
Results in Table 3 show that for each tested classifier, the performance
achieved by bi-channel features is significantly improved compared with using
inner-user channel features only. Specifically, accuracy has increased by 1.71%,
1.58%, 1.40%, 1.23%, precision also increased 3.04%, 3.37%, 2.46%, 2.42%
respectively for CNN, GNB, SVM, and LR classifier. Although GNB and LR
suffered a slight drop in Recall score, the F1 scores on all classifiers are improved
by at least 1.11%.
Since F1-score combines the precision and recall of a classifier into a single
metric by taking their harmonic mean, it can reflect the overall performance
more clearly than other metrics listed in Table 3. We highlighted the F1 score
comparison in Fig. 2, which shows general improvement in F1 score across all
classifiers.
Fig. 2. F1 score comparison between inner-user channel and bi-channel for different
classifiers
The CNN classifier performs better than other classifiers in terms of the gen-
eral performance across different metrics. At the same time, the CNN classifier
96 W. Hong et al.
also generally gained more benefit (improvement) from our bi-channel frame-
work. The LR classifier comes in the last place either in terms of standalone
performance or gained improvement from bi-channel features.
We draw the receiver operating characteristic (ROC) curves for all classifiers
in Fig. 3, showing that bi-channel features are superior to inner-user channel
features. The area under the ROC Curve (AUC) values are listed in Fig. 3.
Taking CNN as an example, the AUC is improved from 0.9101 to 0.9488 when
using B-CITD.
Fig. 3. ROC comparison between inner-user channel and bi-channel for different clas-
sifiers
models. This further verifies our hypothesis that the proposed B-CITD frame-
work could improve the insider detection performance by cooperating features
from both inner-user and inter-user channels. Taking Δ F1 score as an example,
the improvements in F1 scores are 16.20%, 17.70% and 0.97%, corresponding to
GCN, GAT and GraphSAGE models, which are also demonstrated by the blue
line in Fig. 4.
Table 4. Performance comparison between inter-user channel and bi-channel for dif-
ferent GNN models (%)
GNN model Channel Acc Pre Rec F1 ΔAcc ΔPre ΔRecall ΔF1
GCN inter-user 70.45 61.93 95.90 75.26 ↑21.35 ↑27.43 ↓2.24 ↑16.20
bi-channel 91.80 89.36 93.66 91.46
GAT inter-user 68.50 60.30 95.89 74.04 ↑23.60 ↑29.60 ↓2.23 ↑17.70
bi-channel 92.10 89.90 93.66 91.74
GraphSAGE inter-user 90.58 87.18 93.65 90.30 ↑1.03 ↑1.83 0.00 ↑0.97
bi-channel 91.61 89.01 93.65 91.27
Figure 4 and Fig. 5 show the highlighted F1 score and ROC curve comparison.
They both show the same trend with Table 4, demonstrating the effectiveness of
bi-channel features in improving insider threat detection performance compared
with inter-user channel features.
Fig. 4. F1 score comparison between inter-user channel and bi-channel for different
GNN models
5.3 Discussion
This section gives further discussion and analysis on the experimental results
shown in Sects. 5.1 and 5.2.
The comparison between inner-user channel and bi-channel features pre-
sented in Sect. 5.1 confirms our hypothesis that behavioral connections prob-
ably do exist both between user-days and users. This connection information is
98 W. Hong et al.
Fig. 5. ROC comparison between inter-user channel and bi-channel for different GNN
models
6 Conclusion
References
1. Accenture: State of cybersecurity resilience 2021. Accenture Official Website,
03 November 2021. https://www.accenture.com/us-en/insights/security/invest-
cyber-resilience
2. Coffman, T., Greenblatt, S., Marcus, S.: Graph-based technologies for intelligence
analysis. Commun. ACM 47(3), 45–47 (2004)
3. Gamachchi, A., Boztas, S.: Insider threat detection through attributed graph clus-
tering. In: 2017 IEEE Trustcom/BigDataSE/ICESS, pp. 112–119. IEEE (2017)
100 W. Hong et al.
4. Garg, A., Rahalkar, R., Upadhyaya, S., Kwiat, K.: Profiling users in GUI based
systems for masquerade detection. In: Proceedings of the 2006 IEEE Workshop on
Information Assurance, vol. 2006, pp. 48–54 (2006)
5. Gavai, G., Sricharan, K., Gunning, D., Rolleston, R., Hanley, J., Singhal, M.:
Detecting insider threat from enterprise social and online activity data. In: Proceed-
ings of the 7th ACM CCS International Workshop on Managing Insider Security
Threats, pp. 13–20 (2015)
6. Glasser, J., Lindauer, B.: Bridging the gap: A pragmatic approach to generating
insider threat data. In: 2013 IEEE Security and Privacy Workshops. pp. 98–104.
IEEE (2013)
7. Hamilton, W.L., Ying, R., Leskovec, J.: Inductive representation learning on large
graphs. In: Proceedings of the 31st International Conference on Neural Information
Processing Systems, pp. 1025–1035 (2017)
8. Homoliak, I., Toffalini, F., Guarnizo, J., Elovici, Y., Ochoa, M.: Insight into insiders
and it: a survey of insider threat taxonomies, analysis, modeling, and countermea-
sures. ACM Comput. Surv. (CSUR) 52(2), 1–40 (2019)
9. Jiang, J., et al.: Anomaly detection with graph convolutional networks for insider
threat and fraud detection. In: MILCOM 2019–2019 IEEE Military Communica-
tions Conference (MILCOM), pp. 109–114. IEEE (2019)
10. Kabir, M.E., Mahmood, A.N., Wang, H., Mustafa, A.K.: Microaggregation sorting
framework for k-anonymity statistical disclosure control in cloud computing. IEEE
Trans. Cloud Comput. 8(2), 408–417 (2015)
11. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional
networks. arXiv preprint arXiv:1609.02907 (2016)
12. Li, M., Sun, X., Wang, H., Zhang, Y.: Multi-level delegations with trust manage-
ment in access control systems. J. Intell. Inf. Syst. 39(3), 611–626 (2012)
13. Liu, F., Wen, Y., Zhang, D., Jiang, X., Xing, X., Meng, D.: Log2vec: a heteroge-
neous graph embedding based approach for detecting cyber threats within enter-
prise. In: Proceedings of the 2019 ACM SIGSAC Conference on Computer and
Communications Security, pp. 1777–1794 (2019)
14. Maxion, R.A., Townsend, T.N.: Masquerade detection using truncated command
lines. In: Proceedings International Conference on Dependable Systems and Net-
works, pp. 219–228. IEEE (2002)
15. Miller, S.: 2017 u.s. state of cybercrime highlights. Carnegie Mellon University’s
Software Engineering Institute Blog, 17 January 2018. http://insights.sei.cmu.edu/
blog/2017-us-state-of-cybercrime-highlights/
16. Pandey, D., Wang, H., Yin, X., Wang, K., Zhang, Y., Shen, J.: Automatic breast
lesion segmentation in phase preserved dce-mris. Health Inf. Sci. Syst. 10 (2022).
https://doi.org/10.1007/s13755-022-00176-w
17. Paul, S., Mishra, S.: Lac: LSTM autoencoder with community for insider threat
detection. In: 2020 the 4th International Conference on Big Data Research (ICBDR
2020), pp. 71–77 (2020)
18. PwC: Cybercrime survey 2020. PwC Official Website, 28 August 2021. https://
www.pwc.dk/da/publikationer/2021/cybercrime-survey-2020-en.html
19. Rasool, R., Ahmed, K., Anwar, Z., Wang, H., Ashraf, U., Rafiq, W.: Cyberpulse++:
A machine learning based security framework for detecting link flooding attacks in
software defined networks. International Journal of Intelligent Systems 2021, 1–28
(04 2021). https://doi.org/10.1002/int.22442
20. Sarki, R., Ahmed, K., Wang, H., Zhang, Y., Wang, K.: Convolutional neural net-
work for multi-class classification of diabetic eye disease. EAI Endorsed Trans.
Scalable Inf. Syst. 9(4) (2021). https://doi.org/10.4108/eai.16-12-2021.172436
Graph Intelligence Enhanced Bi-Channel Insider Threat Detection 101
21. Schonlau, M., DuMouchel, W., Ju, W.H., Karr, A.F., Theus, M., Vardi, Y.: Com-
puter intrusion: detecting masquerades. Stat. Sci. 16, 58–74 (2001)
22. Singh, R., Zhang, Y., Wang, H., Miao, Y., Ahmed, K.: Investigation of social
behaviour patterns using location-based data - a melbourne case study. ICST
Trans. Scalable Inf. Syst. 8, 166767 (2020). https://doi.org/10.4108/eai.26-10-
2020.166767
23. Sun, L., Ma, J., Wang, H., Zhang, Y., Yong, J.: Cloud service description model: an
extension of USDL for cloud services. IEEE Trans. Serv. Comput. 11(2), 354–368
(2015)
24. Sun, X., Li, M., Wang, H., Plank, A.: An efficient hash-based algorithm for minimal
k-anonymity. In: Conferences in Research and Practice in Information Technology
(CRPIT), vol. 74, pp. 101–107. Australian Computer Society Inc. (2008)
25. Sun, X., Wang, H., Li, J.: Satisfying privacy requirements: one step before
anonymization. In: Zaki, M.J., Yu, J.X., Ravindran, B., Pudi, V. (eds.) PAKDD
2010. LNCS (LNAI), vol. 6118, pp. 181–188. Springer, Heidelberg (2010). https://
doi.org/10.1007/978-3-642-13657-3_21
26. Sun, X., Wang, H., Li, J., Pei, J.: Publishing anonymous survey rating data. Data
Min. Knowl. Disc. 23(3), 379–406 (2011)
27. Theis, M., et al.: Common sense guide to mitigating insider threats (2019)
28. Tuor, A., Kaplan, S., Hutchinson, B., Nichols, N., Robinson, S.: Deep learning
for unsupervised insider threat detection in structured cybersecurity data streams.
arXiv preprint arXiv:1710.00811 (2017)
29. Veličković, P., Cucurull, G., Casanova, A., Romero, A., Lio, P., Bengio, Y.: Graph
attention networks. arXiv preprint arXiv:1710.10903 (2017)
30. Vimalachandran, P., Liu, H., Lin, Y., Ji, K., Wang, H., Zhang, Y.: Improving acces-
sibility of the Australian my health records while preserving privacy and security
of the system. Health Inf. Sci. Syst. 8(1), 1–9 (2020)
31. Wang, H., Cao, J., Zhang, Y.: A flexible payment scheme and its role-based access
control. IEEE Trans. Knowl. Data Eng. 17(3), 425–436 (2005)
32. Wang, H., Zhang, Y., Cao, J.: Effective collaboration with information sharing in
virtual universities. IEEE Trans. Knowl. Data Eng. 21(6), 840–853 (2008)
33. Wang, H., Zhang, Y., Cao, J., Varadharajan, V.: Achieving secure and flexible
m-services through tickets. IEEE Trans. Syst. Man Cybern.-Part A: Syst. Hum.
33(6), 697–708 (2003)
34. Wang, Y., Shen, Y., Wang, H., Cao, J., Jiang, X.: MTMR: ensuring mapreduce
computation integrity with Merkle tree-based verifications. IEEE Trans. Big Data
4(3), 418–431 (2016)
35. Wang, Y., Sun, Y., Liu, Z., Sarma, S.E., Bronstein, M.M., Solomon, J.M.: Dynamic
graph CNN for learning on point clouds. ACM Trans. Graphics (tog) 38(5), 1–12
(2019)
36. Xu, K., Hu, W., Leskovec, J., Jegelka, S.: How powerful are graph neural networks?
arXiv preprint arXiv:1810.00826 (2018)
37. Yin, J., Tang, M., Cao, J., Wang, H., You, M.: A real-time dynamic concept adap-
tive learning algorithm for exploitability prediction. Neurocomputing 472, 252–265
(2022)
38. Yin, J., Tang, M., Cao, J., You, M., Wang, H., Alazab, M.: Knowledge-driven
cybersecurity intelligence: software vulnerability co-exploitation behaviour discov-
ery. IEEE Trans. Ind. Inform. (2022)
102 W. Hong et al.
39. Yin, J., You, M., Cao, J., Wang, H., Tang, M.J., Ge, Y.-F.: Data-driven hierarchical
neural network modeling for high-pressure feedwater heater group. In: Borovica-
Gajic, R., Qi, J., Wang, W. (eds.) ADC 2020. LNCS, vol. 12008, pp. 225–233.
Springer, Cham (2020). https://doi.org/10.1007/978-3-030-39469-1_19
40. You, M., Yin, J., Wang, H., Cao, J., Miao, Y.: A minority class boosted framework
for adaptive access control decision-making. In: Zhang, W., Zou, L., Maamar, Z.,
Chen, L. (eds.) WISE 2021. LNCS, vol. 13080, pp. 143–157. Springer, Cham (2021).
https://doi.org/10.1007/978-3-030-90888-1_12
41. You, M., et al.: A knowledge graph empowered online learning framework for access
control decision-making. World Wide Web, pp. 1–22 (2022)
42. Yuan, F., Cao, Y., Shang, Y., Liu, Y., Tan, J., Fang, B.: Insider threat detection
with deep neural network. In: Shi, Y., et al. (eds.) ICCS 2018. LNCS, vol. 10860,
pp. 43–54. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93698-7_4
Network Security
Exploiting Redundancy in Network Flow
Information for Efficient Security Attack
Detection
1 Introduction
Anomaly detection plays an increasingly important role in network security man-
agement, in terms of detecting the occurrence of new types of network attacks.
Traditional anomaly detection methods involve analysing a fixed vector of fea-
tures of network traffic. However, there is growing interest in the use of graph
neural networks (GNN) that can exploit the topological properties of the traffic
flows in a network to improve anomaly detection accuracy. A key challenge in
this context is how to improve the scalability of training GNNs so that large
networks can be monitored in an efficient manner. The aims of this paper are
to propose several approaches for using sampling in GNNs for network traffic
analysis, and to empirically analyse the effectiveness of these sampling strategies
to improve the scalability of GNNs for anomaly detection on realistic network
traffic data.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 105–119, 2022.
https://doi.org/10.1007/978-3-031-23020-2_6
106 S. Xia et al.
2 Literature Review
Intrusion detection system (IDS) can analyse and identify abnormal behaviours
in networks. Two major detection categories exist, namely anomaly detection
and signature detection [1] depending on whether known patterns exist for train-
ing or not. Anomaly detection is important and widely used in IDS especially
Exploiting Redundancy in Network Flow Information 107
3 Methodology
3.1 Background Techniques
Graph Definitions.
GCN. The definition of a GCN starts with the spectral convolution GNN [15].
A spectral convolution on a graph [14] is obtained by the multiplication of an
input signal x ∈ Rn with a spectral filter gθ = diag(θ) parameterized by the
vector of Fourier coefficients θ ∈ Rn . The forward-path of the GCN can be
expressed by
1 1
H (m+1) = ξ(D̃ 2 ÃD̃ 2 H (m) Θ(m) ), (1)
(m) th (0)
where H is the activation matrix in the m layer and H is the fea-
ture matrix X of the input nodes, ξ(·) is a nonlinear activation function like
ReLU (·) = max(0, ·), and Θ(m) is a trainable weight matrix. The GCN presents
a computationally efficient convolutional process (given the assumption that A
is sparse) and achieves improved accuracy over state-of-the-art methods in semi-
supervised node classification tasks by simultaneously using the features of nodes
and the geometric structure of the graph.
Auto-encoder GCN. There are two auto-encoder techniques that have been
applied in this method. Both auto-encoders are used for graph representation
and possess different architectures for encoding and decoding, especially in the
adjacency matrix. Moreover, the auto-encoders can be applied for anomaly detec-
tion, by leveraging the learnt representations from the encoder to reconstruct the
original data.
 = sigmoid(ZZ T ) (2)
Exploiting Redundancy in Network Flow Information 109
In addition, the reconstruction for the attribute matrix is derived from the
latent representation Z as well as the nodal structure giving:
X̂ = fRelu (Z, A|W (l+1) ) (3)
Symmetric Auto-encoder (GALA). The second type is the symmetric graph con-
volutional auto-encoder for graph embedding, called GALA [11]. In contrast to
the previous auto-encoder architecture, this method has a complete symmet-
ric auto-encoder form for both the encoder and decoder [11]. GALA comprises
two parts: (i) attributed network encoder - which uses the Laplacian smoothing
method to encode the inputs as the weighted average from both the node itself
and its neighbours, and (ii) symmetric network decoder - which performs Lapla-
cian sharpening, reconstructing the feature of each node farther away from the
centroid of its neighbours.
Laplacian smoothing, the general form of GCN, is used to calculate a new
representation of the inputs. With the affinity matrix defined as à = A + In and
the degree matrix defined as D̃ = D + In , Laplacian smoothing can be defined
as:
(m+1) (m)
Ãij (m)
xi = (1 − γ)xi +γ xj (4)
j
D̃ii
(m+1) (m)
where xi is the new representation of xi and γ is a regularisation param-
eter that determines the significance between itself and its neighbours. This can
be shown in an equation as:
(m+1) (m)
Ãij (m)
xi = (1 + γ)xi −γ xj (7)
j
D̃ii
and this also can be rewritten as:
GCN Sampling Methods. GCN sampling methods can be divided into two
main types, namely pre-training sampling and sampling in the latent layers dur-
ing training.
110 S. Xia et al.
GRAIN. GRAIN is a method for selecting significant nodes before training [16].
The outputs from GRAIN can be leveraged as the initial inputs for the auto-
encoder model. In GRAIN, we measure the sensitivity of nodes by computing
how it has been aggregated through feature propagation. We then maximise the
influence of the selected nodes (i.e., seed nodes) to increase the involvement of
non-selected nodes in the downstream model training. The method can select the
most significant nodes and can be used as the initial values for the auto-encoder
training. GRAIN includes information for both graph structure and aggregated
features. The magnitude and diversity components are further used to calculate
the diversified influence, which can be regarded as a score for the data selection.
The nodes are sorted using an importance sampling scheme that relies only
on the matrix Q(l) and P . The importance probability is defined as:
Based on these background techniques, we now describe how these are combined
in our traffic analysis framework.
GCN Sampling on Network Flow Data. First, we analyse the effect of the
different GCN sampling methods on detecting various security attacks from the
network flow data. The sampling methods used to build the anomaly detection
system are node-wise, layer-wise and subgraph sampling methods. The model
is built based on GCN. For node-wise sampling, we use the GraphSAGE [6]
method. For layer-wise sampling, we use LADIES [17], and for subgraph sam-
pling, we use Cluster-GCN sampling [3]. This analysis focuses on finding the
most suitable sampling methods for supervised learning.
Fig. 1. Auto-encoder with sampling for the upper: DOMINANT and lower: GALA
model
Two types of sampling techniques have been applied to the GCN auto-
encoder to build the sampling models. First is GRAIN [16], which chooses nodes
with the most significant information based on the graph structures. Before
training the GCN auto-encoder, the GRAIN node selection is performed, hence
it is regarded as a preprocessing method. The second approach is to sample
during the GCN auto-encoder training process, both using layer-wise sampling
and reordering methods. These techniques are applied to every layer during the
encoder training session.
The general workflow of the sampling method is as follows:
– Original graph data are input to the GRAIN model for data selection.
– The selected data is then used as the initial data for the training process.
The input nodes are selected at each layer during the training process based
on the LADIES and reorder mechanisms.
– With the LADIES mechanism, nodes are selected based on their importance.
Then, the reordering process further selects the nodes from the nodes selected
by LADIES. Finally, the selected nodes are forwarded to the next latent layer
for training.
An overview of the process for both of the auto-encoder structures are shown
in Fig. 1.
The training and testing process for the auto-encoders are the same as their
original definition. The training process is based on the loss function defined for
the auto-encoders according to their model structure.
For the DOMINANT model, the loss function is defined as:
4 Experiments
Datasets. Two published network flow datasets have been used to evalu-
ate the performance of the GCN and GCN auto-encoder with sampling. Both
datasets contain network records, features for the flow records and labels (anoma-
lous/benign) along with the associated class of attack. The datasets included are
UNSW-NB15 [10] and LitNet [4], both of which have proprietary formats and
feature sets and have been widely used to evaluate machine learning based net-
work intrusion detection systems. A brief overview of these datasets is provided
in the following.
GCN Sampling for Attack Types. The second experiment assesses the influence of
sampling on different attacks. In each experiment trial, 2000 nodes were selected
with an anomaly ratio of 10%, with each trial only including one specific attack
type. The results are given in Table 3 for three attack types that involve large
traffic volumes.
Table 3. Accuracy(%) Comparison for Layer-wise GCN Sampling Method With Var-
ious Attack Types
it is shown that the Generic and Fuzzer attacks perform similarly to the gen-
eral scenario, while the Exploits attacks have lower accuracy, especially for low
sampling ratios. It can be seen that the different attacks have different sensitiv-
ity to the sampling proportion, especially at lower levels, and react differently
depending on the sampling method.
Fig. 2. Accuracy comparison for different sampling combination and the sampling pro-
portion for UNSW-NB15. The left graph is using DOMINANT and the right one is
using GALA auto-encoder.
Fig. 3. Accuracy comparison for different sampling combination and the sampling pro-
portion for LitNet. The left graph is using DOMINANT and the right one is using
GALA auto-encoder.
Fig. 4. Time comparison for different sampling combinations and sampling proportion
for UNSW-NB15. The left graph is using DOMINANT and right one is using GALA
auto-encoder.
Fig. 5. Time comparison for different sampling combinations and sampling proportion
for LitNet. The left graph is using DOMINANT and right one is using GALA auto-
encoder.
Fig. 6. -SNE plot for the GCN penultimate layer embeddings under (a) 100%, (b) 50%
and (c) 30% sampling proportions.
5 Conclusion
Timely detection of security attacks in a communication network is important
for providing reliable and safe information flow as well as preventing loss and
damage to the system. In this work, we investigated how redundant information
in the data can be removed by sampling to reduce computation time while
ensuring accurate detection of attacks. Different sampling strategies for graph
based deep learning frameworks are analysed for the detection of attacks in
a computationally efficient manner. Using network flow data, the efficiency of
detecting attacks using different sampling methods in terms of accuracy, as well
as the sensitivity for different types of attacks, has been analysed. The results
reveal that certain types of attacks are more sensitive to the choice of sampling
method. Moreover, for a majority of the attack types, significant savings can be
achieved in terms of computational overhead, by removing the redundancy in
the network flow data. In light of this study, in the future, we aim to propose
a novel loss function that exploits this redundancy information to guide the
graph auto-encoder based deep anomaly detection process to improve detection
accuracy and computational overhead.
References
1. Axelsson, S.: Intrusion detection systems: a survey and taxonomy. Technical report,
Citeseer (2000)
2. Butun, I., Morgera, S.D., Sankar, R.: A survey of intrusion detection systems in
wireless sensor networks. IEEE Commun. Surv. Tutor. 16(1), 266–282 (2013)
3. Chiang, W.L., Liu, X., Si, S., Li, Y., Bengio, S., Hsieh, C.J.: Cluster-GCN: an
efficient algorithm for training deep and large graph convolutional networks. In:
Proceedings of the 25th ACM SIGKDD International Conference on Knowledge
Discovery & Data Mining, pp. 257–266 (2019)
4. Damasevicius, R., et al.: Litnet-2020: an annotated real-world network flow dataset
for network intrusion detection. Electronics 9(5), 800 (2020)
5. Ding, K., Li, J., Bhanushali, R., Liu, H.: Deep anomaly detection on attributed
networks. In: Proceedings of the 2019 SIAM International Conference on Data
Mining, pp. 594–602. SIAM (2019)
Exploiting Redundancy in Network Flow Information 119
6. Hamilton, W.L., Ying, R., Leskovec, J.: Inductive representation learning on large
graphs. In: Proceedings of the 31st International Conference on Neural Information
Processing System, pp. 1025–1035 (2017)
7. Kipf, T.N., Welling, M.: Semi-supervised classification with graph convolutional
networks. arXiv preprint arXiv:1609.02907 (2016)
8. Kipf, T.N., Welling, M.: Variational graph auto-encoders. arXiv preprint
arXiv:1611.07308 (2016)
9. Liu, X., Yan, M., Deng, L., Li, G., Ye, X., Fan, D.: Sampling methods for efficient
training of graph convolutional networks: a survey. arXiv preprint arXiv:2103.05872
(2021)
10. Moustafa, N., Slay, J.: Unsw-nb15: a comprehensive data set for network intru-
sion detection systems (unsw-nb15 network data set). In: Proceeding of the 2015
Military Communications and Information Systems Conference (MilCIS), pp. 1–6.
IEEE (2015)
11. Park, J., Lee, M., Chang, H.J., Lee, K., Choi, J.Y.: Symmetric graph convolutional
autoencoder for unsupervised graph representation learning. In: Proceedings of the
IEEE/CVF International Conference on Computer Vision, pp. 6519–6528 (2019)
12. Rajasegarar, S., Leckie, C., Palaniswami, M.: Anomaly detection in wireless sensor
networks. IEEE Wirel. Commun. 15(4), 34–40 (2008)
13. Rashidi, L., et al.: Node re-ordering as a means of anomaly detection in time-
evolving graphs. In: Frasconi, P., Landwehr, N., Manco, G., Vreeken, J. (eds.)
ECML PKDD 2016. LNCS (LNAI), vol. 9852, pp. 162–178. Springer, Cham (2016).
https://doi.org/10.1007/978-3-319-46227-1 11
14. Shuman, D.I., Narang, S.K., Frossard, P., Ortega, A., Vandergheynst, P.: The
emerging field of signal processing on graphs: extending high-dimensional data
analysis to networks and other irregular domains. IEEE Signal Process. Mag. 30(3),
83–98 (2013)
15. Wu, Z., Pan, S., Chen, F., Long, G., Zhang, C., Philip, S.Y.: A comprehensive
survey on graph neural networks. IEEE Trans. Neural Networks Learn. Syst. 32(1),
4–24 (2020)
16. Zhang, W., et al.: Grain: improving data efficiency of graph neural networks via
diversified influence maximization. arXiv preprint arXiv:2108.00219 (2021)
17. Zou, D., Hu, Z., Wang, Y., Jiang, S., Sun, Y., Gu, Q.: Layer-dependent importance
sampling for training deep and large graph convolutional networks. arXiv preprint
arXiv:1911.07323 (2019)
A Learning Methodology for Line-Rate
Ransomware Mitigation with P4 Switches
1 Introduction
The advent of the programmable data plane technology has enabled a plethora
of advancements in network traffic classification tasks. Simultaneously, Machine
Learning (ML) has cemented itself as capable of carrying out any number of
pattern identification activities in a manner vastly superior to other more tradi-
tional techniques and even humans. However, how best to integrate such pattern
recognition capabilities into programmable switches to further advance the per-
formance of current network traffic classification schemes is still an open research
question [22,24].
Among the most needed traffic classification tasks is a method for countering
mounting ransomware threat. Since the WannaCry attack of May 2017, the fre-
quency of ransomware attacks and magnitude of their damages has been increas-
ing at alarming rates, on a global scale [5]. For instance, in 2021, the occurrence
of attacks rose by 48% around the world, with the U.K. and the U.S. observing
an uptick of 233% and 127%, respectively, with an average of 9.7 attempted
attacks being recorded on a daily basis per organization [50]. Moreover, recent
ransomware variants have extend WannaCry’s worm-like capabilities in order to
self-propagate to other machines [20,29,32,41,48].
To address the aforementioned challenges, we propose a novel methodology
for interleaving the ability of RF classifiers to fingerprint a number of network
traffic classification tasks into the pipeline of programmable switches, and we
utilize this methodology to detect and mitigate ransomware in real-time. Our
methodology relies only on unidirectional traffic to allow for flexibility amid
asymmetric routing [19,24] and is based upon network and transport layer head-
ers to accurately classify ransomware amid encrypted traffic. In addition to classi-
fying offending source IP addresses from only a small amount of the packets that
they transmit, the proposed methodology operates solely in the data plane in
order to circumvent the detection latency and network overhead associated with
communicating traffic artifacts to a centralized controller and awaiting classifica-
tion results [23,24]. This combination of detection speed enhancements enables
the proposed methodology to mitigate ransomware propagation, the encryption
of a victim’s files, and even thwart such encryption altogether, as the asymmetric
key exchanges can be halted.
Our approach was written in P4 [8] and compiled on an Intel Tofino hard-
ware switch, showing that our P4 program fits conservatively within the switch’s
resource bounds. We also generated a training and testing dataset in a Triage
sandbox environment [47] from a number of the most prominent ransomware
variants and demonstrated that such variants can be quickly fingerprinted with
both high precision and recall. Indeed, with Intel Tofino switches now capable
of processing throughput of up to 25.6 Tbps [28], our methodology’s network-
based approach note only can compliment existing host-based defenses to pro-
tect devices logged into networks that are incapable of defending themselves
122 K. Friday et al.
(e.g., connected IoT and mobile devices that are now being targeted [26,55,56])
but also mitigate the ransomware epidemic at scale within high-speed networks,
such as science DMZs, campuses, critical infrastructure [9], medical services,
and numerous others [39], as well as the backbones that serve them. Finally, the
proposed methodology has been fully automated to facilitate ease of implementa-
tion. All source code, datasets, and analytics scripts have been made available to
the public at large [40] to facilitate advancements in programmable switch-based
learning and ransomware mitigation.
This work’s contributions are summarized as follows:
– We present a novel methodology for extracting network traffic features for
RF classification entirely within a programmable switch for line-rate network
traffic classification tasks. The methodology leverages several optimizations
in order to implement full-size RF models in such devices, including the par-
allelization of feature processing to minimize expensive sequential operations
and performing a number of Ternary Content-Addressable Memory (TCAM)
consumption reduction steps. Our methodology was implemented on an Intel
Tofino switch, demonstrating that it conserves the switch’s limited resources.
– We showcase our methodology’s ability to mitigate the ransomware threat
at scale. A comprehensive evaluation was performed, showing that the pro-
posed methodology can reliably fingerprint a host infected with a number of
the most prominent ransomware strains from only a small number of pack-
ets. Moreover, the methodology is capable of performing multiclass classifi-
cation in order to reveal the ransomware family responsible for the infection.
Additionally, we interleaved varying rates of benign packets in between the
malicious transmissions of an infected host to emulate the varying degrees
of additional legitimate processes that may be running on that host despite
being compromised that may be observed in the wild. The proposed app-
roach’s performance experienced negligible degradation amid such interleav-
ing, which further demonstrates the approach’s ability to safeguard machines
regardless of their legitimate network activity.
– We implemented a number of measures to promote the proposed approach’s
adoption in practice. In particular, flexible deployment options are supported
by our approach’s compatibility with asymmetric routing and its indepen-
dence from the controller. Furthermore, the methodology is fully converted
to generic Behavioral Model version 2 (BMv2) [1] code and entirely auto-
mated to facilitate its application by practitioners on a variety of switch
hardware targets, regardless of their background. Additionally, we make all
source code, datasets, and analytics scripts publicly available [40] to promote
future advancements in this domain.
The remainder of the paper is organized as follows. We begin by reviewing the
related literature. Subsequently, Sect. 3 elaborates upon the ransomware threat
model for this work. In Sect. 4, we present the proposed methodology and high-
light its various intricacies. We then comprehensively evaluate our methodology
to verify its effectiveness and practicality in Sect. 5. Finally, we conclude this
work and summarize its findings in Sect. 6.
A Learning Methodology for Line-Rate Ransomware Mitigation 123
2 Related Work
Switch-Based RF Classification. The enhanced classification speed that can
be acquired by pairing ML with the processing capabilities of programmable
switches has began garnering attention from researchers in recent years. In terms
of RF development, the notable contribution of Xiong and Zilberman [54] first
brought attention to such possibilities by demonstrating how Decision Trees
(DTs) could theoretically be sequentially (i.e., traversing the root node down to
a leaf) encoded into the switch’s pipeline. Subsequently, Busse-Grawitz et al. [16],
Lee and Singh [36], and Zheng and Zilberman [57] extended this functionality
by combining noteworthy variations of sequential DT processing to ultimately
realize RFs in the data plane. As such sequential processing limits the size of
in-network RF models that can be developed and leaves little-to-no resources
on the switch for storing and processing features, as well as essential forwarding
and telemetry applications, we endeavor to build upon the advancements of
the aforementioned authors by diverging from more of an if-else sequential
programmatic approach to leveraging ternary key Match-Action Tables (MATs)
to assess the ranges of the RF’s features in parallel in order to preserve the
switch pipeline’s stages. In general, consecutive stages are consumed whenever
dependencies between statements in a P4 program are present. Moreover, we
take a number of additional measures to conserve TCAM utilization, thereby
enabling us to fit a larger RF comfortably within the switch’s pipeline. Lastly,
we take the next step in switch-based ML development by also incorporating
feature extraction, processing, and storage into the P4 program to arrive at a
full-fledged ransomware traffic classification scheme on an Intel Tofino switch.
Ransomware Detection. Given the urgency for effective network-based ran-
somware protection is dire, such development has began taking place in Software
Defined Networking (SDN) environments. Cusak et al. [21] and Cabaj et al. [17]
led the charge by utilizing the data plane to prompt server-based classification
via an RF and Deep Packet Inspection (DPI), respectively. Subsequent works
[2,3,46] took an approach similar to Cusak et al. by instructing the SDN switch to
forward all relevant traffic to server-based analysis mechanisms to perform DPI
and other techniques in order to detect ransomware. Building upon the afore-
mentioned authors’ momentum, we extend ransomware detection and mitigation
to programmable data planes. However, rather than forwarding a wealth of traf-
fic data to the controller and other server-based analysis mechanisms, which can
lead to flooding in busy networks and result in detection delays [23], we finger-
print ransomware solely on the programmable switch. Indeed, such controller
independence coupled with the proposed approach’s strategy of only analyz-
ing unidirectional traffic allows it to support any number placement strategies
within a given network topology. Further, while previous efforts were specifically
designed to defend against one or so variants and frequently rely on unencrypted
traffic to perform DPI, we bridge this gap by performing both binary and mul-
ticlass classification on a number of variants of the most prominent ransomware
strains, regardless if the traffic is encrypted.
124 K. Friday et al.
4 Proposed Methodology
In this section, we present the proposed methodology for detecting and mitigat-
ing ransomware attacks, as summarized in Fig. 1. Moreover, such a methodology
provides a blueprint for the development of other RF-based traffic classifica-
tion tasks on programmable switches. To that extent, we kindly refer interested
readers to our publicly available source and data analysis code [40] for additional
implementation details.
When contemporary ransomware infects a target, the ransomware will often emit
traffic pertaining to either (1) C&C-related communications or (2) probing for
additional targets. Note that (1) may include both locating the C&C server and
the exchange of data once a C&C connection has been established. Based off
these two types of malicious transmissions, there are three primary ways that
the proposed methodology aspires to mitigate ransomware.
A Learning Methodology for Line-Rate Ransomware Mitigation 125
Controller Class
Reducon
Byte Gray
… Masks Code
Packet Captures Generate CSV Feature Selecon Construct RF Opmize TCAM Use Populate RF MATs
f2 No
pthresh
fk Forward packet
4.3 RF Implementation
The last column in the SRAM matrix holds the packet count pcount , which signals
the RF to consume the aforementioned F when pcount = pthresh , as portrayed
in Fig. 1. Given that traversing the Decision Trees (DTs) of the RF sequentially
to arrive at their leaves for classification consumed a number of extra stages of
the switch in past works, we alternatively evaluate all of the DTs’ nodes within
the RF in parallel. A simplified view of how we perform this technique with an
RF with three features f1 , f2 , and f3 , and two classes, is portrayed in Fig. 2.
As shown, the RF-to-MAT conversion procedure can be summarized in three
primary steps. First, the controller generates the RF, and extracts every path
amid the DTs that arrives at a malicious classification. Such paths are denoted in
Fig. 2 with numbered boxes that are shaded in gray next to each malicious class
label 1. Note the decision boundaries d for every intermediary node in the DTs
has subscripts of the format DT number, feature number, and the numbered
occurrence of that feature within the given DT. Subsequently, the ranges for
each fi are extracted from the malicious paths, sorted, and split so that each
split portion of each of the ranges for a given fi map to a unique integer. Lastly,
the combinations of return integers for each fi that map to the aforementioned
numbered malicious paths are placed in Classification MAT, utilizing exact
match keys. Additionally, note that the benign DT paths were not extracted in
the first step, as we default anything not malicious to a benign classification of
0 in the classification MAT.
A Learning Methodology for Line-Rate Ransomware Mitigation 129
f1 MAT
Range Return integer
[0, d1,1,1] 1 f2 MAT
(d1,1,1, d1,1,2] 2 Range Return integer
(d1,1,2, d3,1,2] 3 [0, d3,2,1] 1
(d3,1,2, d3,1,1] 4 (d3,2,1, d3,2,2] 2
(d3,1,1, d2,1,2] 5 (d3,2,2, d1,2,1] 3
(d2,1,2, d2,1,1] 6 (d1,2,1, d1,2,2] 4
(d2,1,1, ) 7 (d1,2,2, d2,2,2] 5
Classification MAT
Exact Return integer Exact Return integer Exact Return integer Exact Return integer Exact Return integer Exact Return integer
1 1 1 1 2 1 1 1 7 7 1 1 1 1 2 1 5 1 7 1 1 2 1 1
2 2 2 2 2 2 3 6 2 3 2
3 3 3 3 3 3 4 7 3 4 3
4 4 4 4 5 5 4
5 5 5 6 6 5
6 7 7 6
1 3 7 5 7 9 11 7
1 3 1 1 1 1 1 1 1 1 2 1 1 1 1 1 1 2 1 1 Default 0
4 2 2 2 2 2 2 2 2 2
5 3 3 3 3 3 3 3 3 3
6 4 4 4 4 4 4 4 4 4
7 5 5 5 5 5 5 5
6 6 6 6 6
7 7 7 7
2 4 6 8 10
proposed methodology to other traffic classification tasks, the majority class can
be substituted for benign in this ransomware classification scenario in order to
conserve the switch’s resources.
The next reduction step is based on the intuition that, given a sequence of
bytes b0 , b1 , ..., bk from higher-order to lower-order that make up an integer, if bi
is incremented j times, bi+1 is guaranteed to cycle through all 256 values at least
j − 1 times. Thus, a 00000000 mask can be applied to bi+1 a minimum of j − 1
times in such instances, which thereby reduces the number of ternary entries
for the given MAT by at least 256(j − 1). This is because the initial j0 value of
bi and its final increment jn may only partially cycle though the 256 values for
bi+1 .
For the final reduction step, we perform a variation of a Gray Code (GC)
[7] conversion of the feature values on the switch, prior to applying them to the
fi MATs in Fig. 1. This conversion entails the binary encoding of integers in a
contiguous range in a manner such that the codes of any two consecutive integers
differ only by a single bit. Such a single-bit difference can promote the seamless
masking of integers to identify ranges. An example of a 4-bit GC conversion
and the masking it facilitates is shown in Fig. 3, which can be extended to 8
bits and beyond. Note that the single bit difference property of GC encoding is
enabled by reflecting a given sequence of bits once they have cycled through all
possible values. For instance, observe that the bits corresponding to integers [0,
3] in Fig. 3 are then reflected in integers [4, 7]. Due to such reflection, we cannot
necessarily deterministically convert a given bi of a particular feature in a MAT,
as the GC for bi may not be the same for different integers. Alternatively, our
variation of a GC conversion is performed efficiently on the switch by using P416
bit slicing to divide a feature’s binary representation into its individual bytes
b0 , b1 , ..., bk , from higher-order to lower-order. Next, the controller populates a
separate GCi MAT that is applied for each bi to perform deterministic byte-level
GC conversions, which only requires 256 P4 exact match keys. Subsequently, the
resultant GC conversions are applied to the aforementioned fi MATs in Fig. 1.
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0000 0001 0011 0010 0110 0111 0101 0100 1100 1101 1111 1110 1010 1011 1001 1000
Mask: 1100
Mask: 0110 Mask: 1010 Mask: 0110 Mask: 1010 Mask: 0110
Mask: 1000
Mask: 0100
Fig. 3. The TCAM masking strategy derived from GC. The bold horizontal black lines
indicate ranges that can be distinguished via applying the mask underneath.
5 Evaluation
In this section, we extensively evaluate the proposed methodology to asses its
viability and practicality as an in-network traffic classification technique that is
capable of thwart-
Table 2. Datasets utilized.
ing ransomware.
The datasets used Source Class Instances Encrypted Self-propagating
in this evalua- Ryuk ransomware 5 variants ✓ ✓
tion are listed Lockbit ransomware 4 variants ✓ ✓
ransomware 10 variants ✓ ✗
in Table 2. Such Teslacrypt
Virlock ransomware 11 variants ✓ ✗
datasets include Cryptowall ransomware 8 variants ✗ ✗
a multitude of Cerber ransomware 5 variants ✗ ✗
Wannacry ransomware 3 variants ✓ ✓
variants associ- Locky ransomware 3 variants ✗ ✗
ated with eight Stratosphere benign 6 captures NA
Laboratory [51]
prominent ran- P2P [44] benign 6 captures NA
somware fami-
lies, including those that utilize encrypted traffic and self-propagate. To arrive at
the ransomware family datasets, we captured the traffic from the machines they
infected in a Triage sandbox environment, which we made publicly available for
download [40]. Note that leveraging such a sandbox allows us to assess precisely
which packets originating from an infected host are of malicious intent for label-
ing purposes, regardless if the traffic is encrypted. Additionally, we included a
variety of notable benign traffic datasets in our experiments from the Strato-
sphere Laboratory [51] that encompass DNS and P2P traffic, as well as HTTPS
connections to Alexa top 1k domains. Since P2P traffic often entails a source
IP contacting several destination IPs, it can prove challenging for probing and
C&C detection techniques. To this extent, we included another P2P dataset [44]
for good measure. In our experiments, we consider an IPsource that is correctly
and incorrectly classified as ransomware to be a True Positive (TP) and False
Positive (FP), respectively, and such IPs that are correctly and incorrectly classi-
fied as benign as True Negatives (TNs) and False Negatives (FNs), respectively.
Given the class imbalance in our datasets, we use precision = T P/(T P +F P ) and
recall = T P/T P +F N as our evaluation metrics.
132 K. Friday et al.
relatively uniformly distributed over the four ranges of [0.0, 0.55), [0.55, 1.0),
[1.0, 5.5), and [5.5, 10.0) ms. In turn, we aggregated the aforementioned IPsource
groupings of pthresh = 50 samples into buckets of these ranges. Once the inter-
leaving was completed for each benign-ransomware IPsource pair, the IPsource
of the benign packets were spoofed to that of the host compromised with ran-
somware. This procedure was repeated for every ransomware IPsource in the
experiment. scapy was then used to transmit the aforementioned interleaved
traffic through the Intel Tofino switch as the ransomware class, while simulta-
neously transmitting the entirety of the benign datasets via tcpreplay as the
benign class.
Ransomware Classification. The first experiment that we conducted was to
measure the effectiveness of the proposed methodology for performing the binary
classification of benign hosts and those possessing ransomware. Additionally, we
executed this test over varying pthresh , namely, 1, 2, 3, 5, 10, 15, 20, 30, 40, and
50, as lower pthresh directly translates to faster detection and mitigation times.
This experiment was also performed for each of the aforementioned interleaved
benign interarrival time ranges. Per the results visualized in Fig. 4, it can be
observed that the proposed methodology obtained high precision and recall for
pthresh ≥ 3. Moreover, the interleaved benign traffic had little impact on ran-
somware classification. Some subtle performance degradation can be observed
for higher rates of benign traffic interleaved with greater pthresh , but that is
expected as the prominence of ransomware indicators present in the features
will be smoothed out to a degree over such pthresh . For example, attempting
to attribute ransomware with a pthresh = 50 from only three actual malicious
packets among the 47 benign will likely result in some misclassifications.
In a similar manner, we performed the multiclass classification of each ran-
somware family listed in Table 2, with all benign datasets given a benign clas-
sification. Indeed, effective multiclass classification offers more granularity that
Fig. 4. Binary classification performance with varying pthresh amid different interar-
rival times. The topmost rows are denoted at No Interleaving (NI), as the ransomware
traffic for those instances applied as extracted from the sandbox environment.
134 K. Friday et al.
The extent to which ransomware has been plaguing our networks has never been
greater. Moreover, contemporary ransomware strains are now commonly employ-
ing self-propagation techniques to infiltrate other hosts and network shares, as
well as targeting devices that cannot defend themselves. To address this threat at
scale, we proposed a novel methodology for embedding a learning-based defense,
namely, a large RF, within programmable switches. After instrumenting an Intel
Tofino switch with our methodology, we showed that it can both detect com-
promised hosts and even attribute the ransomware family they are currently
housing with high precision and recall. Moreover, we show that the proposed
methodology is resource conservative and scalable to a variety of networks that
may observe differing rates of traffic. Finally, we make all source and analysis
136 K. Friday et al.
code along with the ransomware datasets we generated for this research effort
publicly available to promote future advancements in this domain. Future work
will entail extending our multiclass detection strategy to encompass more ran-
somware families, and the proposed approach will be deployed in the wild to
further substantiate its ability to classify ransomware traffic amid real-world
settings.
References
1. p4lang/behavioral-model, November 2019. https://github.com/p4lang/behavioral-
model
2. Akbanov, M., Vassilakis, V.G., Logothetis, M.D.: Ransomware detection and mit-
igation using software-defined networking: the case of wannacry. Comput. Electr.
Eng. 76, 111–121 (2019)
3. Alotaibi, F.M., Vassilakis, V.G.: Sdn-based detection of self-propagating ran-
somware: the case of badrabbit. IEEE Access 9, 28039–28058 (2021)
4. AlSabeh, A., Khoury, J., Kfoury, E., Crichigno, J., Bou-Harb, E.: A survey on
security applications of p4 programmable switches and a stride-based vulnerability
assessment. Comput. Netw. 207, 108800 (2022)
5. AlSabeh, A., Safa, H., Bou-Harb, E., Crichigno, J.: Exploiting ransomware para-
noia for execution prevention. In: ICC 2020–2020 IEEE International Conference
on Communications (ICC), pp. 1–6. IEEE (2020)
6. Barradas, D., Santos, N., Rodrigues, L., Signorello, S., Ramos, F.M., Madeira,
A.: Flowlens: enabling efficient flow classification for ML-based network security
applications. In: Proceedings of the 28th Network and Distributed System Security
Symposium, San Diego, CA, USA (2021)
7. Bitner, J.R., Ehrlich, G., Reingold, E.M.: Efficient generation of the binary
reflected gray code and its applications. Commun. ACM 19(9), 517–521 (1976)
8. Bosshart, P., et al.: P4: programming protocol-independent packet processors.
ACM SIGCOMM Comput. Commun. Rev. 44(3), 87–95 (2014)
9. Bou-Harb, E.: A brief survey of security approaches for cyber-physical systems.
In: 2016 8th IFIP International Conference on New Technologies, Mobility and
Security (NTMS), pp. 1–5. IEEE (2016)
10. Bou-Harb, E., Debbabi, M., Assi, C.: A statistical approach for fingerprinting prob-
ing activities. In: 2013 International Conference on Availability, Reliability and
Security, pp. 21–30. IEEE (2013)
11. Bou-Harb, E., Debbabi, M., Assi, C.: A systematic approach for detecting and
clustering distributed cyber scanning. Comput. Netw. 57(18), 3826–3839 (2013)
12. Bou-Harb, E., Debbabi, M., Assi, C.: Behavioral analytics for inferring large-scale
orchestrated probing events. In: 2014 IEEE Conference on Computer Communica-
tions Workshops (INFOCOM WKSHPS), pp. 506–511. IEEE (2014)
13. Bou-Harb, E., Debbabi, M., Assi, C.: Big data behavioral analytics meet graph
theory: on effective botnet takedowns. IEEE Network 31(1), 18–26 (2016)
14. Bou-Harb, E., Debbabi, M., Assi, C.: A novel cyber security capability: inferring
internet-scale infections by correlating malware and probing activities. Comput.
Netw. 94, 327–343 (2016)
A Learning Methodology for Line-Rate Ransomware Mitigation 137
15. Bou-Harb, E., Lakhdari, N.E., Binsalleeh, H., Debbabi, M.: Multidimensional
investigation of source port 0 probing. Digit. Investig. 11, S114–S123 (2014)
16. Busse-Grawitz, C., Meier, R., Dietmüller, A., Bühler, T., Vanbever, L.: pforest:
In-network inference with random forests. arXiv preprint arXiv:1909.05680 (2019)
17. Cabaj, K., Gregorczyk, M., Mazurczyk, W.: Software-defined networking-based
crypto ransomware detection using http traffic characteristics. Comput. Electr.
Eng. 66, 353–368 (2018)
18. Cabaj, K., Mazurczyk, W.: Using software-defined networking for ransomware mit-
igation: the case of cryptowall. IEEE Network 30(6), 14–20 (2016)
19. Chen, X., Kim, H., Aman, J.M., Chang, W., Lee, M., Rexford, J.: Measuring TCP
round-trip time in the data plane. In: Proceedings of the Workshop on Secure
Programmable Network Infrastructure, pp. 35–41 (2020)
20. Chernikova, A., et al.: Cyber network resilience against self-propagating malware
attacks. In: Atluri, V., Di Pietro, R., Jensen, C.D., Meng, W. (eds) ESORICS 2022.
LNCS, vol. 13554, pp. 531–550. Springer, Cham (2022). https://doi.org/10.1007/
978-3-031-17140-6_26
21. Cusack, G., Michel, O., Keller, E.: Machine learning-based detection of ransomware
using SDN. In: Proceedings of the 2018 ACM International Workshop on Security
in Software Defined Networks & Network Function Virtualization, pp. 1–6 (2018)
22. Friday, K., Bou-Harb, E., Crichigno, J., Scanlon, M., Beebe, N.: On offloading net-
work forensic analytics to programmable data plane switches. Book Series: World
Scientific Series in Digital Forensics and Cybersecurity (2021)
23. Friday, K., Kfoury, E., Bou-Harb, E., Crichigno, J.: Towards a unified in-network
DDoS detection and mitigation strategy. In: 2020 6th IEEE Conference on Network
Softwarization (NetSoft), pp. 218–226. IEEE (2020)
24. Friday, K., Kfoury, E., Bou-Harb, E., Crichigno, J.: Inc: In-network classification of
botnet propagation at line rate. In: Atluri, V., Di Pietro, R., Jensen, C.D., Meng,
W. (eds.) ESORICS 2022. LNCE, vol. 13554, pp. 551–569. Springer, Cham (2022).
https://doi.org/10.1007/978-3-031-17140-6_27
25. Gutterman, C., et al.: Requet: real-time QOE detection for encrypted YouTube
traffic. In: Proceedings of the 10th ACM Multimedia Systems Conference, pp. 48–
59 (2019)
26. Humayun, M., Jhanjhi, N., Alsayat, A., Ponnusamy, V.: Internet of things and
ransomware: evolution, mitigation and prevention. Egyptian Inform. J. 22(1), 105–
117 (2021)
27. Intel: Intel Tofin Series Programmable Ethernet Switch ASIC. https://www.intel.
com/content/www/us/en/products/network-io/programmable-ethernet-switch/
tofino-series/tofino.html
28. Intel: Intelő tofino 3 intelligent fabric processor brief. https://www.intel.com/
content/www/us/en/products/network-io/programmable-ethernet-switch/tofino-
3-brief.html
29. Jareth: How ransomware spreads: 9 most common infection methods and
how to stop them, December 2019. https://blog.emsisoft.com/en/35083/how-
ransomware-spreads-9-most-common-infection-methods-and-how-to-stop-them/
30. of Justice, T.U.S.D.: How to protect your networks from ransomware, March 2022.
https://www.justice.gov/criminal-ccips/file/872771/download
31. Kapoor, A., Gupta, A., Gupta, R., Tanwar, S., Sharma, G., Davidson, I.E.: Ran-
somware detection, avoidance, and mitigation scheme: a review and future direc-
tions. Sustainability 14(1), 8 (2021)
138 K. Friday et al.
52. Tandon, A., Nayyar, A.: A comprehensive survey on ransomware attack: a grow-
ing havoc cyberthreat. Data Management, Analytics and Innovation, pp. 403–420
(2019)
53. Wheelus, C., Bou-Harb, E., Zhu, X.: Tackling class imbalance in cyber security
datasets. In: 2018 IEEE International Conference on Information Reuse and Inte-
gration (IRI), pp. 229–232. IEEE (2018)
54. Xiong, Z., Zilberman, N.: Do switches dream of machine learning? toward in-
network classification. In: Proceedings of the 18th ACM Workshop on Hot Topics
in Networks, pp. 25–33 (2019)
55. Yaqoob, I., et al.: The rise of ransomware and emerging security challenges in the
internet of things. Comput. Networks 129, 444–458 (2017)
56. Zahra, S.R., Chishti, M.A.: Ransomware and internet of things: a new security
nightmare. In: 2019 9th International Conference on Cloud Computing, Data Sci-
ence & Engineering (confluence), pp. 551–555. IEEE (2019)
57. Zheng, C., Zilberman, N.: Planter: seeding trees within switches. In: Proceedings
of the SIGCOMM 2021 Poster and Demo Sessions, pp. 12–14 (2021)
Reducing Intrusion Alert Trees to Aid
Visualization
1 Introduction
Real-world cyber defense tools often produce a huge number of alerts on a daily
basis. It is an important problem to leverage these alerts for defense purposes
because they are often the first opportunity for the defender to detect attacks. A
common approach for this problem is to use graph-based visualization. However,
large graphs can be difficult to analyze manually. It is important to enable this
process because human defenders may be able to detect attacks or make sense
of alerts that automated tools cannot. Nevertheless, the practice of maintaining
“human in the loop” decision-making is often overlooked.
Alert trees have been proposed as an alternative to arbitrary network graphs
(or multigraphs). Intuitively, alert trees offer several advantages over graphs:
The first advantage is their planarity, under which no edges overlap [14]. This
is important because planarity makes it easier to visually distinguish edges.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 140–154, 2022.
https://doi.org/10.1007/978-3-031-23020-2_8
Reducing Intrusion Alert Trees to Aid Visualization 141
The second advantage is that alert trees show the temporal relationships among
alerts. Graphs prioritize spatial relationships, and can only model temporal rela-
tionships by either adding dynamic animations, which take time to observe, or
annotating edges with timestamps, which require the effort of granular inspec-
tion and interpretation.
Alert trees themselves exhibit some limitations, such as: (i) trees can be
prohibitively large; and (ii) trees may present redundant information, which
can confuse defenders. Thus it is not trivial to use alert trees to represent the
temporal relationships between alerts. This motivates the present study.
In order to aid the visualization of alert trees, we hereby contribute a data struc-
ture, three algorithms, two metrics and a case study. First, we introduce the
concept of hypotree, which is useful in the set of reductions that follow by identi-
fying repeated attack patterns across particular links. Second, we propose several
novel algorithms for reducing the size of alert trees. One algorithm for merging
sibling leaves: this eliminates redundancy while preserving significant threats.
One algorithm for merging sibling branches: this eliminates redundancy while
preserving the underlying structure. One algorithm for truncating hypotrees, the
aforementioned novel data structure: this reduces redundancy by grouping sub-
sequent co-located alerts. Third, we propose methods and metrics for evaluating
the usefulness of the above algorithms. Specifically, we consider the effects of
the algorithms on tree size and information retention. These act as trade-offs,
representing the sensitive conflict between not enough and too much informa-
tion. This trade-off poses as a new challenge because information loss has not
been studied in the present context, despite research in other contexts (e.g.,
data anonymization [18] and data perturbation [19]). Fourth, we demonstrate
the usefulness of the proposed approach by applying these three algorithms to
a well-known dataset. We measure the reduction in visual strain (i.e., tree size)
and compare it to the trade-off in lost information.
Since our study is centered at visualizing alerts to help defenders, we divide the
relevant prior studies into the following three categories.
Alert and Attack Trees. There have been studies on leveraging alerts to
help defenders, such as: correlating alerts to construct attack scenarios or enable
collaborative defense [7,20,28], leveraging alerts to learn attack strategies [21],
and alert fusion and reasoning [12]. These approaches are useful for modeling
various attack patterns. However, these patterns are often not reliable enough
to incorporate into a fully automated system, which could damage systems if
deployed too aggressively. In light of this, it remains important for alert-based
systems to present models that are intuitive to human defenders.
Alert trees [9] are conceptually related to attack trees [1,5,22]. Attack trees
are often used to describe the preconditions that allow attackers to achieve their
142 E. Ficke et al.
goals. Because of this, attack trees are often used to guide the hardening of a
network, and constitute preventive measures. By contrast, alert trees are meant
to make sense of the alerts produced by cyber defense tools as attacks enter the
network. This means that alert trees are more appropriate than attack trees for
the sake of cyber triage, which measures the scope of various attacks against a
network. Alert trees are detective measures. Because the semantics of alert trees
differ from attack trees and arbitrary network graphs, the patterns exhibited
by alert trees are likely unique. This motivates us to tailor our approach to the
specific case of alert trees. To our knowledge, no other works have targeted the
problem of reducing redundancy for alert trees in particular.
Alert Aggregation. While the notion of an alert tree does not necessarily
demand alert reduction in general, it may be useful during alert tree construc-
tion. In this regard, alert reduction is related to the notion of alert aggregation
(see, e.g., [17,23,24]), which aims to reduce alert cardinality in order to improve
efficiency. The present work contrasts this by managing redundancies after the
trees have been constructed, rather than before or during construction. This
difference means that any potential data loss is delayed until further down the
processing line and should be easier to recover if necessary.
Graph Visualization. Network visualization has been used to present data to
defenders for the purposes of cyber triage [16,26]. These visualizations are pri-
marily targeted at identifying individual attacks or aggregating similar attacks,
rather than tracking consecutive attacks in a spatiotemporal context. Other
works have used graphs in which nodes represent computers, while arcs rep-
resent security events, such as attacks or remote access [11,13]. These works
focus on detecting anomalies, rather than tracking attacks deterministically and
over time. As mentioned above, planarity is guaranteed in alert trees but not
alert graphs. Metrics used to rank and color graphs vary, as alert trees contain
multiple types of data such as the type and number of attacks observed, ver-
tex connectedness, and number of paths [1,15]. Some libraries used for graph
visualization include Tulip [2], Graphviz [8], and Pajek [3].
The rest of the paper is organized as follows. Section 2 introduces the research
problem and defines important terms. Section 3 details the methods used.
Section 4 presents a case study. Section 5 discusses strengths and weaknesses of
the work. Section 6 concludes the present paper with future research directions.
2 Problem Formalization
This section introduces the concepts and terms used throughout the paper and
describes the context for their use. It also discusses the research questions we
hope to answer.
Reducing Intrusion Alert Trees to Aid Visualization 143
We investigate the problem of intuitive and efficient cyber triage. We use the con-
text of an enterprise network, which consists of computers, networking devices,
and security devices, is managed by a cyber defender, and is targeted by a
cyber attacker who resides inside or outside the enterprise network. Once the
attacker establishes a foothold in the network (through exploits, social engi-
neering attacks, or other means), they conduct lateral movement to compromise
additional computers. These attacks leave footprints that can be detected by
security devices in order to form alert paths. The first computer in an alert path
is known as the origin and all other computers are considered victims. The final
computer may also be called the path’s target.
When multiple paths branch out from a single origin, these can be formulated
into an alert tree. Computers in an alert tree are represented by vertices, and
arcs between them denote sets of alerts. Alert trees may be forward-looking or
backward-looking, such that the root of the tree belongs to all of the tree’s paths
as either the origin or target, respectively.
The concept of alert trees is important because they serve a critical role in
facilitating incident response. Specifically, alert trees help defenders intuitively
understand the scope of an attack in terms of the breadth of network impact
and focal points thereof.
The visualization of alert trees has presented some significant limitations.
Firstly, alert trees have been shown to be particularly large, with some cases
resulting in over 5000 nodes, in under a week of attacks [9]. This size of tree
is prohibitive to analyze as a whole, but simply removing parts may introduce
errors. Thus, the focus of this paper is reducing visual strain while minimizing
information loss.
144 E. Ficke et al.
The above discussion naturally leads to several intuitive needs regarding alert
tree visualization. Specifically: (i) trees must be reasonably sized for visualiza-
tion and viewing by defenders, (ii) trees must accommodate or preserve valu-
able information, and (iii) relevant information on trees must stand out. These
problems highlight some of the limitations in the related literature, which offers
visualization techniques but does not analyze them for robustness. This inspires
us to design and implement the methods here proposed. In what follows we first
introduce the concepts used in this paper using formal definitions.
The core of this work is the reduction operations on alert paths and trees. These
concepts are used throughout the paper.
Alert Path. Intuitively, an alert path describes a series of attacks traversing
one or more network connections, which may have been used by an attacker to
conduct a multi-step attack.
Definition 1 (Alert Path). Given a graph G = (V, E), define an alert path
p = (nodes, edges); where p.nodes = (v1 , v2 , . . . , v ) ⊆ V , such that ∀vi , vj ∈
p.nodes, v = v → i = j; and p.edges = ((v1 , v2 ), (v2 , v3 ), . . . , (v−1 , v )), such
that e ∈ p.edges → e ∈ E.
Alert Tree. An alert tree represents a set of alert paths with a common origin or
target and is composed of nodes with corresponding parent/child relationships.
Each node has a name and a color that represents some metric used to
show the importance of a node. For this work, we will use the threat score
(TS) metric as defined in [9], although the model is metric agnostic. Threat
score is used to describe the severity of attacks against a given target. For alert
trees, we isolate threat score with respect to a given attacker as well (the node’s
parent, as described below). It is sufficient to note that node colors range from
red to black (i.e., in hexadecimal notation: 0xFF0000 to 0x000000), where red
indicates a higher value of the relevant metric, denoting a higher importance.
This is demonstrated in Fig. 1, and will be elaborated further in Sect. 3. These
nodes are used to construct an alert tree based on the following definition.
Alert trees come in two logical forms: forward and backward. For any node nf
in a forward tree, an arc (nf .parent, nf ) indicates an attack from nf .parent to
nf . Conversely, for any node nb in a backward alert tree, an edge (nb .parent, nb )
Reducing Intrusion Alert Trees to Aid Visualization 145
T1: B T2: B
F G F G H
Fig. 2. Example hypotree, where T1 T2 . Color coding shows analogous nodes in the
hypertree. (Color figure online)
Remark 1 (“Hypotree” Usage). The term hypotree has been used to refer to an
altered subtree structure in [10], but is otherwise absent from the literature.
Our usage is not inconsistent with this one. However, this usage may seem to
imply that its inverse is a hypertree, which has been used to denote an unrelated
concept [4,25]. For our purposes, it is sufficient to exclusively use the one-way
relationship of hypotree.
Based on the naming restrictions given in the definition of alert tree, we can
see that for any given alert tree, each node has a single ancestry which is unique
in the tree. With this in mind, we define hypotree in Definition 3.
the attack (B, H). This means that if the two trees were produced by different
attackers and only node H was compromised, we can conclude it was done by
the attacker that produced T2 .
3 Methods
In this section, we propose several methods for reducing an alert trees. Specifi-
cally, we propose merging sibling leaves, merging sibling branches, and truncating
hypotrees, as highlighted in Fig. 3.
Each of the three base functions can be used on its own to reduce a given
alert tree. These represent reduction schedules one, three and five, respectively.
However, because the nodes they merge or remove may overlap, it is unsafe to
apply more than one reduction at a time. The only exception is the merge sibling
leaves reduction, which may be applied after (but not before) either of the other
two base reductions because it does not create conflicts with them. This forms
reduction schedules two and four.
The model requires alert trees as inputs, as defined in Sect. 2. Once the trees
are imported, it annotates them to facilitate the reduction algorithms and sends
them to the appropriate functions. The remainder of this section describes the
base reductions.
Reducing Intrusion Alert Trees to Aid Visualization 147
AVR
Merge Schedule 1
Input Sibling Output
Schedule 2
Alert Branches Reduced
Trees Annotate Merge
Schedule 3 Trees
Tree Sibling
Leaves Schedule 4
Truncate
Hypotrees Schedule 5
Fig. 3. Reductions overview. The colored boxes represent reductions, while colored
arrows represent reduction schedules. Reduction schedules 1,3, and 5 utilize only a
single reduction, while 2 and 4 apply two reductions in sequence. (Color figure online)
Fig. 4. Example tree with reduction schedules 3 and 1 applied. Colors show unique
nodes. Black denotes merges along with number of nodes merged. (Color figure online)
Fig. 5. Example reduction schedules 2, 5 and 4. Colors shows unique nodes. Black
denotes merges or truncations along with the number of nodes reduced. (Color figure
online)
merged leaves according to the TS of the merged leaves. In attack trees, this is
done by adopting the color of the node with the highest TS among those merged.
The approach is as follows. We use a breadth-first traversal to iterate over
the tree, parsing the list of each internal node’s children. For each set of children,
we check each node to determine if it is a leaf node and document the highest
TS within the set of those leaves. We then replace the leaves with a single
node, showing the number of leaves merged and color coded according to the TS
selected above. Figure 4b shows the result of merging leaves on the example tree
from Fig. 4a.
Because all nodes in hypotrees are duplicated in their respective hypertrees, they
are redundant. For this reason, we choose to truncate hypotrees in order to reduce
visual strain on the viewer. This preserves the most amount of information since
all edges are preserved (in the corresponding hypertree), even if their location
and number are lost.
The basic idea of the algorithm is described as follows. We parse the tree
using a breadth-first traversal, marking all nodes that share the same address.
We then compare the hypotrees of each set of identical nodes, preserving trees
which have no proper hypertrees and truncating the rest. In the case of two
equivalent hypotrees (i.e., ), we preserve only the one appearing
first in the traversal. Truncated trees contain annotations to refer viewers to the
corresponding hypertree. Archives save information about removed hypotrees
so they can be reconstructed if needed. The method for truncating hypotrees is
given in Algorithm 1. Figures 4b and 4c show an example usage of the algorithm.
Reducing Intrusion Alert Trees to Aid Visualization 149
4 Case Study
For the case study, we used CSE-CIC-IDS2018 [27], a well-known dataset col-
lected from a testbed with both injected and wild attacks. From the network
traffic, Snort [6] produced 3.3M alerts. These were assembled into trees using
APIN [9]. Nodes were ranked according to threat score, calculated as the geo-
metric mean of the volume and diversity of alerts incident to the node. Trees
were ranked according to the threat score of their root node.
From the resulting trees, we selected 15 for AVR to reduce: 5 each from
the top ranked, bottom ranked, and randomly selected trees. Statistics for the
selected trees are as follows. The top 5 set had on average 9.8 vertices, 7.6 unique
vertices and 8.8 unique arcs. Next, the bottom 5 set had on average 15 vertices,
10.6 unique vertices and 14 unique arcs. Finally, the random 5 set had on average
1999 vertices, 234.4 unique vertices and 825.6 unique arcs.
4.2 Results
Results of the experiments are given in Table 1. Of the basic reductions, the
truncate hypotrees performed the worst in most cases, with its RI trailing by
Reducing Intrusion Alert Trees to Aid Visualization 151
margins of 0.373 and 0.354 for the random 5 and bottom 5 categories, respec-
tively. In the top 5 category, however, it outperformed both other algorithms by
at least 0.131.
Table 1. Results evaluated on alert trees sampled according to threat score. VSR is
average visual strain reduction, NR is average node retention, TSR is average threat
score retention, and RI is reduction index as the harmonic mean of VSR, NR and TSR.
Answering RQ 1: How much can one reduce alert tree size by merging similar
nodes? By merging leaves, tree size can be reduced by as much 98%, and by
merging branches tree size can be reduced by as much as 57%.
152 E. Ficke et al.
Answering RQ 2: How much can one reduce alert tree size by removing dupli-
cate nodes? By truncating hypotrees, tree size can be reduced by as much as
5.3%.
Answering RQ 3: How can one preserve the information lost in the solutions
to RQ1 and RQ2? The best way to preserve information is to truncate hypotrees,
which contain almost exclusively redundant information. Otherwise, results from
the other algorithms have variable results depending on the sample used.
Answering RQ 4: How can one highlight salient information in an alert graph
without increasing visual strain on the user? Color-coding salient information
allows the tree to highlight important data such as network hotspots and threat
activity. Color can be used for both nodes and edges, so NR and TSR are the
metrics to look at when one needs information salience.
The novel reductions had a broad range of performance, with each one having
a different strength. Since user needs will vary, it will be important to consider
these differences when choosing how to handle alert trees. Meanwhile, these
results are only preliminary and warrant further study.
5 Discussion
Limitations of the Methodology. The methods used in this study have the
following limitations. First, the reductions for merging branches and truncating
hypotrees have overlapping domains under composition. This means running
them in sequence may give different results depending on the order used. This
results in only five valid reduction schedules.
Additionally, alert paths do not necessarily give a precise account of an
attacker’s activity. This is for the following reasons: (i) attacks may fail, pro-
ducing alerts that do not indicate compromise; (ii) attacker addresses may be
spoofed or reflected, such that the source of the connection is not visible to net-
work monitors; (iii) security devices may have false positives or negatives; and
(iv) some attacks may use client-side exploits, resulting in arcs that are inverted
(i.e., the compromised computer may be the source of an attack rather than its
destination). These phenomena can induce errors in the experimental results.
Limitations of the Case Study. The dataset in the case study utilizes threat
score to rank edges and paths. This metric has not been robustly studied and
may not produce the best scores relative to a particular attack. However, the
methods proposed in the present study need not use threat score, but could easily
be adapted to rank nodes according to monetary value, vulnerability score, or
other related risk metrics.
6 Conclusion
This work introduced several methods for reducing the size of alert trees while
retaining as much information as possible. The three core functions can be used
Reducing Intrusion Alert Trees to Aid Visualization 153
References
1. Angelini, M., Prigent, N., Santucci, G.: PERCIVAL: proactive and reactive attack
and response assessment for cyber incidents using visual analytics. In: 2015 IEEE
Symposium on Visualization for Cyber Security (VizSec), pp. 1–8. IEEE (2015)
2. Auber, D.: Tulip—a huge graph visualization framework. In: Jünger, M., Mutzel,
P. (eds.) Graph Drawing Software. Mathematics and Visualization, pp. 105–126.
Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-642-18638-7 5
3. Batagelj, V., Mrvar, A.: Pajek-program for large network analysis. Connections
21(2), 47–57 (1998)
4. Brandstädt, A., Chepoi, V.D., Dragan, F.F.: The algorithmic use of hypertree
structure and maximum neighbourhood orderings. Discret. Appl. Math. 82(1–3),
43–77 (1998)
5. Chen, Y., Boehm, B., Sheppard, L.: Value driven security threat modeling based
on attack path analysis. In: 2007 40th Annual Hawaii International Conference on
System Sciences (HICSS 2007), pp. 280a–280a. IEEE (2007)
6. Cisco: Snort - network intrusion detection & prevention system, March 2018.
http://www.snort.org/downloads
7. Cuppens, F., Miège, A.: Alert correlation in a cooperative intrusion detection
framework. In: Proceedings of the 2002 IEEE Symposium on Security and Pri-
vacy, SP 2002, p. 202 (2002)
8. Ellson, J., Gansner, E., Koutsofios, L., North, S.C., Woodhull, G.: Graphviz—open
source graph drawing tools. In: Mutzel, P., Jünger, M., Leipert, S. (eds.) GD 2001.
LNCS, vol. 2265, pp. 483–484. Springer, Heidelberg (2002). https://doi.org/10.
1007/3-540-45848-4 57
9. Ficke, E., Xu, S.: APIN: automatic attack path identification in computer networks.
In: IEEE ISI 2020 (2020)
10. Gerbessiotis, A.V.: An architecture independent study of parallel segment trees. J.
Discrete Algorithms 4(1), 1–24 (2006)
11. Goodall, J.R., et al.: Situ: identifying and explaining suspicious behavior in net-
works. IEEE Trans. Vis. Comput. Graph. 25(1), 204–214 (2019)
12. Gu, G., Cárdenas, A., Lee, W.: Principled reasoning and practical applications of
alert fusion in intrusion detection systems. In: Proceedings of ACM Symposium
on Information, Computer and Communications Security (ASIACCS 2008), pp.
136–147 (2008)
154 E. Ficke et al.
13. Harshaw, C.R., Bridges, R.A., Iannacone, M.D., Reed, J.W., Goodall, J.R.: Graph-
Prints: towards a graph analytic method for network anomaly detection. In: Pro-
ceedings of the 11th Annual Cyber and Information Security Research Confer-
ence, CISRC 2016, pp. 15:1–15:4. ACM, New York (2016). https://doi.org/10.
1145/2897795.2897806
14. Herman, I., Melançon, G., Marshall, M.S.: Graph visualization and navigation in
information visualization: a survey. IEEE Trans. Visual Comput. Graphics 6(1),
24–43 (2000)
15. Kerzner, E., et al.: Graffinity: visualizing connectivity in large graphs. In: Computer
Graphics Forum, vol. 36, pp. 251–260. Wiley Online Library (2017)
16. Lohfink, A.P., Anton, S.D.D., Schotten, H.D., Leitte, H., Garth, C.: Security in
process: visually supported triage analysis in industrial process data. IEEE Trans.
Visual Comput. Graphics 26(4), 1638–1649 (2020)
17. Nadeem, A., Verwer, S., Yang, S.J.: SAGE: intrusion alert-driven attack graph
extractor. In: 2021 IEEE Symposium on Visualization for Cyber Security (VizSec),
pp. 36–41. IEEE (2021)
18. Nettleton, D.F.: Information loss evaluation based on fuzzy and crisp clustering
of graph statistics. In: 2012 IEEE International Conference on Fuzzy Systems, pp.
1–8. IEEE (2012)
19. Nettleton, D.F., Torra, V., Dries, A.: The effect of constraints on information loss
and risk for clustering and modification based graph anonymization methods. arXiv
preprint arXiv:1401.0458 (2014)
20. Ning, P., Cui, Y., Reeves, D.S.: Constructing attack scenarios through correlation
of intrusion alerts. In: Proceedings of the 9th ACM Conference on Computer and
Communications Security, CCS 2002, pp. 245–254 (2002)
21. Ning, P., Xu, D.: Learning attack strategies from intrusion alerts. In: Proceedings
of the 10th ACM Conference on Computer and Communications Security, CCS
2003, pp. 200–209 (2003)
22. Ray, I., Poolsapassit, N.: Using attack trees to identify malicious attacks from
authorized insiders. In: di Vimercati, S.C., Syverson, P., Gollmann, D. (eds.)
ESORICS 2005. LNCS, vol. 3679, pp. 231–246. Springer, Heidelberg (2005).
https://doi.org/10.1007/11555827 14
23. Sadoddin, R., Ghorbani, A.: Alert correlation survey: framework and techniques.
In: Proceedings of the 2006 International Conference on Privacy, Security and
Trust: Bridge the Gap Between PST Technologies and Business Services, pp. 1–10
(2006)
24. Salah, S., Maciá-Fernández, G., Dı́az-Verdejo, J.E.: A model-based survey of alert
correlation techniques. Comput. Netw. 57(5), 1289–1317 (2013)
25. Schidler, A., Szeider, S.: Computing optimal hypertree decompositions. In: 2020
Proceedings of the Twenty-Second Workshop on Algorithm Engineering and
Experiments (ALENEX), pp. 1–11. SIAM (2020)
26. Sethi, A., Wills, G.: Expert-interviews led analysis of EEVi-a model for effective
visualization in cyber-security. In: 2017 IEEE Symposium on Visualization for
Cyber Security (VizSec), pp. 1–8. IEEE (2017)
27. Sharafaldin, I., Lashkari, A.H., Ghorbani, A.A.: Toward generating a new intrusion
detection dataset and intrusion traffic characterization. In: ICISSP, pp. 108–116
(2018)
28. Valeur, F., Vigna, G., Kruegel, C., Kemmerer, R.A.: A comprehensive approach
to intrusion detection alert correlation. IEEE Trans. Dependable Secur. Comput.
1(3), 146–169 (2004)
Attacker Attribution via Characteristics
Inference Using Honeypot Data
1 Introduction
In today’s world, cybersecurity has an increasing importance as cyberattacks are
more and more frequent [1]. Initially, many researchers focused on the detection
of these incidents through the use of Intrusion Detection System (IDS) plat-
forms that attempt to capture the essence of the attack itself [7,14]. However,
with continual advances in technology, new forms of attacks appear every day,
creating a need to regularly update an IDS. Therefore, detection alone is no
longer sufficient and an IDS must consider the attribution problem as well [18].
Attribution, sometimes referred to as “attacker profiling”, is the process of char-
acterizing the attacker instead of the attack. Currently, attribution tasks are
mostly done by network administrators, thus the quality of attribution will vary.
There is a great need to automate, at least some, part of this process with an
unbiased tool to increase the reliability and speed of this task.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 155–169, 2022.
https://doi.org/10.1007/978-3-031-23020-2_9
156 P. Crochelet et al.
of an attacker, which is later refined into an exact attacker profile through other
specific rules. Finally, a database of attacker profiles is searched to find a match
for this attacker profile. This methodology is very dependent on the set of IDS
alerts generated and therefore requires an up-to-date tool to be effective. Regard-
less, it will not be possible to consider attackers using zero-day exploits. Similarly,
Karafili et al. [13] use argumentation-based reasoning to help forensic analysts
with attribution tasks. On the one hand, they use a set of rules described as
background knowledge that needs to be updated regularly. On the other hand,
they use a set of core rules that aims to mimic the analysts’ reasoning during
the attribution tasks. Ultimately, these two methodologies are not self-sufficient
since they require human-based assistance or a high-performing tool to generate
interesting results.
Deshmukh et al. [8] use real attack logs gathered from the Cowrie honeypot
as a basis for attribution [2]. The authors identify the need for unsupervised or
semi-supervised learning methods and propose Fusion Hidden Markov Models
(FHMMs) that fall in the latter category. FHMMs are more resistant to noise
and profit from all the advantages associated with ensemble learning. However,
for the FHMMs, they define 19 states in terms of data specific to the Cowrie
logs, making their technique hard to generalize to other types of honeypot logs.
Similarly, Fraunholz et al. [10] introduce an attacker model, GAMfIS, to
characterize attackers in four attributes: Motivation (M), Skill (S), Intention (I)
and Resources (R). Using those attributes, they define a Threat Rating (TR)
as M+I, a Capability Rating (CR) as S+R, and finally a Total Threat Score as
TR+CR. Then in [11], the authors apply their attacker model to a series of logs
collected from a Cowrie Honeypot. They conclude that most attacks are coming
from botnet traffic that can be mapped to rather harmless attackers. However,
[11] only use logs from a Cowrie Honeypot that implements the SSH and Telnet
protocols and focuses on a statistical analysis of their results. To do this, they
use features that are specific to this honeypot. Our method builds on the work
of [11] but focuses on features that can be extracted from various honeypots
and services. Furthermore, after the statistical analysis, our method introduces
a clustering analysis to differentiate harmless and malicious attacks.
3 Methodology
3.1 Data Collection and Processing
Our data has been collected for more than a year, starting in December 2020,
through a series of honeypots. In total, we have more than two million log entries.
The distribution of these logs is the following; Redis 44.9%, SSH 34.4%, Telnet
5.1%, Modbus 5.0%, HTTP 4.5%, HTTP-proxy 3.7%, DNP3 1.4%, FTP 0.9%,
and BACnet 0.1%. All of these logs resemble the ones obtained from a Cowrie
Honeypot. They are in a “NDJSON” format and contain information about the
attacker, such as the source Internet Protocol (IP) address and port, as well as
about the attack, such as the protocol, the command typed, and when it was
executed. From these logs, we extract several features to classify each attacker.
158 P. Crochelet et al.
We include all protocols but focus on the 6 that we can easily interpret and for
which we have interesting data, namely: SSH, Telnet, Redis, FTP, Modbus, and
HTTP. The extracted features are shown in Table 1.
Fraunholz et al. [11] perform the attribution on the attacks, defined as all attack
sessions sharing the same IP address. In practice, this means that they group
together all logs that share the same source IP, not considering the time. Then,
for each attack, they propose characterizing them with:
– Motivation: the amount of effort the attacker puts into the attack,
– Skill: the degree of expertise of the attacker,
– Resources: the degree of automation the attacker has access to, and
– Intention: the attacker’s goals and severity of the attack.
– Motivation: the amount of effort the attacker puts into the attack,
– Resourcefulness: the degree of expertise and automation of an attacker,
– Stealth: the amount of effort the attacker puts into not getting caught,
– Intention: the attacker’s goals and severity of the attack, and
– Originality: to identify “script kiddies” from legitimate malefactors.
4 Evaluation
In practice, Fraunholz et al. [11] do not give the exact equations from which they
derived the values of each attribute. Indeed, they mention the features they used
for each attribute, however, do not show the weight associated to each feature.
Therefore, without having the specifics, we use the previous equation to find the
added value of each feature for an attribute. Then, for comparison purposes, we
scale the obtained attribute values to the corresponding range. Also, Fraunholz
et al. [11] mention that they could not find a way to express the attackers’
intentions. Therefore, to find the threat rating they consider the intention score
to be the same as the motivation score, which is what we are doing for this
replication as well.
The motive isn’t clear but the attackers’ intent could be to cause a denial of
service. Therefore the “time spent in all sessions” feature is very high for those
attackers, compared to the others. The second way to explain those outliers is
through the “number of commands” feature. Indeed, where most attackers only
sent between zero and a few hundreds of commands, some sent tens of thousands
of commands and therefore, have a very high motivation score. To compare our
results with the ones obtained in [11], we scale the values in the same range as
they had. However, if we just scale the results as they are in Fig. 1, the resulting
distribution will be skewed towards those outliers. Therefore, to get a meaningful
comparison, we first remove the outliers and then scale the values. These results
are shown in Fig. 2.
With our dataset, we obtain similar results for the motivation ratings. The
major difference is that we see more attackers with a low motivation score. This
is probably the result of adding the constraint on time when aggregating the
Attacker Attribution via Characteristics Inference Using Honeypot Data 161
logs into attacks, which gives more “small” attacks where the attackers simply
send a few scans but do not act on them.
Resources Ratings. To calculate the resources ratings, only one feature can
be used with the data we have. Indeed, in [11], Fraunholz et al. used the inter-
arrival time of the attacker’s commands as well the number of credentials tried
when logging into the honeypot. However, in the honeypots we are using, the
attackers do not need to log in, either because of the specification of the protocols
(like Modbus) or because the login function is disabled in the honeypots. This
leaves only the inter-arrival times as a suitable feature to reproduce their results.
Figure 3 shows the results obtained without scaling the feature. Most attackers
obtain a resources score between 0 and 2000, with a few exceptions.
Looking back at the logs, we see that the resources outliers correspond to
attackers for which we have several observations on a small interval, usually
having one new observation every 0.1 s. For the same reason as discussed above,
we remove the outliers before scaling the values for the comparison, as shown in
Fig. 4. With our dataset, the results we get are a bit different, having very few
attackers with a high resource rating. We presume this is because only one of
the two features is usable with our data, which compromises the results.
Skill Ratings. The skill attribute is the most difficult to replicate. The features
used are a list of commands entered by the attacker as well as a malware detec-
tion rate returned by VirusTotal [5] and a Threat level returned by Symantec
[4]. However, to get those two last features, one needs access to the malware
itself, which we do not have access to, at the time of writing. We only have the
command executed by the attacker (i.e. the name of the malware) and some-
times the IP address the attacker used to obtain the malware. In the end, to
approximate the malware detection rate, we use the number of times that IP
address was flagged as malicious by VirusTotal. However, this feature is not easy
to generalize for all protocols. Therefore, for most protocols, only the number of
162 P. Crochelet et al.
commands entered by the attacker is used. Only for some protocols, do we also
have the approached malware detection rate. Figure 5 shows the direct compar-
ison between the results as there are no outliers for this attribute. However, for
the reasons explained above, those results are difficult to compare.
Final Results. From the attributes defined above, we get the threat and capa-
bility ratings for each attacker. A comparison of these is shown in Fig. 6. The
results are relatively similar, with most of the attackers grouped in the same
place on the graph, representing the fact that most attackers are rather harm-
less. Here again, we see the impact of adding a time constraint when aggregating
the logs with a higher density of attackers in the same group. The outliers men-
tioned before are also easily identified on this graph as the 21 attackers on the
Attacker Attribution via Characteristics Inference Using Honeypot Data 163
top left (motivation outliers) and the detached group of attackers on the right
(resources outliers). However, besides the outliers that were already identified
before, it is difficult to identify what characterizes the attackers in each cell of
the heat map. Therefore, it is difficult to find out exactly how many attackers
should be considered for a more detailed analysis. This will depend on the net-
work administrator in charge and his or her experiences. This is an issue we
address in the following.
different commands entered and the number of downloaded files. Figure 8 shows
the results, which at first seem similar to the ones in Sect. 4.1. However, after
removing the outliers and scaling the values, we see a different distribution. The
outliers here represent attackers who sent lots of commands in a short time
interval and who sent lots of different commands. Indeed, we observe that some
attackers try several commands for the same goal, which would transcribe as
having more expertise and knowledge in this model. The reason why most of
the attackers have a medium resourcefulness score is once again because of the
missing time-to-live. Indeed, the low-resourcefulness scores represent attackers
who maintain a connection open for a few weeks, but only send a few commands.
Therefore, the inter-arrival time is especially low for these attackers.
Stealth Ratings. The stealth ratings are calculated from the approached mal-
ware detection rate for the downloaded malwares, as calculated in Sect. 4.1. The
idea is that if the IP address from which the malware is downloaded has been
flagged as malicious by VirusTotal, then it can easily be part of a banned list.
The second feature we use is the number of actions the attackers take to hide
their presence. Amongst others, this includes removing written files, wiping out
any written data, and resetting communication links. The last feature included
in the stealth attribute is the number of scans performed by the attacker. Some
observations do not explicitly contain payloads and seem to represent port scans
that an attacker would do. The more scans are performed, the less stealthy the
attackers are. Figure 9 shows the results with and without outliers. The single
outlier, in this case, represents an attacker who takes a lot of precautions not to
get caught by resetting communication links multiple times and removing any
written data. On average, however, attackers do not spend much effort trying to
hide themselves. The reason why the distribution of the stealth ratings is skewed
on the left is that some attackers send many scans, resulting in a low stealth
score. In opposition, most attackers send few scans or even no scans at all.
Intention Ratings. For the intention ratings, we classify each command into
one of the following actions: read, write, execute, or other. Therefore, databases
are created, linking each command to the corresponding action for each protocol.
For example, in SSH, changing the permissions of a file using chmod counts as
an “other” action but running a file afterwards counts as an “execute” action.
This gives, for each attack, an array describing how many times the attackers try
to read data, write data, or execute some code on the system. To refine this into
a 1-dimensionality characteristic we calculate intention score = α ∗ execute +
β ∗ write + γ ∗ read. Where, α, β, and γ represent the weighting of the execute,
166 P. Crochelet et al.
write, and read values, respectively. To stay general, we evaluate each action
similarly and set each weight to 0.33. Figure 10 shows the distribution of the
intention ratings. The single outlier here is an attacker whose commands could
all be classified as “read” and “write” actions, while targeting exclusively the
Modbus protocol for more than 1500 observations. After removing the outlier
and scaling the values, we see that most attackers have low intention scores,
likely since most attackers perform a few scans without acting upon them.
Final Results. For continuity, we can still define a threat rating and a capability
rating, as shown in Fig. 12. However, we find the same problems as above; we do
not know what exactly characterizes attackers in each cell and which attackers to
Attacker Attribution via Characteristics Inference Using Honeypot Data 167
– The first three clusters contain more than 90% of the attackers who are iden-
tified as harmless. Indeed, these attackers usually only send a few scanning
commands but do not perform any attack.
– The last cluster is the only one that contains potentially dangerous attackers.
Indeed, looking back at the logs, we see that they send several hundreds or
thousands of commands, which rarely use pre-built scripts. They also take
several actions to hide themselves, such as removing most downloaded and
written files. Finally, they try different ways to compromise the system by
sending many different commands.
– The attackers who belong to the other clusters usually try a few commands
like reading and writing data or exploit basic vulnerabilities such as the miss-
ing time-to-live. However, those attackers only perform basic attacks using
pre-built scripts and are therefore not so alarming.
5 Discussion
As shown in Sect. 4.2, the generalized approach allows us to extend the method-
ology introduced by Fraunholz et al. [11] for any combination of protocols as it
uses common features. Anyone who wants to analyse logs from one or several
honeypots at once could therefore use this approach. Furthermore, we show that
this methodology can be used on any kind of honeypot as it is shown working
on low-interaction honeypots and only needs a recording of the attackers’ com-
mands. However, higher interaction honeypots will keep the attackers’ interests
for a longer time and might result in more attackers identified as alarming. We
also propose a new way to analyse the results that returns the specific attack-
ers that network administrators would need to consider, independently of their
168 P. Crochelet et al.
experience. Indeed, only the attackers who are identified as outliers through the
attribute analysis and the attackers who belong to the dangerous cluster need to
be considered for a more detailed analysis. This means that out of a few million
logs, more than one hundred thousand attackers are identified, and out of those
attackers, only 111 (49 outliers and 62 from the dangerous cluster) represent a
real threat and need to be studied more thoroughly by a network administrator.
However, our methodology only analyses the attackers separately and does not
consider evasion techniques. Indeed, attackers who perform their attacks using
multiple IP addresses are not correlated together. This is a simple evasion tech-
nique that many attackers perform and is a main limitation of the presented
approach.
6 Conclusion
In this paper, we tackle the problem of cyber attacker attribution. Cyber attacker
attribution tries to gain insight into attackers instead of the attacks. We expand
upon an already established idea to characterize the attackers through different
attributes. We generalize this approach so that it can be used on any protocol
and apply it to honeypot logs collected from real attacks on several services, both
IT and OT. We demonstrate that this methodology would greatly help a network
administrator to identify a fixed number of attackers that need to be investigated
more carefully, independently of that network administrator’s experience and
interpretation. Furthermore, this methodology is self-sufficient in that it does
not depend on other tools and does not need human-based help to identify those
attackers. In future work, our major focus will be towards considering attackers
using evasion techniques. We aim to associate each attacker to a threat group as
described in the MITRE ATT&CK framework [3] and link attackers who belong
to the same threat group together. Finally, we will also validate this methodology
on new datasets as they are gathered from the honeypots.
Acknowledgements. We would like to thank Thales Digital Solutions for their gen-
erous support to enable this work.
Attacker Attribution via Characteristics Inference Using Honeypot Data 169
References
1. Cyber security breaches survey (2022). www.gov.uk/government/statistics/cyber-
security-breaches-survey-2022/cyber-security-breaches-survey-2022
2. Oosterhof, M.: Cowrie (2022). www.cowrie.org
3. MITRE ATT CK, Groups (2022). www.attack.mitre.org/groups/
4. Symantec (2022). www.securitycloud.symantec.com/cc/landing
5. VirusTotal (2022). www.virustotal.com/gui/home/upload
6. Bar, A., Shapira, B., Rokach, L., Unger, M.: Identifying attack propagation pat-
terns in honeypots using Markov chains modeling and complex networks analysis.
In: 2016 IEEE International Conference on Software Science, Technology and Engi-
neering (SWSTE 2016), pp. 28–36 (2016)
7. Buczak, A.L., Guven, E.: A survey of data mining and machine learning methods
for cyber security intrusion detection. IEEE Commun. Surv. Tutorials 18(2), 1153–
1176 (2016)
8. Deshmukh, S., Rade, R., Kazi, D., et al.: Attacker behaviour profiling using stochas-
tic ensemble of hidden Markov models. arXiv preprint arXiv:1905.11824 (2019)
9. Doynikova, E., Novikova, E., Kotenko, I.: Attacker behaviour forecasting using
methods of intelligent data analysis: a comparative review and prospects. Informa-
tion 11(3), 168 (2020)
10. Fraunholz, D., Duque Anton, S., Schotten, H.D.: Introducing GAMfIS: a generic
attacker model for information security. In: Begusic, D., Rozic, N., Radic, J., Saric,
M. (eds.) 2017 25TH International Conference on Software, Telecommunications
and Computer Networks (SOFTCOM), pp. 393–398 (2017)
11. Fraunholz, D., Krohmer, D., Anton, S.D., Schotten, H.D.: YAAS-on the attribution
of honeypot data. Int. J. Cyber Situational Aware. 2(1), 31–48 (2017)
12. Goutam, R.K.: The problem of attribution in cyber security. Int. J. Comput. Appl.
131(7), 34–36 (2015)
13. Karafili, E., Wang, L., Lupu, E.C.: An argumentation-based reasoner to assist dig-
ital investigation and attribution of cyber-attacks. Forensic Sci. Int.-Digital Invest.
32(S), 300925 (2020)
14. Khraisat, A., Gondal, I., Vamplew, P., Kamruzzaman, J.: Survey of intrusion detec-
tion systems: techniques, datasets and challenges. Cybersecurity 2(1), 1–22 (2019).
https://doi.org/10.1186/s42400-019-0038-7
15. Mallikarjunan, K.N., Shalinie, S.M., Preetha, G.: Real time attacker behavior pat-
tern discovery and profiling using fuzzy rules. J. Internet Technol. 19(5), 1567–1575
(2018)
16. Mokube, I., Adams, M.: Honeypots: concepts, approaches, and challenges. In: Pro-
ceedings of the 45th Annual Southeast Regional Conference, pp. 321–326 (2007)
17. Nawrocki, M., Wählisch, M., Schmidt, T.C., Keil, C., Schönfelder, J.: A survey on
honeypot software and data analysis. arXiv preprint arXiv:1608.06249 (2016)
18. Nisioti, A., Mylonas, A., Yoo, P.D., Katos, V.: From intrusion detection to attacker
attribution: a comprehensive survey of unsupervised methods. IEEE Commun.
Surv. Tutorials 20(4), 3369–3388 (2018)
Detecting Contradictions from CoAP RFC
Based on Knowledge Graph
Xinguo Feng1(B) , Yanjun Zhang2 , Mark Huasong Meng3,4 , and Sin G. Teo3
1
The University of Queensland, St. Lucia, Australia
[email protected]
2
Cyber Security Research and Innovation (CSRI), Deakin University, Geelong,
Australia
3
Institute for Infocomm Research, A*STAR, Singapore, Singapore
4
National University of Singapore, Singapore, Singapore
1 Introduction
The Internet of Things (IoT) is an emerging technology in recent years. It refers
to “devices and sensors” that are uniquely addressable based on their communi-
cation protocols, and are adaptable and autonomous with inherent security [5].
Its development is closely connected to many cutting-edge technologies such as
blockchain [10,13], smart home [17], and machine learning [11,23,32]. During
the past decade, IoT applications have experienced rapid growth and have been
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 170–189, 2022.
https://doi.org/10.1007/978-3-031-23020-2_10
Detecting Contradictions from CoAP RFC Based on Knowledge Graph 171
successfully applied on both individual (e.g., e-health, smart home) and pro-
fessional levels (e.g., smart supply chain, smart city, industry IoT) [16,28]. It
is estimated that there will be over 500 billion IoT devices connected to the
Internet by 2030 [25].
Similar to traditional web endpoints, IoT devices communicate through
the corresponding web protocols, which are defined by the Request for Com-
ments (RFC) specification documents. An RFC is a specification document that
describes the technical details of a web protocol. However, it is challenging to
perform formal verification on an RFC because it is usually written in natural
human languages. There might exist some contradictions and inconsistencies
in an RFC that cannot be easily spotted. Furthermore, ambiguities might be
introduced in the writing of an RFC when people have different understandings
or interpretations of the protocol design. All of those issues may lead to confu-
sion for users who want to utilise the protocol in their implementations. Take
RFC7252 [24] on The Constrained Application Protocol (CoAP) as an example.
Californium [12] is a significant Java implementation for CoAP. On its GitHub
repository, 170 out of 2,030 issues in total (around 8%) mention the keyword
RFC1 , indicating there might be discrepancies between the implementation and
the description in the RFC. Those discrepancies are possibly caused by the con-
tradictions existing in the RFC itself. Considering such contradictions may make
communicating devices malfunction and introduce potential security issues, we
see the need to validate if the defined technical details are consistent within the
specification document.
Existing work on RFC or similar specification documents focuses on extract-
ing finite state machines to perform security analysis dynamically [22,30]. There
is limited work on detecting contradictions in natural language documents them-
selves, especially in specification documents like RFC. We seek a way to fill this
gap. In this paper, we propose RFCKG, an approach to construct a knowl-
edge graph from RFC documents and detect potential contradictions from the
knowledge graph. We construct the knowledge graph through entity extrac-
tion, relation extraction, and rule extraction with NLP techniques, such as co-
reference resolution, sentence split and dependency parsing. We apply RFCKG
to RFC7252 of CoAP. It manages to detect one direct contradiction and four
conditional contradictions from the RFC.
We summarise our contributions as the following:
1
Assessed on 11th August, 2022.
172 X. Feng et al.
2.1 Background
RFC. An Request for Comments (RFC) is a specification document that
describes the technical details of a web protocol. It is usually written by engineers
or computer scientists to describe the methods, behaviours, or innovations of the
web protocol in natural human languages. Developers who wish to implement
the protocol or users who wish to utilise the implementations should always refer
to the RFC that defines the protocol.
Knowledge Graph. Since the technical details are all described in the spec-
ification documents, extracting the knowledge and representing it in an appro-
priate data structure is desired. A knowledge graph (KG) is a multi-relational
graph composed of nodes (entities) and edges (relations), and each edge can be
represented in a triplet (head entity, edge, tail entity).
Rule Extraction for RFC. Rules in RFC define the functionalities and
behaviours of the protocol. The natural language writing style of rules is spec-
ified in RFC 2119 [3]. In particular, it defines the modal keywords to indicate
the requirement levels for rules [27]. Furthermore, RFC 8174 [14] emphasises
the usage of uppercase letters for modal keywords defined in RFC 2119. Tian et
al. [27] extract the rules with keyword matching and use dependency parsing to
process the rules. Dependency parsing is also present in other work such as [33].
It works well with simple sentences but suffers with complicated sentences with
multiple objects or multiple subordinate clauses.
Detecting Contradictions from CoAP RFC Based on Knowledge Graph 173
3 Problem Definition
RFCs are written in unstructured natural languages. RFCKG parses them and
generates knowledge graphs that can be automatically checked for contradic-
tions. In this section, we first define the components of the knowledge graph
(Sect. 3.1), then we present the types of contradictions we target to detect in
this work (Sect. 3.2).
in which {variable, operator, value} represents the rule content, and the
necessity represents the requirement level, including “STRONG” and “WEAK”,
where “STRONG” indicates an absolute requirement level such as “MUST”,
“REQUIRED”, “SHALL”, “MUST NOT”, and “WEAK” indicates an optional
requirement such as “NOT RECOMMENDED”, “MAY” and “OPTIONAL”. For
example, in the statement: “Message version number MUST be set to 1 and the
options of the message MUST be cached”, the extracted rule is:
Relation. The relations RFCKG targets to extract from RFCs include (1) the
relation between an entity and an entity, e.g, “A version number [entity] is a field of
[relation] a message [entity]”, (2) the relation between an entity and a rule, e.g.,
({version_number = 1}, ST RON G) [rule] is a rule of [relation] confirmable mes-
sage [entity], and (3) the conditional relation between a rule and a rule. For exam-
ple, in the statement “If the version number of a message is not set to 1, the options
of the message MUST NOT be cached”, ({version_number ! = 1}, ST RON G)
[rule] is a condition of [relation] ({cached_options = F ALSE}, ST RON G)
[rule]. The former is the antecedent rule and the latter is the consequent rule.
Figure 1 illustrates the KG representation of the rule statement “If the version
number of a message is set to 1, the options of the message MUST NOT be cached”.
message
field
version
number
rule rule
version version
number condition number
rule 1 rule 2
({version_number ({cache_options =
= 1}, STRONG) False}, STRONG)
3.2 Contradictions
The core idea of RFCKG is to represent an unstructured RFC document under
analysis as a structured knowledge graph, and then to check its rules for contra-
diction detection. In particular, we define two types of contradictions as follows:
– Direct contradiction. This occurs when different rules of a same entity e -
denoted as {r1 , ..., rn }e contradicts with each other. That is, the conjunctions
of rules is evaluated as false, i.e.,
n
{ri }e = FALSE
i=1
(1) Contradiction among plain rules. A plain rule refers to a rule that
is not an antecedent rule or consequent rule. For example, consider the fol-
lowing rule statements “The version number of a message MUST be set to
1” and “Message version number MUST be 0”. The rules for these rule state-
ments are ({version_number = 1}, STRONG) and ({version_number = 0},
STRONG). These are plain rules as they are not antecedent rules or conse-
quent rules. We concatenate them and see that they evaluate as false.
For example, consider the following rule statements “Message version num-
ber SHOULD be set to 1” and “If the version number of a message is not
1, the options MUST be cached”. The rule for the first statement is ({ver-
sion_number = 1}, STRONG), which is a plain rule. The antecedent rule for
the second statement is ({version_number != 1}, STRONG). We concatenate
them and see they evaluate as false.
4 RFCKG Approach
We design RFCKG as a three-phase approach that consists of rule statements
extraction, knowledge graph construction and Contradiction detection, as shown
in Fig. 2.
Since the release of RFC2119 (which specifies the standard for keywords usage
in RFCs to indicate requirement levels) in 1997 [3], RFC documents (released after
1997) enforce the use of capitalized modal verbs (such as “MUST”, “MAY” and
etc.) to indicate the requirement level of a rule in the specification. We therefore
examine the capitalized modal verbs used in the sentences, and identify a sentence
that contains those capitalized modal verbs as a rule statement. More specifically,
we extract the strong statements and weak statements based on the modal key-
words as shown in Table 1 following the definition of prior work [27]. Algorithm 1
in Appendix B demonstrates the details for rule statements extraction.
This phase aims to identify entities, rules and relations based on the extracted
statements, and represent them in a knowledge graph.
as the rule entity. If there are multiple entities that have the same number of
occurrences, we take the one that appears the last as the rule entity.
– Co-reference resolution. It is common in natural languages to use co-
references to refer to words or phrases that are mentioned before. We aim
to find the co-references in the rule statements and substitute them with the
actual words or phrases they are referring to, so that we have complete and
rich information in each rule statement for the next step. We use the co-
reference resolution functionality in the spaCy [9] NLP tool to address the
pronoun co-reference, such as “it”, “them”, etc. For other co-references that
the tool cannot address, such as “this field”, we use the rule entity we identify
for each rule to substitute them.
– Sentence splitting and rephrasing. A rule statement is a sentence that
describes one or several behaviours of an entity, which means the structure
of the sentence can be complex. It would be easier to process the rule state-
ment if we can split one complex sentence into multiple simple sentences but
retain the semantics that describes the behaviours, so that we can process
these simple sentences one at a time. To address this, we use the dependency
parsing functionality in the spaCy [9] NLP tool and look for the root of the
rule statement, then look for words that have a conjunction dependency rela-
tion with it. We then look for the subject of the rule statement, split the
rule statement with the conjunction words, and concatenate each of the split
sentences with the subject in the front. In this way, we split and rephrase the
complex rule statement into multiple complete but simple rule statements.
To determine the logical connective between the split sentences, we see if the
keyword “and” or “or” appears in the original rule statement. If “or” appears,
we determine the logical connective to be “∨ (OR)”. If not, we determine the
logical connective to be “∧ (AND)”.
– Condition identification. Recall that we define a type of contradiction as
conditional contradiction in Sect. 3.2. For a rule statement, we need to know
if there exists a conditional relation between different behaviours. To address
this, we look for rule statements that start with the word “If”, and split it at
the first comma. We give the first part an antecedent label to indicate it is an
antecedent rule, and the following part a consequent label to indicate it is a
consequent rule. For the other situation that we describe above, we give the
split sentences an entity label, indicating that they are plain entity rules.
– Rule construction. Recall that we define an atomic rule as a four-tuple
data structure:
We construct atomic rules on a split sentence level. The rules we try to con-
struct are operations that the entity performs to describe its behaviours.
There are two main types of atomic rules. The first type specifically describes
Detecting Contradictions from CoAP RFC Based on Knowledge Graph 179
that an item is set to, equal to, larger, or smaller than a value. The other type
describes an operation being performed, but does not specifically describe any
value. We review part of the split sentences and define 59 syntactical patterns
for spaCy [9] to extract variables for constructing the atomic rules. A syn-
tactical pattern is a pattern that describes the dependency relations between
the components we want to extract.
For example, consider the following rule statement “Implementations of this
specification MUST set the version number to 1”. The variable we want to
extract from the first example above is “version_number ”. We look at the
dependency relations of this sentence, as shown in Fig. 3. We define the pat-
tern as {verb, dobj, compound, prep, pobj}, indicating that we want to extract
the verb, the direct object of the verb, the compound of the direct object,
the preposition of the verb, and the prepositional object of the preposition.
The information we extract with this pattern from this sentence is {set, num-
ber, version, to, 1}. We organise the order of these words and construct the
atomic rule as ({version_number, =, 1}, STRONG), in which the necessity
“STRONG” comes from the fact that the original rule statement is a strong
rule statement.
For each split sentence that belongs to a rule statement, we apply these 59
defined patterns to them and construct atomic rules accordingly. Then we
apply the logical connective that we extracted above to concatenate these
atomic rules to construct a Rule object that represents the original rule state-
ment. The entity, antecedent and consequent rule labels are carried over to
these constructed rule objects.
– Variable normalisation. The 59 defined syntactical patterns are applied to
all split and rephrased sentences, as we want the defined syntactical patterns
to be able to generalise to more sentences that have similar structures. There
could be situations where variables extracted from different patterns actually
mean the same thing. Also, different words might have the same or similar
meanings. These different variables that actually could mean the same should
be grouped as one variable as it might affect the accuracy of the contradiction
checking later. To address this, for each Entity node, we gather all the vari-
ables of all the Rule nodes under it. For each variable, we use the spaCy [9]
tool with its internal word embedding to get the variable’s average embedding
vector. Then we compute the cosine similarity between all variable pairs. If
the similarity is larger than 0.9, we mark them as similar variables. After we
gather all the similar variables, we substitute the variable that has the longer
name with the shortest one between them.
following rule from the same original rule statement has the consequent rule label,
we use the “condition” relation defined in Table 5 in Appendix A.
recommend which one to follow. If not, we can recommend to follow the one
with a strong requirement level.
We then check for conditional contradictions. The process is also similar to
direct contradiction checking. We keep the final expression that is evaluated as
true from when we check for the plain entity rules. We then iterate through each
Rule node in the conditional rules set, construct the rule expression, concatenate
the rule expression with the evaluated entity rule expression with “∧” and check
if there is a contradiction between them. We do not store the concatenated
expression. We iterate to the next conditional rule and repeat the process.
5 Evaluation
RFCKG extracts 217 rule statements in total on RFC7252, with 136 strong
statements and 81 weak statements. From the rule statements, we extract and
construct 28 Entity nodes with the predefined entity list and use two predefined
relations “type” and “field” to construct the skeleton knowledge graph. From the
217 rule statements, we construct 319 Rule nodes and use the predefined relation
“rule” to connect them to the corresponding Entity nodes. Out of the 319 Rule
nodes, there are 220 plain entity rules, 41 antecedent rules and 58 consequent
rules. RFCKG extracts the knowledge that describes the behaviours of entities
in rules and represent it in a knowledge graph data structure, which can be easily
accessed. Table 2 shows the results of our knowledge graph construction.
We now discuss some limitations of this work and some possible future directions.
when they cannot identify the correct co-reference or split the sentence in the
wrong way. The co-reference resolution tool we use is also for general purpose.
The similar idea to further pre-train an existing language model to inject domain
knowledge also applies here.
Introduced Noise. In our approach, although there is some noise being intro-
duced, we argue that it is still reasonable to do so. From our true positive direct
contradiction case, the original variable being extracted are “support shorter
lengths” and “use shorter lengths”, and they have the value True and False respec-
tively. If we do not normalise these two variables as one, we will not find this
contradiction exists. Furthermore, our work does not target to only capture pre-
cise contradictions, but to send out warnings when we suspect that there might
be a contradiction. However, a possible solution to improve this might be to
split the sentences into several clusters, where each cluster contains sentences
that have similar syntactical structures. We might be able to describe the syn-
tactical structure of a sentence with features like the number of syntactical roles
(verbs, subjects, etc.), positions of these roles, and so on.
Reasoning Scalability. We observe that the SymPy [20] solver we use for con-
tradictions detection is not satisfactorily efficient even on a single specification
document (RFC7252), due to the large number of variables extracted and eval-
uated. This indicates there would be a scalability issue when we apply this
approach to a broader range of documents. A recent work by Zhang et al. [36]
inspires us that it is possible to utilise the ability of deep neural networks for
more efficient reasoning.
7 Conclusion
Entities Relations
message, empty message, version number, token length, payload, option, type,
option number, option delta, configuration, option length, endpoint, field,
recipient, option value, confirmable message, acknowledgement message, reset rule,
message, non-confirmable message, message id, client, get, put, delete, server, condition
sender, response code, proxy, uri-path option, proxy-uri option, etag option,
location-path option, constrained networks, datagram transport layer
security, dtls, pre-shared key, psk, raw public key, x.509 certificate, certificate,
application environment, post, if-match option, if-none-match option, origin
server, content-format, resource discovery, intermediary, forward-proxy,
reverse-proxy, coap-to-coap proxy, cross-proxy, separate response, critical
option, elective option, unsafe option, safe-to-forward option
References
1. Andow, B., et al.: {PolicyLint}: investigating internal privacy policy contradictions
on google play. In: 28th USENIX Security Symposium (USENIX security 19), pp.
585–602 (2019)
2. Bird, S., Klein, E., Loper, E.: Natural language processing with Python: analyzing
text with the natural language toolkit. O’Reilly Media, Inc (2009)
3. Bradner, S.: Key words for use in RFCs to indicate requirement levels. http://
datatracker.ietf.org/doc/html/rfc2119 (1997). Assessed 04 Aug 2022
4. Brown, T., et al.: Language models are few-shot learners. Adv. Neural. Inf. Process.
Syst. 33, 1877–1901 (2020)
5. Chegini, H., Naha, R.K., Mahanti, A., Thulasiraman, P.: Process automation in
an IoT-fog-cloud ecosystem: a survey and taxonomy. IoT 2(1), 92–118 (2021)
6. Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: BERT: pre-training of
deep bidirectional transformers for language understanding. arXiv preprint
arXiv:1810.04805 (2018)
7. Hagberg, A.A., Schult, D.A., Swart, P.J.: Exploring network structure, dynamics,
and function using networkx. In: Varoquaux, G., Vaught, T., Millman, J. (eds.)
Proceedings of the 7th Python in Science Conference, pp. 11–15. Pasadena, CA
USA (2008)
188 X. Feng et al.
8. Harabagiu, S., Hickl, A., Lacatusu, F.: Negation, contrast and contradiction in text
processing. In: AAAI, vol. 6, pp. 755–762 (2006)
9. Honnibal, M., Montani, I.: spaCy 2: Natural language understanding with Bloom
embeddings, convolutional neural networks and incremental parsing (2017)
10. Huh, S., Cho, S., Kim, S.: Managing IoT devices using blockchain platform. In: 2017
19th International Conference on Advanced Communication Technology (ICACT),
pp. 464–467. IEEE (2017)
11. Khan, L.U., Saad, W., Han, Z., Hossain, E., Hong, C.S.: Federated learning for
internet of things: recent advances, taxonomy, and open challenges. IEEE Commun.
Surv. Tutorials PP(99), 1 (2021)
12. Kraus, A.: californium. https://github.com/eclipse/californium (2016). Accessed
11 Aug 2022
13. Le, D.P., Meng, H., Su, L., Yeo, S.L., Thing, V.: Biff: a blockchain-based IoT
forensics framework with identity privacy. In: TENCON 2018–2018 IEEE region
10 conference, pp. 2372–2377. IEEE (2018)
14. Leiba, B.: Ambiguity of uppercase vs lowercase in RFC 2119 key words. https://
datatracker.ietf.org/doc/html/rfc8174 (2017). Accessed 04 Aug 2022
15. Li, H., et al.: Improving API caveats accessibility by mining API caveats knowl-
edge graph. In: 2018 IEEE International Conference on Software Maintenance and
Evolution (ICSME), pp. 183–193. IEEE (2018)
16. Lynggaard, P., Skouby, K.E.: Complex IoT systems as enablers for smart homes
in a smart city vision. Sensors 16(11), 1840 (2016)
17. Mahadewa, K., et al.: Scrutinizing implementations of smart home integrations.
IEEE Trans. Softw. Eng. 47, 2667–2683 (2019)
18. Mahadewa, K., et al.: Identifying privacy weaknesses from multi-party trigger-
action integration platforms. In: Proceedings of the 30th ACM SIGSOFT Interna-
tional Symposium on Software Testing and Analysis, pp. 2–15 (2021)
19. Meng, M.H., et al.: Post-GDPR threat hunting on android phones: dissecting OS-
level safeguards of user-unresettable identifiers. In: The Network and Distributed
System Security Symposium (NDSS) (2023)
20. Meurer, A., et al.: SymPy: symbolic computing in python. Peer. J. Comput. Sci.
3, e103 (2017)
21. Mondal, I., Hou, Y., Jochim, C.: End-to-end NLP knowledge graph construction.
arXiv preprint arXiv:2106.01167 (2021)
22. Pacheco, M.L., von Hippel, M., Weintraub, B., Goldwasser, D., Nita-Rotaru, C.:
Automated attack synthesis by extracting finite state machines from protocol spec-
ification documents. arXiv preprint arXiv:2202.09470 (2022)
23. Shanthamallu, U.S., Spanias, A., Tepedelenlioglu, C., Stanley, M.: A brief sur-
vey of machine learning methods and their sensor and IoT applications. In: 2017
8th International Conference on Information, Intelligence, Systems & Applications
(IISA), pp. 1–8. IEEE (2017)
24. Shelby, Z., Hartke, K., Bormann, C.: The constrained application protocol (CoAP).
http://datatracker.ietf.org/doc/html/rfc7252 (2014). Accessed 04 Aug 2022
25. Singh, A.K.: We will be surrounded by 500 billion connected devices by 2030,
says anter virk of subcom. https://opportunityindia.franchiseindia.com/article/
we-will-be-surrounded-by-500-billion-connected-devices-by-2030-says-anter-virk-
of-subcom-35012 (2022). Accessed 28 Aug 2022
26. Soares, L.B., FitzGerald, N., Ling, J., Kwiatkowski, T.: Matching the blanks: dis-
tributional similarity for relation learning. arXiv preprint arXiv:1906.03158 (2019)
Detecting Contradictions from CoAP RFC Based on Knowledge Graph 189
27. Tian, C., Chen, C., Duan, Z., Zhao, L.: Differential testing of certificate validation
in SSL/TLS implementations: an RFC-guided approach. ACM. Trans. Softw. Eng.
Methodol. 28(4), 1–37 (2019).https://doi.org/10.1145/3355048
28. Uddin, H., et al.: IoT for 5g/b5g applications in smart homes, smart cities, wear-
ables and connected cars. In: 2019 IEEE 24th International Workshop on Computer
Aided Modeling and Design of Communication Links and Networks (CAMAD), pp.
1–5. IEEE (2019)
29. Wang, K., Bai, G., Dong, N., Dong, J.S.: A framework for formal analysis of pri-
vacy on SSO protocols. In: Lin, X., Ghorbani, A., Ren, K., Zhu, S., Zhang, A.
(eds.) SecureComm 2017. LNICST, vol. 238, pp. 763–777. Springer, Cham (2018).
https://doi.org/10.1007/978-3-319-78813-5_41
30. Wang, Q., et al.: {MPInspector}: A systematic and automatic approach for evalu-
ating the security of {IoT} messaging protocols. In: 30th USENIX Security Sym-
posium (USENIX Security 21), pp. 4205–4222 (2021)
31. Wang, Q., Mao, Z., Wang, B., Guo, L.: Knowledge graph embedding: a survey of
approaches and applications. IEEE Trans. Knowl. Data Eng. 29(12), 2724–2743
(2017)
32. Xiao, L., Wan, X., Lu, X., Zhang, Y., Wu, D.: IoT security techniques based on
machine learning: how do IoT devices use AI to enhance security? IEEE Signal
Process. Mag. 35(5), 41–49 (2018)
33. Xie, D., et al.: DocTer: documentation-guided fuzzing for testing deep learning API
functions. In: Proceedings of the 31st ACM SIGSOFT International Symposium
on Software Testing and Analysis, pp. 176–188 (2022)
34. Xie, F., et al.: Scrutinizing privacy policy compliance of virtual personal assis-
tant apps. In: Proceedings of the 37th IEEE/ACM International Conference on
Automated Software Engineering (ASE) (2022)
35. Zhang, B., Xu, Y., Li, J., Wang, S., Ren, B., Gao, S.: SMDM: tackling zero-shot
relation extraction with semantic max-divergence metric learning. Appl. Intell. 1–
16 (2022). https://doi.org/10.1007/s10489-022-03596-z
36. Zhang, C., et al.: Towards better generalization for neural network-based sat
solvers. In: Gama, J., Li, T., Yu, Y., Chen, E., Zheng, Y., Teng, F. (eds) Advances in
Knowledge Discovery and Data Mining. PAKDD 2022. LNCS, vol. 13281. Springer,
Cham (2022). https://doi.org/10.1007/978-3-031-05936-0_16
Mobile Security
A First Look at Android Apps’
Third-Party Resources Loading
1 Introduction
Mobile apps have become extremely popular [54], however, recently there has been
a flurry of research [25,31] exposing how many of these apps carry out misleading
or even malicious activities. These acts range from low-risk (e.g., usage of services
and inter process communication which may drain the battery, CPU or memory)
to high-risk (e.g., harvesting data and ex-filtrating to third-parties [31].
We are interested in understanding the root source of this suspicious (or
malicious) activity. Past work has treated this question as trivial—naturally,
the root source of suspicious activity is the app’s developer [25]. However, in
this paper, we counter this assumption and shed light on the true complexity of
suspicious app activity. We focus on the use of dynamically loaded third-party
resources within apps. Mobile apps often load these resources from a range of
third-party domains which include, for example, ad providers, tracking services,
content distribution networks (CDNs) and analytics services. Although loading
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 193–213, 2022.
https://doi.org/10.1007/978-3-031-23020-2_11
194 H. Qayyum et al.
these resources is a well known design decision that establishes explicit trust
between mobile apps and the domains providing such services, it creates com-
plexity in terms of attribution. For example, it is not clear whether an app
developer knows the third party resources are suspicious. This is further compli-
cated by the fact that certain third-party code can further load resources from
other domains. This creates a dependency chain (see Fig. 1 for example), where
the first-party app might not even be aware of the resources being loaded during
its execution. This results in a form of implicit trust between mobile apps and
any domains loaded further down the chain.
Consider the example BBC News [4] Android mobile app (cf. Fig. 1) which
loads JavaScript code from the widgets.com domain, which, upon execution
loads additional content from another third-party, ads.com. Here, BBC News as
the first-party, explicitly trusts widgets.com, but implicitly trusts ads.com. This
can be represented as a simple dependency chain in which widgets.com is at
level 1 and ads.com is at level 2 (see Fig. 1). Past work tends to ignore this,
instead, collapsing these levels into a single set of third-parties [21,41].
Fig. 1. Example of Android App dependency chain, including malicious third-party (in
red). Here, Dependency Level 1 and Dependency Level ≥ 2 represent resources loaded
from explicitly and implicitly trusted parties, respectively. (Color figure online)
This, however, overlooks a vital security aspect for resources loaded by mobile
apps. For instance, it creates a significant security challenge, as mobile apps lack
visibility on resources loaded further down their domain’s dependency chain. The
dynamic nature of the content is loaded and the wide adoption of in-path traffic
alterations [16,45] further complicates the issue. The potential threat should not
be underestimated as errant active content (e.g., JavaScript code) opens the way
to a range of further exploits, e.g., Layer-7 DDoS attacks [42] or malvertising
[46] and ransomware campaigns [33].
In this work, we study dependency chains in Android apps. We use static and
dynamic analysis to extract the URLs requested by apps and leverage our dis-
tributed crawling framework to retrieve apps’ resource dependency chains. We
then use VirusTotal API [32] to augment apps’ dependency chains to character-
ize any suspicious resource loading. By analyzing 7,048 apps, we explore their
implicit dependencies on third parties; we find that over 98.2% of apps have
A First Look at Android Apps’ Third-Party Resources Loading 195
dependency chains > 1, and therefore rely on an implicit trust model (Sect. 3).
Although the majority (84.32%) of these have short chains of 4 and below lev-
els, a notable minority (5.12%) have chains exceeding 5 levels. We also analyze
different types of resource types and interestingly find JavaScript codes to be
implicitly loaded by 92.3% of Android apps. This is perhaps due to app develop-
ers are unaware of the risks of implicitly trusting active content like JavaScript
codes imported in WebView. Moreover, we inspect the categories of third-parties
and find the predominance of the “Business” category across all dependency
levels i.e., 39.34% of all loaded resources at level 1, which increases to 40.54%
at level 3, then to 51.4%, and so on. We also investigate the most occurring
implicit third-parties and find google-analytics.com and doubleclick.net
to be imported by 83.8% and 79.41%, respectively.
Although the above findings expose the analyzed Android apps to a new
attack surface (as implicit trust makes it difficult for Android apps’ owners or
developers to vet third-parties), arguably, this alone does not create a security
violation. Hence, we proceed to test whether or not these chains contain any
malicious or suspicious third parties. To this end, we classify third-party domains
into innocuous vs suspicious. Using several VirusTotal thresholds (which we refer
to as VTscore (explained in Sect. 2.5)), we find that a considerable fraction of
the third-parties involved in the dependency chains is classified as suspicious.
These perform suspicious activities such as requesting sensitive resources and
sending HTTP(S) requests to known malicious domains. We find that 1.18%
of third-parties are suspicious with a VTscore ≥ 10 (i.e. at least 10 AntiVirus
services flagged them as malicious domains). This fraction naturally decreases
when increasing the VTscore, for example with the VTscore of ≥ 40 the number
of suspicious websites is 0.16% only. We then further investigate JavaScript code
and find that more than half of the code (51%) implicitly trusted (i.e., loaded at
trust level 2 and beyond) have a VTscore ≥ 30 which suggests high confidence in
the security assessment. Finally, to foster further research, we release the dataset
and scripts used in this paper to the research community: https://mobapptrust.
github.io/.
dynamic analysis tools failed to analyze them. Overall, our corpus consists of 7,048
apps distributed across 27 different categories (collected in Dec 2018). For context,
Fig. 3 presents the number of apps we have with different ratings and number of
downloads. Our dataset also consists of apps that receive high user ratings: 70.7%
of the apps have more than 4-star ratings and 72% of them have 500K+ down-
loads as depicted in Fig. 3. These apps have 364,999,376 downloads (the sum of
lower values of the installs). We argue this constitutes a reasonable sample of apps
considered to be both mainstream and non-malicious in nature.
source code and the app’s network traffic. The above two techniques result in
414,387 URLs and 89,787 domains that correspond to 16,069 s-level domains.
include ad networks, trackers, social networks, and any other party that an app
contacts. For instance, twitter.com is a first-party to the Twitter App but it
is a third-party to BBC News.
Table 1. Overview of the dataset for different ranges of a number of apps’ install. The
rows indicate the proportion of a number of app installs that explicitly and implicitly
trust at least one third-party (i) resource (of any type); and (ii) JavaScript code.
Number of Installs
1-5B 1-10K 10K-100K 100K-500K 500K-5M 5M-50M 50M-5B
(7048) (119) (391) (1456) (3069) (1588) (425)
Apps that trust at least one third-party which loads:
Any Resources:
Explicitly (Lvl. 1) 98.2% 89.9% 93.6% 97.1% 98.2% 99.0% 99.3%
Implicitly (Lvl. ≥ 2) 95% 82% 86% 93% 94% 96% 98%
JavaScript:
Explicitly 22.1% 26.7% 25.3 23.1% 20.6% 21.7% 18.1%
Implicitly 92.3% 65.5% 79.3% 90.9% 92.9% 94.3% 92.0%
Fig. 4. (a) CDF of dependency chain levels (broken down into categories of apps); and
(b) distribution of third-parties across various categories and levels.
The previous section has confirmed that a notable fraction of apps creates depen-
dency chains with (up to) 7 levels. Next, we inspect the types of imported
resources within these dependency chains. For analyzed (categories of) apps
at each level of the resource dependency chain, we classify the types of loaded
resources into six main types: Data (consisting of HTML, XML, JSON, plain
text, and encoded files), Image, JavaScript code, CSS/Fonts, Audio, and Video.
We were unable to classify 5.28% of resources loaded by the analyzed apps. On
a closer look, we find that 98% of these uncategorized resources were imported
from 242 unique, static IP addresses via WebSockets while 2% of the uncatego-
rized resources were requested from localhost (127.0.0.1).
Table 2 presents the volume of each resource type imported at each level in
the trust chain. We observe that the make-up of resources varies dramatically
based on the level in the dependency chain. For example, the fraction of images
imported tends to increase—this is large because third-parties are in turn loading
images (e.g., for adverts). In contrast, the fraction of JavaScript codes decreases
as the level in the dependency chain increases: 27.2% of resources at level 2 are
JavaScript codes compared to just 11.92% at level 5. This trend is caused by
the fact that new levels are typically created by JavaScript execution (thus, by
definition, the fraction of JavaScript codes must be deplete along the chain).
However, it remains at a level that should be of concern to app developers as
this confirms a significant fraction of JavaScript code is loaded from potentially
unknown implicitly trusted domains.
Table 2. Breakdown of resource types requested by the analyzed apps across each level
in the dependency chain. The total column refers to the number of resource calls made
at each level. Here JS represents the JavaScript code category of imported resources.
To build on this, we also inspect the categories, taken from WebSense (see
Sect. 2.5 for details), of third-party domains hosting these resources. Figure 4b
presents the make-up of third-party categories at each level in the chain. It is
clear that, across all levels, Business and Advertisement domains make up the
bulk of third-parties. We also notice other highly demanded third-party cate-
gories such as Business, Ads, and IT. These are led by well-known providers, e.g.,
google-analytics.com (web-analytics–grouped as in business category as per
VirusTotal reports) provides resources to 83.78% of the analyzed apps. This obser-
vation is in line with the fact that 81.4% of the analyzed apps embed Google ads
and analytic service libraries. The figure also reveals that the distributions of cate-
gories vary slightly across each dependency level. For example, 37.7% of all loaded
resources at level 1 come from Business domains compared to 39.1% at level 3, i.e.,
overall, the proportion increases across dependency levels. We also observe similar
trends for resources loaded from Ads and IT (e.g., web hosting) domains.
In contrast, social network third-parties (e.g., Facebook) are mostly pre-
sented at level 1 (4.89%) and 2 (3.26%) with a significant drop at level 3.
The dominance of Business and Advertisements is not, however, caused by a
plethora of Ads domains: there are far fewer Ads domains than Business (see
Table 4). Instead, it is driven by a large number of requests for advertisements:
even though Ads domains only make up 9.01% of third-parties, they generate
13.58% of resources. Naturally, these are led by major providers. Importantly,
these popular providers can trigger further dependencies; for example, 79.41% of
apps leverage doubleclick.net which imports 11% of its resources from further
implicitly trusted third-party domains. This makes such third-parities means for
online fraudulent activities and ideal propagator of “malicious” resources for any
other domains having implicit trust in it [39].
The previous section has shown that the creation of dependency chains is
widespread, and there is therefore extensive implicit trust within the mobile and
third-party app ecosystem. This, however, does not shed light on the activity
of resources within the dependency chains, nor does it mean that the implicit
Fig. 5. CDFs of number of unique suspicious domains contacted and JavaScript codes
downloaded by apps (broken down into apps’ categories) at explicit level (Level = 1)
and implicit level (Level ≥ 2).
A First Look at Android Apps’ Third-Party Resources Loading 203
We next inspect how “popular” these suspicious third-parties are at each posi-
tion in the dependency chain, by inspecting how many Android apps utilize
them. Figure 6 displays the CDF of resource calls to third-parties made by each
app in our dataset. We decompose the third-party resources into various groups
(including total vs. suspicious). As mentioned earlier, we take a conservative
approach and consider a resource suspicious if it receives a VTscore ≥ 10.
Fig. 6. CDF of resources loaded per app from various categories of third-parties.
The figure reveals that suspicious parties within the dependency chains are
commonplace: 12.76% of all apps contain at least 3 third-parties classified as
suspicious in their dependency chain. Remarkably, 21.48% of apps load resources
from third-parties at least once. Hence, even though only 9.01% of third-party
domains are classified as suspicious, their reach covers nearly one-fifth of the
apps (indirectly via implicit trust).
This is a product of the power-law distribution of third-party “popularity”
across Android apps: The top 20% of third-party domains cover 86% (3,650,582)
A First Look at Android Apps’ Third-Party Resources Loading 205
Fig. 7. Distribution of calls to suspicious third-party domains (VT score ≥ 10) per
category at each level, for all (Fig. 7a) and Entertainment (Fig. 7b) apps.
206 H. Qayyum et al.
Lv. All apps Games apps Entert. apps Business apps Comm. Apps
All JS All JS All JS All JS All JS
1 41.20% 37.37% 55.40% 43.43% 53.61% 47.20% 49.23% 45.38% 47.41% 45.25%
2 4.24% 1.29% 23.34% 4.53% 10.09% 3.50% 7.53% 3.21% 8.09% 3.05%
3 1.01% 0.13% 1.59% 0.40% 3.26% 0.18% 1.070% 0.29% 2.20% 0.10%
4 0.11% ≤ 0.1% 0.51% ≤ 0.1% 0.80% ≤ 0.1% 0.60% ≤ 0.1% 0.40% ≤0.001%
≥ 5 ≤ 0.10% 0 ≤0.001% ≤ 0.1% ≤0.001% ≤ 0.1% ≤0.001% ≤ 0.1% ≤0.001% 0.00%
the cumulative distribution of the VTscores for all JavaScript resources loaded
with VTscore ≥ 1. We separate the JavaScript programs into their location in the
dependency chain. A clear differences can be observed, with level 2 obtaining the
highest VTscore (median 28). In fact, 51% of the suspicious JavaScript resources
loaded on trust level 2 have a VTscore > 30 (indicating very high confidence).
Figure 9 also presents the breakdown of the domain categories specifi-
cally for suspicious JavaScript codes. Clear trends can be seen, with IT
(e.g., dynaquestpc.com), News and Media (e.g., therealnews.com), Enter-
tainment (e.g., youwatchfilm.net) and Business (e.g., vindale.com) are dom-
inating. Clearly, suspicious JavaScripts cover a broad spectrum of activities.
Interestingly, we observed that 63% and 66%, respectively, of IT and News &
Media JavaScript codes, are loaded from level ≥ 2 in contrast to 17% and 25%
of JavaScript code from Social Networks and Streaming loaded at level 1.
We next strive to quantify the level of suspicion raised by each of these
JavaScript programs. Intuitively, those with higher VTscores represent a higher
threat as defined by the 68 AV tools used by VirusTotal. Hence, Fig. 8 presents
the cumulative distribution of the VTscores for all JavaScript resources loaded
with VTscore ≥ 1. We separate the JavaScript programs into their location in the
dependency chain. A clear difference can be observed, with level 2 obtaining the
highest VTscore (median 32). In fact, 78% of the suspicious JavaScript resources
loaded on trust level 2 have a VTscore > 52 (indicating very high confidence).
This is a critical observation since as mentioned earlier, while suspicious
third-parties at level 1 can be ultimately removed by apps’ developers if flagged
as suspicious, this is much more difficult for implicitly trusted resources further
along the dependency chain. If the intermediate (non-suspicious) level 1 resource
is vital for the webpage, it is likely that some operators would be unable or
unwilling to perform this action. The lack of transparency and the inability to
perform a vetting process on implicitly trusted loaded resources further compli-
cates the issue. It is also worth noting that the VTscore for resources loaded
further down the dependency chain is lower (e.g., level 4). For example, 92% of
level 2 resources receive a VTscore below 3. This suggests that the activity of
these resources is more contentious, with a smaller number of AV tools reaching
a consensus.
5 Related Work
We examine literature that measures third-party ecosystems on the web [29,30]
and mobile platforms [48]; then review the security and privacy implication of
loading resources from third-parties and illuminate on the chain of resource load-
ing. Previous works analyzed the presences of third-party JavaScript libraries
and ill-maintained external web servers making exploitation via JavaScript triv-
ial [41]. Lauinger et al. led a further study, classifying sensitive libraries and the
vulnerabilities caused by them [37]. Gomer et al. analyzed users’ exposure to
third-party tracking in the context of search queries, showing that 99.5% of users
are tracked by popular trackers within 30 clicks [23]. Hozinger et al. found 61
third-party JavaScript exploits and defined three main attack vectors [27]. Our
work differs quite substantially from these studies in that we are not interested
in the third-party JavaScript code itself, nor the simple presence of third-party
tracking domains embedded in tweets or in a webpage. Instead, we are inter-
ested in how mobile apps’ users are exposed to third-parties and the presence of
third-parties in the redirect chain. In contrast to our work, these prior studies
ignore the presence of chains of resource loading and treat all third-parties as
“equal”, regardless of where they are loaded when users click on a given URL
embedded in a tweet or webpage.
Kumar et al. [35] characterized websites’ resource dependencies on third-
party services. In line with our work, they found that websites’ third-party
resource dependency chains are widespread. This means, for example, that 55%
of websites, among Alexa top 1M, are prevented from fully migrating to HTTPS
by the third-parties that provide resources to them. More related work is Ikram
et al. [30], who perform a large-scale study of suspicious resource loading and
dependency chains in the Web, and around 50% of first-party websites render
content that they did not directly load. They also showed that 84.91% of web-
sites have short dependency chains (below 3 levels). The study reported that
A First Look at Android Apps’ Third-Party Resources Loading 209
1.2% of these suspicious third-parties have remarkable reach into the wider Web
ecosystem. To the best of our knowledge, we are the first to characterize the
chains of resource loading of mobile apps. Moreover, we also characterize the
role of apps’ suspicious resource loading. We suggest that more rigorous vetting
of in-app third-party resources is required.
Category Third-parties Total calls Suspicious JS VTScore ≥ 1 VTScore ≥ 5 VTScore ≥ 10 VTScore ≥ 20 VTScore ≥ 40
Num. Vol. Num. Vol. Num. Vol. Num. Vol. Num. Vol.
Business 5,073 (33.43%) 1,030,635 63,970 (6.21%) 14.75% 47.59% 1.70% 2.75% 1.13% 1.17% 0.61% 0.22% 0.12% 0.09%
Ads 1,367 (9.01%) 623,261 100,843 (16.18%) 24.58% 60.65% 2.93% 5.36% 1.54 5.03% 0.59% 0.08% 0.08% 0.01%
IT 1,173 (7.73%) 41,841 887 (2.12%) 13.98% 14.54% 1.62% 3.42% 0.68% 1.61% 0.26% 0.09% 0% 0%
Shopping 607 (4.0%) 137,686 990 (0.72%) 13.51% 12.01% 1.98% 0.37% 1.32% 0.17% 1.15% 0.13% 0.66% 0.12%
NewsAndMedia 549 (3.62%) 76,566 1,205 (1.57%) 15.12% 28.86% 3.28% 0.94% 2.37% 0.93% 1.09% 0.14% 0.18% 0.03%
Social Networks 246 (1.62%) 160,789 5,033 (3.13%) 19.51% 85.77% 1.63% 0.59% 0.81% 0.59% 0.81% 0.59% 0% 0%
Games 244 (1.61%) 27,419 358 (1.30%) 16.39% 16.40% 2.46% 3.11 1.64% 1.96% 1.23% 1.93% 1.23% 1.93%
Others 5,916 (38.99%) 2,656,419 213,604 (8.04%) 12.98% 89.83% 1.81% 1.066% 1.12% 0.65% 0.50% 0.60% 0.15% 0.027%
Total 15,175 (100%) 4,670,741 386,890 (8.28%) 14.95% 73.69% 1.93% 2.03% 1.18% 1.36% 0.59% 0.44% 0.16% 0.06%
Table 5. Top 5 most exposed apps (with VTscore ≥ 10) ranked by the number of
unique suspicious domains.
Table 6. Top 5 most prevalent suspicious third-party domains (VTscore ≥ 10) on level
1 and level ≥ 2 providing resources to Apps. The number of apps (# Apps) having the
corresponding suspicious third-party domain in their chain of dependency.
6 Concluding Remarks
References
1. Android.tapjoy — symantec (2019). https://www.symantec.com/security-center/
writeup/2014-052619-4702-99
2. AntiVirus 2019 (2019). https://play.google.com/store/apps/details?id=com.
androhelm.antivirus.free2
A First Look at Android Apps’ Third-Party Resources Loading 211
3. Apktool - a tool for reverse engineering 3rd party, closed, binary android apps
(2019). https://ibotpeaches.github.io/Apktool/
4. BBC News (2019). https://play.google.com/store/apps/details?id=bbc.mobile.
news.ww
5. Borussia Dortmund (2019). https://play.google.com/store/apps/details?id=de.
bvb.android
6. Egypt news moment by moment (2019). https://play.google.com/store/apps/
details?id=com.egy.new
7. Evite: Free Online & Text Invitations (2019). https://play.google.com/store/apps/
details?id=com.evite
8. Github-hosted malware targets accountants with ransomware (2019). https://
www.bleepingcomputer.com/news/security/github-hosted-malware-targets-
accountants-with-ransomware/
9. Google play unofficial python 3 API library (2019). https://github.com/
alessandrodd/googleplay api
10. mitmproxy - an interactive HTTPS proxy (2019). https://mitmproxy.org
11. monkeyrunner — Android Developers (2019). https://developer.android.com/
studio/test/monkeyrunner/
12. Package tracker (2019). https://play.google.com/store/apps/details?id=de.orrs.
deliveries
13. RoboForm Password Manager (2019). https://play.google.com/store/apps/details?
id=com.siber.roboform
14. Bashir, M.A., Arshad, S., Robertson, W., Wilson, C.: Tracing information flows
between ad exchanges using retargeted ads. In: USENIX Security (2016)
15. Canto, J., Dacier, M., Kirda, E., Leita, C.: Large scale malware collection: lessons
learned. In: SRDS (2008)
16. Chen, J., et al.: Forwarding-loop attacks in content delivery networks. In: NDSS
(2016)
17. Cova, M., Kruegel, C., Vigna, G.: Detection and analysis of drive-by-download
attacks and malicious javascript code. In: Web Conference (WWW) (2010)
18. Das, A., Acar, G., Borisov, N., Pradeep, A.: The web’s sixth sense: a study of
scripts accessing smartphone sensors. In: SIGSAC (2018)
19. Egele, M., Wurzinger, P., Kruegel, C., Kirda, E.: Defending browsers against drive-
by downloads: mitigating heap-spraying code injection attacks. In: Flegel, U.,
Bruschi, D. (eds.) DIMVA 2009. LNCS, vol. 5587, pp. 88–106. Springer, Heidelberg
(2009). https://doi.org/10.1007/978-3-642-02918-9 6
20. IBM X-Force Exchange: Statcounter session hijack (2005). https://exchange.
xforce.ibmcloud.com/vulnerabilities/20506
21. Falahrastegar, M., Haddadi, H., Uhlig, S., Mortier, R.: Anatomy of the third-
party web tracking ecosystem. In: Traffic Measurements Analysis Workshop (TMA)
(2014)
22. Gatlan, S.: Github service abused by attackers to host phishing kits (2019).
https://www.bleepingcomputer.com/news/security/github-service-abused-by-
attackers-to-host-phishing-kits/
23. Gomer, R., Rodrigues, E.M., Milic-Fraying, N., Schrafel, M.: Network analysis of
third party tracking: user exposure to tracking cookies through search. In: WI-IAT
(2013)
24. Google: Headless chromium (2018). https://chromium.googlesource.com/
chromium/src/+/lkgr/headless/README.md
25. Grace, M.C., Zhou, W., Jiang, X., Sadeghi, A.R.: Unsafe exposure analysis of
mobile in-app advertisements. In: WISEC (2012)
212 H. Qayyum et al.
26. GreenBerg, A.: Hack brief: malware hits 225,000 (jailbroken, mostly Chi-
nese) iphones (2015). https://www.wired.com/2015/08/hack-brief-malware-hits-
225000-jailbroken-mostly-chinese-iphones/
27. Holzinger, P., Triller, S., Bartel, A., Bodden, E.: An in-depth study of more than
ten years of java exploitation. In: CCS (2016)
28. Ibosiola, D., Castro, I., Stringhini, G., Uhlig, S., Tyson, G.: Who watches the
watchmen: exploring complaints on the web. In: Web Conference (WWW) (2019)
29. Ikram, M., Asghar, H.J., Kâafar, M.A., Mahanti, A., Krishnamurthy, B.: Towards
seamless tracking-free web: improved detection of trackers via one-class learning.
PoPETs (2017)
30. Ikram, M., Masood, R., Tyson, G., Kaafar, M.A., Loizon, N., Ensafi, R.: The chain
of implicit trust: an analysis of the web third-party resources loading. In: WWW
(2019)
31. Ikram, M., Vallina-Rodriguez, N., Seneviratne, S., Kaafar, M.A., Paxson, V.: An
analysis of the privacy and security risks of android VPN permission-enabled apps.
In: IMC (2016)
32. VirusTotal Inc.: Virustotal public API (2019). https://www.virustotal.com/en/
documentation/public-api/
33. Janosik, J.: Russia hit by new wave of ransomware spam (2019). https://www.
welivesecurity.com/2019/01/28/russia-hit-new-wave-ransomware-spam/
34. Knockel, J., Senft, A., Deibert, R.: WUP! there it is privacy and security issues
in QQ browser (2016). https://citizenlab.ca/2016/03/privacy-security-issues-qq-
browser/
35. Kumar, D., Ma, Z., Mirian, A., Mason, J., Halderman, J.A., Bailey, M.: Security
challenges in an increasingly tangled web. In: WWW (2017)
36. Kurkowski, J.: Accurately separate the TLD from the registered domain and sub-
domains of a URL, using the public suffix list (2018). https://github.com/john-
kurkowski/tldextract
37. Lauinger, T., Chaabane, A., Arshad, S., Robertson, W., Wilson, C., Kirda, E.:
Thou shalt not depend on me: analysing the use of outdated javascript libraries
on the web. In: NDSS. The Internet Society (2017)
38. Lerner, A., Simpson, A.K., Kohno, T., Roesner, F.: Internet jonesa and the raiders
of the lost trackers: an archaeological study of web tracking from 1996 to 2016. In:
25th USENIX Security (2016)
39. Li, Z., Zhang, K., Xie, Y., Yu, F., Wang, X.: Knowing your enemy: understanding
and detecting malicious web advertising. In: CCS (2012)
40. MalwareDontNeedCoffee: A doubleclick https open redirect used in some malver-
tising chain (2015). https://malware.dontneedcoffee.com/2015/10/a-doubleclick-
https-open-redirect-used.html
41. Nikiforakis, N., et al.: You are what you include: large-scale evaluation of remote
javascript inclusions. In: CCS (2012)
42. Pellegrino, G., Rossow, C., Ryba, F.J., Schmidt, T.C., Wählisch, M.: Cashing out
the great cannon? on browser-based DDoS attacks and economics. In: USENIX
Sec (2015)
43. Popa, B.: 85 infected android apps stealing social network passwords found on play
store (2017). https://news.softpedia.com/news/85-infected-android-apps-stealing-
social-network-passwords-found-on-play-store-518984.shtml
44. Rastogi, V., Shao, R., Chen, Y., Pan, X., Zou, S., Riley, R.: Are these ads safe:
detecting hidden attacks through the mobile app-web interfaces. In: NDSS (2016)
45. Reis, C., Gribble, S.D., Kohno, T., Weaver, N.C.: Detecting in-flight page changes
with web tripwires. In: NSDI (2008)
A First Look at Android Apps’ Third-Party Resources Loading 213
46. Sequa, J.: Large angler malvertising campaign hits top publishers (2016). https://
blog.malwarebytes.com/threat-analysis/2016/03/large-angler-malvertising-
campaign-hits-top-publishers/
47. Starov, O., Dahse, J., Ahmad, S.S., Holz, T., Nikiforakis, N.: No honor among
thieves: a large-scale analysis of malicious web shells. In: WWW (2016)
48. Tang, Z., et al.: iOS, your OS, everybody’s OS: vetting and analyzing network ser-
vices of iOS applications. In: 29th USENIX Security Symposium (USENIX Security
2020), pp. 2415–2432 (2020)
49. Unuchek, R.: Leaking ads securelist (2018). https://securelist.com/leaking-ads/
85239/
50. Vance, A.: Times web ads show security breach (2009). https://www.nytimes.com/
2009/09/15/technology/internet/15adco.html
51. Vanrykel, E., Acar, G., Herrmann, M., Diaz, C.: Leaky birds: exploiting mobile
application traffic for surveillance. In: ICFCDS (2016)
52. Vigna, G., Valeur, F., Balzarotti, D., Robertson, W., Kruegel, C., Kirda, E.: Reduc-
ing errors in the anomaly-based detection of web-based attacks through the com-
bined analysis of web requests and SQL queries. JCS 17(3) (2009)
53. Virus, Q.R.: How to remove [email protected] virus completely (2017). https://
quickremovevirus.com/how-to-remove-nintendonxqq-com-virus-completely7
54. Wang, H., et al.: An explorative study of the mobile app ecosystem from app
developers’ perspective. In: WWW (2017)
55. Wang, X.S., Balasubramanian, A., Krishnamurthy, A., Wetherall, D.: Demystify
page load performance with wprof. In: USENIX NSDI (2013)
56. Whittaker, C., Ryner, B., Nazif, M.: Large-scale automatic classification of phish-
ing pages. In: NDSS (2010)
Comprehensive Mobile Traffic
Characterization Based on a Large-Scale
Mobile Traffic Dataset
1 Introduction
As shown in mobile application (app) analytics reports [1–3], mobile apps
account for roughly 90% of smartphone usage and 56% of web page views world-
wide in 2021. These indicate that the ways of accessing the Internet have turned
to mobile devices, and mobile app traffic has accounted for a majority of network
traffic. Accordingly, mobile traffic analysis becomes a new research hotspot [4].
To perform mobile traffic analysis tasks better, it is essential to have a clear
understanding of mobile traffic. On the one hand, the measurement of mobile
traffic provides the researchers with an independent view of what is happening
on the mobile Internet, which forms the foundation of simulation and emulation
studies. On the other hand, the traffic properties could greatly affect researchers’
decision-making. However, we notice that there is a lack of a comprehensive
characterization of the current mobile traffic. The answers to questions about
the properties of mobile traffic are difficult to be found from a few references. For
instance, “How much of mobile traffic is encrypted now?”, “Are there any differ-
ences between the traffic properties of different categories of apps?”, “How many
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 214–232, 2022.
https://doi.org/10.1007/978-3-031-23020-2_12
Mobile Traffic Characterization 215
connections in mobile traffic have DNS requests in front of them?”. Given the
scarcity of research work that characterizes mobile traffic from multiple perspec-
tives, interested parties usually need to go through a large number of studies and
synthesize fragmented measurements of mobile traffic to gain an initial overview
of mobile traffic [4].
Several possible reasons why the measurements of mobile traffic have not
received sufficient attention are as follows. Firstly, most elements in mobile net-
works, such as protocols, communication methods, and data transmission, are
similar to those of traditional desktop networks. This makes it easy to transfer
the measurement of traditional networks directly to mobile networks. However,
this straight migration is reckless as mobile networks grow and update rapidly.
Secondly, many challenging issues arise as mobile network traffic dominates,
such as mobile traffic identification, privacy protection, and user profiling. These
issues have gained more attention than basic mobile network measurements.
Besides, although capturing mobile traffic is not difficult, the lack of labels (e.g.
app label, service label) for the traffic makes it difficult to characterize mobile
traffic at such high levels. Lastly, the rapid iterations of mobile networks may
introduce concerns that the measurement of current mobile networks may quickly
become outdated. This may further lead many researchers to underestimate the
necessity of mobile traffic characterization.
To fill this research gap, a comprehensive mobile traffic characterization is
provided in this paper. In contrast to other research efforts that give fragmented
descriptions of mobile traffic, our work provides interested parties with up-to-
date information on the properties of mobile traffic from multiple perspectives
and in multiple dimensions. Moreover, our work measures the mobile traffic at
the app/app category level as the dataset that supports our work is labeled
at the app level. We hope that this work could serve as a basis for helping
interested parties to better conduct their research. Overall, we gain insight into
the properties of mobile traffic from four perspectives based on a large-scale
labeled mobile traffic dataset:
(1) The properties of mobile traffic in its basic information are analyzed. The
basic information includes the protocol, the destination IP (dstIP), and the
destination Port (dstPort).
(2) The properties of domain names used in mobile traffic are summarized.
(3) Two most commonly used protocols in mobile networks, namely HTTP and
TLS, are investigated in detail.
(4) The properties of traffic biflows are measured. Besides, the traffic properties
shown by different apps and app categories are analyzed.
The rest of this paper is organized as follows. Section 2 introduced the related
work. The mobile traffic dataset is described in Sect. 3. Then, the mobile traffic
is characterized from four perspectives and the detailed findings are provided in
Sect. 4. Section 5 discusses how the findings assist in improving various mobile
traffic analysis tasks. Finally, Sect. 6 concludes the paper.
216 S. Zhao et al.
2 Related Work
Mauro et al. [4] summarize works that investigate the network traffic generated
by specific apps or a population of mobile devices. Those works generally focus
on the protocol composition of the traffic, the characteristics of traffic in size and
arrival time, or the traffic behavior of specific apps. The main traffic properties
that emerged from those works are highlighted in [4]. However, some conclusions
in those works are no longer applicable as the properties of mobile traffic have
changed greatly over time. For instance, the conclusion “Android apps typically
do not encrypt their network traffic” is not in conformity with the reality now.
Several studies build the temporal and spatial profile of mobile traffic based
on large-scale unlabeled mobile traffic. Hoang et al. [5] provide the analysis of
traffic obtained from an LTE Network. The daily and weekly throughput patterns
of mobile traffic are given in their work. Besides, they summarize the traffic
intensity behaviors on weekdays and weekends. Similarly, Shi et al. [6] capture
the weekly, daily, and hourly temporal patterns in the mobile traffic load across
base stations. Their analysis shows that there are patterns in traffic distribution
across time. Moreover, the patterns are predictable. Lastly, five traffic patterns
are extracted and mapped to five types of geophysical locations related to urban
ecology. In addition, Fang et al. [7] measure the mobile web traffic based on a
massive real commercial dataset. Several web traffic properties are extracted,
such as the web parsing time and the web page size. For the above works, the
analysis of traffic properties at the app level is insufficient.
Other works almost only briefly depict the traffic properties from part of
the point of view when introducing their datasets. Wang et al. [8] point out
that most apps transmit their data based on the HTTP protocol since they
use ports 80 and 443 for communication. Aceto et al. [9] release the MIRAGE-
2019 dataset and provide a description for it. Specifically, the packet length
distribution of two apps (Dropbox and Slither.io) is presented. Then, they report
the distribution of the packet length and inter-arrival time for three different
app categories (Productivity, Sports, and Games). According to MIRAGE-2019,
more than 88% of the traffic flows have volumes less than 100KB. Meanwhile,
downstream traffic accounts for 65% of the volume of the whole traffic. Based
on a private mobile traffic dataset, Rezaei et al. [10] conclude that the majority
of the mobile traffic flows are carried by TCP. Besides, only streaming and
video/voice apps contain a significant amount of UDP traffic, with their UDP
flows accounting for around 10% of the whole traffic flow. Sengupta et al. [11]
investigate the cipher suites used for encrypting mobile traffic. After extracting
the SeverHello and ClientHello TLS handshake messages from the mobile traffic,
they parse those messages to find out how the cipher suites are used by different
apps. Chen et al. [12] analyze their manually collected mobile dataset. They find
that around 79.9% of the traffic flows contain an X.509 certificate.
Compared with the existing studies, our work provides a more comprehen-
sive description and measurement of mobile traffic. On the one hand, our work
includes the points of interest of the existing work, and further validates and
updates those points of interest with a recent mobile traffic dataset. On the
Mobile Traffic Characterization 217
other hand, our work extracts the properties of mobile traffic in higher dimen-
sions, including the app level and the app category level.
Netlog is used to collect mobile traffic and label it at the app level [13]. The core
functions of Netlog are built on the VPNService (an API provided in Android
SDK). Netlog would create a virtual network interface after it is installed and
launched on an Android device. Then it could create a duplicate copy of the
device’s network traffic at the userspace without requiring the root permission.
Besides, Android provides the UID, which can be used to map a traffic flow
to a specific app by Android’s PackageManager API. By this means Netlog
could collect and label mobile traffic. Since Netlog collects the traffic before it
is encapsulated and forwarded by the VPNService, hence no additional bias will
be introduced into the traffic during this traffic collection process.
Based on Netlog, our traffic collection was conducted during 2020.05-2020.07
with the participation of 224 volunteers. The volunteers were asked to install and
operate the designated apps on their smartphones. At last, a total of about 636
GB of traffic data is collected from 785 apps, with 611.23 GB of data labeled.
There are five types of networks are found in our collection, including 2G, 3G,
4G, LTE_CA, and WIFI. Besides, the smartphones used in the collection involve
at least 9 brands and 94 models. Overall, the mobile traffic is captured under
diverse configurations. This dataset will be made public after anonymization in
our future work [14]. After preprocessing, we found that 350 apps (quoted as
head apps) account for 99.39% of the collected traffic in bytes. According to
the main functionalities provided by apps, the head apps are classified into 22
categories as listed in Table 1.
It is worth mentioning that our dataset has some unavoidable limitations.
Firstly, the apps we selected are all from China, which leads to some of the
analysis results may not apply to other regions, such as the domain name usage.
Secondly, the users’ individual behavioral preferences may affect the traffic prop-
erties of an app to some extent. For instance, the traffic properties of an app could
be dominated by the functions executed in one path if the user over-executes a
certain path. Thirdly, this dataset was collected in 2020, which does not strictly
represent the latest mobile traffic. However, our subsequent analysis finds that
some characteristics of mobile traffic, such as duration and flow size, are not sig-
nificantly different from those of many years ago. Finally, the distribution of our
app set differs from the distribution of apps present in practical mobile networks,
which may introduce some noise. However, considering the scale of this dataset,
we believe that the statistical results on this dataset are worthy of reference.
Protocol. Firstly, the protocols used in mobile traffic are investigated. Fig. 1
provides the distribution of mobile traffic under different protocols.
It can be seen from Fig. 1 that mobile traffic mainly relies on TCP to trans-
mit data, and TCP traffic accounts for 97.34% and 72.13% in bytes and flows,
respectively. Although UDP traffic has a ratio of 27.12% in flows, 22.08% of
them are DNS. However, UDP-based DNS traffic only occupies 0.1% of mobile
traffic in bytes, the majority of UDP traffic (2.64%) transmits application data.
HTTP and HTTPS are the mainly used application layer protocols for TCP
traffic. HTTPS traffic accounts for 46.53% and 40.88% of the total traffic in
bytes and flows respectively, which is close to HTTP traffic in bytes and even
exceeds HTTP traffic in flows. Therefore, encrypted traffic has become the main
part of mobile traffic. In addition, a few DNS data are found to be transmitted
using TCP. Lastly, there is a small amount of ICMP traffic in mobile traffic in
addition to TCP and UDP.
Mobile Traffic Characterization 219
Fig. 1. Bytes and flows distribution of mobile traffic under different protocols. (For
clarity, the protocols with extremely small ratios are not displayed in the figures, such
as ICMP and DNS in (a)).
In terms of IPv6, 0.5% and 2.72% of mobile traffic adopt it in bytes and flows.
It seems that there is a low adoption rate of IPv6 in mobile traffic at present.
Then we investigate how apps and app categories use UDP and HTTPS to
transmit their data. Figure 2 gives the number of apps under the different ratio
of flows transmitting application data using HTTPS/UDP. Figure 3 provides the
average ratio of flows transmitting application data using HTTPS/UDP for each
app category.
Fig. 2. The number of apps (CDF) Fig. 3. The average flow ratio that
under the different ratio of flows that transmits application data based on
transmit application data based on HTTPS/UDP for each app category.
HTTPS/UDP.
As Fig. 2 shows, the UDP flows generated by more than 80% of the apps
account for less than 10% of their total traffic flows. Moreover, 127 apps do
not adopt UDP at all. As shown in Fig. 3, children and audio apps produce the
most UDP flows (about 20% of their traffic in flows). The app categories of the
second echelon using UDP flows include community platform, video, and social
220 S. Zhao et al.
community. The common feature between those categories is that many video
and audio resources are usually provided by apps in these categories. In other
words, apps that need to access a large number of audio and video resources
usually generate more UDP traffic than other apps.
In terms of HTTPS, the HTTPS flows generated by 56.28% of the head apps
are more than half of their total traffic flows, and 16% of the head apps are more
than 90%. Besides, finance and business apps show the highest average ratios
of HTTPS flows, which both are over 70%. The following six app categories,
health & exercise, photography, online shopping, convenient life, security, and
input method, fall into the ratio space of 60%–70%. Such results are in line with
expectations, since such apps generally access the most sensitive information of
users. Lastly, the average ratio of HTTPS flows of audio apps is the smallest,
which is 33.3%.
Destination Port. The dstPort refers specifically to the port used by the
server. Besides, we focus on how dstPorts of TCP flows distribute. A total of
7,305,801 flows are obtained and 7,762 different dstPorts are extracted after
filtering the TCP flows of 350 head apps.
Four ports are used by the overwhelming majority of the flows among thou-
sands of dstPorts, including 443, 80, 8080, and 8081. The proportion of flows
using these four ports reaches 95.96%, and the proportion for each port is 58.21%,
34.71%, 1.34%, 1.70%, respectively. It is consistent with the fact that mobile
traffic mainly uses HTTP/HTTPS to transmit data, as these four ports are the
default ports of these two protocols. The rest ports (quoted as random ports)
used by the remainder 294,859 flows fall into 7 to 65243. The number of random
ports used by each head app is shown in Fig. 4. Note that five head apps are
not included in Fig. 4, because the number of random ports used by these five
apps far exceeds that of the other 345 apps. These five apps use 2107, 2337, 707,
1634, and 978 random ports, respectively. Compared with these five apps, 335
apps out of the rest 345 apps use no more than 30 random ports.
Then, we analyze the distribution of the random ports to find out whether
apps have a preference for the selection of random ports. The value range of
the dstPort (0–65535) is divided into 66 buckets equally, each with a length of
1000. The ratio of flows falling into each bucket is depicted in Fig. 5. As Fig. 5
shows, the apps are prone to choose small ports that are less than 15000 although
the random ports are widely distributed. Besides, it can be observed that the
ratio of flows within the bucket 8000–9000 is far larger than others. Meanwhile,
there are other three small peaks in the range of 30000–31000, 33000–34000, and
55000–56000.
Destination IP. Similarly, the dstIP refers to the IP used by the server. Based
on our dataset, 42,670 different dstIPs are obtained from the TCP flows of
350 head apps. Meanwhile, 111,352 <app, dstIP > pairs are extracted, each pair
implies that there is at least one request that exists from the app to that dstIP .
Mobile Traffic Characterization 221
Fig. 4. The number of random ports Fig. 5. The ratio of flows for random
used by 345 head apps. port buckets.
We found that 72.34% of these dstIPs were accessed by only one app and
led 42.9% of TCP flows. Therefore, the dstIP would be a valuable attribute
for many traffic analysis tasks. For instance, the performance of mobile traffic
identification may be improved when the dstIP is added as a feature. However,
it is worth mentioning that the dstIP is unstable in some cases, especially for
the mobile network. The application of Content Delivery Network (CDN) in
mobile networks makes the dstIP changes frequently. For the rest of the dstIPs,
we found that one dstIP is visited at most by 128 apps in our dataset. Besides,
250 different dstIPs are visited by one app on average for 340 head apps. The
number of visited dstIPs of the remaining 10 apps is significantly higher than
that of the other 340 apps, which are distributed between 1092–4494.
Lastly, 41.46% of TCP flows with SYN handshake are established after a
DNS request. In other words, these flows obtain their dstIPs by DNS requests.
Therefore, the rich information in DNS packets is worthy of attention to assist
relevant traffic analysis tasks.
In this section, the usage of the domain name in mobile traffic is analyzed. A
total of 19,538 unique domain names are found by parsing the DNS response
packets in our traffic dataset.
Length of Domain Names. The maximum and minimum lengths of the found
domain names are 73 and 5, with an average length of 25.3. Meanwhile, 80% of
domain names have a length of less than 35. In addition, the number of domain
names in the following length ranges, [0–10], [30–40], and [50–60], is smaller than
that in other ranges. Overall, the majority of domain names fall into the length
range of 10 to 35. As for the level deepness of domain names, we find 7 types,
namely 2–8. The distribution ratios of domain names with level 2 to level 8 are
around 1%, 54.76%, 34.27%, 8.26%, 1.63%, 0.01%, 0.01%. respectively.
222 S. Zhao et al.
Top 10 Domain Names. Table 2 lists the top 10 second-level domain names
that provide the most services under three different standards. The three stan-
dards are the number of requests responded by the domain name, the traffic
volume generated from the domain name, and the number of apps that visit the
domain name. The obtained top 10 domain names are overlapped under these
three ranking standards, while there are some changes.
For the top 10 domain names with the most number of requests, nine of them
are registered by the five largest Internet companies in China, including Tencent,
ByteDance, Baidu, Alibaba, and Kuaishou. Each company has developed mul-
tiple apps that are popular in China. Therefore, it is understandable that these
domain names are frequently visited. The remaining domain name, xdrig.com,
provides data analysis services, which contributes to its high access frequency.
There is an obvious change in the top 10 domain names under the stan-
dard of traffic volume. The domain name that provides audio/video resources
has a higher ranking, such as ixigua.com and videocc.net. In addition, some
domain names providing cloud services enter the top 10, such as bcebo.com and
alicdn.com.
Lastly, new features are reflected in terms of the top 10 domain names that
are visited by the maximum number of apps. For these 10 domain names, they
either provide services to multiple apps that were developed by one company
(e.g., qq.com provides services for dozens of apps from Tencent), or they belong
to third-party service providers and provide third-party services, such as cloud
services (e.g., aliyuncs.com), map services (e.g., amap.com), and data analysis
services (e.g., umeng.com and getui.com), or they meet the above two cases at
the same time. Such features can be beneficial to the mobile traffic analysis tasks
such as discovering third-party services.
Domain Names, DstIPs, and Apps. Finally, we explore the domain name
usage from the following two angles, the correlations between domain names and
dstIPs, and the correlations between domain names and apps.
There is a many-to-many relationship between dstIPs and domain names due
to the application of CDN, cloud services, load balancing, and other technologies.
One dstIP could support multiple domain names. On the contrary, one domain
name could associate with multiple dstIPs. In our dataset, we found that there
is an average of 10.66 dstIPs behind one domain name, with a maximum of 1,014
different dstIPs for one domain name. For each dstIP, a maximum/minimum of
790/4 domain names are deployed on it, with an average of 16 domain names
per dstIP.
For domain names and apps, about 72.56% of domain names are accessed by
one app. It indicates that there is a strong correlation between domain names
and apps. Meanwhile, this correlation is more stable than the correlation between
dstIPs and apps. Therefore, the information contained in DNS can be utilized
to analyze mobile traffic at the app level, if the mapping relationship between
the domain names and apps can be determined.
HTTP. We focus on “Request Method” and “Host” for the fields of the HTTP
request. There is a set of predefined request methods in HTTP protocol, such
as GET and POST. Different request methods are usually applied in different
scenarios. Five kinds of request methods are found in our dataset, including
GET, POST, HEAD, OPTIONS, and PUT. The proportions of traffic using
these request methods in flows and bytes are listed in Table 3.
As shown in Table 3, most of the HTTP flows use GET and POST to transfer
application data. The other three methods appear occasionally. In addition, the
224 S. Zhao et al.
number of HTTP flows using POST is close to that using GET. However, the
HTTP flows using GET transmit 97.058% of data. Therefore, it can be inferred
that the large data block is usually transmitted by the way of GET, while the
HTTP flows with POST only transmit a small amount of data.
As for the field of “Host”, it is found that 75.75% of HTTP flows are not
empty in this field, and those flows account for 98.02% of HTTP traffic in bytes.
This field could provide rich information for many mobile traffic analysis tasks.
The high non-empty rate of this field implies that it could play a promising role
in related analysis tasks.
TLS. The handshake phase of TLS flows is plaintext, which is often exploited
by mobile traffic analysis tasks. Therefore, we further explore the properties of
TLS shown in the handshake phase.
Firstly, we calculated the bytes and number of packets that are transmitted
during the handshake phase. The CDF of those two statistics are shown in Fig. 6
and Fig. 7, respectively. The number of packets is calculated as the number of
packets between the first packet after the TCP 3-way handshake and the first
packet that transfers the application data. The size of bytes is the sum of the
payload length from the L3 layer of those packets.
Fig. 6. The CDF of transferred bytes Fig. 7. The CDF of transferred num-
during the TLS handshake. ber of packets during the TLS hand-
shake.
As Fig. 6 shows, despite the long tail, the bytes transmitted during the TLS
handshake are mainly distributed in two intervals: [647,1123] and [3701–6790].
These two intervals contain 28.6% and 51.12% of flows, respectively. For the tasks
that need to analyze the TLS handshake, exploiting the first 6790 bytes of TLS
flows would be a good choice since it already holds all the handshake information
of 98.12% of TLS flows. For the number of packets transferred during the TLS
Mobile Traffic Characterization 225
handshake, at most 37 packets are found in our dataset. However, around 83.5%
of flows only have 6 to 15 packets in this phase, and 99.66% of flows have less than
16 packets. Among those flows, about 12.26% of flows transfer their application
data without the TLS handshake. Therefore, it is sufficient to analyze the first
15 packets for most TLS flows.
Secondly, we paid attention to the cipher suites supported by the client and
the server. In one ClientHello packet, the client offers the server a sequence of
cipher suites ordered in the preference of the client. Each cipher suite defines a
set of methods, such as the encryption algorithm and pseudorandom function,
that will be needed to establish a connection and transmit data using TLS.
There are 246 different cipher suites are extracted from the ClientHello pack-
ets in our dataset. The use rate of each cipher suite and the number of apps that
support the cipher suite are shown in Fig. 8. It can be seen from Fig. 8 that
several cipher suites appear more frequently than others. In addition, there is
a positive correlation between the use rate and the number of apps. The val-
ues of cipher suites with use rates higher than 0.1 are listed in Table 4. The
detailed cipher suites information corresponding to these values can be found in
[16]. Appendix A also provides the corresponding cipher suites mentioned in this
paper for quick looking up. In addition to the 22 cipher suites listed in Table 4,
the use rates of other cipher suites are close to 0.01 or even less.
After receiving the ClientHello packet, the server would select one cipher
suite and send its choice to the client by a ServerHello packet. We found that
22 kinds of cipher suites were selected by servers after parsing the ServerHello
packets. Among these 22 cipher suites, 16 of them come from Table 4. More-
over, all 12 cipher suites with a use rate between 0.8 to 0.9 had been selected by
servers. On the contrary, the 3 cipher suites with a use rate between 0.2 to 0.3
had not been used by any server. Table 5 lists the usage details of cipher suites
226 S. Zhao et al.
selected by servers with a frequency greater than 10−2 . Note that the server-side
cipher suites provided by 15.86% of TLS flows were empty. It can be seen from
Table 5 that the server has a strong bias towards the cipher suite. Although all
of the cipher suites in Table 5 have more than 80% use rate on the client side,
49199 (TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) is the most
commonly used cipher suite, which is preferred by nearly half of the TLS flows. In
addition to 49199, only cipher suites 49200 (TLS_ECDHE_RSA_WITH_AES
_256_GCM_SHA384) and 52392 (TLS_ECDHE_RSA_WITH_
CHACHA20_POLY1305_SHA256) are often selected.
Cipher suite Use rate (ServerHello) Use rate (ClientHello) Number of apps using it
49199 49.32% 87.11% 732
49200 20.66% 85.71% 730
Empty 15.86% / /
52392 6.19% 84.64% 725
49195 2.57% 86.96% 732
53 1.93% 87.48% 721
156 1.27% 86.91% 721
Fig. 9. The CDFs of mobile traffic flows in the flow size, the number of packets, the
flow duration, and the D/U.
Mobile Traffic Characterization 227
app categories. Figure 9 provides the CDFs of the above four attributes of mobile
TCP flows. Several conclusions can be drawn from Fig. 9.
About one fifth of the flows have a flow size less than 1 KB as shown in Fig. 9a,
and 94.79% of the flows have a flow size less than 100 KB. Although most mobile
traffic flows are “mice” flows, few “elephant” flows are found in our dataset. For
example, the sizes of 66 flows in our dataset are larger than 100 MB.
In terms of the number of packets per flow, 95.57% of the flows have less
than 100 packets as shown in Fig. 9b. Although the number of packets usually
increases with the increase of the flow size, our statistics show that the growth of
the number of packets is slower than the growth of the flow size. In other words,
for the flows with large sizes, they would give priority to adding the number of
bytes carried by each packet, rather than using more packets.
Then, the duration of mobile traffic flows shows the characteristics of short
and fast. As shown in Fig. 9c, more than half of the flows (51.22%) ended in 2 s,
and 96.6% of the flows ended within 1 min. The remaining flows almost ended
within 2 min.
As for the D/U per flow, we measure it from the aspects of bytes and the
number of packets. In terms of bytes, the D/U of 53.67% of flows is less than
1, which indicates that there is a considerable need to upload data in mobile
networks. The D/U of the remaining flows is mainly distributed between 1–30.
Among them, 34.18% and 4.75% of the flows fall into the interval of 1–7 and
7–30, respectively. In terms of the number of packets, the D/U of 56.92% of the
flows is less than 1, which is similar to the scenario in bytes. However, 40.67%
out of the remaining 43.08% of the flows have a D/U between 1–2. This result
demonstrates that the number of downlink packets is close to that of uplink
packets even if the downlink bytes far exceed the uplink bytes.
We calculate the average and median values of these four attributes for apps
in different categories to refine the properties differences between app categories.
The results are depicted in Fig. 10. For each category, the average and median
values are presented in the first column and the second column, and each point
in the columns is an app that belongs to the category. Due to space limitations,
we do not display the apps that are outside the set maximum value of the y-axis
in the subgraphs. Note that such cases are rare.
Fig. 10. The Average/Median of four attributes of flows for different app categories.
228 S. Zhao et al.
Figure 10a shows the flow size distribution for different app categories. On
the whole, the average flow sizes of all categories are higher than the median
flow sizes. It implies that although there is a large number of “mice” flows in
mobile networks, “elephant” flows account for the main part of mobile traffic. In
the same category, the average flow sizes of different apps are widely distributed,
while the median flow sizes are generally small. Among different categories, the
average flow sizes of Child, Reading, Photo, and Beauty are relatively larger
than that of other categories, while other significant differences are not found.
The distribution of the number of packets for different app categories is similar
to that of the flow size.
In terms of the flow duration, it can be seen from Fig. 10c that the average
values and the median values of different apps in the same category are close,
and the value distributions are compact. Among these 22 categories, Security,
Browser, and Beauty have large minimum average values, which are higher than
10 s. However, their maximum average values are lower than 40 s. Contrarily,
business apps show small median values of flow duration.
Lastly, for the D/U (in bytes), the average values and median values of Secu-
rity, Edu, Bus, and Input are very close, and both of them are about 1. It can be
inferred that most flows of apps in these categories need to upload and download
data to the server at the same time. For the remaining categories, their average
values are generally much larger than their median values, and their median
values are mainly distributed between 0–2. Besides, the apps of Video, SComm,
CPlat, and Reading have relatively large average values, which indicates that
these apps have the need to obtain a large number of resources from the server.
5 Discussion
This section discusses how our observations can be employed to achieve the
relevant parties’ goals, and several examples are provided. We believe that our
work could provide more inspiration than the examples we give.
Based on the findings of our work, the network operator could learn the compo-
sition of mobile traffic and how network resources are used by mobile apps, so as
to deploy and configure the network resource reasonably, improve the network
resource utilization and the quality of user experience. In addition, some of our
observations could be employed by the network operator to analyze the mobile
app usage in the current network and adopt corresponding control strategies.
For instance, if a large amount of UDP traffic is observed in the network, it may
be an indicator that some users are accessing apps or web pages rich in audio
and video resources, which should not appear in some working scenarios.
Mobile Traffic Characterization 229
6 Conclusion
Although researches on mobile traffic have become hotspots, there is still a lack
of clear and comprehensive understanding of the current mobile application
230 S. Zhao et al.
traffic. This paper fully describes the properties of mobile application traffic
from multiple perspectives, including its basic information, domain name usage,
HTTP/TLS usage, and traffic flow. In addition, based on these four perspec-
tives, this paper gives an in-depth analysis from the viewpoints of bytes, flows,
and application categories. Compared with the existing work, the measurement
of mobile traffic in this work is more comprehensive and detailed. On the whole,
this paper not only provides an overview of the current mobile application traffic
but also could provide guidance for the research of relevant parties. For future
work, more dimensions on the characterization of mobile traffic could be com-
plemented, such as the service level. In addition, it is valuable to analyze how
mobile traffic properties change in the dimension of time.
Appendix A
Table 6 provides the cipher suites mentioned in this paper.
References
1. Statista Research Department. Mobile app usage - Statistics & Facts. https://
www.statista.com/topics/1002/mobile-app-usage/
2. Buildfire. Mobile app Download Statistics & Usage Statistics (2021) . https://
buildfire.com/app-statistics/
3. First Site Guide. Mobile Web Traffic Stats and Facts in 2021. https://firstsiteguide.
com/mobile-traffic-stats/
4. Conti, M., Li, Q.Q., Maragno, A., Spolaor, R.: The dark side(-channel) of mobile
devices: a survey on network traffic analysis. IEEE Commun. Surv. Tutor. 20(4),
2658–2713 (2018). https://doi.org/10.1109/COMST.2018.2843533
5. Trinh, H.D., Bui, N., Widmer, J., Giupponi, L., Dini, P.: Analysis and modeling
of mobile traffic using real traces. In: IEEE 28th Annual International Symposium
on Personal, Indoor, and Mobile Radio Communications, pp. 1–6 (2017). https://
doi.org/10.1109/PIMRC.2017.8292200
6. Shi, H., Li, Y.: Discovering periodic patterns for large scale mobile traffic data:
method and applications. IEEE Trans. Mob. Comput. 17(10), 2266–2278 (2018).
https://doi.org/10.1109/TMC.2018.2799945
7. Fang, C., Liu, J., Lei, Z.: Fine-grained HTTP web traffic analysis based on large-
scale mobile datasets. IEEE Access 4, 4364–4373 (2016). https://doi.org/10.1109/
ACCESS.2016.2597538
8. Wang, R., Liu, Z., Cai, Y., Tang, D., Yang, J., Yang, Z.: Benchmark data for
mobile app traffic research. In: 15th EAI International Conference on Mobile and
Ubiquitous Systems: Computing, Networking and Services, pp. 402–411 (2018).
https://doi.org/10.1145/3286978.3287000
9. Aceto, G., Ciuonzo, D., Montieri, A., Persico, V., Pescape, A.: MIRAGE: mobile-
app traffic capture and ground-truth creation. In: International Conference on
Computing, Communications and Security, pp. 1–8 (2019). https://doi.org/10.
1109/CCCS.2019.8888137
10. Rezaei, S., Kroencke, B., Liu, X.: Large-scale mobile app identification using deep
learning. IEEE Access 8, 348–362 (2019)
11. Sengupta, S., Ganguly, N., De, P., Chakraborty, S.: Exploiting diversity in android
TLS implementations for mobile app traffic classification. In: World Wide Web
Conference, pp. 1657–1668 (2019). https://doi.org/10.1145/3308558.3313738
12. Chen, Y., Zang, T., Zhang, Y., Zhou, Y., Wang, Y.: Rethinking encrypted traf-
fic classification: a multi-attribute associated fingerprint approach. In: IEEE 27th
International Conference on Network Protocols, pp. 1–11 (2019). https://doi.org/
10.1109/ICNP.2019.8888043
13. Wang, X., Chen, S., Jinshu, S.: Real network traffic collection and deep learning
for mobile app identification. Wirel. Commun. Mob. Comput. 2020, 1–14 (2020).
https://doi.org/10.1155/2020/4707909
14. NUDT_MobileTraffic. https://github.com/Abby-ZS/NUDT_MobileTraffic
15. Aceto, G., Ciuonzo, D., Montieri, A., Pescape, A.: Mobile encrypted traffic clas-
sification using deep learning: experimental evaluation, lessons learned, and chal-
lenges. IEEE Trans. Netw. Serv. Manag. 16(2), 445–458 (2019). https://doi.org/
10.1109/TNSM.2019.2899085
16. Transport Layer Security (TLS) Parameters. https://www.iana.org/assignments/
tls-parameters/tls-parameters.xhtml#tls-parameters-4
232 S. Zhao et al.
17. Bub, D., Hartmann, L., Bozakov, Z., Wendzel, S.: Towards passive identification of
aged android devices in the home network. In: Proceedings of the 2022 European
Interdisciplinary Cybersecurity Conference, pp. 17–20 (2022). https://doi.org/10.
1145/3528580.3528584
18. Almashhadani, A.O., Kaiiali, M., Carlin, D., Sezer, S.: MaldomDetection: a sys-
tem for detecting algorithmically generated domain names with machine learning.
Comput. Secur. 93(2020), 1–13 (2020)
DOT-M: A Dual Offline Transaction
Scheme of Central Bank Digital Currency
for Trusted Mobile Devices
Abstract. In recent years, many major economies have paid close atten-
tion to central bank digital currency (CBDC). As an optional attribute
of CBDC, dual offline transaction is considered to have great practical
value under the circumstances for payment without network connection.
However, there is no public report or paper on how to securely design or
implement the dual offline transaction function specifically for CBDC.
In this paper, we propose DOT-M, a practical dual offline transaction
scheme designed for the mobile device user as either a payer or a payee.
Precisely, adopting secure element (SE) and trusted execution environ-
ment (TEE), the architecture of trusted mobile device is constructed to
protect security-sensitive keys and execution of the transaction proto-
col. According to the trusted architecture, the data structure for offline
transaction is designed as well. On this basis, we describe the core proce-
dures of DOT-M in detail, including registration, account synchroniza-
tion, dual offline transaction, and online data updating. A prototype
system is implemented and finally tested with possible parameters. The
security analysis and experimental results indicate that our scheme could
meet the practical requirement of CBDC offline transaction for mobile
users from both aspects of security and efficiency.
1 Introduction
Currently, a number of central banks are exploring central bank digital currency
(CBDC). According to the latest survey conducted by the Bank for International
Settlements (BIS) [1] on central banks in 65 countries or economies, about 86%
have carried out researches on digital currencies. Meanwhile, the proportion of
central banks that were performing experiments or developing a proof-of-concept
prototype increased from 42% in 2019 to 60% in 2020. In October 2020, the
European Central Bank released the report on a digital euro [2], which analyzed
the causes and potential impacts of the launch of the digital. In July 2021, the
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 233–248, 2022.
https://doi.org/10.1007/978-3-031-23020-2_13
234 B. Yang et al.
– For the scenario of dual offline transaction of CBDC, the secure solution for
trusted mobile device is specially constructed;
– DOT-M utilizes a series of secret keys, which are derived from a terminal
master key reproduced in SE, to protect users’ digital currency of CBDC and
data;
– The sensitive codes on the user side of DOT-M are isolated and executed in
TEE for the possibility that the guest OS is compromised;
– In DOT-M, users could authenticate each other’s identity and wallet identity,
as well as the authenticity of CBDC in the absence of a network.
We also design the data structure of CBDC in order to split the value of one
integrated digital currency flexibly when dual offline transaction is executed. In
the meantime, the security properties of the transaction protocol are guaran-
teed, which include preventing man-in-the-middle attack, preventing intruder
attack, preventing malicious payer or payee, preventing double-spending, non-
repudiation and unforgeability. Furthermore, we implement a prototype of DOT-
M and evaluate its efficiency at the security level of 256-bit. The experimental
results show that our scheme is efficient enough for practical usage, even from
the perspective of mobile devices.
2.1 Notation
Notation Descriptions
y := x y assigned as x
x||y Concatenation of x and y
(y1 , ..., yj ) ← A(x1 , ..., xi ) An algorithm with input (x1 , ..., xi ) and output (y1 , ..., yj )
Sign(k, m) Digital signature for a message m using a private key k
The system model of DOT-M proposed in this paper is composed of three kinds
of participating entities: mobile device R of payee and mobile device P of payer,
central bank C. R and P are bound with payee and payer respectively, and the
DOT-M: Dual Offline Transaction Scheme of CBDC 237
user behaviors are achieved through the mobile device. The mobile device used
for the trader is equipped with security chip for SE and ARM processor chip
supporting TrustZone extension technology for TEE. Both of the devices could
communicate with each other through NFC or Bluetooth for dual offline trans-
action. In charge of providing CBDC services and CBDC wallet applications, C
should be a central bank or a third-party agency authorized by the central bank.
Generally, C has multiple data centers to meet the needs of powerful computing
and big data storage capabilities. Figure 1 illustrates our system model.
NFC/Bluetooth
connection
SE & TEE
The security solution is the terminal foundation for establishing reliable dual
offline transaction. Three parts constitute the solution: the specific architecture
of trusted mobile device, key derivation with sensitive data management and
basic key system of CBDC.
DOT-M Service
User Space
NW-Driver SW-Driver
Combined with SE, TEE can shield the integrity of the execution process of
sensitive programs, the confidentiality and the integrity of sensitive data, which
is fundamental to the security of offline transaction. Figure 2 shows the detailed
architecture with the way the components interact with each other. The basic
functionality of DOT-M in the architecture contains two components: untrusted
DOT-M Proxy in normal world (NW) and security-sensitive DOT-M Service in
secure world (SW). The different components are formally described as follows.
DOT-M Proxy. As a bridge between user space and kernel space in NW, it
can directly communicate with the normal mobile applications. Waiting for their
requests, the proxy handles the parameters and preprocesses them. According
DOT-M: Dual Offline Transaction Scheme of CBDC 239
to the request type, the proxy would call DOT-M Service for substantive com-
putations of the scheme and finally return the results.
DOT-M Service. It is the core component to perform DOT-M secure com-
putations and operations. The execution of the component codes is under the
well protection of TrustZone isolation mechanism. The detailed description of
the subcomponents can be found in the extended version of this paper [15].
Wallet and Wallet Trustlet. For upperlevel interaction, the CBDC applica-
tion released by C consists of two parts: an App for NW called Wallet and an
App Trustlet for SW called Wallet Trustlet. Wallet provides users with the gen-
eral GUI, remote service access and other basic functions, while Wallet Trustlet
is securely loaded and trusted for handling security-sensitive inputs, data oper-
ations and communications with the other device through NFC or Bluetooth
during dual offline transaction.
Components in Hardwares. Protected by TrustZone mechanism, SE is only
accessible for SW. With a variety of hardware protection mechanisms for resisting
the laboratory-level attack, SE contributes to generate the master key and act
as the root of trust in DOT-M.
the public key certificate infrastructure (PKI). Table 2 shows the definitions of
different certificates and keys in our scheme for offline transaction.
Preset in CBDC wallet application, the unified public key pkC is used for
verifying the digital currency issued by the central bank C. When a wallet appli-
cation is started on a mobile device by its user for the first time, (usk, upk) and
(wsk, wpk) are generated in TEE through DOT-M Service and sent to C, then
C issues ucert and wcert respectively for the user. For the same user, his wcert
is recorded and associated with his ucert in C’s database. Subsequently, the user
is required to set a payment password pwd through TUI on his device for future
transactions.
3.3.1 Registration
This procedure is specifically divided into the following parts:
1. User downloads the CBDC wallet application on the mobile device and its
two parts (i.e. Wallet and Wallet Trustlet) are installed and activated.
2. User starts the application for the first time, and it connects to central bank
C, and verifies that C is real.
3. User sets the account and login password of the application. User’s mobile
device generates (usk, upk) in TEE, and sends upk to C. C issues ucert, and
sends ucert to user’s mobile device where ucert is well protected by sealing
described in Sect. 3.1.2.
4. User’s mobile device generates (wsk, wpk) in TEE, and sends wpk to C. C
issues wcert, and sends wcert to user’s mobile device to seal.
5. User sets pwd of wallet for payment.
DOT-M: Dual Offline Transaction Scheme of CBDC 243
Next, the dual offline transaction begins, and there are 9 major steps in the
protocol as shown in Fig. 7.
1. Use uskR to output a signature α ← Sign(uskR , tsn), where tsn is the unique
serial number of transaction.
2. Use wskR to output a signature β ← Sign(wskR , v), where v is the amount
of value for offline transaction.
3. Send λ := ( tsn|| v || α || ucertR || β || wcertR ) to P.
244 B. Yang et al.
the number of times of offline transaction in each currency block, and renewing
remaining offline amount of wallet.
Step 6. R notifies P to update the data structure of wallet by sending a notifi-
cation message signed using uskR .
Step 7. P verifies the message using upkR from Step 2 and updates its data
structure of wallet.
Step 8. P notifies R that the transaction is successful.
Step 9. R monitors the response from P. If R receives the response from P
within the due time, R closes the successful transaction and shows the message,
otherwise it rollbacks transaction, and restores the data structure of wallet to the
state before the start of this transaction. Only when the payee sees the success
message on the screen of R, he admits this effective transaction.
4.1 Implementation
For simulating the complete dual offline transaction process, we use one PC
platform as the central bank server and implement the CBDC background ser-
vice on this platform, which can apply two-way authentication with the wallet
246 B. Yang et al.
application, generate or destroy digital currency, and issue certificates and wal-
let parameters etc. Moreover, the implementation also involves the simulation of
mobile device, which is described as follows.
Hardware Platform. We utilize two Hikey-960 development boards whose
operating systems are Android 9.0 to simulate the mobile devices of two parties.
The HiKey-960 development board is based around the Kirin-960 processor with
four ARM Cortex-A73 and four Cortex-A53 cores. The board is equipped with
3 GB of LPDDR4 SDRAM memory and 32 GB of UFS 2.0 flash storage. The
function of TEE is supported and enabled by the hardware on the board. In
order to simulate NFC communication that conforms to the ISO14443 proto-
col with the maximum transmission rate of 424 kbps, we choose to use serial
communication at the same rate as NFC to transmit data between devices. In
addition, we adopt STM32F103 module to act as the security chip (i.e. SE).
Software Implementation. For the software implementation of DOT-M on the
mobile device, we respectively develop Wallet in Android, the trusted services
and Wallet Trustlet in OP-TEE which is compliant with GP’s TEE Specifications
[13]. For the cryptographic algorithms used in our scheme, such as the SM series
algorithms, we implement them based on GmSSL 3.0 [14] static library and at the
security level of 256-bit. 7053 lines of code (LOC) in C language totally comprise
our components and auxiliary functions in TEE and SE. Besides, we program
one test application that could execute upon DOT-M scheme. It contains 896
LOC for Wallet running in NW and 736 LOC for Wallet Trustlet in SW.
5 Conclusion
In this paper, we propose DOT-M, a complete and practical dual offline transac-
tion scheme for mobile devices using SE and TEE. DOT-M takes both security
and efficiency specially for mobile users. The scheme supports transactions that
can be completed when both the mobile devices of payer and payee are offline.
Our implementation and evaluation convince that DOT-M is quite practical for
dual offline transaction through mobile devices.
References
1. Ready, steady, go?-Results of the third BIS survey on central bank digital currency.
https://www.bis.org/publ/bppdf/bispap114.htm/
2. Report on a digital euro. https://www.ecb.europa.eu/pub/pdf/other/Report_on_
a_digital_euro4d7268b458.en.pdf/
3. Progress on research and development of E-CNY in China
4. Gupta, Y.K., Jeswani, G., Pinto, O.: M-Commerce offline payment. SN Comput.
Sci. 3(1), 1–11 (2022)
248 B. Yang et al.
5. Kutubi, M.A.A.R., Alam, K.M.R., Morimoto, Y.: A simplified scheme for secure
offline electronic payment systems. High-Confidence Comput. 1(2), 100031 (2021)
6. EMV Mobile Payment software-based Mobile Payment Security Requirements ver-
sion 1.4. https://www.emvco.com/
7. Payment Card Industry (PCI) software-based PIN entry on COTS (SPoCTM ) mag-
netic stripe readers annex security and test requirements version 1.1
8. Chaum, D.: Blind signatures for untraceable payments. In: Chaum, D., Rivest,
R.L., Sherman, A.T. (eds.) Advances in Cryptology, pp. 199–203. Springer, Boston,
MA (1983). https://doi.org/10.1007/978-1-4757-0602-4_18
9. Yang, B., Feng, D.G., Qin, Y.: A lightweight anonymous mobile shopping scheme
based on DAA for trusted mobile platform. In: IEEE TrustCom 2014, pp. 9–17.
IEEE (2014)
10. Yang, B., Yang, K., Qin, Yu., Zhang, Z., Feng, D.: DAA-TZ: an efficient DAA
scheme for mobile devices using ARM TrustZone. In: Conti, M., Schunter, M.,
Askoxylakis, I. (eds.) Trust 2015. LNCS, vol. 9229, pp. 209–227. Springer, Cham
(2015). https://doi.org/10.1007/978-3-319-22846-4_13
11. ARM Security Technology building a secure system using TrustZone technology.
https://documentation-service.arm.com
12. Yang, B., Yang, K., Zhang, Z., Qin, Yu., Feng, D.: AEP-M: practical anonymous E-
payment for mobile devices using ARM TrustZone and divisible E-cash. In: Bishop,
M., Nascimento, A.C.A. (eds.) ISC 2016. LNCS, vol. 9866, pp. 130–146. Springer,
Cham (2016). https://doi.org/10.1007/978-3-319-45871-7_9
13. GlobalPlatform Technology TEE system architecture version 1.2. https://
globalplatform.org/specs-library/tee-system-architecture/
14. Guan, Z.: The GmSSL Project. http://gmssl.org
15. Yang, B., Zhang, Y.C., Tong, D.: DOT-M: A Dual Offline Transaction Scheme
of Central Bank Digital Currency for Trusted Mobile Devices (extended version).
ePrint (2022). https://eprint.iacr.org/2022/1443
A Beyond-5G Authentication and Key
Agreement Protocol
1 Introduction
The 5G technology positively impacts several industries, such as healthcare,
transportation, and autonomous vehicles [12]. However, the emergence of 5G
has increased the concerns about the security and privacy of mobile users [13].
A proper authentication mechanism is essential to provide many services, e.g.,
roaming. The 3rd Generation Partnership Project (3GPP) group, responsible for
the standardization of 3G, 4G, and 5G, specified the security architecture and
procedures for 5G in its technical specification [TS 33.501]. A major component
of the specification is the Authentication and Key Agreement (AKA) protocol in
5G. Compared to previous mobile generations, the 5G specification emphasised
This work was supported by the Business Finland Consortium Project “Post-Quantum
Cryptography” under Grant 754/31/2020.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 249–264, 2022.
https://doi.org/10.1007/978-3-031-23020-2_14
250 M. T. Damir et al.
more on user privacy, which is due to the importance and the high demand for
privacy. We also recall that the 5G standards were developed while new pri-
vacy regulations have taken effect, for example, the European Union’s General
Data Protection Regulation (GDPR) [17]. Unfortunately, and shortly after stan-
dardizing the 5G AKA by 3GPP, various security and privacy issues have been
discovered, for example, linkability attacks [6–8] and the lack of a full protec-
tion against compromised/impersonated SNs. The latter was identified during
the 5G AKA Tamarin formal verification [3]. Moreover, passive/active attacks
on 5G networks became a realistic threat [18], which is due to the gradually
increasing availability of the necessary software and hardware to perform such
(fake base station) attacks.
Among the new features in the 5G AKA, is the protection of the user identity
using public-key cryptography, i.e., the ECIES algorithm. However, it is expected
that such a solution would not last for a long period with the rise of quantum
computers. A sufficiently large quantum computer can break many currently
used cryptographic algorithms including the ECIES, see Sect. 2.3. Therefore,
some of the mechanisms in 5G that are considered secure and private at the
time of writing, such as users’ identity protection, may be broken once large-
scale quantum computers appear. It is unclear when such a quantum computer
will be available, but it is worth mentioning that some leading companies such
as Google and IBM are working on developing quantum computers and they are
offering access to their computers over the cloud. Thus, the average attacker is
expected to get access to quantum devices (over the cloud), while the average
user is still using “classical” devices. Hence, there is interest in cryptography that
works on classical devices but with the property of resisting quantum attacks,
called Post-Quantum Cryptography (PQC).
In this context, we consider perfect forward secrecy, which is concerned with
an attacker who is recording present (encrypted) sessions, with the hope of
decrypting those at some future time point. The break would be possible if
some long-term secrets were broken at that later time point, e.g., by using a
quantum computer.
In this work, we propose a novel AKA protocol that has several security and
privacy properties, while keeping in mind further practical considerations such as
backward compatibility with previous mobile generations and the adaptability to
quantum-resistant cryptography. Our detailed contributions and the properties
of our protocol are given in Sect. 4.
2 Preliminaries
2.1 5G Terms and Acronyms
For the purposes of our discussions, we reduce the mobile network architecture
to three relevant entities: (1) The User Equipment (UE) which further consists
of the Universal Subscriber Identity Module (USIM) and the Mobile Equipment
(ME), (2) the Home Network (HN), and (3) the Serving Network (SN). In 5G,
the Home Network assigns to every subscriber, and a USIM, a globally unique
A Beyond-5G Authentication and Key Agreement Protocol 251
identifier that is called the Subscription Permanent Identifier (SUPI). The SUPI
can be used to track and locate users. For protecting user privacy, the SN assigns
to the UE a Globally Unique Temporary Identity (GUTI), which is a temporary
and frequently changing identifier. The idea is to use, as often as possible, GUTI
instead of SUPI but there are also circumstances where the GUTI cannot be
used as an identifier.
To avoid sending the SUPI as a plaintext, [TS 33.501] includes a mechanism
to conceal the SUPI, resulting in Subscription Concealed Identifier (SUCI). The
SUPI concealment is done by using a HN public key, pkH , stored at the USIM
with an Elliptic Curves Integrated Encryption Scheme (ECIES). In 5G, the UE
and the HN share a long term key K, and a sequence number SQN, where K
is stored at the temper-resistant part of the USIM at the UE side, while SQN
is used to check synchronization and detect replay attacks. The SUPI/GUTI,
K and SQN are used to establish a mutual authentication and key agreement
between the UE and SN via the HN.
The three algorithms work together in a natural fashion, e.g., both Encaps and
Decaps produce the same key k when the input keys pk and sk are chosen from
the same pair.
In order to be consistent with the 3GPP standardization, we use the same nota-
tions as in [3GPP TS 33.501]. In our protocol we use a Key Derivation Func-
tion (KDF) which is based on SHA256, and seven symmetric key algorithms
that are denoted by f1 , f2 , f3 , f4 , f5 , f1∗ and f5∗ . Please note that although 3GPP
did not fully standardize the above functions, 3GPP requires that breaking the
security of these functions should require approximately 2128 operations. The
MILENAGE algorithm set [3GPP TS 35.205] provides examples of the functions
f1 − f5∗ which utilize an AES-128 block cipher as a kernel function. Please note
that the AES-256 is quantum-resistant and can be utilized as kernel function
(because it has the same block size as AES-128).
3 Related Work
Various works have pointed out security and privacy issues in mobile network
authentication and key agreement (AKA) protocols. One of these issues is related
to linkability attacks. Such attacks consist of the attacker linking protocol exe-
cutions based on the user’s behavior to conclude some critical information about
the user, for example, their identity or location. In [6], the authors described an
attack where they exploited the failure messages in previous mobile AKA pro-
tocols to track the target user, and the authors proposed concealing the error
messages using the HN public key. In [7], Fouque et al. discovered another attack
that accrues despite the fix proposed in [6]. The work in [8], described a threat
where the attacker can guess the pattern of the sequence number by exploit-
ing the synchronization failure message sent by a target UE. In our protocol,
we abandon the use of sequence numbers to avoid potential de-synchronization
attacks.
The mentioned linkability attacks became a central issue in many recent
works on 5G/6G AKA protocols, see for instance [2] and the references therein.
In [3], the authors provided a formal verification of 5G AKA, where they pointed
out further security issues in the studied protocol. They showed that if the
SN is compromised, then the attacker can make the SN assign the session key
to a different UE, that is because the session key and the user identifier are
sent to the SN in two different messages. Moreover, the UE is unable to detect
SN impersonation attacks before the key confirmation with the SN, which is
not mandatory in 5G AKA. That is because there is no mechanism at the UE
allowing this last to check if it is talking to the SN that has the identity that
1
We discard the evaluation of SIKE as this algorithm has been shown to be insecure
after it was selected.
A Beyond-5G Authentication and Key Agreement Protocol 253
was verified by the HN. The last issue is due to the lack of a key confirmation
message from the SN to the UE.
Solutions to the SN related problems identified in [3] while considering link-
ability were studied in [4,5], but these works did not consider further security
properties, e.g., perfect forward secrecy. In our quantum resistance context, we
expect that an attacker is currently recording the (encrypted) messages sent
between the UE and the SN in the hope of compromising the long-term keys of
either the UE or HN by some other means, for example, a large-scale quantum
computer. In the standardized 5G AKA and previous generations, compromis-
ing the long-term keys will imply compromising previous session keys. In other
words, the property of perfect forward secrecy is not provided. Such an issue in
mobile networks was studied in [10,11,16]. In both [10,11], the perfect forward
secrecy is based on the intractability of the discrete logarithm problem. Conse-
quently, these proposals are vulnerable to quantum attacks (Shor’s algorithm).
The work in [16] uses generic encryption in the protocol that we might assume
to be post-quantum, but their protocol lacks protection against malicious and
impersonated SNs.
The perfect forward secrecy in [10,11] follows from a Diffie-Hellman (DH)
type key exchange. Thus, replacing DH in these works with a post-quantum key
exchange would make them quantum resistant. However, at the time of writing
no post-quantum key exchange is considered for standardization. In our work,
both the SUPI protection and the perfect forward secrecy are based on KEMs
which gives our protocol the possibility of implementing post-quantum KEMs in
particular. Implementing post-quantum KEMs in 5G was considered in [15], but
the authors only consider the identification phase of the AKA protocol. Thus,
further security features, e.g., linkability, and forward secrecy were not covered.
As a side note on the work in [10], we would like to point out that the
authors used ProVerif to formally verify their protocol. We remarked that the
code published in [10] considers the channel between the UE and SN as secure,
while the channel between the SN and the HN is insecure. It should actually
be the converse. We re-implemented the authors’ verification with the corrected
assumptions and noted that two of the claimed properties are then false (items
4 and 9, Section 5.1, pp. 324). We applied a minor correction to the Proverif
code and item 9 turns out to be true after all. However, item 4 cannot be true.
More precisely, item 4 states that the SN can distinguish a legit identification
message (the first message in the protocol from the UE to SN) from an identity
sent by an attacker, which is not ensured by the proposed protocol. In the next
section, we list our contributions in more detail.
4 Contributions
Table 1. Comparison of the security and privacy properties of our protocol with the
prior art.
Moreover, we use the formal verification tool ProVerif to prove some of the
above claims. Furthermore, we give an overview of practical implementation
of our protocol. First, we describe some backward compatibility properties of
our protocol with previous mobile generations, see Sect. 5.3. Second, we dis-
cuss implementing the protocol using Kyber, the post-quantum KEM recently
selected by NIST and round4 KEM NIST finalists, see Sect. 8. We show that
implementing our protocol with such KEMs, and especially Kyber, outperforms
the public-key cryptography used nowadays (i.e., ECIES) in 5G AKA.
Table 1 compares the security and privacy properties of our protocol with
those properties of several recent works.
5 Our Protocol
The proposed protocol consists of two phases. Phase A is the identification phase,
where the UE is identified by the HN. Phase B is an authentication phase, which
allows the UE and the HN to securely authenticate each other.
either initiated by the UE, e.g., for outgoing call, or by the SN, e.g., for incoming
call. In both cases, the UE has to send an identifier (SUCI or GUTI) to the SN.
In our context, the two cases are similar. In the rest of this section, we cover
the SUCI case, while the GUTI case is covered in Sect. 6. The identification
procedure for the SUCI case goes as follows:
Once the MAC check passes at the HN (Fig. 2), the HN retrieves the UE’s long
term key K based on SUPI, derives the key Ks2 and the ciphertext c2 using the
appropriate KEM encapsulation algorithm and pkU . In more detail, we have:
256 M. T. Damir et al.
KS = KS ⊕ RSN
.
In the last step above, the HN may delete the old KS because it knows that
the UE has completed the protocol successfully. On the other hand, the UE has
to keep also the old KS until it gets confirmation from the SN about successful
completion of the whole protocol also on the HN side. This confirmation may be
given in several ways, either explicitly or implicitly, but we leave the details out
of scope of this paper.
Please note that the forward security in the case of SUPI (resp., GUTI)
is based on the shared Ks2 (resp., KS ), while the protection against compro-
mised/impersonated SNs follows from the contribution of the SN, i.e., RSN and
the MAC check at the UE in both the SUPI and the GUTI case. By assumption,
the parameters Ks2 , KS are shared only between the UE and the HN, while RSN
and RSN are shared by the UE, SN and HN. Moreover, the SUPI and GUTI
protocols are similar, and the only difference consists of replacing Ks2 by KS .
Furthermore, and thanks to the hash function h, it is practically impossible to
link Ks2 to KS . The same is true for RSN and RSN as they are randomly and
independently generated. Consequently, a SUPI based protocol execution and a
subsequent GUTI based protocol execution cannot be linked to each other. Due
to the similarity between the GUTI and SUPI cases, we mainly focus on the
security analysis of the SUPI based protocol.
7 Security Analysis
We prove the security of our protocol by utilizing ProVerif [14], which is one of
the well-known formal verification tools.
session, our protocol ensures authentication and secrecy of the SUPI, long-term
key K, skHN , and the session key. In the second part of our verification, we
assume that the HN or UE (or both) are compromised; we then prove that our
protocol satisfies the forward-secrecy property under such assumptions.
Next, we precise our assumptions on the protocol’s channels and components.
Our assumptions are drawn from the 5G requirements specified in TS 33.501.
Assumptions on the Channels. As in the case of 5G, our protocol uses two
separate channels. The first one is the radio channel between the UE and the
SN; see the 5G specification, TS 33.501. We assume the presence of a Dolev-Yao
attacker who can intercept, manipulate and replay messages on this channel. The
second channel is a wired channel between the SN and HN; in contrast with the
above radio channel, the channel between the SN and HN is explicitly specified
by TS 33.501 as a e2e core network interconnection channel. Consequently, we
adopt the assumption that such a channel is secure, namely, a channel that
provides both confidentiality and integrity.
Assumptions on the Components. We recall that our protocol consists of
three components, the UE, the SN and the HN. Our assumptions on the protocol
components are the following: (1) The UE consists of the USIM and the ME. In
our protocol we assume that both the asymmetric (post-quantum) encryption
and the session key Kseaf derivation are performed by the ME, where the ME
uses parameters that are given by the USIM. In our model, we consider the UE
to be one single secure entity. More precisely, the exchange between the ME and
USIM is assumed to be secure and the key Kseaf is protected at the UE after
the execution of the protocol. Moreover, the long term key K is residing at the
temper-resistant part of the USIM, thus, assumed to remain protected. (2) The
attacker cannot obtain the key Kseaf at the SN. (3) The long term parameters
at the HN, i.e., K and skH are protected during the protocol execution. Note
that in the context of forward secrecy we assume that such parameters leaked
after an honest execution of the protocol.
Our verification consists of four parts. The process at the UE, the process at
the SN, the process at the HN, denoted by UE, SN, HN respectively, and a main
process to conclude to proof. Our ProVerif code with implementation details
and design choices on the chosen primitives, i.e., XOR, KEM. is available in our
repository at https://github.com/Secure-6G/ProVerif-AKA-6G.
Verification Results. Our verification shows the excitability of our protocol
by showing that each pair of successive messages is executed in sequence. We
further prove the secrecy of the protocol long term parameters, namely, K the
long term key at the UE/HN, skHN , the secret key at the HN and the long term
identifier SUPI. Moreover, the authentication of the UE by the SN by the help
of the HN is proved. Finally, Proverif shows that forward-secrecy holds even if
the long term keys at the UE and HN have been compromised.
260 M. T. Damir et al.
exchange. At the time of writing, PQ key exchanges are still not at the same
maturity level as KEMs. Moreover, using KEMs instead of DH have been shown
to be more efficient in some contexts, e.g., the TLS protocol [20]. Thus, we argue
that in this direction, a novel feature of our protocol is in the use of the (post-
quantum) KEM paradigm to ensure perfect forward secrecy in 5G and beyond
instead of using DH type key exchange.
9 Conclusion
We presented an authentication and key agreement protocol for 5G and beyond
with further security and privacy features that are not offered by the stan-
dardized 5G AKA. Such features include resistance to known linkability attacks,
perfect forward secrecy, and protection against compromising and impersonating
the SN. Moreover, in our protocol, we abandoned the use of sequence numbers
to avoid possible desynchronization attacks. Furthermore, our protocol covers
the case of GUTI which is usually ignored in similar works. We used Proverif
to formally verify some of our security claims. Finally, we gave an overview of
potential implementations of the protocol using NIST post-quantum KEM can-
didates. In summary, we illustrated a theoretical and practical implementation
of a (quantum) safe AKA protocol for beyond-5G and presented a support-
ing argument for its security features using both formal and classical methods.
A Beyond-5G Authentication and Key Agreement Protocol 263
As mentioned in the threat model, active attackers between the USIM and ME
are omitted. While not considered in our protocol, we emphasize that our proto-
col does not prevent an attacker from requesting the session key from the USIM
or ME, especially an attacker able to compromise the long term key K. This
problem is left as future work.
References
1. Shor, P.: Algorithms for quantum computation: discrete logarithms and factoring.
In: Proceedings of 35th Annual Symposium FOCS, pp. 124–134 (1994)
2. Wang, Y., Zhang, Z., Xie, Y.: Privacy-preserving and standard-CompatibleAKA
protocol for 5G. In: 30th USENIX Security Symposium (USENIX Security 2021),
pp. 3595–3612 (2021)
3. Basin, D., Dreier, J., Hirschi, L., Radomirovic, S., Sasse, R., Stettler, V.: A formal
analysis of 5G authentication. In: Proceedings of the 2018 ACM SIGSAC Confer-
ence on Computer and Communications Security, pp. 1383–1396 (2018)
4. Braeken, A., Liyanage, M., Kumar, P., Murphy, J.: Novel 5G authentication proto-
col to improve the resistance against active attacks and malicious serving networks.
IEEE Access 7, 64040–64052 (2019)
5. Koutsos, A.: The 5G-AKA authentication protocol privacy. In: 2019 IEEE Euro-
pean Symposium on Security and Privacy (EuroS&P), pp. 464–479 (2019)
6. Arapinis, M., et al.: New privacy issues in mobile telephony: fix and verification.
In: Proceedings of the 2012 ACM CCS, pp. 205–216 (2012)
7. Fouque, P., Onete, C., Richard, B.: Achieving better privacy for the 3GPP AKA
protocol. In: Proceedings on Privacy Enhancing Technologies 2016, pp. 255–275
(2016)
8. Borgaonkar, R., Hirschi, L., Park, S., Shaik, A.: New privacy threat on 3G, 4G, and
upcoming 5G AKA protocols. In: Proceedings on Privacy Enhancing Technologies
2019, pp. 108–127 (201)
9. Liboqs (2019). https://github.com/open-quantum-safe/liboqs
10. Liu, T., Wu, F., Li, X., Chen, C.: A new authentication and key agreement protocol
for 5G wireless networks. Telecommun. Syst. 78(3), 317–329 (2021). https://doi.
org/10.1007/s11235-021-00815-9
11. Arkko, J., Norrman, K., Näslund, M., Sahlin, B.: A USIM compatible 5G AKA
protocol with perfect forward secrecy. In: 2015 IEEE Trustcom/BigDataSE/ISPA,
vol. 1, pp. 1205–1209 (2015)
12. Attaran, M.: The impact of 5G on the evolution of intelligent automation and
industry digitization. J. Ambient Intell. Humaniz. Comput. 1–17 (2021)
13. Ahmad, I., Kumar, T., Liyanage, M., Okwuibe, J., Ylianttila, M., Gurtov, A.: 5G
security: analysis of threats and solutions. In: 2017 IEEE Conference on Standards
for Communications and Networking (CSCN), pp. 193–199 (2017)
14. Blanchet, B., Abadi, M., Fournet, C.: Automated verification of selected equiva-
lences for security protocols. J. Logic Algebr. Program. 75, 3–51 (2008)
15. Ulitzsch, V., Park, S., Marzougui, S., Seifert, J.: A post-quantum secure subscrip-
tion concealed identifier for 6G. In: Proceedings of the 15th ACM Conference on
Security and Privacy in Wireless and Mobile Networks, pp. 157–168 (2022)
16. Hojjati, M., Shafieinejad, A., Yanikomeroglu, H.: A blockchain-based authentica-
tion and key agreement (AKA) protocol for 5G networks. IEEE Access 8, 216461–
216476 (2020)
264 M. T. Damir et al.
17. Regulation (EU) 2016/679 of the European Parliament and of the Council. Regu-
lation (EU) 679/2016 (2016)
18. Chlosta, M., Rupprecht, D., Pöpper, C., Holz, T.: 5G SUCI-catchers: still catching
them all? In: Proceedings of the 14th ACM Conference on Security and Privacy in
Wireless and Mobile Networks, pp. 359–364 (2021)
19. LaMacchia, B., Lauter, K., Mityagin, A.: Stronger security of authenticated key
exchange. In: International Conference on Provable Security, pp. 1–16 (2007)
20. Schwabe, P., Stebila, D., Wiggers, T.: Post-quantum TLS without handshake sig-
natures. In: Proceedings of the 2020 ACM SIGSAC Conference on Computer and
Communications Security, pp. 1461–1480 (2020)
IoT Security
A Survey on IoT Vulnerability Discovery
1 Introduction
Internet of Things (IoT) is envisioned to fundamentally change our lives in every
aspect because it is an emerging communication paradigm that aims at connect-
ing all kinds of objects to the Internet and harvesting data generated by sensors.
The exploitable points of most IoT attacks are related to the software vulnera-
bilities that exist in one or more components of the IoT ecosystems. The research
on IoT security shows the advantages of accurately working out a real-world vul-
nerability with the development of simulation technology [2]. In addition, with
the help of a physical device, recent studies show that it is practical to discover
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 267–282, 2022.
https://doi.org/10.1007/978-3-031-23020-2_15
268 X. Ban et al.
2.1 Taxonomy
Fig. 3. A new research methodology for IoT vulnerability discovery with code intelli-
gence
Root Cause Analysis. Based on the IoT threat understanding, root cause
analysis is to answer a few key questions: what type of the vulnerability is,
where it comes and what the consequences it would cause. For example, some
experienced researchers may perform threat modeling for root cause analysis.
Threat modeling is the practice of identifying and prioritizing potential threats
and security mitigation. The modeling process will consider the nature of the
system, the security domain, the probable attacker’s profile, and the most likely
attack vectors. It may address the following research questions. What is the secu-
rity domain in the system? What is the most likely vulnerability to be exploited?
What are the most relevant clues can be tracked?
In this section, we review security problems in physical devices from both IoT
and IIoT devices. As shown in Fig. 4, typically, the firmware is extracted from
IoT devices for code analysis. Mobile companion apps can be treated as helpful
related resources if the firmware is rarely acquired.
A Survey on IoT Vulnerability Discovery 273
Fig. 4. Physical device. As state in Sect. 2, pre-analysis in the data prepossessing phase
aims to make the code properly to run or extract the features for the following analysis.
In the discovery phase, the testing could be performed based on the code emulation
or feature. Then a monitor checks the status of the emulation while rebooting it if
necessary. Meantime, any crash will be outputted as the result of a vulnerability report.
Correctly Execute the IoT Programs in IoT Firmware: Zheng et al. [28] pre-
sented FIRM-AFL, a high-throughput grey-box fuzzing platform for vulnerabil-
ity discovery in IoT firmware. FIRM-AFL aimed to correctly execute the IoT
274 X. Ban et al.
Vulnerability Searching Based on Graphs: Feng et al. [11] proposed a bug search
scheme, named Genius, based on the scalable graph. The results showed Genius
significantly outperformed the baseline methods with higher recall and lower
false positive rates.
Vulnerable Device Discovery Without Accessing the Physical Device: Wang et al.
[23] presented a vulnerable device discovery platform with no need for accessing a
physical device or its firmware code. The proposed platform utilized the analysis
of mobile companion apps of the IoT devices. Additionally,
The Smart Home environment, such as SmartThings and IFTTT, [12] is mainly
consisted of four main components: a hub, a companion mobile app, a cloud
backend, and an IoT device. As shown in Fig. 5, the vulnerability can be found
from the interactions between rules through checking these interactions.
Fig. 5. Operation rule. Extraction of rules aims to model the rules since the types of
rules express variously. The rules can be analyzed for interaction chain generation via
the environmental channels (e.g. Temperature, humidity). The safety properties define
the legal operation in an IoT ecosystem and safety baselines indicate the boundary of
invulnerable rules. These can be postulated through the analysis of rules. The checking
phase leverages these safety properties and baselines to check the violation of the rules.
Finding Property Violations of IoT by Model Checking: Celik et al. [5] presented
a SCA system named SOTERIA to validate whether IoT apps or ecosystem
adhere to conform with safety properties of the SmartThings platform. SOTE-
RIA leveraged source code to extract intermediate representation (IR). Regard-
ing evaluation, for market apps, nine individual apps and three multi-apps groups
had more than one property violation
Dynamic Safety and Security Checking for IoT Devices: Celik et al. [6] proposed
IoTGUARD, a dynamic IoT safety, and security checking system. IoTGUARD
utilized the policy enforcement service and code instrumentation to dynamically
monitor the behaviors of the devices for blocking the insecure states timely.
In general, IoTGUARD checked the events and actions from apps based on a
collection of policies and notified users if potential violations existed.
A Survey on IoT Vulnerability Discovery 277
Generating Physical Interaction Chains Across IoT Ecosystem: Ding and Hu [10]
proposed a framework, IoTMon, that utilized the physical influence of apps to
find all potentially unsafe interaction of multiple apps. They manually validated
the results and found that 37 of the total (77%) were correctly identified.
Assessing the Privacy and Security Risks of IFTTT Recipes: Surbatovich et al.
[21] analyzed the vulnerable IFTTT recipes that contain the potential secrecy
and integrity violation by building an information flow model. In order to figure
out the security and privacy threats of IFTTT recipes, the authors developed
two sets of information flow labels: secrecy lattice and integrity lattice.
Discussion: Table 3 lists the papers reviewed in this section. Specifically, the
platform, level, assistance resources, and contributions are summarized. Smart-
Things platform was chosen to conduct the analysis in [5,10,12,18] and the
IFTTT platform was analyzed by work [9,21,22]. The work [12] performed secu-
rity on individual app level and the others were based on interaction level. Among
278 X. Ban et al.
these, the work [5,6,21] discovered the vulnerabilities on both levels. IoTGUARD
[6] integrated the rule programs from both SmartThings and IFTTT to dynam-
ically enforce the safety policy. Besides, interaction level vulnerability requires
the acquisition of rule chains. Thus it is important to integrate the assistance
resource for rule chain generation. IOTSAN [18] crawled the system’s configu-
ration from the web management app. SOTERIA [5] used a device capability
reference file created by the authors, that included the attributes and actions.
iRULER [22] took device metadata and user’s deployment configuration to gen-
erate the IR. MenShen [9] required the device documentation for IoT deploy-
ment. IOTMON [10] identified the rule chain by utilizing NLP on application
description.
3.3 Communication
In the IoT ecosystem, data is transmitted among devices, mobile phones, cloud
backends based on several protocols as we discussed as Sect. 1. Communication
is vital in the IoT ecosystem since the core functionalities of IoT are automation
and data transmission. The tasks of communication include connection, pairing,
bonding, and transmission. The security of key information protection in the
communication channels relies on the design of tbe communication scheme. The
overview of the discovery framework is illustrated in Fig. 6.
Automatic Fingerprinting of Vulnerable BLE IoT Devices: Zuo et al. [31] pro-
posed an automated vulnerable device discovery tool, named BLESCOPE. In a
A Survey on IoT Vulnerability Discovery 279
Table 4. Communication
typical scenario, IoT devices need to establish a connection with their companion
mobile apps. In the evaluation, BLESCOPE analyzed 18,166 apps and reported
‘Just Works’ pairing was adopted by 11,141 (61.3%), which indicated that the
BLE channels were barely secure.
4 Research Challenges
Although some solid research work have been published in the new area of dis-
covering IoT vulnerabilities with code intelligence, the progress is still in its
infant stage. The following subsections will discuss the crucial research chal-
lenges, which may shed light on its future paths.
5 Conclusion
In this survey, we provided a roundup and a research outlook of the develop-
ing area, IoT vulnerability discovery with code intelligence. Initially, a research
methodology was summarized, which is an incrementally circular process, for
essentially basic phases of discovering an IoT vulnerability, consisting of IoT
threat understanding, root cause analysis, code acquisition and preprocessing,
intelligent vulnerability discovery, performance evaluation. On the basis of the
research methodology, a comprehensive literature review of the recent research
efforts was conducted on the solutions of discovering an IoT vulnerability. More
specifically, since code in software plays a key role in introducing vulnerabili-
ties and exposing security threats, the work were categorized into three groups
depending on the corresponding security domains, which are ‘physical device’,
‘operation rule’, and ‘communication’. Lastly, conforming to research methodol-
ogy, we have discussed many of the challenges that exist in the emerging research
area growing in an infant stage while elaborating on the future directions for
other researchers who intend to contribute to this area. Hopefully, IoT vulnera-
bility discovery with code intelligence can attract attention from both industry
and academia. We believe this survey will be helpful towards characterizing the
latency acting as a valuable guideline and reference for the future.
References
1. Ban, X., Chen, C., Liu, S., Wang, Y., Zhang, J.: Deep-learnt features for twitter
spam detection. In: 2018 International Symposium on Security and Privacy in
Social Networks and Big Data, pp. 208–212. IEEE (2018)
A Survey on IoT Vulnerability Discovery 281
2. Ban, X., Ding, M., Liu, S., Chen, C., Zhang, J., Xiang, Y.: TAESim: a testbed for
IoT security analysis of trigger-action environment. In: Katsikas, S., et al. (eds.)
European Symposium on Research in Computer Security, pp. 218–237. Springer,
Cham (2021). https://doi.org/10.1007/978-3-030-95484-0_14
3. Ban, X., Liu, S., Chen, C., Chua, C.: A performance evaluation of deep-learnt
features for software vulnerability detection. Concurr. Comput. Pract. Exp. 31(19),
e5103 (2019)
4. Bu, L., et al.: Systematically ensuring the confidence of real-time home automation
IoT systems. ACM Trans. Cyber-Phys. Syst. 2(3), 1–23 (2018)
5. Celik, Z.B., McDaniel, P., Tan, G.: SOTERIA: automated IoT safety and security
analysis. In: USENIX, Boston, MA, USA, pp. 147–158 (2018)
6. Celik, Z.B., Tan, G., McDaniel, P.: IoTGuard: dynamic enforcement of security
and safety policy in commodity IoT. In: Network and Distributed System Security
Symposium, San Diego, CA, USA, pp. 1–15. The Internet Society (2019)
7. Chen, D.D., Woo, M., Brumley, D., Egele, M.: Towards automated dynamic anal-
ysis for linux-based embedded firmware. In: 23rd Annual Network and Distributed
System Security Symposium, San Diego, CA, USA. The Internet Society (2016)
8. Chen, J., et al.: IoTFuzzer: discovering memory corruptions in IoT through app-
based fuzzing. In: NDSS, San Diego, CA, USA. The Internet Society (2018)
9. Croft, J., Mahajan, R., Caesar, M., Musuvathi, M.: Systematically exploring the
behavior of control programs. In: Proceedings of the 2015 USENIX Conference,
Santa Clara, CA, USA, pp. 165–176. USENIX Association (2015)
10. Ding, W., Hu, H.: On the safety of IoT device physical interaction control. In: Pro-
ceedings of the 2018 ACM SIGSAC Conference on Computer and Communications
Security, New York, NY, USA, pp. 832–846. ACM (2018)
11. Feng, Q., Zhou, R., Xu, C., Cheng, Y., Testa, B., Yin, H.: Scalable graph-based
bug search for firmware images. In: 2016 ACM SIGSAC Conference on Computer
and Communications Security, Vienna, Austria, pp. 480–491. ACM (2016)
12. Fernandes, E., Jung, J., Prakash, A.: Security analysis of emerging smart home
applications. In: 2016 IEEE symposium on security and privacy (SP), San Jose,
CA, USA, pp. 636–654. IEEE (2016)
13. Hamza, A.A., Abdel-Halim, I.T., Sobh, M.A., Bahaa-Eldin, A.M.: A survey and
taxonomy of program analysis for IoT platforms. Ain Shams Eng. J. 12(4), 3725–
3736 (2021)
14. Iijima, R., Takehisa, T., Mori, T.: Cyber-physical firewall: monitoring and control-
ling the threats caused by malicious analog signals. In: Proceedings of the 19th
ACM International Conference on Computing Frontiers, pp. 296–304 (2022)
15. Kang, H.J., Sim, S.Q., Lo, D.: Iotbox: sandbox mining to prevent interaction
threats in IoT systems. In: 2021 14th IEEE Conference on Software Testing, Veri-
fication and Validation (ICST), pp. 182–193. IEEE (2021)
16. Kashaf, A., Sekar, V., Agarwal, Y.: Protecting smart homes from unintended
application actions. In: 2022 ACM/IEEE 13th International Conference on Cyber-
Physical Systems (ICCPS), pp. 270–281. IEEE (2022)
17. Li, J., Zhang, Y., Chen, X., Xiang, Y.: Secure attribute-based data sharing for
resource-limited users in cloud computing. Comput. Secur. 72, 1–12 (2018)
18. Nguyen, D.T., Song, C., Qian, Z., Krishnamurthy, S.V., Colbert, E.J., McDaniel,
P.: IotSan: fortifying the safety of IoT systems. In: Proceedings of the 14th Inter-
national Conference on Emerging Networking Experiments and Technologies, Her-
aklion, Greece, pp. 191–203. ACM (2018)
19. Pradeep, P., Kant, K.: Conflict detection and resolution in IoT systems: a survey.
IoT 3(1), 191–218 (2022)
282 X. Ban et al.
20. Stephens, N., et al.: Driller: augmenting fuzzing through selective symbolic exe-
cution. In: Proceedings of 23rd Annual Network and Distributed System Security
Symposium, San Diego, CA, USA. The Internet Society (2016)
21. Surbatovich, M., Aljuraidan, J., Bauer, L., Das, A., Jia, L.: Some recipes can do
more than spoil your appetite: analyzing the security and privacy risks of IFTTT
recipes. In: Proceedings of the 26th International Conference on World Wide Web,
Perth, Australia, pp. 1501–1510 (2017)
22. Wang, Q., Datta, P., Yang, W., Liu, S., Bates, A., Gunter, C.A.: Charting the
attack surface of trigger-action IoT platforms. In: Proceedings of the 2019 ACM
SIGSAC Conference on Computer and Communications Security, New York, NY,
USA, pp. 1439–1453. ACM (2019)
23. Wang, X., Sun, Y., Nanda, S., Wang, X.: Looking from the mirror: evaluating
IoT device security through mobile companion apps. In: 28th USENIX Security
Symposium, Santa Clara, CA, USA, pp. 1151–1167. USENIX Association (2019)
24. Wang, Z., et al.: Automated vulnerability discovery and exploitation in the internet
of things. Sensors 19(15), 3362 (2019)
25. Wen, H., Chen, Q.A., Lin, Z.: Plug-N-Pwned: comprehensive vulnerability analysis
of OBD-II dongles as a new over-the-air attack surface in automotive IoT. In: 29th
USENIX Security Symposium, Boston, MA, USA. USENIX Association (2020)
26. Xiao, F., Sha, L., Yuan, Z., Wang, R.: Vulhunter: a discovery for unknown bugs
based on analysis for known patches in industry internet of things. IEEE Trans.
Emerg. Top. Comput. 8(2), 267–279 (2020)
27. Zhang, Y., et al.: SRFuzzer: an automatic fuzzing framework for physical SOHO
router devices to discover multi-type vulnerabilities. In: 35th Annual Computer
Security Applications Conference, San Juan, PR, USA, pp. 544–556. ACM (2019)
28. Zheng, Y., Davanian, A., Yin, H., Song, C., Zhu, H., Sun, L.: FIRM-AFL: high-
throughput greybox fuzzing of IoT firmware via augmented process emulation. In:
USENIX, Santa Clara, CA, USA, pp. 1099–1114. USENIX Association (2019)
29. Zheng, Y., Song, Z., Sun, Y., Cheng, K., Zhu, H., Sun, L.: An efficient greybox
fuzzing scheme for linux-based IoT programs through binary static analysis. In:
38th IEEE International Performance Computing and Communications Confer-
ence, London, UK, pp. 1–8. IEEE (2019)
30. Zhou, W., et al.: Discovering and understanding the security hazards in the inter-
actions between IoT devices, mobile apps, and clouds on smart home platforms.
In: 28th USENIX Security Symposium, Santa Clara, CA, pp. 1133–1150. USENIX
Association (2019)
31. Zuo, C., Wen, H., Lin, Z., Zhang, Y.: Automatic fingerprinting of vulnerable BLE
IoT devices with static UUIDs from mobile apps. In: Proceedings of the 2019 ACM
SIGSAC Conference on Computer and Communications Security, London, UK, pp.
1469–1483. ACM (2019)
Differentiated Security Architecture
for Secure and Efficient Infotainment
Data Communication in IoV Networks
Jiani Fan1(B) , Lwin Khin Shar2 , Jiale Guo1 , Wenzhuo Yang1 , Dusit Niyato1 ,
and Kwok-Yan Lam1
1
Nanyang Technological University, 50 Nanyang Avenue, Singapore, Singapore
{jiani001,jiale001,wenzhuo001}@e.ntu.edu.sg,
{DNIYATO,kwokyan.lam}@ntu.edu.sg
2
Singapore Management University, 81 Victoria Street, Singapore, Singapore
[email protected]
This work was supported by Alibaba Group through Alibaba Innovative Research
(AIR) Program and Alibaba-NTU Singapore Joint Research Institute (JRI), Nanyang
Technological University, Singapore.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 283–304, 2022.
https://doi.org/10.1007/978-3-031-23020-2_16
284 J. Fan et al.
1 Introduction
The Internet-of-Vehicle (IoV) is an integration of Vehicular Ad-hoc Networks
(VANET), and the Internet of Things (IoT) [10]. The IoV is a network of
vehicles that uses various sensors, software, built-in hardware, and communica-
tion technologies to enable information exchange between pedestrians, cars, and
urban infrastructure [14]. With seamless connectivity, IoVs can perform various
functionalities, such as providing real-time navigation guidance and delivering
onboard infotainment services.
IoV infotainment systems use touchscreen displays, button panels, and
audio/video interfaces in the vehicle to provide information and entertainment.
It is connected to onboard units via Control Area Network (CAN) to integrate
various functionalities and offer a unified user interface for both entertainment
(such as retrieving media content from nearby transportation infrastructure and
presenting it, connecting to personal devices to enable onboard voice/video pro-
jection), and driver-assistance (such as real-time monitoring of vehicle conditions
via installed cameras, receiving real-time traffic status updates, etc.). It also acts
as a platform for translating input from the user into messages communicated
across the IoV network via built-in Bluetooth, cellular, and Wi-Fi modules.
Although there is a unanimous agreement on the importance of protecting traf-
fic communication security [7,10,21,35], infotainment systems have not received
adequate attention in their communication security. Negligence on the security of
infotainment data communication in IoV networks can unintentionally open an
easy access point for social engineering attacks, where attackers can influence a
person psychologically to act in the interest of the attacker [23]. For example, the
attacker can spread false information about traffic conditions through vehicle-to-
vehicle infotainment communication, mislead drivers into crowding a particular
highway and interfere with traffic management by reporting false traffic informa-
tion. Furthermore, there will be distractions for drivers as they attempt to find
accurate information after realizing it is incorrect, which could have a potential
implication for driving safety. Hence, infotainment data communication security
is important to data integrity in IoV networks and road safety.
In the literature on IoV communication and network security, most security
solutions aim to provide secure communication via a single mechanism, such
as user authentication using strong cryptographic operations and are growingly
unfit for increasingly complicated network communication. Although these oper-
ations are required to secure crucial traffic control messages on the IoV network,
they often have a high computational cost and a substantial overhead for vehic-
ular communication. However, not all messages on the IoV network require this
high level of security protection. Systems can be more efficient by reducing the
complexity of the security framework and ensuring that important communica-
tions are efficiently and adequately protected by tailoring security protections
Differentiated Security Architecture 285
according to the type and nature of data exchanged. Such an adaptation can be
termed Quality-of-Security-Service (QoSS).
Similar to Quality-of-Service (QoS), Quality-of-Security-Service (QoSS) is a
concept that measures the level of security in a system where there is a variable
level of security services and requirements against which the system is evaluated.
As a result, not all the information exchanged in the IoV ecosystem will have the
same level of QoSS, and not all will require stringent authentication protection.
The degree of security factors considered would subsequently be referred to as
the system’s level of security. By matching security requirements with security
mechanisms that offer such capabilities, QoSS can enhance system performance
and achieve higher user satisfaction by providing users or network tasks with a
range of appropriate security choices [9].
In the case of the IoV network, due to the wide range of messages transmitted
in IoV communications, different types of data can have different security and
efficiency requirements, i.e. different QoSS. Depending on the nature of the info-
tainment content, i.e., whether the media is private or publicly available, there
will be a different set of security and efficiency expectations. Public infotain-
ment data does not require confidentiality protection, while subscription-based
infotainment data needs access control based on the user’s subscription status.
For example, Tesla has preinstalled in-car entertainment applications, such as
Netflix and Youtube, in their digital system, and users have to pay a premium
subscription fee to access these entertainment applications. For infotainment ser-
vices on the go, they install WiFi and cellular modems in each Tesla, and users
can connect to the car, nearby WiFi networks, or personal/public hotspots, or
they can pay a subscription fee and get an LTE connection with the preinstalled
SIM card to enjoy infotainment services. Naturally, there will be different secu-
rity expectations for such subscription services than for unpaid public services.
At the same time, the same protocols that safeguard private data exchanges are
not suitable for public data because public data are supposed to be accessible by
all and have lower criticality for instant and long-term availability. Similarly, the
communication protocol for traffic control messages has a different QoSS from
public data, with top priority on maintaining the integrity and availability of
the information while achieving low latency. Hence, the security design of the
IoV communication network can be more effective and efficient if we consider
the different QoSS of the communication to the different security mechanisms
that we have in place.
This paper aims to provide differentiated security protection for infotain-
ment data communication in IoV networks. The security mechanisms utilised to
protect each communication are determined by the type of data exchanged and
the security focus of such communication, i.e., the QoSS of each communication.
The main contributions of this paper are summarised as follows:
– We classify data communication in the IoV network into six categories and
examine its security focus. By doing so, we analyse the different QoSS of each
type of data communication in terms of confidentiality, integrity, short-term
availability, and long-term availability.
286 J. Fan et al.
2 Related Work
2.1 Internet-of-Vehicles
Given recent advancements in telecommunication technologies and more pow-
erful computation engines, we expect our vehicles to be more intelligent and
capable. IoV has come to light as a promising direction for solving the grow-
ing demand for a safer, faster, and more comfortable transportation network in
Differentiated Security Architecture 287
identifiers for communication allows routers to keep track of packet states, allow-
ing them to perform a variety of activities. The data packets are self-contained
and independent of where they can be retrieved and transferred. These char-
acteristics enable in-network caching of content for future requests, enhancing
content mobility while eliminating the requirement for application-specific mid-
dleware. Furthermore, NDN routers allow multi-path forwarding, which means
they can route a user request to numerous interfaces simultaneously.
The authors in [30] first proposed to leverage NDN in the vehicular informa-
tion network environment to provide efficient communication and scalable infor-
mation retrieval services. Later, many works investigated NDN-based research
topics in Vehicular Ad-hoc Networks (VANET) domain. In [13], the authors
provided a comprehensive review of the state-of-the-art works and challenges on
NDN-based VANET. The system architecture and packet forwarding phase of
NDN were explained in their work. The naming schemes, routing and forwarding
mechanisms, data transmission, in-network caching, mobility support solutions,
security and privacy, and simulation techniques of NDN in VANET have also
been surveyed in detail. After all, NDN has shown its ability to provide a safe,
efficient, and infotainment-rich driving service for users. Hence, we also lever-
aged NDN for data dissemination and secure and efficient subscription-based
infotainment data communication in IoV.
to decrypt files are encrypted with attributes that only privileged users’ access
policies can match. In this way, a user can have a broad policy tree where dif-
ferent combinations of keys can be used to satisfy and decrypt, allowing greater
flexibility in access management. A “platinum user”, for example, should be able
to decrypt any content that a “gold user” can decrypt, assuming “platinum” is
a higher tier subscription class than “gold”. An important advantage of doing
so is the relatively small amount of overhead for data protection that is being
circulated in the NDN network. Unlike in CP-ABE where a large-sized access
policy will be encrypted with the files to cater to potential users of varying status
and characteristics, KP-ABE encrypts the files with the few attributes that a
privileged user should have.
2.4 Blockchain
Blockchain has been widely used in IoV for decentralized, secure, transparent,
immutable, or automatic data access control, identity management, and other
applications [21]. Network nodes can audit the data access control and identity
verification to avoid unauthorized access and malicious tampering [8]. Blockchain
is utilized for secure and trustworthy data sharing in [11,12,22], and leveraged
for identity management in [17,26,28,31] for IoV. In addition, the authors in
[25] applied blockchain to protect multimedia data sharing from being tampered
with or forged in IoV. A blockchain-based certificate revocation approach is pro-
posed in [15] for reducing the communication overhead and shortening the user
revocation processing time in the intelligent transportation system. To prop-
erly manage access to subscription-based infotainment data of vehicles, we also
leverage blockchain in our work to verify the user’s pseudo-identity, expected
expiration, and transaction timestamps to avoid revocated users from decrypt-
ing subscription infotainment data.
First of all, we classify data exchange in IoV communication and explain the
security focus of data communication in each category to better illustrate the
need for differentiated security schemes in such IoV networks.
Table 1. Comparison among different security focuses for data categories in IoV.
Private data, such as “V2X private information exchange” and “private info-
tainment data,” for example, should be protected by stringent authentication
mechanisms to preserve its confidentiality and integrity. On the other hand,
the communication protocol for “traffic control messages” has a top priority in
maintaining the integrity and availability of the information while achieving low
latency. The same protocols that safeguard the aforementioned data types are
not suitable for public data, such as public traffic data and public infotainment
data, because these public data are supposed to be accessible by all and have
lower criticality for instant and long-term availability. Edge nodes in IoV net-
works are often desired to store this information for easy distribution. At the
same time, peer-to-peer sharing will also help speed up the circulation of public
information, but the integrity of the information exchanged is a concern. Similar
to public information, subscription-based infotainment data provided by third-
party service providers are often cached in edge nodes for fast transmission,
requiring additional access restriction by subscription status.
Thus, we can observe different security and efficiency focuses among data
exchanges in IoV networks. IoV network communication can be made more effi-
cient if we provide a differentiated security implementation based on the require-
ments of different data categories.
There are several considerations that we made in our design of the security
architecture for infotainment data sharing:
Differentiated Security Architecture 293
cles, whichever is in close proximity. Users can modify their system settings to
always download the desirable media content (the next part of the movie the
user is watching) when it is available. Large media files are broken down into
smaller files so that the expected transmission time per file is low. Given the
short amount of interaction time between fast-moving IoV and nearby RSU or
neighbouring IoVs, this will lower the number of incomplete transmissions. These
download requests are fulfilled by either the RSU or peers. Once the download
for the entire file is complete, the IoV verifies the hash value of the file against
the directory entry to check for integrity.
IoV could verify the hash value of the portion they received completely and
request other portions from neighbours in proximity.
Encrypt(PK, M, Tc , S) :
According to Equ. (2), compute
CT = {C0 , C0 , {C0,τ , C1,τ }τ ∈Tc }
SK(ID,A,T ) , A
file request
CT , encrypted file
MK = {α, β},
2 1 2
PK ={g, g α , g α , g α , g β , g β , e(g, g)α , hβ1 , . . . , hβU , V0 ,
V1 , . . . , VT }.
where k < T, give the master key MK = {α, β} and the LSSS access struc-
ture A = {M, ρ}, where M is an l × n matrix and ρ is a mapping function
that maps each row of M into an attribute. This algorithm outputs a private
key SK(ID,A,T ) for this user according to the following operations. At first,
it chooses a random masking vector v = {w, y2 , . . . , yn } ∈ Znp to share the
encryption exponent w. Besides, it computes λi = v · Mi for ∀i ∈ {1, 2, . . . , l},
i.e. Mi is the i-th row vector of M . Here {λi } are the shares of the secret w
according to M . Then this algorithm can calculate
w
D0 = e(g, g)αw , D0 = g α ,
⎧ ⎛ ⎞w ⎫
⎨ k ⎬
τ
D0,τ = ⎝V 0 Vj j ⎠ ,
⎩ ⎭ (1)
j=1
∀τ ∈T
λ1 ID
Di = g βλi , Di = ghβρ(i)
– Encrypt(PK, M, Tc , S): this is the algorithm that uses the public key PK
generated by the Setup algorithm to encrypt a plaintext message M1 asso-
ciated with a set of attributes S and a set of decryptable time periods Tc .
The set S consists of attributes such as film rating and subscription tier
(e.g., platinum, gold, and silver). The set Tc consists of some time elements
τ = {τ1 , τ2 , . . . , τk τ } ∈ {1, z}kτ where kτ < T. The set Tc is determined by
the content provider. For example, if the provider decides that the content is
valid for a particular period, Tc will cover that period so that only users who
subscribed for this period will be able to decrypt.
The algorithm chooses a random x ∈ Zp and for ∀τ ∈ Tc , it chooses a random
vτ ∈ Zp . It then computes
2
C0 = M · e(g, g)αx , C0 = g α x , C0,τ = g vτ ,
⎛ ⎞v τ
ky
2 τ (2)
C1,τ = g αx g β ⎝V0 Vj j ⎠
j=1
2. T is not completely covered in Tc , i.e. τT and all its prefixes are not in
Tc .
Otherwise, let I = {i : ρ(i) ∈ S}
⊂ {1, 2, . . . , l}, there exists a set of constants
{ωi ∈ Zp }i∈I satisfying that i∈I ωi λi = w, where λi are valid shares of a
secret w according to M . Finally, this algorithm can decrypt CT as
The user with the appropriate access policy whose valid time period com-
pletely covers the decryption time period of the file can achieve the message
decryption by solving this equation above.
The correctness of the scheme is shown below.
C0 · e(D0 , C0,τ · e(C0 , D0
))
ωi
e(C0 , g 1/α ) · i∈I e C1,τ , (Di ) ID · e(Di , kρ(i) )ωi
τj w 2 w
M · e(g, g)αx · e (V0 k j=1 Vj ) , g
vτ
· e(g α x , g α )
= v
1 ky τj τ λ ID ωi
2 2 β β
e(g α x , g α ) · i∈I e g αx g β V0 j=1 Vj , ghρ(i) 1 ID · e g βλi , (g β hh(i) )−ωi
τj w 2 w
M · e(g, g)αx · e (V0 k j=1 Vj ) , g
vτ
· e(g α x , g α )
= v
2 1 2 ky τj τ
e(g α x , g α ) · e g αx g β V0 j=1 Vj , g w · e(g βw , g −β )
τj w 2 w 2
M · e(g, g)αx · e (V0 k j=1 Vj ) , g
vτ
· e(g α x , g α ) · e(g, g)β w
= v
2 1 2 ky τj τ
e(g α x , g α ) · e g αx g β V0 j=1 Vj , gw
2 w
M · e(g, g)αx · e(g α x , g α )
= 1
2
e(g αx , g w ) · e(g α x , g α )
=M
Similar to the work [18,20] that we built upon, the security of our time-sensitive
KP-ABE scheme is based on the modified decisional q-parallel-BDHE assump-
tion. That is, as long as this assumption holds, no adversary can selectively break
our time-sensitive KP-ABE scheme.
Consider a modified decisional q-parallel-BDHE game between a challenger
C and the adversary H. In this game, the adversary aims to decrypt a challenge
ciphertext without having the right private key.
2
They cannot break this game in polynomial time [18].
Differentiated Security Architecture 301
5 Conclusion
In conclusion, communication security for IoV infotainment systems is essential
and different types of infotainment data can have different security and efficiency
requirements. Systems can be more efficient by reducing the complexity of the
security framework and ensuring that important communications are adequately
protected by tailoring security protections according to the type and nature of
data exchanged. To achieve this, we propose a differentiated security architec-
ture for secure and efficient infotainment data communication in IoV networks,
leveraging NDN and designing security protection on a file-to-file basis, ensur-
ing that various types of data receive appropriate protection and eliminating the
wastage of resources in generic security solutions. In particular, our time-sensitive
KP-ABE scheme allows content providers to set time validity on their content
and protect their copyrights. In future work, we plan to investigate incentive
mechanisms that encourage IoV users under our system to conduct peer-to-peer
infotainment resource sharing, which is a crucial feasibility concern for improv-
ing the efficiency of resource sharing and reducing communication overheads for
file retrievals.
See Table 3.
302 J. Fan et al.
Symbol Description
U The number of attributes
T The depth of the time tree
MK The master key
PK Public parameters
G1 A bilinear group of prime order p
g A generator of G1
h1 , h 2 . . . h U Random elements chosen from G1
V1 , V 2 , . . . , V T Random elements chosen from G1
α, β Random numbers chosen from Zp
ID A user’s pseudo-identity
T A set-cover of a user’s decryptable time periods
τ A z-ary representation of a time element
A A LSSS access structure
M An l × n matrix
ρ A mapping function
v A random masking vector in Zpn
ω An encryption exponent
λi (i = 1, 2, . . . , l) The shares of ω
SK A private key of a user
M A plaintext message
Tc A set of decryptable time periods of a message
S A set of attributes of the message
CT A ciphertext
References
1. Ali, I., Hassan, A., Li, F.: Authentication and privacy schemes for vehicular ad hoc
networks (VANETs): a survey. Veh. Commun. 16, 45–61 (2019)
2. Bagga, P., Das, A.K., Wazid, M., Rodrigues, J.J.P.C., Park, Y.: Authentication
protocols in internet of vehicles: Taxonomy, analysis, and challenges. IEEE Access
8, 54314–54344 (2020). https://doi.org/10.1109/ACCESS.2020.2981397
3. Barrachina, J., et al.: V2X-d: a vehicular density estimation system that combines
V2V and V2I communications. In: 2013 IFIP Wireless Days (WD), pp. 1–6. IEEE
(2013)
4. Chen, C., Wang, C., Qiu, T., Atiquzzaman, M., Wu, D.O.: Caching in vehicular
named data networking: architecture, schemes and future directions. IEEE Com-
mun. Surv. Tutor. 22(4), 2378–2407 (2020)
Differentiated Security Architecture 303
5. Datta, P., Dutta, R., Mukhopadhyay, S.: Adaptively secure unrestricted attribute-
based encryption with subset difference revocation in bilinear groups of prime
order. In: Pointcheval, D., Nitaj, A., Rachidi, T. (eds.) AFRICACRYPT 2016.
LNCS, vol. 9646, pp. 325–345. Springer, Cham (2016). https://doi.org/10.1007/
978-3-319-31517-1 17
6. Deng, X., Gao, T., Guo, N., Xie, K.: A secure data sharing scheme based on CP-
ABE in VANETs. In: Barolli, L. (ed.) Innovative Mobile and Internet Services in
Ubiquitous Computing, IMIS 2022. LNNS, vol. 496, pp. 65–74. Springer, Cham
(2022). https://doi.org/10.1007/978-3-031-08819-3 7
7. Fan, J., et al.: Understanding security in smart city domains from the ant-centric
perspective. arXiv (2022). https://doi.org/10.48550/ARXIV.2202.05023. https://
arxiv.org/abs/2202.05023
8. Guo, J., Yang, W., Lam, K.-Y., Yi, X.: Using blockchain to control access to cloud
data. In: Guo, F., Huang, X., Yung, M. (eds.) Inscrypt 2018. LNCS, vol. 11449, pp.
274–288. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-14234-6 15
9. Irvine, C., Levin, T.: Quality of security service. In: Proceedings of the 2000 Work-
shop on New Security Paradigms, February 2001. https://doi.org/10.1145/366173.
366195
10. Ji, B., et al.: Survey on the internet of vehicles: network architectures and applica-
tions. IEEE Commun. Stand. Mag. 4(1), 34–41 (2020). https://doi.org/10.1109/
MCOMSTD.001.1900053
11. Kang, J., Xiong, Z., Niyato, D., Ye, D., Kim, D.I., Zhao, J.: Toward secure
blockchain-enabled internet of vehicles: Optimizing consensus management using
reputation and contract theory. IEEE Trans. Veh. Technol. 68(3), 2906–2920
(2019)
12. Khelifi, H., Luo, S., Nour, B., Moungla, H., Ahmed, S.H., Guizani, M.: A
blockchain-based architecture for secure vehicular named data networks. Comput.
Electr. Eng. 86, 106715 (2020)
13. Khelifi, H., et al.: Named data networking in vehicular ad hoc networks: state-of-
the-art and challenges. IEEE Commun. Surv. Tutor. 22(1), 320–351 (2019)
14. Lam, K.Y., Mitra, S., Gondesen, F., Yi, X.: Ant-centric IoT security reference
architecture-security-by-design for satellite-enabled smart cities. IEEE Internet
Things J. 9(8), 5895–5908 (2022). https://doi.org/10.1109/JIOT.2021.3073734
15. Lei, A., et al.: A blockchain based certificate revocation scheme for vehicular com-
munication systems. Futur. Gener. Comput. Syst. 110, 892–903 (2020)
16. Li, F., Lam, K.Y., Ni, Z., Niyato, D., Liu, X., Wang, L.: Cognitive carrier resource
optimization for internet-of-vehicles in 5g-enhanced smart cities. IEEE Netw., 1–7
(2021). https://doi.org/10.1109/MNET.211.2100340
17. Lin, C., He, D., Huang, X., Kumar, N., Choo, K.K.R.: BCPPA: a blockchain-
based conditional privacy-preserving authentication protocol for vehicular ad hoc
networks. IEEE Trans. Intell. Transp. Syst. 22(12), 7408–7420 (2020)
18. Liu, J.K., Yuen, T.H., Zhang, P., Liang, K.: Time-based direct revocable
ciphertext-policy attribute-based encryption with short revocation list. In: Preneel,
B., Vercauteren, F. (eds.) ACNS 2018. LNCS, vol. 10892, pp. 516–534. Springer,
Cham (2018). https://doi.org/10.1007/978-3-319-93387-0 27
19. Liu, Y., Wang, Y., Chang, G.: Efficient privacy-preserving dual authentication and
key agreement scheme for secure V2V communications in an IoV paradigm. IEEE
Trans. Intell. Transp. Syst. 18(10), 2740–2749 (2017). https://doi.org/10.1109/
TITS.2017.2657649
304 J. Fan et al.
20. Liu, Z., Wang, F., Chen, K., Tang, F.: A new user revocable ciphertext-policy
attribute-based encryption with ciphertext update. Secur. Commun. Netw. 2020
(2020)
21. Mollah, M.B., et al.: Blockchain for the internet of vehicles towards intelligent
transportation systems: a survey. IEEE Internet Things J. 8(6), 4157–4185 (2020)
22. Ren, Y., Zhu, F., Wang, J., Sharma, P.K., Ghosh, U.: Novel vote scheme for
decision-making feedback based on blockchain in internet of vehicles. IEEE Trans.
Intell. Transp. Syst. 23(2), 1639–1648 (2021)
23. Salahdine, F., Kaabouch, N.: Social engineering attacks: a survey. Future Internet
11(4) (2019). https://doi.org/10.3390/fi11040089. https://www.mdpi.com/1999-
5903/11/4/89
24. Sharma, S., Kaushik, B.: A survey on internet of vehicles: applications, secu-
rity issues & solutions. Veh. Commun. 20, 100182 (2019). https://doi.org/10.
1016/j.vehcom.2019.100182. https://www.sciencedirect.com/science/article/pii/
S2214209619302293
25. Shi, K., Zhu, L., Zhang, C., Xu, L., Gao, F.: Blockchain-based multimedia shar-
ing in vehicular social networks with privacy protection. Multimedia Tools Appl.
79(11), 8085–8105 (2020)
26. Son, S., Lee, J., Park, Y., Park, Y., Das, A.K.: Design of blockchain-based
lightweight V2I handover authentication protocol for VANET. IEEE Trans. Netw.
Sci. Eng. 9, 1346–1358 (2022)
27. Taha, M.B., Talhi, C., Ould-Slimanec, H.: A cluster of CP-ABE microservices for
VANET. Procedia Comput. Sci. 155, 441–448 (2019)
28. Tan, H., Chung, I.: Secure authentication and key management with blockchain in
VANETs. IEEE Access 8, 2482–2498 (2019)
29. Wang, X., Zhang, J., Schooler, E.M., Ion, M.: Performance evaluation of attribute-
based encryption: toward data privacy in the IoT. In: 2014 IEEE International
Conference on Communications (ICC), pp. 725–730 (2014). https://doi.org/10.
1109/ICC.2014.6883405
30. Yan, Z., Zeadally, S., Park, Y.J.: A novel vehicular information network archi-
tecture based on named data networking (NDN). IEEE Internet Things J. 1(6),
525–532 (2014)
31. Yang, Y., Wei, L., Wu, J., Long, C., Li, B.: A blockchain-based multidomain
authentication scheme for conditional privacy preserving in vehicular ad-hoc net-
work. IEEE Internet Things J. 9(11), 8078–8090 (2021)
32. Zhang, J., Li, T., Obaidat, M.S., Lin, C., Ma, J.: Enabling efficient data sharing
with auditable user revocation for IoV systems. IEEE Syst. J. 16(1), 1355–1366
(2021)
33. Zhang, L., et al.: Named data networking. ACM SIGCOMM Comput. Commun.
Rev. 44(3), 66–73 (2014)
34. Zhao, Y., Zhang, X., Xie, X., Ding, Y., Kumar, S.: A verifiable hidden policy CP-
ABE with decryption testing scheme and its application in VANET. Trans. Emerg.
Telecommun. Technol. 33(5), e3785 (2022)
35. Zhou, H., Xu, W., Chen, J., Wang, W.: Evolutionary V2X technologies toward
the internet of vehicles: challenges and opportunities. Proc. IEEE 108(2), 308–323
(2020). https://doi.org/10.1109/JPROC.2019.2961937
An Efficient Authenticated Group Key
Agreement Protocol with Dynamic Batch
Verification for Secure Distributed
Networks
1 Introduction
This work is supported by the National Natural Science Foundation of China under
Grants No. 61922045, No. U21A20465, No. 62172292, No. 61877034, the China Schol-
arship Council under Grant No. 202109040028.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 305–318, 2022.
https://doi.org/10.1007/978-3-031-23020-2_17
306 T. Zhou et al.
the networks structure. The security of the data transmission is usually under-
estimated and ignored. To be more specific, many existing works [10] all explic-
itly or implicitly assume that the raw data or local model parameters can be
securely collected or assume that the transmission channel is secure without
given detailed implementation. Whereas, how to guarantee the transmission
security and efficiency of the raw data or local model parameters is not an
easy task. That is because, the computational cost for encryption and decryp-
tion can increase dramatically when the number of nodes in distributed networks
becomes large. Without a well-designed and efficient encryption algorithm, the
system burden can be intolerable. On the other hand, the nodes in distributed
networks distribute in different geographical locations and different network envi-
ronments, which are prone to suffer from the distributed denial of serves (DDoS)
attack [6,8,9]. Therefore, instead of explicitly or implicitly assuming that the
transmission channel is secure, it is desirable to design a secure mechanism to
guarantee the transmission security in distributed networks. In this paper, we
mainly concentrate on how to securely and efficiently aggregate the data in a
group manner, which is a challenging issue in distributed networks.
This paper focuses on the secure data transmission and efficient data sharing in
distributed networks. The main contributions of this paper are summarized as
follows.
the DDoS attack. The main design rationales is that members who are legally
and normally operating are retained, and members who do not respond or
fail in verification are ignored, which is achieved through the adjustment of
threshold and progressive parameters.
1.3 Organization
The reminder of this paper is organized as follows. Section 2 introduces the
related techniques that will be used in the proposed protocol. Section 3 describes
the system model under the distributed networks. Section 4 presents the detailed
protocol, the corresponding lightweight verification with precomputation mech-
anism and the dynamic batch verification mechanism. Section 5 concludes this
paper.
2 Preliminaries
In this section, the related techniques including group key agreement, BLS multi-
signatures, and the secure transformation used in the proposed protocol are
introduced. Also, some essential notations used in this paper are summarized in
a table for convenient and quick reference.
The group key agreement protocol (BD protocol) [3] proposed by Burmester and
Desmedt is a well-designed group key agreement protocol, which consists of four
phases and is described as follows.
g sa g se
g se g sb
sk = g se sa sk = g se sb
finalize
σ = σ1 · σ2 · σ3 · · · σ n (4)
Then, the aggregated signature can be verifies according to Eq. (5).
ê(g1 , σ) = ê(pk1 , hM1 ) · ê(pk2 , hM2 ) · ê(pk3 , hM3 ) · · · ê(pkn , hMn ) (5)
2.4 Notations
Table 1. Notations.
3 System Model
In this section, the system model of the proposed protocol is described under
the distributed networks.
In our system, four entities are involved which are distributed servers, dis-
tributed nodes, the semi-trusted authority (STA), and the public key infrastruc-
ture (PKI). The detailed system model is illustrated in Fig. 1 and described as
follows.
Distributed servers are in charge of collecting and storing data from dis-
tributed nodes. After the data are collected, the servers can train model based
on the received data or just offer storage services. Finally, after the model train-
ing, the model parameters will be feedback to distributed nodes in distributed
networks. Alternatively, when data are requested, servers will feedback data to
distributed nodes.
Distributed nodes in the system model are resources-constrained in storage
and computation capability who can only generate data but can not storage these
data for a long time. It is required that nodes need to upload data periodical
(e.g., 24 h) to refresh the storage space. Moreover, the computation capability
of nodes is constrained thus the training task can only be outsourced to servers.
Also, the verification needed the assistance from the STA.
STA is a semi-trusted authority who will assist nodes in performing authen-
tication but may collude with attackers to run man-in-the-middle attack. In
particular, in our system, the STA will help the distributed nodes to do some pre-
computation thereby supporting efficient batch verification between distributed
312 T. Zhou et al.
nodes. Moreover, in the dynamic batch verification phase, the STA is in charge
of selecting parameters according to different authentication requirement and
running the dynamic batch verification algorithm.
PKI is responsible for registering entity and issuing certificate. In our system
model, entities including distributed servers, distributed nodes and STA need to
register at PKI to obtain the corresponding certificates. The certificate can be
used to support authentication during the group key agreement phase.
– Key generation: Party i selects xi ←$ Z∗p as its private key. Then, the cor-
responding public key is calculated as pki = g1xi . Unlike the original BLS
multi-signatures, to support authentication, every entity in our system need
to register at the PKI with its public key and private key. Finally, PKI gen-
erates and issues the certificate certi for the registered legal party Pi .
– Round 1: For a group with n parties, they are organized as a ring with index
from 0 to n − 1. Each party Pi selects si ←$ Z∗p as its ephemeral key. Here,
Z∗p := {1, 2, 3, ..., p−1}. Also, the corresponding public parameter is calculated
as hi = g si . Then, to support authentication, party Pi generates signature on
hi with its private key xi . In particular, Pi calculates σi1 = H(hi )xi . Finally,
every party broadcasts R1i = {hi , σi1 , certi }.
– Round 2: For party Pi , it obtains the messages R1i−1 and R1i+1 from its
neighbours. Then, Pi checks Eq. (6) to verify the validity of the received
messages.
In the following, the main data flow of the proposed authenticated group key
agreement protocol is shown.
314 T. Zhou et al.
R1i
R2i
Moreover, in order to show the proposed scheme clear, the interactions of the
group key agreement in round 1 and round 2 are depicted in Fig. 2 and Fig. 3,
respectively.
It can be observer from Fig. 2 that in the first round, each party distributes
its public parameter to its neighbours. Then, in the second round as shown in
Fig. 3, each party broadcasts its calculation result to all the rest n − 1 parties.
Finally, all parties in the group can generate a session key.
In order to support the proposed protocol performs in a high efficiency in dis-
tributed networks with real-time requirements, the precomputation mechanism
preformed by STA is presented in the next subsection.
Precomputation. Note that the verification equation in the session key gen-
eration phase is the same for all n parties. Thus, it inspires us to introduce STA
An Efficient Authenticated Group Key Agreement Protocol 315
Detection. To avoid the collusion from STA and attackers, the detection mech-
anism is designed. In particular, the detection mechanism is performed by every
party in the group based on the concept of probabilistic random sampling.
After received the precomputation result from STA, each party Pi randomly
selects one samples from Table 2. Then, Pi compares the results of his calcu-
lations with the results of the sample. If the result is consistent, outputs acci .
Otherwise, outputs refi and quits this session. If all parties accept, then the
precomputation from STA is accepted.
5 Conclusion
References
1. Bellare, M., Canetti, R., Krawczyk, H.: A modular approach to the design and anal-
ysis of authentication and key exchange protocols. In: Proceedings of the Thirtieth
Annual ACM Symposium on Theory of Computing, pp. 419–428 (1998)
318 T. Zhou et al.
2. Boneh, D., Drijvers, M., Neven, G.: Compact multi-signatures for smaller
blockchains. In: Peyrin, T., Galbraith, S. (eds.) ASIACRYPT 2018. LNCS, vol.
11273, pp. 435–464. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-
03329-3 15
3. Burmester, M., Desmedt, Y.: A secure and efficient conference key distribution
system. In: De Santis, A. (ed.) EUROCRYPT 1994. LNCS, vol. 950, pp. 275–286.
Springer, Heidelberg (1995). https://doi.org/10.1007/BFb0053443
4. Conti, M., Dragoni, N., Lesyk, V.: A survey of man in the middle attacks. IEEE
Commun. Surv. Tutor. 18(3), 2027–2051 (2016)
5. Diffie, W., Hellman, M.E.: New directions in cryptography. IEEE Trans. Inf. The-
ory 22(6), 644–654 (1976)
6. Du, M., Wang, K.: An SDN-enabled pseudo-honeypot strategy for distributed
denial of service attacks in industrial internet of things. IEEE Trans. Industr.
Inf. 16(1), 648–657 (2019)
7. Feitosa, A.E., Nascimento, V.H., Lopes, C.G.: Adaptive detection in distributed
networks using maximum likelihood detector. IEEE Signal Process. Lett. 25(7),
974–978 (2018)
8. Gavrilis, D., Dermatas, E.: Real-time detection of distributed denial-of-service
attacks using RBF networks and statistical features. Comput. Netw. 48(2), 235–
245 (2005)
9. Islam, U., et al.: Detection of distributed denial of service (DDoS) attacks in IoT
based monitoring system of banking sector using machine learning models. Sus-
tainability 14(14), 8374 (2022)
10. Jiang, Y., Zhang, K., Qian, Y., Zhou, L.: Anonymous and efficient authentica-
tion scheme for privacy-preserving distributed learning. IEEE Trans. Inf. Forensics
Secur. 17, 2227–2240 (2022). https://doi.org/10.1109/TIFS.2022.3181848
11. Liu, Z., Zhang, L., Ni, W., Collings, I.B.: Uncoordinated pseudonym changes for
privacy preserving in distributed networks. IEEE Trans. Mob. Comput. 19(6),
1465–1477 (2019)
12. Lopes, C.G., Sayed, A.H.: Incremental adaptive strategies over distributed net-
works. IEEE Trans. Signal Process. 55(8), 4064–4077 (2007)
13. Shen, J., Zhou, T., He, D., Zhang, Y., Sun, X., Xiang, Y.: Block design-based
key agreement for group data sharing in cloud computing. IEEE Trans. Depend-
able Secure Comput. 16(6), 996–1010 (2019). https://doi.org/10.1109/TDSC.2017.
2725953
14. Sun, Y., Han, Z., Liu, K.R.: Defense of trust management vulnerabilities in dis-
tributed networks. IEEE Commun. Mag. 46(2), 112–119 (2008)
15. Wang, C., Shen, J., Lai, J.F., Liu, J.: B-TSCA: blockchain assisted trustworthiness
scalable computation for V2I authentication in VANETs. IEEE Trans. Emerg. Top.
Comput. 9(3), 1386–1396 (2020)
16. Wang, C., Shen, J., Vijayakumar, P., Gupta, B.B.: Attribute-based secure data
aggregation for isolated IoT-enabled maritime transportation systems. IEEE Trans.
Intell. Transp. Syst. (2021). https://doi.org/10.1109/TITS20213127436
17. Xiong, H., Wu, Y., Lu, Z.: A survey of group key agreement protocols with constant
rounds. ACM Comput. Surv. (CSUR) 52(3), 1–32 (2019)
18. Zhou, T., Shen, J., He, D., Vijayakumar, P., Kumar, N.: Human-in-the-loop-aided
privacy-preserving scheme for smart healthcare. IEEE Trans. Emerg. Top. Comput.
Intell. 6(1), 6–15 (2022). https://doi.org/10.1109/TETCI.2020.2993841
19. Zhou, T., Yang, H., Shen, J.: Key agreement protocol with dynamic property for
VANETs. J. Cryptol. Res. 7, 375–388 (2020)
Leveraging Frame Aggregation in Wi-Fi
IoT Networks for Low-Rate DDoS Attack
Detection
1 Introduction
The number of smart home IoT devices connected to the Internet is projected
to reach 75.44 billion by 2025 [1]. However, the resource-constraint essence of
IoT devices makes them vulnerable to various attacks. For example, the work
in [2–4] analyzed various popular consumer IoT devices and found numerous
vulnerabilities. In particular, Distributed Denial of Service (DDoS) and energy-
oriented DDoS (E-DDoS) attacks against IoT devices have attracted increasing
attention since they can cause severe damage, such as high resource consumption
and operational failure [3]. To exhaust the resources of victim devices promptly,
DDoS adversaries often launch attacks with significantly higher rates than that
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 319–334, 2022.
https://doi.org/10.1007/978-3-031-23020-2_18
320 B. Tushir et al.
of the benign traffic. Therefore, existing studies often utilize machine learning
algorithms and identify traffic with distinct statistical anomalies as malicious
traffic [5–9,17].
The idea behind low-rate DDoS (LR-DDoS) attacks, however, is to bypass
the detection mechanisms by launching attack traffics with statistic features very
similar to benign traffic. For example, the protocols used in LR-DDoS attacks
are standard protocols such as TCP and UDP, which are the most common
type of protocols in IoT networks [11]. Next, the LR-DDoS average flow rate
is lower or similar to benign traffic. Finally, from the perspective of rate and
duration, a LR-DDoS attack can have dynamic rates and duration that evolves
with changes in the network environment [12]. For example, the attacks may be
launched during traffic bursts to hide malicious traffic among the benign traffic.
Because of such factors, detecting LR-DDoS attacks is very challenging.
Although various solutions have been proposed recently to detect LR-DDoS
attacks against data centers [13–16], little effort has been made to detect LR-
DDoS against smart home devices which may cause severe consequences. Firstly,
packets (such as ICMP reply) transmitted by IoT devices in response to attack
packets can be used to initiate high-rate DDoS attacks against devices outside
the smart home network [4]. Secondly, LR-DDoS attacks can stealthily increase
the power consumption of IoT devices since they process malicious packets.
This could increase the consumer electricity bill. Finally, LR-DDoS attacks can
introduce poor user experience by targeting multiple IoT devices to exhaust the
home network bandwidth.
Therefore, in this work, we propose to focus on LR-DDoS attacks against
smart home IoT devices. Note that due to the resource-constraint essence of IoT
devices, it is possible to launch low-rate Denial of Service (LR-DoS) attacks by
one machine and LR-DDoS attacks by multiple machines. For simplicity, in this
work, we use the terms LR-DDoS to represent both attacks against IoT devices.
Specifically, 802.11 (WiFi), with its low-cost and wide-spreading deployment,
has become an effective communication channel for IoT devices, including the
smart home IoT devices [36,37]. To reduce transmission overhead, the 802.11
standards after 802.11n adopt frame aggregation that combines multiple frames
into a single frame for transmission. 802.11n describes two ways of frame aggre-
gation, namely Aggregate MAC Protocol Service Unit (A-MSDU) and Aggregate
MAC Protocol Data Unit (A-MPDU). Next, the density of frame aggregation
is affected by several parameters such as the amount of data generated by the
device, the interval between packet generations, and transmission rate. This
means, frame aggregation, for example, is affected by the software implanta-
tion and processing resources of an IoT device, because these parameters affect
packet generation rate. Building on such observations, in this work, we leverage
the 802.11 data generated by smart home IoT devices and rely on block acknowl-
edgment (BA) to introduce a novel set of features to detect LR-DDoS attacks
in smart home networks. In particular, we explore the core mechanism of the
frame aggregation scheme by exploiting characteristics such as the number of
MAC protocol service unit (MPDU)s in a A-MPDU and the observed rate of
Leveraging Frame Aggregation for Low-Rate DDoS Detection 321
the MPDUs. Since frame aggregation is affected by the network conditions such
as distance between IoT device and Access Point (AP) and channel utilization,
we normalize the proposed feature set by incorporating distance and channel
utilization.
The primary contributions of this work are as follows:
– We propose a novel feature set that builds on the properties of 802.11 frame
aggregation and is specifically suitable to be deployed on resource-constraint
smart home APs for LR-DDoS detection since they are lightweight, privacy-
preserving and robust under different smart home configurations. In particu-
lar, we demonstrate how 802.11 packets, specifically block acknowledgments,
can be used to extract a rich set of 802.11 features. We define two essential
features: aggregation intensity and MPDU rate, and show how these features
can be used to distinguish between IoT devices’ benign traffic and LR-DDoS
attacks traffic. To the best of our knowledge this is the first work addressing
LR-DDoS attack detection by characterizing frame aggregation. We further
demonstrate the impact of network conditions on the proposed feature set. In
particular, we show how aggregation intensity and MPDU rate of IoT network
varies with changes in distance and channel utilization and later normalize
the feature set.
– We validate the effectiveness of the proposed features by adopting multiple
machine learning algorithms and conducting experiments on the real-world
dataset collected at our lab.
The rest of the paper is organized as follows. Section 2 presents an overview
of frame aggregation, the motivation behind proposed features, how features
are computed, and factors influencing proposed features. We present the threat
model and assumptions in Sect. 3. Next, Sect. 4 presents the machine learning-
based framework and data collection setup. Section 5 validates the effectiveness of
the proposed features by adopting multiple machine learning algorithms. Finally,
we overview related work in Sect. 6 and conclude the paper in Sect. 7.
2 Feature Design
In this Section, we first give an overview of 802.11 frame aggregation and then
discuss the motivation behind adopting frame aggregation as the primary feature
used for detecting LR-DDoS attacks. Next, we show how to calculate aggregation
intensity by adopting BA and finally, we normalize the proposed features by
illustrating the factors affecting frame aggregation.
device A-MPDU AP
MPDU MPDU MPDU MPDU
BA
A-MPDU
MPDU MPDU
BA
A-MPDU
BA
A-MPDU when moved into the physical layer. All the MPDUs (i.e., packets)1
in the A-MPDU have the same destination address and traffic identifier (TID).
Thus, the packets collected by a 802.11 sniffer are in the form of A-MPDU. Typ-
ically, an A-MPDU is followed by a BA that includes a bitmap field to report the
reception status of each MPDU, as shown in Fig. 1. This work primarily focuses
on leveraging A-MPDU characteristics for LR-DDoS attack detection in smart
homes.
The implementation of 802.11 frame aggregation adopts the idea that traffic
belonging to each TID is queued and scheduled independently. For example, the
following six frames Fa1 , Fb1 , Fa2 , Fa3 , Fb2 and Fc1 , where Fxi is the ith frame
with x as the TID, can be sent out as subsequent three frame (or A-MPDUs):
(Fa1 , Fa2 , Fa3 ), (Fb1 , Fb2 ) and (Fc1 ). The primary idea is that the transmission
gap between two A-MPDUs allows assembling more packets into the TID queues
except for the TID being transmitted. For instance, assume while transmitting
the A-MPDU (Fa1 , Fa2 , Fa3 ), new MPDUs arrive with TID as b, denoted as
(Fb3 ). This MPDU could be aggregated with A-MPDU (Fb1 , Fb2 ) and sent out
as (Fb1 , Fb2 , Fb2 ). Finally, the formation of A-MPDU is restricted by maximum
A-MPDU size (65,535 B) and maximum frame transmission time (Tmax ) (e.g.,
4 ms in ath9k) [27,28].
As one of the major contributions of this study is the proposal of features based
on the 802.11 frame aggregation characteristics, this subsection describes the
characteristics of benign traffic and the intuition behind how 802.11 frame aggre-
gation helps to detect LR-DDoS attacks.
1
The terms packet and MPDU are used interchangeably in this article.
Leveraging Frame Aggregation for Low-Rate DDoS Detection 323
Fig. 2. Benign network traffic received/sent rates (packets per second) from Amazon
Echo and Kasa camera.
IoT devices generate the following two types of traffic. (1) Standalone traf-
fic: IoT devices have repetitious network traffic, such as regular network pings,
DNS, and NTP requests, with small packets at fixed time intervals for logging
purposes. (2) Active traffic: Traffic generated when users interact with the IoT
devices, such as Google Home replying to the user’s voice commands and Ring
camera detecting activity and notifying the user phone [19]. The active traffic
of IoT devices has the following characteristics. First, multiple data packets are
exchanged between IoT device and the cloud server to perform one task (or
request). For example, when we ask Google Home about the weather, 330710
bytes are transmitted as 325 packets, and 75208 bytes are received as 255 pack-
ets. Second, normally, the active traffic is sent in short bursts of packets. The
sudden increase in the packets sent/received for a short period by Amazon Echo
and Kasa represents the burst in Fig. 2.
Based on such observations, our intuition is that while transmitting active
traffic associated with one request, numerous packets in the transmission queue
of IoT devices are aggregated before transmission. However, in the case of LR-
324 B. Tushir et al.
Fig. 3. 802.11 frame aggregation intensity of benign and LR-DDoS attack traffic of
IoT devices.
DDoS attacks, the packets in the transmission queue would depend on the
number of replies transmitted by the IoT device, which relies on the incom-
ing attack rate. For example, IoT devices send ICMP replies, unreachable des-
tination messages, and TCP-RSTs in response to ICMP requests, UDP, and
TCP-SYN attack types, respectively. Therefore, understanding the transmission
queue information, precisely length, can help detect LR-DDoS attacks. How-
ever, obtaining such details requires kernel-level access on a device, which is
challenging for IoT devices, especially in the case of the passive approach. For-
tunately, 802.11 frame aggregation schemes intrinsically show the property to
extract transmission queue length. Hence, in this work, we adopt the character-
istics of the frame aggregation schemes, such as the number of MPDUs within
one A-MPDU, named aggregation intensity, to detect LR-DDoS attacks.
Figure 3 shows the aggregation intensity for the following two LR-DDoS
attack rates, 100 and 500 packet per second (pps), and benign traffic of IoT
devices used in our testbed. It is evident from Fig. 3 that for a lower incoming
rate of 100 pps, the aggregation intensity is approximately 1.5; while for a higher
incoming rate of 500 pps, the aggregation intensity is approximately between 1
and 4 for 90% of the outgoing traffic of IoT devices. Thus, the increase in the
malicious incoming packets increases IoT devices’ transmission queue length,
which correlates with aggregation intensity. Further, it is observable that the
aggregation intensity of benign traffic is less than 4 for 90% of benign traffic
sent out by IoT devices. Based on such findings, we intend to capitalize on this
variation in the aggregation intensity among benign and attack traffic to detect
LR-DDoS attacks.
Aggregation intensity primarily infers an IoT device’s transmission queue
length while sending benign and malicious A-MPDUs. However, it does not
assess how many MPDUs are sent out by IoT devices. It is noteworthy that for
the exact number of A-MPDUs belonging to benign and malicious traffic sent
by IoT devices, the total number of benign and malicious MPDUs might differ.
Leveraging Frame Aggregation for Low-Rate DDoS Detection 325
Fig. 4. Benign and malicious packets sent out per second (MPDU rate). The A-MPDUs
are transmitted is between 100 to 400 per second.
The malicious traffic refers to the reply transmitted by IoT devices in response
to LR-DDoS attacks. Thus, we utilize another A-MPDU metric called MPDU
rate to count how many MPDUs are sent from the IoT device. For example,
Fig. 4 shows the CDF graph for benign and malicious MPDUs sent per second
(MPDU rate) by IoT devices, where the number of benign and malicious A-
MPDUs transmitted is between 0 to 400 per second. The MPDU rate is 400 and
850 for 90% benign traffic and 90% malicious traffic. We rely on machine learning
to leverage the difference between malicious and benign outgoing MPDU traffic
rates.
A-MPDU1
device AP
2115 2116 2117 2118
1
BA
SSN: 2055
2
A-MPDU
2119 2120
BA2
SSN: 2059
Miss
A-MPDU3
BA3
SSN: 2062 01
A-MPDU4
2122
BA4
SSN: 2062
Fig. 5. Data transmission using A-MPDU frame aggregation. The sequence number
(SSN) and bitmap are fields by block acknowledgment that enables aggregation inten-
sity calculation.
2055 = 4) for BA1 and BA2 . For the lost packets, for example, in A − M P DU 4 ,
MPDU 2122 is lost, the BA bitmap represents the failure status by updating the
received status to zero. The device then retransmits the MPDU while the BA
SSN is the same (i.e., 2062). Finally, to accommodate the packet loss and increase
the proposed features’ effectiveness, we normalize them by understanding the
influential factors.
Fig. 6. Kasa camera aggregation intensity of malicious outgoing traffic versus distance
shows an exponential association.
arrive at the device queue, Ian might increase proportionally. Figure 3 validates
the association between Ian and traffic rate for LR-DDoS attacks. It is evident
from Fig. 3 that Ian is higher for 500 pps attack rate compared to 100 pps rate.
Thus, Ian increases with an increase in attack rate (or arriving traffic rate). On
the other hand, benign traffic Ian shows no correlation with incoming packet rate
since benign traffic generated by IoT devices depends on its functionality. Thus,
IoT devices’ Ian is independent of incoming traffic.
Next we show the association between IoT devices aggregation intensity and
distance. Figure 6 shows the mean aggregation intensity per second versus dis-
tance for the Kasa camera for malicious outgoing traffic. It is evident from Fig. 6
that the aggregation intensity decreases with an increase in distance. Typically,
the aggregation intensity decreases whenever the transmission queue has retry
frames with non-consecutive sequence numbers [32]. Subsequently, the farther
the IoT device from AP, the higher the number of retransmissions, decreasing
the aggregation intensity. Finally, channel utilization shows linear association
with aggregation intensity [33]. Thus, we normalize aggregation intensity Ian as
follows:
Ian ∗ CU
Ian (N ) = (1)
d
where Ian (N ) is the normalized aggregation intensity; d is the distance between
the device and AP; and CU is the channel utilization. Later we standardize
these features between 0 and 1. This equation holds if incoming traffic is lower
or equal to 1000 pps. Beyond 1000 pps, the association might change. On this
note, the following are the features proposed in this work.
328 B. Tushir et al.
The features are accumulated for both incoming and outgoing traffic of IoT
networks.
3 Threat Model
In this Section, we discuss the assumptions and details of the threat model. We
assume that the adversary has access to the local network of the smart home. The
work in [4] validated this assumption. Further, we build the threat model upon
the LR-DDoS attacks characteristics discussed in Sect. 1. In particular, firstly, the
LR-DDoS attack rate is equivalent to the benign traffic (sent or received) by IoT
devices. To achieve this goal, we analyze the benign traffic of off-the-shelf smart
home IoT devices and observed the following. The rate of packets sent/received
measured varies approximately from 0 to 800 pps. For example, Fig. 2(a)–(d)
show the sending/receiving rates from the Amazon Echo and Kasa camera over
approximately 11 min. Notably, the sending/receiving rate has peaked at time
intervals when user activities are present. The maximum number of packets
Amazon Echo receives and sends is 630 and 430 pps respectively, while the
maximum number of packets Kasa camera receives and sends is 60 and 110 pps
respectively. Thus, based on such observation, we keep the attack rate between 10
pps to 1000 pps. Secondly, we launch attacks based on IoT networks’ three most
common protocols: ICMP, TCP-SYN and UDP. Thirdly, in varying order, the
LR-DDoS attacks are launched in bursts for 10 to 45 s. Further, the attack rate
and duration vary randomly. Finally, please note that we choose the maximum
attack rate as 1000 pps to show the trends of 802.11 frame aggregation among
benign and LR-DDoS attack traffic. In real world settings, the adversary might
increase or decrease the attack rate based on the types of IoT devices in the
network.
4 Framework Overview
A-MPDU 0
Benign & batch Each device Feature Feature Attack
Capture attack datset data Extraction set
formation
1
IoT servers
Attack
Public Internet & other end
Source
points
Ethernet
Connection
Smart Home Gateway
Connection
Fig. 7. IoT network proposed framework and corresponding data collection setup for
collecting benign and attack traffic training data.
videos from the cameras to the phone while performing activities in front of cam-
eras and ask various questions to Amazon Echo and Google Home.
Next, we collect LR-DDoS attack data. We use a Linux machine connected
to the AP through Ethernet as an attack source. We launched ICMP, TCP-
SYN, UDP LR-DDoS attacks. The attack source then targets each IoT device
with each type of attack. The attacks happened in a random sequence for a
random duration ranging uniformly from 1 to 60 s, with the attack rate varying
between 10 pps to 1000 pps. The sniffer is kept close to AP and records pcap
files of attack traffic. The sniffer collects the BA and beacon frame to compute
proposed features and channel utilization. The attacks are simulated with the
hping3 utility. We collected approximately 5 min of attack traffic per device at
a distance. We collect the LR-DDoS attack data at the following distances 1 m,
5 m, 10 m, 15 m, and 20 m.
BA Batch Formation: in this step, batches of BAs are formed by adopting
the BA packets as discussed in Sect. 2.3 sent/received from each IoT device. The
BAs are further grouped based on the MAC address for both benign and attack
data. The groups are further divided into time windows (i.e., per second) by
timestamps. It is interesting to note that identifying low-rate attacks on a per-
device basis restricts collecting the number of flows in the smart home network.
Thus, reducing the load of the AP.
Feature Extraction: from the BA groups the features discussed in Sect. 2.4
are extracted.
Attack Detection: various machine learning algorithms can distinguish benign
traffic from attack traffic with high accuracy, as illustrated in Sect. 5.
330 B. Tushir et al.
Table 1. IoT devices benign and LR-DDoS attack traffic detection results
Fig. 8. The relative importance of all four features when applying RF using Gini score.
6 Related Work
Most existing works focus on defending data centers against DDoS [25,26,29] and
LR-DDoS [13–15]. In IoT networks majority of the work focus on detecting DDoS
attacks originating from IoT devices [7,8,30,31], few works focus on protecting
IoT devices against flood DDoS attacks [5,6] and much less attention has been
paid to protecting IoT devices from LR-DDoS attacks. Therefore, in this work,
we aim to detect LR-DDoS attacks against IoT devices. To do so, we explore the
properties of 802.11 frame aggregation and propose a novel, lightweight, privacy-
preserving, and robust feature set that achieves 99% accuracy with machine
learning algorithms.
The work in [5,6] focuses on detecting flood attacks against IoT devices. In
particular, the work in [5] proposed a feature set including packet size, inter-
packet interval, and protocol type estimated for a time window to detect flood
DDoS attacks on IoT devices. However, such features may not detect low-rate
attacks because of two significant shortcomings. First, the authors did not con-
sider the impact of network conditions on the proposed features. For example,
an increase in the number of packet retransmission would alter (increase or
decrease) the percentage of packets of a specific protocol for a time window.
Second, the objective of a slow-rate attack is to approximate the benign traffic
rate. Thus, the inter-packet interval may not be a significant feature for slow-
rate attack detection. Next, the authors in [6] proposed an intrusion detection
system to detect DDoS attacks in IoT network. The features set adopted by
[6] is based on per packet characteristics such as packet length, TCP, and IP
flags violating user privacy. Therefore, to overcome such challenges in this work,
we consider the impact of network conditions on the proposed lightweight and
privacy-preserving features and aim to detect both LR-DDoS attacks launched
against smart home networks. Further, to the best of our knowledge, this is the
first work detecting LR-DDoS attacks against smart home networks.
The works [20–22] use deep learning to detect DDoS attacks. Although deep
learning algorithms can automatically extract high-level features from low-level
ones and gain powerful representation and inference, such algorithms are asso-
ciated with high computation costs. The work in [20–22] used packet-level fea-
332 B. Tushir et al.
tures such as protocol, port numbers, and HTTP length. These features are
fed to deep learning algorithms such as LSTM and GRU. However, such fea-
tures might violate user privacy. To overcome such challenges, in this work, we
engineer lightweight and privacy-preserving features that, when adopting basic
machine learning algorithms such as RF achieve 0.98 accuracies in detecting LR-
DDoS attacks. To the best of our knowledge, our work is the first to analyze the
frame aggregation scheme among benign and attack traffic to detect low-rates
attacks against IoT devices.
7 Conclusion
References
1. Cvitić, I., Peraković, D., Periša, M., Botica, M.: Smart home IoT traffic character-
istics as a basis for DDoS traffic detection. In: 3rd EAI International Conference
on Management of Manufacturing Systems (2018)
2. Davis, B., Mason, J., Anwar, M.: Vulnerability studies and security postures of IoT
devices: a smart home case study. IEEE Internet Things J. 7, 10102–10110 (2020)
3. Tushir, B., Dalal, Y., Dezfouli, B., Liu, Y.: A quantitative study of DDoS and E-
DDoS attacks on WiFi smart home devices. IEEE Internet Things J. 8, 6282–6292
(2020)
4. Lyu, M., Sherratt, D., Sivanathan, A., Gharakheili, H., Radford, A., Sivaraman,
V.: Quantifying the reflective DDoS attack capability of household IoT devices. In:
Proceedings of the 10th ACM Conference on Security and Privacy in Wireless and
Mobile Networks, pp. 46–51 (2017)
5. Doshi, R., Apthorpe, N., Feamster, N.: Machine learning DDoS detection for con-
sumer internet of things devices. In: 2018 IEEE Security and Privacy Workshops
(SPW), pp. 29–35 (2018)
6. Anthi, E., Williams, L., Słowińska, M., Theodorakopoulos, G., Burnap, P.: A super-
vised intrusion detection system for smart home IoT devices. IEEE Internet Things
J. 6, 9042–9053 (2019)
7. Jia, Y., Zhong, F., Alrawais, A., Gong, B., Cheng, X.: FlowGuard: an intelligent
edge defense mechanism against IoT DDoS attacks. IEEE Internet Things J. 7,
9552–9562 (2020)
Leveraging Frame Aggregation for Low-Rate DDoS Detection 333
8. Roopak, M., Tian, G., Chambers, J.: An intrusion detection system against DDoS
attacks in IoT networks. In: 2020 10th Annual Computing and Communication
Workshop and Conference (CCWC), pp. 0562–0567 (2020)
9. Diro, A., Chilamkurti, N.: Distributed attack detection scheme using deep learning
approach for Internet of Things. Futur. Gener. Comput. Syst. 82, 761–768 (2018)
10. Liu, Z., Yin, X., Hu, Y.: CPSS LR-DDoS detection and defense in edge computing
utilizing DCNN Q-learning. IEEE Access. 8, 42120–42130 (2020)
11. Gordon, H., Batula, C., Tushir, B., Dezfouli, B., Liu, Y.: Securing smart homes
via software-defined networking and low-cost traffic classification. 2021 IEEE 45th
Annual Computers, Software, and Applications Conference (COMPSAC), pp.
1049–1057 (2021)
12. Zhijun, W., Wenjing, L., Liang, L., Meng, Y.: Low-rate DoS attacks, detection,
defense, and challenges: a survey. IEEE Access. 8, 43920–43943 (2020)
13. Aiello, M., Cambiaso, E., Mongelli, M., Papaleo, G.: An on-line intrusion detec-
tion approach to identify low-rate DoS attacks. In: 2014 International Carnahan
Conference on Security Technology (ICCST), pp. 1–6 (2014)
14. Zhang, N., Jaafar, F., Malik, Y.: Low-rate DoS attack detection using PSD based
entropy and machine learning. In: 2019 6th IEEE International Conference on
Cyber Security and Cloud Computing (CSCloud)/2019 5th IEEE International
Conference on Edge Computing and Scalable Cloud (EdgeCom), pp. 59–62 (2019)
15. Zhang, X., Wu, Z., Chen, J., Yue, M.: An adaptive KPCA approach for detecting
LDoS attack. Int. J. Commun Syst 30, e2993 (2017)
16. He, Z., Zhang, T., Lee, R.: Machine learning based DDoS attack detection from
source side in cloud. In: 2017 IEEE 4th International Conference on Cyber Security
and Cloud Computing (CSCloud), pp. 114–120 (2017)
17. Chandola, V., Banerjee, A., Kumar, V.: Anomaly detection: a survey. ACM Com-
put. Surv. (CSUR) 41, 1–58 (2009)
18. Ferrag, M., Maglaras, L., Moschoyiannis, S., Janicke, H.: Deep learning for cyber
security intrusion detection: approaches, datasets, and comparative study. J. Inf.
Secur. Appl. 50, 102419 (2020)
19. Sivanathan, A., Sherratt, D., Gharakheili, H., Sivaraman, V., Vishwanath, A.:
Low-cost flow-based security solutions for smart-home IoT devices. In: 2016 IEEE
International Conference on Advanced Networks and Telecommunications Systems
(ANTS), pp. 1–6 (2016)
20. Yuan, X., Li, C., Li, X. DeepDefense: identifying DDoS attack via deep learning.
In: 2017 IEEE International Conference on Smart Computing (SMARTCOMP),
pp. 1–8 (2017)
21. Yadav, S., Subramanian, S.: Detection of Application Layer DDoS attack by feature
learning using Stacked AutoEncoder. In: 2016 International Conference on Compu-
tational Techniques in Information and Communication Technologies (ICCTICT),
pp. 361–366 (2016)
22. Idhammad, M., Afdel, K., Belouch, M.: Detection system of HTTP DDoS attacks
in a cloud environment based on information theoretic entropy and random forest.
Secur. Commun. Netw. 2018 (2018)
23. Tomita, T., et al.: Sparse projection oblique randomer forests. J. Mach. Learn. Res.
21 (2020)
24. Pedregosa, F., et al.: Scikit-learn: machine learning in Python. J. Mach. Learn.
Res. 12, 2825–2830 (2011)
25. Xiao, P., Qu, W., Qi, H., Li, Z.: Detecting DDoS attacks against data center with
correlation analysis. Comput. Commun. 67, 66–74 (2015)
334 B. Tushir et al.
26. Cao, J., Yu, B., Dong, F., Zhu, X., Xu, S.: Entropy-based denial-of-service attack
detection in cloud data center. Concurr. Comput. Pract. Exp. 27, 5623–5639 (2015)
27. Erikarn How the ath9k transmit path works (2013). https://github.com/erikarn/
ath9k-docs/blob/master/ath9k-xmit.txt
28. Song, L., Striegel, A.: Leveraging frame aggregation to improve access point selec-
tion. In: 2017 IEEE Conference on Computer Communications Workshops (INFO-
COM WKSHPS), pp. 325–330 (2017)
29. Jiao, J., et al.: Detecting TCP-based DDoS attacks in Baidu cloud computing data
centers. In: 2017 IEEE 36th Symposium on Reliable Distributed Systems (SRDS),
pp. 256–258 (2017)
30. Roopak, M., Tian, G., Chambers, J.: Multi-objective-based feature selection for
DDoS attack detection in IoT networks. IET Netw. 9, 120–127 (2020)
31. Vishwakarma, R., Jain, A.: A honeypot with machine learning based detection
framework for defending IoT based botnet DDoS attacks. In: 2019 3rd Interna-
tional Conference on Trends in Electronics and Informatics (ICOEI), pp. 1019–1024
(2019)
32. Inamullah, M., Raman, B.: 11 ac frame aggregation is bottlenecked: revisiting
the block ACK. In: Proceedings of the 22nd International ACM Conference on
Modeling, Analysis and Simulation of Wireless and Mobile Systems, pp. 45–49
(2019)
33. Ginzburg, B., Kesselman, A.: Performance analysis of A-MPDU and A-MSDU
aggregation in IEEE 802.11 n. In: 2007 IEEE Sarnoff Symposium, pp. 1–5 (2007)
34. Saif, A., Othman, M., Subramaniam, S., Hamid, N.: An enhanced A-MSDU frame
aggregation scheme for 802.11 n wireless networks. Wirel. Pers. Commun. 66, 683–
706 (2012)
35. Song, L., Striegel, A., Mohammed, A.: Sniffing only control packets: a lightweight
client-side WiFi traffic characterization solution. IEEE Internet Things J. 8, 6536–
6548 (2020)
36. Ramanna, V.K., Sheth, J., Liu, S., Dezfouli, B.: IEEE Trans. Green Commun.
Netw. 5(4), 1833–1845 (2021)
37. Sheth, J., Miremadi, C., Dezfouli, A., Dezfouli, B.: EAPS: edge-assisted predictive
sleep scheduling for 802.11 IoT stations. IEEE Syst. J. 16(1), 591–602 (2021)
Supporting Cyber-Attacks and System
Anomaly Detection Research
with an Industry 4.0 Dataset
1 Introduction
• Our network data includes the traffic from three industrial communication
protocols, and one of them is an encrypted protocol.
The remainder of the paper is organised as follows. Section 2 provides a
literature review on existing datasets in the related fields. Section 3 describes
the Industry 4.0 manufacturing testbed and network architecture. In Sect. 4, we
present details of the attacks. Section 5 describes the dataset and data collection
details. In Sect. 6, we describe the setup of ML metrics and the results from
detecting cyber-attacks and anomalies. Finally, Sect. 7 concludes the paper.
2 Literature Review
Machine learning has been used to design intrusion detection systems (IDS) [15]
and it looks to be particularly effective in recognising cyber-attacks and anoma-
lies. It is critical to evaluate these systems so that their ability to detect attacks
can be assessed. Moreover, the current smart manufacturing system is compli-
cated and includes a system of systems. There is a necessity to create realistic
data from a sufficiently complex testbed.
There are widely used datasets such as KDDCup99 [16] and CTU-13
Dataset [9], however, they present the data in a traditional network with only
IT devices. As Industry 4.0 is a convergence of internet technology (IT) and
operation technology (OT), it is necessary to use the testbed with OT devices to
create both network data and physical data so that they can be used to explore
artificial intelligence techniques and applications in the industrial control sys-
tem (ICS) and cyber physical system (CPS). In recent years, some publications
have presented the data in an industrial control system or cyber physical sys-
tem. They focus on creating a dataset for critical infrastructures such as water
distribution and smart grid. Below is a summary of the papers.
The first three publications in the Table 1 are on the application of water dis-
tribution. In [5], the authors present a simple and real set up with a PLC, two
water tanks, two pumps and multiple sensors. Data in 15 situations, including
normal, cyber-attack and physical attacks, were collected. The dataset consists
of sensor data obtained from registers in the PLC. There is a lack of network
traffic in the dataset which makes it inadequate to have a comprehensive eval-
uation of an IDS. By contrast, the authors in [4] present a more complex and
comprehensive dataset of a real system in the Centre for Research in Cyber
Security. The testbed is called Singapore University Secure Water Treatment
(SWaT) and it consists of a full SCADA system with PLCs; human machine
interfaces (HMIs) and multiple water tanks; sensors and actuators in six differ-
ent stages. The dataset includes SWaT testbed runs without any attacks in the
first 7 days, followed by launched attacks for four days. Although the system
includes high-level SCADA device, the attacks were only launched against the
communication between PLCs and sensors.
In [3], an ICS dataset has been generated from a hybrid system in a hardware-
in-the-loop fashion. It provides both physical and network data so that the rela-
tions between cyber and physical aspects of the system can be explored. Datasets
338 L. Shi et al.
from [6,7] are from smart grid systems in which different controllers and commu-
nication protocols are used compared with an ICS. Finally, the authors from [23]
present two network datasets including Modbus and S7Comm, and then several
ML models are trained to detect anomalies.
To the best of our knowledge, no publication has presented the dataset from
a real Industry 4.0 smart factory, including both network and physical data. No
publication presents complex network data including multiple industrial com-
munication protocols with encrypted data. Instead, previous papers were mainly
focused on simple protocol Modbus. Moreover, there is not much discussion on
how the ML models trained by network and physical data complement each
other in building a detecting system.
Cyber Physical Factory is a learning and research platform from FESTO and it
is designed for Industry 4.0 and the Industrial internet of things (IIOT). It is
made of 6 modules. Starting from the storage cell, the system retrieves the back
cover, assembles PCB assembly and then presents the half-finished part to the
Symbiotic Cell.
As illustrated in Fig. 2, Symbiotic Cell is designed and built by the team
from Swinburne Factory of the Future to integrate with CPF and form a com-
prehensive production line. It models the technologies of networked production
and incorporates typical Industry 4.0 concepts and enabling technologies as a
modular and smart factory system. It consists of a Siemens PLC, a Siemens
HMI, a UR robot and a smart light system. An operator works side by side with
a UR robot, which is a collaborative robot, to finish the assembly of a portable
device. The dataset presented in this paper is mainly from the Symbiotic Cell.
340 L. Shi et al.
Unlike the datasets in previous papers [3,4,23] which focuses on MODBUS, our
testbed is a more realistic system with a mix of widespread industrial commu-
nication protocols including Profinet, S7Comm and S7CommPlus. As shown in
Diagram 1, Siemens PLC communicates with HMI using encrypted S7 Comm+
protocol and two siemens PLCs while the other systems in the Symbiotic cell use
unencrypted S7Comm and Profinet protocols. Other parts of the system use the
TCP/IP and some other common network protocols. Moreover, a MikroTik [11]
router is connected with the Symbiotic Cell and forwards all network packets
from the Symbiotic Cell to a Windows PC, and a virtual machine is used to
launch cyber-attacks through the router.
Both S7 Comm and S7Comm plus are Siemens proprietary protocols and
they use industrial ethernet standards and rely on ISO TCP(RFC1006). Com-
pared with S7 Comm, S7Comm plus is a new version of communication protocol
Supporting Cyber-Attacks and System Anomaly Detection Research 341
with encryption to prevent attacks such as replay attacks. In [10], the authors
demonstrate the encryption algorithms of S7CommPlus and a method to break
the anti-replay attack of Siemens PLC. Although packets using S7CommPlus
protocol have been recorded in our datasets, the analysis of S7Comm plus is
beyond the scope of this paper.
PROFINET is a leading Industrial Ethernet communication standard and
it is used to exchange data between controllers and peripheral devices for an
industrial control system. PROFINET is the most popular industrial ethernet
protocol in factory automaton in 2022 [20]. Compared with Modbus, which keeps
its simplicity, PROFINET is working towards integration with Industry 4.0.
Hence, PROFINET has more features with functional safety (PROFIsafe) and
allows for easier integration with machine to machine communication protocols
such as OPC UA [21]. In our evaluation section, we focus on the PROFINET
protocol, with an analysis based on the communication among the smart lights
(IO link) module, PLC and UR robot.
4 Attacks Details
In this work, four types of attacks including Denial of Service, Man-in-the-middle
attack, Malware, Disgruntled employee attack, and System malfunction were
launched within the testbed. We considered the first three of these cyber-attacks.
DoS attacks were launched to disrupt the manufacturing process and they are
intended to flood devices with packets. In our setup, the Internet Control Mes-
sage Protocol (ICMP) and Transmission Control Protocol (TCP) were used to
flood devices in the Symbiotic Cell of the testbed. ICMP is a Ping flood attack
with ICMP echo requests, while the latter is a TCP SYN flood attack in which
the attacker sends SYN packets as a part of a three-way handshake of TCP.
Unlike the results from other testbeds [3], the operation of our devices in the
symbiotic cell, including HMI, Smart lights module, PLC and Robot were not
affected by the flood of TCP SYN scan and ICMP. This could be because the
Profinet connected system in our setup comprises the latest Siemens PLC, HMI
and their compatible peripherals. We have designed robust hardware system to
showcase Industry 4.0 principles. However, as illustrated in Table 2 the cycle
time of Siemens PLC in the symbiotic Cell increased when it was is under ICMP
and TCP flooding attacks.
Figure 3 shows in more detail the cycle time of each time period. Data num-
bers 0–427 and 1811–2023 are the periods when no DoS attack happened. On the
other hand, 427–1266 and 1267–1810 are when PLC is under DoS attack. From
the observation from the Fig. 3, we can conclude that the average cycle time
342 L. Shi et al.
of PLC when under both ICMP and TCP SYN flooding attacks has increased.
Moreover, cycle time of individual sample can be misleading, so the authors
processed the data to include average cycle time in the presented dataset.
4.3 Malware
Siemens PLC and causes the failure of the uranium enrichment process. The
whole attack process is very complicated and costly, which includes a chain of
attacks to vulnerabilities in the Windows operation system, printer and TIA
Portal [13]. In our experiment, we simulate the attack by using similar steps
of the Stuxnet - PLC programs are modified and downloaded to PLC. The
dataset can be used to validate the effectiveness of the intrusion detection system
(IDS) against a modified PLC program. Hence, it is useful to the research for
the purpose of defending attacks towards PLC controlled physical systems like
Stuxnet.
In a smart factory, a few employees look after the operations of the whole factory.
If a disgruntled employee deliberately causes damage to production, it would be
difficult for an employer to detect, which could lead to costly damages to the
organisation. System malfunction can also cause a similar effect if the problem
is not found quickly by the production staff. And due to the complexity of the
production system in Industry 4.0, it is vital for technical staff to quickly detect
and locate the anomaly in the system.
Because cyber-attacks can cause similar damage to the production as this
type of problem, the dataset generated in this scenario can be adopted by
research in both areas, and the developed algorithm may be shared as well.
In our dataset, we create a scenario of a wrong part with an incorrect weight
that has been produced in the previous manufacturing steps or manually loaded
by the operator. This leads to the wrong product being assembled in production.
Table 3 describes each type of attack and the respective attacking tools.
5 Data Collection
As described in Sect. 3, the data is from equipment within the Symbiotic Cell,
MES and one module of CP factory. Because production is a process of manu-
facturing products one by one and step by step, it is a discrete process. For this
reason, unlike previous papers on critical infrastructure [3,4,23] which collect
data continuously and over a block of time, the authors in this paper collected
data using the cycle time in product production. Both physical data and network
data are collected in a scenario with different setups. For example, scenario one
is a normal production of four products including two temperature meters, one
barometric meter and two digital boards. The whole process is around 11 min
with around 3 min per product. There are four types of attacks in Table 3 and
dataset in a total of eight scenarios are presented. The details of each scenario
are described in Table 4. Figure 4 plots the total number of samples for network
and physical datasets.
344 L. Shi et al.
Physical data is collected using the logging function of Siemens PLC Tia
Portal, whereas Wireshark is used to collect network data.
The data of each scenario contains the same initialisation process. This is
because Wireshark needs a Profinet initialisation process to correctly dissect the
packets. After data is collected, they are saved as CSV files. An extra column
has been created for each set of data to characterise each record by two different
labels: normal and type of attack. The final form of the dataset is in two folders,
one is the original dataset and another is the processed dataset. The original data
folder contains the raw physical and network data gathered in the experiment,
whereas processed dataset folders contain processed datasets with labelled CSV
files which can be directly fed into the ML algorithms.
346 L. Shi et al.
Fig. 5. Distribution between labeled normal and anomalous samples of the physical
dataset
In our work, all the physical data was logged twice every second using Siemens
PLC’s internal data logging block [22] and saved into an SD card plugged into
the PLC. This function allows you to store process data in CSV format. A
sensor is a device to sense and measure physical values whereas actuators convert
the electrical signal into physical output. In fact, the advancement of sensor
technology is one of the main drivers in Industry 4.0. Table 5 below describes
the physical data from different sensors and actuators. The dataset includes
comprehensive data to represent the physical properties of all the devices in the
Symbiotic cells.
Supporting Cyber-Attacks and System Anomaly Detection Research 347
Network traffic was captured using Wireshark software. The collection process
for network traffic began when the PLC of the Symbiotic Cell is turned on. Fea-
tures were extracted from the pcap file using python and saved into CSV files.
As illustrated in Diagram 1, our testbed has a variety of networking devices
and four different protocols that are used around Symbiotic Cell. Our dataset
shows the complexity of an Industry 4.0 production line system, and each sub-
system is a system itself. Both S7Comm and Profinet are proprietary industrial
protocols with complicated data structure embedded in the packets. Moreover,
S7CommPlus uses encryption to avoid Eavesdropping during communication,
which makes it difficult to interpret the data. For this reason, in the valuation,
we only take into consideration part of the information as features. Table 6 shows
the parameters and formats used in the network data which we have selected for
our evaluation.
However, in the pcap files, all the data from all protocols have been presented.
They can be used for future research in relation to exploring packets in a testbed
with heterogeneous and encrypted protocols. It is not within the scope of this
paper to dive deep into this direction.
Although machine learning has been successfully applied in areas such as com-
puter vision and Natural Language Processing, its application in the Industry 4.0
area is still in the early stages. The dataset presented in this paper provides sup-
port to researchers in relation to the validation of machine learning algorithm.
The application is mainly for intrusion and anomaly detection, but can also be
extended to other areas such as predictive maintenance. In this section, we have
Supporting Cyber-Attacks and System Anomaly Detection Research 349
Table 7. Hyperparameters
NN RF SVM
Hyperparameters Number of layers:3 Number of Linear
Neurons per layer: Estimator: 20
20
Result of Physical Data. Table 8 has summarised the results of Recall, Pre-
cision and F1-score for each scenario. In general, NN has the best performance
of all three models; RF also shows good results except in Scenario 6; in contrast,
SVM is the model that obtains the worst results.
In the scenarios on DoS attacks to PLC, all three models return better per-
formance in Scenario 2 than 1. This fits our prediction in Sect. 3 where we show
that TCP flooding affects PLC’s cycle time more than ICMP attacks. Scenario
3, 4 and 5 show acceptable results for all three models. On the other hand, these
algorithms do not show good result in Scenario 6. This might be because the
part with the wrong weight did not create enough changes to the readings of the
sensors. In fact, SVM cannot generate a result for anomaly at all and returns a
value of 0 for all three metrices. Scenario 5 achieves better results as it changes
the combination of some values in the PLC program which can be detected by
our models.
Scenarios NN RF SVM
Recall Precision F1 Score Recall Precision F1 Score Recall Precision F1 Score
1 DoS ICMP 0.87 0.88 0.88 0.87 0.86 0.86 0.59 0.95 0.73
2 DoS TCP flooding 0.92 0.96 0.94 0.94 0.95 0.95 0.70 0.80 0.75
3 MITM 0.91 0.92 0.91 0.88 0.90 0.89 0.75 0.91 0.82
4 Slow Down Robot 0.99 1.00 1.00 1.00 1.00 1.00 0.84 0.94 0.89
5 Wrong part 0.87 0.85 0.86 0.90 1.00 0.95 0.72 0.97 0.83
6 Wrong weight 0.80 0.50 0.62 0.33 0.14 0.20 0.00 0.00 0.00
Scenarios NN RF SVM
Recall Precision F1 score Recall Precision F1 score Recall Precision F1 score
1 DoS ICMP 1.0 0.99 1.0 1.0 1.0 1.0 0.78 0.64 0.70
2 MITM 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0 1.0
3 Slow Down Robot 0.90 0.00 0.00 0.84 0.00 0.00 0.00 0.00 0.00
1. Network dataset requires additional device to collect all the packets in the
network. In our setup, a MikroTik router has been added to the system to
forward all packets.
2. Although network dataset includes the current state of physical process, it is
hard for the data to be extracted because of its encryption and proprietary
industrial communication protocols.
3. Models that are trained by physical data perform well in predicting anomalies
and cyber-attacks in our experiment. And physical dataset is easily obtained
from PLC.
Moreover, in our experiment, although the models trained by network data per-
form well in Scenarios 1 and 2 with cyber-attacks, there are other simpler meth-
ods to detect attacks in the network traffic instead of machine learning. For
352 L. Shi et al.
7 Conclusion
Industry 4.0 has already started to generate a significant impact on the current
industry. The fusion of IT and OT is driving the development of smart factory,
but this also makes the system more vulnerable to cyber-attacks. At the same
time, this change leads to more a complicated system and it creates difficulties
in detecting the anomalies in the system. We believe machine learning tech-
niques have the potential to solve these problems. But a lack of datasets from
a realistic and contemporary Industry 4.0 system is one of the main barriers
to researchers. In this work, we present a dataset obtained from an Industry
4.0 system. The testbed has enough complexity to generate datasets for the
purpose of cyber-security and anomaly detection research. It is comprised of a
system called Symbiotic Cell and Festo Cyber Physical Factory. We created six
attack scenarios and then deploy attacks to generate both network and physi-
cal datasets. In both datasets, each row has been labelled as either normal or
a type of attack. Finally, experiments have been implemented to quantify the
performance of three ML algorithms. Results show that ML classifiers trained by
our datasets perform well in detecting all the attack types and anomalies except
one scenario. On the other hand, although network data is adequate to train
ML algorithms in our experiment, it is difficult to extract payload data from
network data in a complicated and realistic Industry 4.0 system. In addition,
cyber-attacks may not have an impact on the physical process, in which case the
network dataset can complement the physical data. Hence, physical and network
data can be a good combination to build a robust system in detecting attacks
and anomaly.
References
1. Market and markets. https://www.marketsandmarkets.com/Market-Reports/
industry-4-market-102536746.html. Accessed 4 Sep 2022
2. Deloitte. https://www2.deloitte.com/global/en/pages/real-estate/articles/future-
real-estate-data-new-gold.html. Accessed 4 Sep 2022
3. Faramondi, L., Flammini, F., Guarino, S., Setola, R.: A hardware-in-the-loop water
distribution testbed dataset for cyber-physical security testing. IEEE Access 9,
122385–122396 (2021). https://doi.org/10.1109/ACCESS.2021.3109465
4. Goh, J., Adepu, S., Junejo, K., Mathur, A.: A Dataset to Support Research in the
Design of Secure Water Treatment Systems (2016)
5. Laso, P., Brosset, D., Puentes, J.: Dataset of Anomalies and Malicious Acts in
a Cyber-Physical Subsystem. Data in Brief, 14 (2017). https://doi.org/10.1016/j.
dib.2017.07.038.
Supporting Cyber-Attacks and System Anomaly Detection Research 353
6. Biswas, P.P., Tan, H.C., Zhu, Q., Li, Y., Mashima, D., Chen, B.: A synthesized
dataset for cybersecurity study of IEC 61850 based substation. In: 2019 IEEE
International Conference on Communications, Control, and Computing Technolo-
gies for Smart Grids (SmartGridComm), pp. 1–7 (2019). https://doi.org/10.1109/
SmartGridComm.2019.8909783
7. Ahmed, C., Kandasamy, N.K.: A Comprehensive Dataset from a Smart Grid
Testbed for Machine Learning Based CPS Security Research (2021). https://doi.
org/10.1007/978-3-030-69781-5_9
8. Shi, L., Chen, X., Wen, S., Xiang, Y.: Main Enabling Technologies in Industry
4.0 and Cybersecurity Threats (2020). https://doi.org/10.1007/978-3-030-37352-
8_53
9. CTU-13 Dataset. https://www.stratosphereips.org/datasets-ctu13. Accessed 31
May 2022
10. Cheng, L., Donghong, L., Liang, M.: The spear to break the secu-
rity wall of S7CommPlus (2017). https://media.defcon.org/DEFCON25/
DEFCON25presentations/ChengLei/DEFCON-25-Cheng-Lei-The-Spear-to-
Break-the-SecurityWall-of-S7CommPlus-WP.pdf. Accessed 10 Sep 2022
11. MiroTic Homepage. https://mikrotik.com/. Accessed 10 Sep 2022
12. The Real Story of Stuxnet. https://spectrum.ieee.org/the-real-story-of-stuxnet.
Accessed 10 Sep 2022
13. Tia Portal: https://new.siemens.com/global/en/products/automation/industry-
software/automation-software/tia-portal.html. Accessed 10 Sep 2022
14. Kumar, M.: Irongate - New Stuxnet-like Malware Targets Industrial Control
Systems (2016). https://thehackernews.com/2016/06/irongate-stuxnet-malware.
html. Accessed 10 Sep 2022
15. KishorWagh, S., Pachghare, V., Kolhe, S.: Survey on intrusion detection system
using machine learning techniques. Int. J. Comput. App. 78, 30–37 (2013). https://
doi.org/10.5120/13608-1412
16. KDD Cup 99 Dataset. http://kdd.ics.uci.edu/databases/kddcup99/kddcup99.
html. Accessed 10 Sep 2022
17. Scapy homepage. https://scapy.net/. Accessed 10 Sep 2022
18. Ettercap Scapy homepage. https://www.ettercap-project.org/. Accessed 10 Sep
2022
19. Ettercap Scapy homepage. https://scikit-learn.org/stable/. Accessed 10 Sep 2022
20. Carlsson, T.: Industrial networks keep growing despite challenging times (2022).
https://www.hms-networks.com/news-and-insights/news-from-hms/2022/05/
02/industrial-networks-keep-growing-despite-challenging-times. Accessed 10 Sep
2022
21. Dias, A.L., Sestito, G.S., Turcato, A.C., Brandão, D.: Panorama, challenges and
opportunities in PROFINET protocol research. In: 2018 13th IEEE International
Conference on Industry Applications (INDUSCON, pp. 186–193 (2018). https://
doi.org/10.1109/INDUSCON.2018.8627173
22. Siemens: Recording and monitoring process data (2020). https://support.industry.
siemens.com/cs/attachments/64396156/64396156_S7-1x00_DataLogging_
DOC_V4.0_en.pdf. Accessed 10 Sep 2022
23. Gomez, A.L., et al.: On the generation of anomaly detection datasets in industrial
control systems. IEEE Access 7, 177460–177473 (2019). https://doi.org/10.1109/
ACCESS.2019.2958284
Privacy-Preserving Machine Learning
Protocols and Systems
The Force of Compensation,
a Multi-stage Incentive Mechanism Model
for Federated Learning
1 Introduction
In this era of AI, more and more complex applications based on machine learn-
ing are being introduced into our daily lives. It is now possible to train a highly
accurate machine learning model by feeding it vast amounts of real-world data.
However, we are also in an era with an emphasis on privacy protection, and
various privacy protection regulations around the world, such as the GDPR in
the EU [3], restrict data sharing. This creates a significant problem for machine
learning where training a well-performing model invariably means accessing pri-
vate data - and lots of it. In this context, federated learning, an inherently private
learning scheme introduced by Google in 2016 [6–8], has received much atten-
tion. With federated learning, participants train a model collaboratively without
ever needing to expose their sensitive raw data. An initialised global model is
distributed to the data owners (clients) via a federated learning server, and each
client trains the model locally using its own private data. Only the updated
parameters of the model are then uploaded to the server for aggregation. After
the uploaded parameters have been integrated, the server sends the updated
model back to the clients for further training. This process is repeated until the
accuracy of the model reaches its target.
In the years since 2016, the concept of federated learning has been expanded
to include horizontal federated learning, vertical federated learning, and fed-
erated migrated learning [13], while the participants fall into two groups: the
model owners and the data owners. The architecture of a simple federated learn-
ing scheme is shown in Fig. 1. The data owners consume their resources to collect,
clean and process large quantities of qualified training data. They also provide
the computational and communication resources required for local training. The
model owners consume resources throughout the training process for parameter
integration, model tuning, optimisation, and more. Thus, an incentive mecha-
nism is needed to compensate both parties for the resources consumed and to
motivate them to collaborate. To maximise performance, both parties need to
contribute their resources to the fullest degree. However, the privacy-preserving
mechanisms within the federated learning paradigm creates information asym-
metry between the participants causing a double ethical risk problem where
neither side’s effort is observable. In addition, there is often a cost associated
with the effort, which may lead to self-interested, opportunistic behaviour on
both sides given the disparity of interests and the information asymmetry. Con-
sider a practical example: a medical association with several hospital members
wants to work with a company that specialises in image recognition to build
an automated CT image recognition model that can label suspected lung can-
cer nodules in CT images. The medical association cannot observe how much
effort the model provider puts into the training, and nor can the model provider
observe whether the healthcare association is putting enough effort into collect-
ing and processing high-quality/quantity training data. Both parties can only
directly observe the training results at particular stages. As such, there is a
double ethical risk in this kind of federated learning case.
Much work has been done on different aspects of incentive mechanisms for
federated learning - work that can be found in some of the recently published
state-of-art surveys [16,17]. Currently, most reward-based incentive mechanisms
focus on model owner-led reward schemes. These are typically designed to max-
imise federated learning outcomes for model owners, while minimising the incen-
tives offered to the data owners. However, to the best of our knowledge, the issue
of dual ethical risk in federated learning has not been addressed. Hence, in this
paper, we propose an incentive mechanism that differs from the status quo. In
our mechanism, the data owners are Stackelberg game leaders, which address the
above dual ethical risk. Our focus is on the ethical risk problems with federated
A Multi-stage Incentive Mechanism Model for Federated Learning 359
learning, i.e., how to gauge the implicit efforts of both groups of participants
and how this problem might be countered using multi-stage game theory. This
is our focus because the implicit efforts targeted by our incentive mechanism are
highly significant to the success of federated learning schemes.
To this end, our research examines the game between data owners and model
owners within a federated learning process, where the efforts of neither party
are directly observable. The solution involves a multi-stage incentive mechanism
designed for two parties, where the incentive contract is defined before the start
of training.
Our contribution to the literature is insight into an optimal multi-stage incen-
tive contract and an endogenous optimal payoff point description. More specifi-
cally, this article shows that the optimal scheme for the data owner who leads the
incentive contract should, to the extent possible, return all later stages incentive
payments to the model owner.
The remainder of the paper is structured as follows. Section 2 reviews the
existing incentive mechanisms for federated learning. Section 3 presents the
incentive mechanism model used in our research and the results, and Sect. 4
provides a simulation example to validate the model. Finally, conclusions and
future work are drawn in Sect. 5.
2 Related Works
This section positions our research within the existing literature by reviewing
relevant studies on incentive mechanisms for federated learning.
360 H. Xu et al.
possibility of dual ethical risk. Based on the discussion in the previous section,
no existing incentive mechanism has suitably addressed this issue. This section
introduces a multi-stage incentive mechanism model based on contract theory. It
addresses the dual ethical risks associated with federated learning while incen-
tivising both parties to cooperate successfully. Note that, for simplicity, the game
assumes one data owner and one model owner. A contract-theoretic solution for
federated learning scenarios with more than one data owner is left to future
work.
The two participants in our model, the data owner and the model owner, are
risk-neutral. Both parties agree that the entire training process will be conducted
in K stages, with both parties jointly checking the training results at the end
of each stage to confirm that the training was successful. Additionally, both
parties agree that the contract cannot be ended earlier than these K stages
unless the training fails. We assume that the effort value committed by the data
owner at stage k is Dek , and the effort value committed by the model owner
at stage k is M ek . Dek and M ek are both uncorrelated variables. Furthermore,
Dek ≥ 0, M ek ≥ 0.
Table 1 lists the notations commonly used in this paper for ease of reference.
Notation Description
k Training stages, k = 1, · · · K.
M ek The effort committed by the model owner at stage k
Dek The effort committed by the data owner at stage k
Pk (M ek , Dek ) The probability of successful training at stage k
C(M ek ) The effort cost of the model owner at stage k
C(Dek ) The effort cost of the data owner at stage k
Vk The incremental value of the model after stage k
Mk The market value of the model at stage k
Ik The data owner’s costs at stage k
DRk Total expected revenue of the data owner from stage k to K
M Rk Total expected revenue of the model owner from stage k to K
Rk The reward received by the model owner if training success at stage k
Xk (M ek , Dek ) The model’s performance at stage k
φ, ν The weight parameters of the model at stage k
Naturally, the performance of a model, e.g., the accuracy of its inferences, will
be higher if the data owner contributes more effort to providing more and higher
quality data. Similarly, if the model owner puts in more effort, such as improving
362 H. Xu et al.
the algorithm, model performance will also increase. The model’s performance
is assumed to be
ν
Xk (M ek , Dek ) = 1 − e−φ(M ek ,Dek ) ,
The following assumptions are made over the probability that training at
stage k will be successful:
Pk (M ek , Dek ),
and
∂ 2 Pk (M ek , Dek ) ∂ 2 Pk (M ek , Dek )
< 0, < 0, (k = 1, · · · , K).
∂M ek 2 ∂Dek 2
A Multi-stage Incentive Mechanism Model for Federated Learning 363
Before entering the federated learning scheme, the data owner and the model
owner need to agree on the reward Rk > 0 (k = 1, · · · , K) and set up the
contract. The model owner receives Rk from the data owner after training is
confirmed to be successful in stage k. According to the contract, the model
owner commits the optimal level of effort M ek ∗ to maximise their expected
return M Rk . At the same time, the data owner also to commit the optimal level
of effort Dek ∗ to maximise DRk . If the training result is successful at the end
of stage k, the value of the updated model held by the data owner increases by
Vk , and the model owner receives the reward Rk from the data owner. Training
then proceeds to the next stage. If stage k training fails, both the model owner
and the data owner gain nothing for that stage. Note that the optimal strategy
for the Stackelberg game leader is to not reward the follower for failure at each
stage of the game [1,2]. Both parties will pay C(M ek ) and C(Dek ) regardless of
success or failure. Thus, the following recursive equation describes the profit of
the data owner and the model owner,
In our model, the contract is set before the first phase. The relevant payoffs
in the first phase are DR1 for the data owner and M R1 for the model owner.
Note that the payoff for stage k is directly effected by the payoffs for stage k + 1.
Expanding the above recursive equations, we have:
⎧ ⎫
K ⎨ k ⎬
M Rm = Pj (M ej , Dej )Rk
⎩ ⎭
k=m j=m
⎧ ⎫ (3)
K ⎨ k−1 ⎬
− Pj (M ej , Dej )C(M ek )
⎩ ⎭
k=m j=m
and
⎧ ⎫
K ⎨
k ⎬
DRm = Pj (M ej , Dej )(Vk − Rk )
⎩ ⎭
k=m j=m
⎧ ⎫ (4)
K ⎨ k−1
⎬
− Pj (M ej , Dej )C(Dek ) .
⎩ ⎭
k=m j=m
A Multi-stage Incentive Mechanism Model for Federated Learning 365
In this section, we outline the findings of the above model, beginning with the
optimal effort Dek ∗ of the data owner.
The derivative of the data owner’s payoff with respect to their effort Dek
from Eq. 2 is
Corollary 1. The optimal effort of the data owner is a function of the incre-
mental value of the model, the reward to the model owner, and the data owner’s
expectation of future payoffs. Reducing the reward to the model owner and
increasing the incremental value of the model and the data owner’s expectations
for the future should motivate the data owner to put in more effort and reduce
their ethical risk.
In the same way, we can solve the optimal effort M ek ∗ of the model owner.
The derivative of the model owner’s payoff with respect to it’s effort M ek from
Eq. 1 is
Corollary 2. The optimal effort level of the model owner is positively correlated
with the reward and their expected future payoff. Higher rewards from the data
owner and increasing the model owner’s future expectations should motivate the
model owner to work harder and reduce any ethical risks.
Based on Corollaries 1 and 2, we have the following conditions:
dPk (M ek ,Dek )
dDek (Vk − Rk + DRk+1 ) = dC(De k)
dDek ;
dPk (M ek ,Dek ) (10)
dM ek (Rk + M Rk+1 ) = dC(M ek )
dM ek (k = 1, · · · , K).
Corollary 3. An optimal incentive mechanism should be such that the marginal
benefit of each participant’s effort equals their marginal cost.
Given the optimal level of effort M ek ∗ and Dek ∗ for the model owner and
data owner, M Rm in Eq. 3 satisfies the following conditions:
∂M Rm
k
= Pj (M ej ∗ , Dej ∗ ) (k = 1, · · · , K; m ≤ k). (11)
∂Rk j=m
Corollary 4. The marginal utility of the rewards diminishes for the model
owner over time. Therefore, to encourage the model owner to increase their
effort, the rewards for the model owner in the incentive mechanism should be
gradually increased as training continues. This should mean the incentive mech-
anism stays effective in motivating the model owner to work hard.
The optimal incentive Rk ∗ > 0 (k = 1, · · · , K) for the model owner is
determined before starting the first stage of training. Therefore, the optimal
payoff Rk ∗ of the data owner can also be solved. The first-order condition of
data owner with respect to payoff Rk from Eq. 2 is
∂DR1 ∂M R2
= P1 (M e1 ∗ , De1 ∗ )M e1 ∗
∂Rk Ri ∗ ,i=1,··· ,K ∂Rk
∗ ∗ ∗ ∂DR2
+P1 (M e1 , De1 )De1 (V1 − R1 + DR2 )
∂Rk
∂DR2 ∂DR2
+ P1 (M e1 ∗ , De1 ∗ ) − C (De∗1 )De∗1 = 0.
∂Rk ∂Rk
(14)
A Multi-stage Incentive Mechanism Model for Federated Learning 367
∗ ∗k
From Corollary 4, we can derive ∂M R2
∂Rk = j=2 Pj (M ej , Dej ) and from
Corollary 1, we can derive P1 (M e1 ∗ , De1 ∗ )(V1 −R1 +DR2 )−C (De1 ∗ ) = 0, V1 −
R1 + DR2 > 0. Substituting both of these into Eq. 14 and rearranging the terms
yield:
De1 ∗ [P1 (M e1 ∗ , De1 ∗ )(V1 − R1 + DR2 ) − C (De1 ∗ )] + P1 (M e1 ∗ , De1 ∗ )
⎡ ⎤
∂DR2
k
+ P1 (M e1 ∗ , De1 ∗ )M e1 ∗ ⎣ Pj (M ej ∗ , Dej ∗ )⎦ (V1 − R1 + DR2 ) = 0.
∂Rk j=2
(15)
Then,
∂DR2 1
=− P1 (M e1 ∗ , De1 ∗ )M e1 ∗
∂Rk Ri ∗ ,i=1,··· ,K P1 (M e1 ∗ , De1 ∗ )
⎡ ⎤
(16)
k
⎣ Pj (M ej , Dej )⎦ (V1 − R1 + DR2 ) < 0.
∗ ∗
j=2
Corollary 5. The expected payoff to the model owner increases marginal utility
for the data owner over time. Intuitively, the data owner always wants to delay
the reward to the model owner, while the model owner wants to receive the reward
as early as possible. For the data owner, the later the reward is given to the model
owner, the more likely it is for ethical risk to be avoided.
From Corollary 5, for k > 1,
∂DR1 ∂M R2 ∂DR2
= P1 (M e1 ∗ , De1 ∗) M e1 ∗ + P1 (M e1 ∗ , De1 ∗) De1 ∗
∂Rk ∂Rk ∂Rk
∂DR ∂DR2
(V1 − R1 + DR2 ) + P1 (M e1 ∗ , De1 ∗) − C(De1 ∗ ) De1 ∗
2
.
∂Rk ∂Rk
(18)
For every m < k,
∂DRm ∂M Rm+1
= Pm (M em ∗ , Dem ∗) M em ∗
∂Rk ∂Rk
∂DR
+ Pm (M em ∗ , Dem ∗) Dem ∗
m+1
(Vm − Rm + DRm+1 ) (19)
∂Rk
∂DRm+1 ∂DRm+1
+ Pm (M em ∗ , Dem ∗) − C(Dem ∗ ) Dem ∗ ,
∂Rk ∂Rk
368 H. Xu et al.
∂DRk
=[Pk (M ek ∗ , Dek ∗) M e∗k − Pk (M ek ∗ , Dek ∗) De∗k ](Vk − Rk + DRk+1 )
∂Rk
− Pk (M ek ∗ , Dek ∗) + C(Dem ∗ ) De∗k .
(20)
From Corollary 1, we can derive Pk (M ek ∗ , Dek ∗) (Vk − Rk + DRk+1 ) −
∗
C(Dek ) = 0, and substituting this into the three equations above, we have
⎛ ⎞
∂DR1 ⎝
k k
1
= Pj (M ej ∗ , Dej ∗ )⎠
∂Rk j=1
P (M ei ∗ , Dei ∗ )
i=1 i
(21)
k
∗ ∗ ∗ ∗ ∗
Pi (M ei , Dei )M ei [Vi − Ri + DRi+1 ] − Pj (M ej , Dej ),
j=1
and
∂DR1 ∂DR1
= Pk+1 (M ek+1 ∗ , Dek+1 ∗ )
∂Rk+1 ∂Rk
⎛ ⎞
k
(22)
+⎝ Pj (M ej ∗ , Dej ∗ )⎠ Pk+1 (M ek+1 ∗ , Dek+1 ∗ )
j=1
Since ∂DR1
∂Rk = 0, from Eq. 22, we can derive Vk+1 − Rk+1 +
Ri ∗ ,i=1,··· ,K
DRk+2 = 0. It is known that DRK+1 = 0, so it follows that RK ∗ = VK , so
DRK = 0. Similarly, for any δ, there is 1 ≤ δ ≤ K − 1. If M eδ ∗ > 0 and
Rδ ∗ > 0, then:
∗
Rk = Vk (k = δ + 1, · · · , K).
(23)
DRk = 0 (k = δ + 1, · · · , K).
Then,
j
δ−1
∗ ∗ ∗
DR1 = Pi (M ei , Dei )(Vj − C(Dei ))
j=1 i=1
δ−1 (24)
∗ ∗ ∗ ∗
+ Pi (M ei , Dei ) Pδ (M eδ , Deδ )[Vδ − Rδ ].
i=1
A Multi-stage Incentive Mechanism Model for Federated Learning 369
Theorem 1. The data owner can receive their optimal payoff at point δ during
training such that
∗
Rk = 0 (k < δ),
(25)
Rk ∗ = Vk ∗ , DRk ∗ = 0 (k > δ),
and
⎧
⎨ DR1 ≥ δ−1 j ∗ ∗
− C(Dej ∗ ) ,
i=1 Pi (M ei , Dei ) Vj
j=1
(26)
⎩ DR1 ≤ δ j ∗ ∗
− C(Dej ∗ ) .
j=1 i=1 Pi (M ei , Dei ) Vj
Theorem 1 shows an optimal payoff point for the data owner, where the
data owner receives the total payoff from the federated learning process and the
reward given to the model owner is zero in phases 1 − δ. However, after that
point, the data owner does not have any profit, the expected future payoffs are
zero, and the benefit goes entirely to the model owner. Thus, point δ is the
optimal payoff point for the data owner. Essentially, what Theorem 1 indicates
is that, for a federated learning scenario initiated by the data owner, the optimal
incentive scheme is one where as much of the incremental value of the model as
possible is paid to the model owner. Therefore, success in the later stages of
training is based on the success in the earlier stages and, in turn, rewards in the
later stages incentivise effort in the earlier stages. Overall, giving back as much
of the value created by the model owner’s efforts as possible in the later stages
is the least costly incentive scheme for the data owner.
4 Experimental Evaluation
To complement the analytical findings and evaluate the performance of our incen-
tive mechanism for federated learning, we create a multi-stage contract simulator
for the data and model owners. The simulator evaluates the impact of different
reward settings on the level of effort contributed by each participant and gives
the total payoff for both parties.
Figure 4 shows the optimal rewards yielded for the model owner, calculated by
recurring the above equations in Table 2 and the derivative of the data owner’s
payoff dr1 with respect to the reward R2 ∗ :
R1 ∗ = 0, R2 ∗ = 0.4085, R3 ∗ = 3,
payoff point for the data owner is δ = 2, and R1 ∗ = 0, R3 ∗ = V3 , and 0 < R2 <
V2 . The data owner’s expected payoff is dr1 = 0.3608, which is consistent with
Theorem 1,
dr1 ≥ P1 (M e1 ∗ , De1 ∗ )(V1 − De1 2 ) = 0.2878,
dr1 ≤ P1 (M e1 ∗ , De1 ∗ )(V1 − De1 2 ) + P2 (M e2 ∗ , De2 ∗ )(V2 − De2 2 ) = 1.1841.
We have taken some relevant data from the simulator to make it easier to
understand, as shown in Table 3. This table shows the effects of the reward value
settings at different stages on the efforts of the participants and the expected
payoff for the data owner in the incentive contract. Some settings around the
optimal one have been selected as comparisons: R1 ∗ = 0, R2 ∗ = 0.4085, R3 ∗ = 3.
From the results, we can see that:
372 H. Xu et al.
Thus, we can conclude that our model is able to reduce the dual ethical
risk of federated learning due to information asymmetry. It can motivate the
participants to exert an optimized effort to training, confirming the intuition
behind our model that the success in the later stages is based on success in the
earlier stages. Thus, rewards in the later stages incentivise efforts in the earlier
stages. Moreover, giving back as much of the value created by the model owner’s
efforts in the later stages is the least costly incentive scheme for the data owner.
In this paper, we have used the framework of a dynamic game to investigate the
dual ethical risk problem between model owners and data owners in federated
learning. The model used is novel and it has derived optimal incentive payoff
contracts for the data and model owners through two sets of analyses: one for a
multi-stage incentive payoff game and the other for the dual ethical risk affecting
the contract design. The output is an optimal payoff point for the data owners.
Our approach has provided insights into the characteristics of optimal incentive
contracts between data owners and model owners in federated learning schemes,
including their endogenous optimality. Specifically, our study has shown that, for
a federated learning scenario initiated by the data owner, the optimal incentive
scheme is one where as much of the incremental value of the model as possible is
paid to the model owner. There could be several possible extensions of this paper,
which requires further research in this field. First, we explored the dual ethical
risk problem in the data owner-led federated learning scenario using a multi-stage
incentive model. Further work will extend this model in other scenarios and can
be compared comprehensively with existing incentive mechanisms. Second, we
negated the possibility of multiple data owners to treat them as a single entity. It
would be interesting to consider multi-data owners joining the game at different
stages as a possible extension to our proposed model. The third extension of this
paper would be to investigate how the efforts of model and data owners with fair
preferences in the later stages of cooperation (based on fair preference theory)
are affected by the value of benefits and new compensation schemes.
A Multi-stage Incentive Mechanism Model for Federated Learning 373
References
1. Bergemann, D., Hege, U.: Venture capital financing, moral hazard, and learning.
J. Banking Financ. 22(6–8), 703–735 (1998)
2. Elitzur, R., Gavious, A.: A multi-period game theoretic model of venture capitalists
and entrepreneurs. Eur. J. Oper. Res. 144(2), 440–453 (2003)
3. European Parliament, C.o.t.E.U.: Guide to the general data protection regulation
(2018). https://www.gov.uk/government/publications/guide-to-the-general-data-
protection-regulation
4. Feng, S., Niyato, D., Wang, P., Kim, D.I., Liang, Y.C.: Joint service pricing and
cooperative relay communication for federated learning. In: 2019 International
Conference on Internet of Things (iThings) and IEEE Green Computing and
Communications (GreenCom) and IEEE Cyber, Physical and Social Computing
(CPSCom) and IEEE Smart Data (SmartData), pp. 815–820. IEEE (2019)
5. Jia, R., et al.: Towards efficient data valuation based on the Shapley value. In:
The 22nd International Conference on Artificial Intelligence and Statistics, pp.
1167–1176. PMLR (2019)
6. Konečnỳ, J., McMahan, H.B., Ramage, D., Richtárik, P.: Federated optimiza-
tion: Distributed machine learning for on-device intelligence. arXiv preprint
arXiv:1610.02527 (2016)
7. Konečnỳ, J., McMahan, H.B., Yu, F.X., Richtárik, P., Suresh, A.T., Bacon, D.: Fed-
erated learning: Strategies for improving communication efficiency. arXiv preprint
arXiv:1610.05492 (2016)
8. McMahan, H.B., Moore, E., Ramage, D., y Arcas, B.A.: Federated learning of deep
networks using model averaging. arXiv preprint arXiv:1602.05629 (2016)
9. Nowak, A.S., Radzik, T.: The Shapley value for n-person games in generalized
characteristic function form. Games Econom. Behav. 6(1), 150–161 (1994)
10. Sim, R.H.L., Zhang, Y., Chan, M.C., Low, B.K.H.: Collaborative machine learn-
ing with incentive-aware model rewards. In: International Conference on Machine
Learning, pp. 8927–8936. PMLR (2020)
11. Toyoda, K., Zhang, A.N.: Mechanism design for an incentive-aware blockchain-
enabled federated learning platform. In: 2019 IEEE International Conference on
Big Data (Big Data), pp. 395–403. IEEE (2019)
12. Tu, X., Zhu, K., Luong, N.C., Niyato, D., Zhang, Y., Li, J.: Incentive mechanisms
for federated learning: From economic and game theoretic perspective. IEEE Trans.
Cogn. Commun. Netw. 8, 1566–1593 (2022)
13. Yang, Q., Liu, Y., Chen, T., Tong, Y.: Federated machine learning: concept and
applications. ACM Trans. Intell. Syst. Technol. (TIST) 10(2), 1–19 (2019)
14. Yu, H., et al.: A fairness-aware incentive scheme for federated learning. In: Pro-
ceedings of the AAAI/ACM Conference on AI, Ethics, and Society, pp. 393–399
(2020)
15. Yu, H., et al.: A sustainable incentive scheme for federated learning. IEEE Intell.
Syst. 35(4), 58–69 (2020)
16. Zeng, R., Zeng, C., Wang, X., Li, B., Chu, X.: A comprehensive survey of incentive
mechanism for federated learning. arXiv preprint arXiv:2106.15406 (2021)
17. Zhan, Y., Zhang, J., Hong, Z., Wu, L., Li, P., Guo, S.: A survey of incentive
mechanism design for federated learning. IEEE Trans. Emerg. Top. Comput. 10,
1035–1044 (2021)
18. Zhang, W., et al.: Blockchain-based federated learning for device failure detection
in industrial IoT. IEEE Internet Things J. 8(7), 5926–5937 (2020)
A Privacy-Preserving Distributed
Machine Learning Protocol Based
on Homomorphic Hash Authentication
Yang Hong1(B) , Lisong Wang1 , Weizhi Meng2 , Jian Cao3 , Chunpeng Ge1 ,
Qin Zhang1 , and Rui Zhang1
1
College of Computer Science and Technology, Nanjing University of Aeronautics
and Astronautics, Nanjing 211106, China
{hongyang,wangls}@nuaa.edu.cn
2
DTU Compute, Technical University of Denmark, Lyngby, Denmark
3
School of Cyber Science and Engineering, SouthEast University, Nanjing, China
1 Introduction
Machine Learning has become an indispensable supporting technology for Big
Data, Internet of Things (IoT), and Cloud Computing. However, the risk of pri-
vacy leakage exists in all phases of machine learning, including data acquisition,
model training, and model prediction, which poses potential challenges to the
state of machine learning.
How to balance the relationship between data interaction and privacy pre-
serving has become a crucial issue. At present, researchers often adopt obfusca-
tion and cryptography methods to fulfill these requirements. Obfuscation oper-
ation is realized by randomization, noise addition, and other differential-privacy
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 374–386, 2022.
https://doi.org/10.1007/978-3-031-23020-2_21
A Privacy-Preserving Distributed Machine Learning Protocol 375
2 Related Work
A potential solution for secure aggregation in privacy preserving machine learn-
ing is utilizing cryptographic approaches, including multi-party computation
(MPC), homomorphic encryption, or differential privacy. MPC technique mainly
adopts Garbled Circuit (GC), Secret Sharing, and Oblivious transfer [17,20,23].
However, the bottleneck of Garbled Circuit is the high communication overhead,
and requirement of offline computation [3]. Burkhart et al. [7] focused on the
optimization of MPC in terms of network security and supervision. Homomor-
phic encryption is one cryptographic primitive that usually applied to encrypted
data aggregation [18]. However, computation complexity in encryption field is
another obstacle for homomorphic encryption, and simultaneously it relies on
the size of encrypted data [8]. Differential privacy mainly masks the initial data
by adding noise data to protect sensitive data information, which does not affect
the computation outcome significantly [9]. However, this noise insertion approach
entails the trade-off between privacy and accuracy.
For the parameters, secure aggregation in distributed machine learning
domain, Bonawitz et al. [5] proposed the secure aggregation method. While this
functionality enabled a broad range of offline computational tasks, scaling con-
cerns limited its scope of use. Therefore, Bell et al. [1] proposed the secure aggre-
gation achieving polylogarithmic communication and computation per client,
which improved the asymptotics for secure aggregation. To solve the problem
that the overhead of secure aggregation grows quadratically with the number
of users [5], So et al. [22] adopted Turbo-Aggregate method with n users which
achieved a secure aggregation O(n log n), as opposed to O(n2 ). Different from
secure centralized computation, Liu et al. [12] proposed a collaborative privacy-
preserving learning system based on deep learning, which cannot share local
data with the servers. Shokri and Shmatikov [21] proposed a solution by sharing
the model’s gradients among clients during the training process via parameter
servers. Nasr et al. [16] then improved the efficiency observably, while ignoring
the risk of parameter leakage poses a potential threat to the model. Therefore,
comparing with the existing research work, this paper mainly focuses on how to
prevent parameter leakage or being eavesdropped during transferring process.
Our privacy-preserving protocol adopts secret sharing scheme and achieves the
verifiable property by combining it with homomorphic hash verification function.
3 Background
S(s, H, t, n, α) → {(< s>0 , · · · , < s>n ), [H(α, < s>0 ), · · · , H(α, < s>n )]} (3)
where S holds the secret s, the Hash authentication H, the threshold t, a global
key α and the number of servers m as input. Meanwhile, it takes the Secrets
Shares with Hash Authentication shares as the output.
R{(< s>0 , · · · , < s>n ), [H(α, < s>0 ), · · · , H(α, < s>n )]} → s (4)
R takes the output of S as input, and the output is the initial secret s.
We denote G as a secure Hash function if for all the adversaries with time
complexity Adv(A) < ε(λ), where ε(λ) is a negligible function, and τ (λ) is the
polynomial of λ.
( g n )0 || Hash[( g n )0 , ]
( g1 )0 || Hash[( g1 )0 , ] ( g n )0 || Hash[( g n )0 , ]
( g1 )1 || Hash[( g1 )1, ]
Hash
Hash
Output
Output ...
... Layer
Layer
... Layer n
... Layer n
... Layer 1
... Layer 1
Input Input
... Layer
... Layer
Client 1 Client n
n
(gi )j theoretically, where j ∈ {1, 2, · · · , m}. After downloading the gradients,
i=1
m n
each client would conduct aggregation [ (gi )j ] theoretically since receiving
j i=1
sufficient gradient shares.
Suppose that in finite field Fq , we have secrets S and S , n is the number
of clients and t is the threshold, where q > n [4]. For S, S ∈ Fq , we select
s1 , · · · , st−1 , s1 , · · · , st−1 ∈ Fq and let:
t−1
f (x) = s + si xi
i=1 (7)
t−1
g(x) = s + si xi
i=1
Then we distribute the secret shares to each client Pi and compute the sum of
two secret shares that are denoted as Π(s, s1 , · · · , sn ) ∗ (s , s1 , · · · , sn ), where ∗
is the operation between secret sharing schemes.
Π(s, s1 , · · · , sn ) ∗ (s , s1 , · · · , sn )
= (f (x1 ) + g(x1 ), · · · , f (xn ) + g(xn ))
t−1 i
t−1
t−1 i
t−1
= (s + si xi1 + s + si x1 , · · · , s + si xin + s + si xn )
i=1 i=1 i=1 i=1 (9)
t−1
t−1
= (s + s + (si + si )xi1 , · · · , s + s + (si + si )xin )
i=1 i=1
= Π(s + s , s1 + s1 , · · · , sn + sn )
n
n
n
Hash(xi , α) mod p = Hash( xi , α) mod p = α Hash(xi ) mod p
i=1 i=1 i=1 (11)
A Privacy-Preserving Distributed Machine Learning Protocol 381
Table 1. Time consumption of Each Client and Each Server with 2 servers
Number Type
Each client Each server
100 clients 726 ms 1209 ms
250 clients 884 ms 1328 ms
500 clients 1023 ms 2180 ms
In Fig. 5, we measure the time needed for sharing, reconstruction, and addi-
tion operations along with the number of CNN parameters. Therefore, we change
the number of CNN parameters. As illustrated in Fig. 5, for CNN parameters
at 40000, our presented protocol could share them within 0.5 ms, compute the
addition of two shares in about 1.2 ms, and reconstruct them in around 1.4 ms.
384 Y. Hong et al.
Number Type
Secret sharing Homomorphic hash
100 clients 66875 kb 40909 kb
250 clients 160625 kb 109091 kb
500 clients 316875 kb 222727 kb
Fig. 3. Experimental results for convergence rate and protocol execution time
(a) (b)
clients clients
Fig. 4. Convergence rate and protocol execution time for 100, 250, 500 clients
A Privacy-Preserving Distributed Machine Learning Protocol 385
Fig. 5. Computation overhead for sharing, reconstruction and addition with one thread
6 Conclusion
We presented a privacy-preserving secure aggregation scheme for distributed
machine learning. Our scheme not only prevents a certain percentage of clients
or servers from colluding, but also resists external eavesdroppers from tamper-
ing with gradient information. This particularly allows our protocol to be veri-
fiable. Simultaneously, the correctness in the clients semi-honest model scenario
was proved. The further work includes an additional complementation, such as
resisting Hash collisions and exploring Non-IID datasets experimental results,
and performing a systematic implementation of our protocol.
References
1. Bell, J.H., Bonawitz, K.A., Gascón, A., Lepoint, T., Raykova, M.: Secure single-
server aggregation with (poly) logarithmic overhead. In: Proceedings of the 2020
ACM SIGSAC Conference on Computer and Communications Security, pp. 1253–
1269 (2020)
2. Bellare, M., Goldreich, O., Goldwasser, S.: Incremental cryptography: the case of
hashing and signing. In: Desmedt, Y.G. (ed.) CRYPTO 1994. LNCS, vol. 839, pp.
216–233. Springer, Heidelberg (1994). https://doi.org/10.1007/3-540-48658-5 22
3. Ben-Or, M., Goldwasser, S., Wigderson, A.: Completeness theorems for non-
cryptographic fault-tolerant distributed computation. In: Providing Sound Foun-
dations for Cryptography: On the Work of Shafi Goldwasser and Silvio Micali, pp.
351–371 (2019)
4. Benaloh, J.C.: Secret sharing homomorphisms: keeping shares of a secret secret
(extended abstract). In: Odlyzko, A.M. (ed.) CRYPTO 1986. LNCS, vol. 263, pp.
251–260. Springer, Heidelberg (1987). https://doi.org/10.1007/3-540-47721-7 19
5. Bonawitz, K., et al.: Practical secure aggregation for federated learning on user-
held data. arXiv preprint arXiv:1611.04482 (2016)
6. Bonawitz, K., et al.: Practical secure aggregation for privacy-preserving machine
learning. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and
Communications Security, pp. 1175–1191 (2017)
386 Y. Hong et al.
7. Burkhart, M., Strasser, M., Many, D., Dimitropoulos, X.: Sepia: privacy-preserving
aggregation of multi-domain network events and statistics. Network 1(101101), 15–
32 (2010)
8. Damgård, I., Pastro, V., Smart, N., Zakarias, S.: Multiparty computation from
somewhat homomorphic encryption. In: Safavi-Naini, R., Canetti, R. (eds.)
CRYPTO 2012. LNCS, vol. 7417, pp. 643–662. Springer, Heidelberg (2012).
https://doi.org/10.1007/978-3-642-32009-5 38
9. Geyer, R.C., Klein, T., Nabi, M.: Differentially private federated learning: a client
level perspective. arXiv preprint arXiv:1712.07557 (2017)
10. Jürgen, S.: A homomorphism theorem for partial algebras. In: Colloquium Math-
ematicum, vol. 21, pp. 5–21. Institute of Mathematics Polish Academy of Sciences
(1970)
11. Krohn, M.N., Freedman, M.J., Mazieres, D.: On-the-fly verification of rateless era-
sure codes for efficient content distribution. In: 2004 Proceedings of IEEE Sympo-
sium on Security and Privacy, pp. 226–240. IEEE (2004)
12. Liu, M., Jiang, H., Chen, J., Badokhon, A., Wei, X., Huang, M.C.: A collabora-
tive privacy-preserving deep learning system in distributed mobile environment.
In: 2016 International Conference on Computational Science and Computational
Intelligence (CSCI), pp. 192–197. IEEE (2016)
13. Mandal, K., Gong, G.: PriVFL: practical privacy-preserving federated regressions
on high-dimensional data over mobile networks. In: Proceedings of the 2019 ACM
SIGSAC Conference on Cloud Computing Security Workshop, pp. 57–68 (2019)
14. Mandal, K., Gong, G., Liu, C.: Nike-based fast privacy-preserving high dimensional
data aggregation for mobile devices. Technical report, CACR Technical report,
CACR 2018–10, University of Waterloo, Canada (2018)
15. McMahan, B., Moore, E., Ramage, D., Hampson, S., y Arcas, B.A.:
Communication-efficient learning of deep networks from decentralized data. In:
Artificial Intelligence and Statistics, pp. 1273–1282. PMLR (2017)
16. Nasr, M., Shokri, R., Houmansadr, A.: Comprehensive privacy analysis of deep
learning: stand-alone and federated learning under passive and active white-box
inference attacks (2018)
17. Rabin, M.O.: How to exchange secrets with oblivious transfer (2005). http://eprint.
iacr.org/2005/187 harvard University Technical Report 81 [email protected]
12955. Accessed 21 June 2005
18. Rastogi, V., Nath, S.: Differentially private aggregation of distributed time-series
with transformation and encryption. In: Proceedings of the 2010 ACM SIGMOD
International Conference on Management of Data, pp. 735–746 (2010)
19. Rivest, R.L., Adleman, L., Dertouzos, M.L., et al.: On data banks and privacy
homomorphisms. Found. Secur. Comput. 4(11), 169–180 (1978)
20. Shamir, A.: How to share a secret. Commun. ACM 22(11), 612–613 (1979)
21. Shokri, R., Shmatikov, V.: Privacy-preserving deep learning. In: Proceedings of the
22nd ACM SIGSAC Conference on Computer and Communications Security, pp.
1310–1321 (2015)
22. So, J., Guler, B., Avestimehr, A.S.: Turbo-aggregate: breaking the quadratic aggre-
gation barrier in secure federated learning. IEEE J. Sel. Area Inf. Theory. 2, 479–
489 (2021)
23. Yao, A.C.: Protocols for secure computations. In: 23rd Annual Symposium on
Foundations of Computer Science (SFCS 1982), pp. 160–164. IEEE (1982)
24. Yao, A.C.C.: How to generate and exchange secrets. In: 27th Annual Symposium
on Foundations of Computer Science (SFCS 1986), pp. 162–167. IEEE (1986)
An Efficient Clustering-Based
Privacy-Preserving Recommender System
Junwei Luo1(B) , Xun Yi1 , Fengling Han1 , Xuechao Yang1 ,
and Xu Yang2
1
School of Computing Technologies, RMIT University, Melbourne, Australia
[email protected], {xun.yi,fengling.han,xuechao.yang}@rmit.edu.au
2
School of Mathematics and Statistics, Fujian Normal University, Fuzhou, China
[email protected]
1 Introduction
Over the past decade, there has been an explosive growth of data generated
from various online services such as social platforms, e-commerce and so on. As
a result, finding the relevant information for users within a short time becomes
critical for online service providers. Recommender systems facilitate the problem
of information overload and provide a way to effectively deliver information to
the users, benefiting both the users and reducing the server load. Collaborative
Filtering (CF), which is one of the most commonly used techniques for imple-
menting recommender systems, analyses feedbacks such as ratings collected from
users and predicts their preferences to make decisions about what information
should be delivered to different users.
While employing a recommender system to resolve information overload has
become a common practice, issues related to user privacy have been raised over
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 387–405, 2022.
https://doi.org/10.1007/978-3-031-23020-2_22
388 J. Luo et al.
the years. Recommender systems exploit user ratings, which are considered to
be private, to predict the preferences of a user for generating recommendations.
A study [7] shows that ratings collected by a recommender system are enough
to infer data subject and their transactions. In addition, as computing power is
usually sourced from a third-party domain such as the cloud, both the online
service provider and cloud will have access to user data. Furthermore, as more
and more countries propose various privacy laws to prevent online services from
abusing user data for profits, it becomes clear that a privacy-preserving solution
for recommendations is desirable.
Privacy-preserving recommender systems incorporate various security mech-
anisms to the data and algorithms to improve security. Crypto-based approaches
[2,4,8,13] apply homomorphic encryptions to the data and compute the recom-
mendations without decryption. Other approaches involve various data pertur-
bation techniques such as k-anonymity [24], perturbation [21] and differential
privacy [28] to protect user privacy. Data perturbation usually lowers the accu-
racy of the recommendation since noises are added to the data. Crypto-based
approaches, on the other hand, offer stronger security compared to perturbation-
based solutions, and yet these solutions suffer from performance issues as the
homomorphic computations are expensive and time-consuming.
In this paper, we pay attention to the crypto-based recommender systems
as they provide stronger security and better accuracy. We notice that existing
works solely focus on applying different encryption schemes, such as ElGamal
[12], Paillier [20] and BGV [6] to the algorithm for recommendations, they fail
to realise that the sheer amount of data participated in computations also plays
a role in affecting the practicability of the proposed arts. Inspired by the short-
coming, we propose an efficient privacy-preserving recommender system that
further improves the performance while maintaining the same utility as other
existing crypto-based works. The basic idea is that data are clustered into mul-
tiple groups to reduce computations while maintaining accuracy. When a user
requests a recommendation, only the data from the group similar to the user
input will be used for computation. However, as data are encrypted, clustering
is done in encrypted form to guarantee data confidentiality.
This paper makes the following contributions:
baseline. Two datasets are employed during the accuracy comparison and the
proposed system remains accurate with an error rate of less than 1%.
The rest of the paper is organised as follows: Sect. 2 discusses the preliminar-
ies for our model, which is presented in Sect. 3. Section 4 discusses the detail of
our proposed system, followed by the security analysis in Sect. 5. The detailed
evaluation is shown in Sect. 6. Section 7 presents the related work. Lastly, Sect. 8
concludes the paper.
2 Preliminaries
2.1 Collaborative Filtering
Collaborative Filtering is a technique commonly employed in recommender sys-
tems for information filtering. It analyses feedback from users and predicts how
likely a user will enjoy other items based on the analysed result. Item-based
Collaborative Filtering (ICF) [26] measures item-to-item similarities and gives
a predicted result based on the similar items. Let rm,i be the rating of item
i from user um , Ii and Ij be two items represented in vector spaces, where
Ii ← {r1,i , r2,i , · · · , rMi } and Ij ← {r1,j , r2,j , · · · , rMj }. The similarity si,j
between two items is measured using Cosine Similarity in the Eq. 1.
M
Ii · Ij rm,i rm,j
si,j = sim(Ii , Ij ) = = m=1 (1)
Ii Ij M 2 M 2
m=1 rm,i m=1 rm,j
Recommendation Pu,i of i-th item for the user u can be predicted using the
Eq. 2.
k∈Si (si,k ∗ ru,k )
Pu,i = (2)
k∈Si (|si,k |)
where Si denotes a list of most similar items to i-th item.
2.2 ElGamal
ElGamal [12] is a public key cryptography introduced in 1985. The ElGamal is
an additively homomorphic encryption scheme that allows some computations
without the need for decryption.
Key Generation
– Choose a cyclic group G of a prime order q with a generator g at random;
– Choose a secret key sk from Z∗q at random;
– Compute the public key pk = g sk .
The values (pk, G, q, g) are publicly known whilst the secret sk is kept private.
Encryption: To encrypt a message m ∈ G using a public key pk, randomly
select an integer r ∈ (Z∗q ) and compute the following:
Decryption: Given a ciphertext E(m, pk) = (c1 , c2 ), one might recover the
message using the secret key sk and compute the following:
c2
D(E(m, pk), sk) = mod p
c1 sk
Homomorphic Addition: Given two ciphertexts E(m1, pk) and E(m2, pk),
summation of two ciphertexts over the ciphertext space is computed as follows:
1
µi = xj (4)
Si
xj ∈Si
3 Our Model
In this section, we present the design of our model. We first give an overview
of the proposed model and introduce several involved components. After that,
we discuss different data structures and notations used in our model. Lastly, we
define an adversary model for our proposed system Fig. 1.
3.1 Overview
Our proposed system is composed of three main components:
– Recommender Server (RS) is the centralised server that users interact
with, it offers storage for user data and provides computing resources for
generating recommendations.
– Security Server (SS) is a trusted curator responsible for providing security-
related functionalities and participating in secure computations with the RS
and users.
An Efficient Clustering-Based Privacy-Preserving Recommender System 391
– Users are data owners that provide information such as ratings for the RS
to generate recommendations.
The proposed system consists of two stages: an offline stage includes collecting
and pre-processes data and an online stage provides the functionality of privacy-
preserving recommendations.
The offline stage includes initialisation, clustering and data preprocessing.
During the initialisation, the RS initialises data structures for managing user
data and the SS generates public/private keys, where the private key sk is kept
secret and the public key pk is shared with all participants. Users obtain the
public key pk from the SS and encrypt their ratings prior to submitting to
the RS for future recommendations. During clustering, both RS and SS execute
privacy-preserving k-means to partition encrypted ratings into k clusters. Lastly,
data pre-processing computes item-to-item similarities for the clustered dataset
in preparation for the online stage.
When the preprocessing is finished, the system transitions into the online
stage and is ready for recommendations. A target user submits her encrypted
recommending query to the RS for a recommendation. The RS locates the near-
est cluster to the target users and computes the recommendations based on the
data from the closest cluster. Results are sent back to the target user, in which
the user will communicate with the SS for decryption.
R1
{r1,1
r1,2 ···
r1,N }
.. .. .. .. ..
. . . . .
RM {rM,1 rM,2 · · · rM,N }
Table 2. Notations
and outputs a set of clustered data T . Specifically, for each rating vector Ri ∈
D, where Ri ← {ri,1
, ri,2
, · · · , ri,N }, the PPKM mechanism first measures the
distance between Ri and k centroids stored in µ using Secure Square Euclidean
Distance (SSED) [24], which results in k numbers of encrypted distance values
Di,j , j ∈ k. The distances are fed into the SBD protocol that decomposes the
encrypted integer into a list of encrypted bits, which is used for comparison
using SMIN to find the shortest distance among all Di,j . The centroid µt that
corresponds to the shortest distance is returned and the rating Ri is assigned to
the matrix Tt , where 1 ≤ t ≤ k.
When all items are assigned to respective clusters, the centroid of each cluster
is recalculated based on the newly assigned ratings and µ is updated accordingly.
The RS repeatedly executes above steps with SS to securely assign ratings into k
clusters. In the end, the PPKM outputs the clustered dataset T that consists of
k user-item matrices Tn ∈ T and centroids µn ∈ µ, 1 ≤ n ≤ k. It should be noted
that the k-means is applied to user inputs R for aggregating users who rated
similar items into a group. In item-to-item collaborative filtering, items rated
by the same group of users are deemed to be similar. During the preprocessing
stage, each item In,i ∈ Tn will be used for measuring similarities.
M
pi,j = sumP rod(In,i , In,j ) =
ri,m
⊗ rj,m
m=1
where ⊗ denotes multiplication of two ciphertexts using the SMP protocol [24].
Similarly, line 7 computes the sum of squares of each rating for the item Ii by
multiplying the rating by itself.
M
qi = sumSqrt(In,i ) =
ri,m
⊗ ri,m
m=1
For computing the cosine similarity between Ii and Ij , the RS submits pi,j , qi
and qj to the SS. Upon receiving the data, the SS computes the following:
D(pi,j )
si,j = cos(pi,j , qi , qj ) = E( )
D(qi ) · D(qj )
where si,j is the cosine similarity between Ii and Ij according to the Eq. 1. It is
worth noting that ElGamal expects integers whilst the similarity si,j is likely to
be a floating point number. As a result, si,j are normalised and rounded prior to
encryption. Both RS and SS interactively compute the similarity for all items in
a cluster and the results are stored in Sn , where 1 ≤ n ≤ k. The RS maintains
all Sn ∈ S for generating recommendations.
for 1 ≤ j ≤ k. The distance value is then used by the SBD for decomposition
and the SKMIN algorithm, which is based on SMIN with support for finding the
minimal value among k distances. The SKMIN outputs the centroid µt nearest
to the user input Rt .
After that, the recommendation of a rating for the user ut is computed using
the items from the nearest cluster as denoted in Eq. 2. Note that the similarity
is divided into two parts Nt and Dt . Specifically, let St be the list of similarities
closest to the centroid µt from the S , the similarity si,j ∈ St between the
requested item i by the user and other items j, where 1 ≤ j ≤ N, i = j is
396 J. Luo et al.
multiplied with the rating rt,j of j-th item from the user ut . Each multiplication
of the j-th ratings from user ut and the similarity si , j is summed together using
homomorphic addition, Nt denotes the summation of the above computation.
Nt = si,j ⊗ rt,j
si,j ∈St
Notice that multiplication over ciphertext space is equal to addition in the plain-
text space. It is obvious that when Nt and Dt are combined, the predicted rating
for i-th item requested by user ut is generated.
However, the RS is unable to finalise the result Pt,i due to the difficulty of
dividing two large ciphertexts. As a result, both Nt and Dt are returned to the
target user ut , in which the user can execute a decryption protocol with the SS
to privately decrypt and get the result.
and un-scrambled the decrypted results to compute the following to reveal the
predicted rating.
Nt · n1
Pt,i =
Dt · d1
5 Security Analysis
In this section, we analyse the security of the proposed system and show that
it can achieve sufficient privacy. Under the adversary model, each party faith-
fully follows the designated protocols and does not deviate, either party could be
malicious but they do not collude with each other including users, RS and SS.
The proposed system is said to be secure if, for any malicious party, no infor-
mation leakage could be used to identify a data subject during both the offline
and online stages.
Malicious Users: A malicious user can submit fake ratings to the system in
an attempt to reveal ratings made by other users. However, as the item-to-item
similarities are securely computed prior to the recommendation, it remains to
be seen if a malicious user can disclose any information from the similarity.
6 Evaluation
In this section, we assess the performance of our proposed system regarding its
computational overhead and recommendation accuracy.
·104
500
I = 20 I = 20
450 I = 40 I = 40
I = 60 1.5 I = 60
Execution time (sec)
250
0.5
200
150
2 4 6 0 2 4 6
Number of clusters k Number of clusters k
(a) (b)
While the clustering indeed adds a significant amount of time to the offline
stage, it grants several benefits when pre-computing item-to-item similarities.
To demonstrate how the clustering affects the performance, a baseline is set up
that computes the item-to-item similarities without partitioning data, whilst our
proposed system only computes the similarities with items in the same group.
For simplicity, we use k = 0 to denote the baseline. Figure 2b shows the compu-
tational time for computing item-to-item similarities. When the dataset contains
a small subset of data, says I = 20, computing the similarities takes 505 s, whilst
400 J. Luo et al.
3 150
I = 20 I = 20
I = 40 I = 40
I = 80 I = 80
2 I = 100 100 I = 100
1.5 75
1 50
0.5 25
2 4 6 0 2 4 6
Number of clusters k Number of clusters k
(a) (b)
Fig. 3. finding the closest cluster (a) and computing the recommendation (b) with
various I and k.
the runtime is reduced significantly after the clustering, we measure 208 s when
k = 2, 105 and 69 s when k is increased 4 and 6 respectively. Adding more items
to the dataset results in an even more significant improvement to the overall
runtime, from 13,012 s when the item size is increased to 100 with no clustering,
to 5,717, 2,893 and 1,988 s when the number of clusters is set to 2, 4 and 6
respectively.
The results show that the computational time is directly related to the num-
ber of clusters k, where each cluster computes the similarity independently with
the items in the same group. As a result, computing the similarities in differ-
ent clusters can be effectively parallel, hence further reducing the computational
time. Considering that modern online services contain thousands of items in
the system, we argue that data clustering is effective in relieving computational
overheads while maintaining accuracy and preserving user privacy.
As the proposed system utilises clustering to group similar items before gener-
ating a recommendation, we first evaluate the performance of finding a suitable
cluster for a target user. Figure 3a shows the computational time for measuring
the distance between user input and centroids. Given that k = 2, the SDM algo-
rithm finds the closest distance in less than 0.5 s regardless of the dimensions,
and the time increases steadily to around 1.5 s when k is increased to 6. As can
be seen that the number of clusters k determines how quickly can a cluster be
securely retrieved. Recall that a large k benefits the similarity computations dur-
ing the offline stage, here it adds more complexity to the distance measurement
as more computations and comparisons are needed.
Lastly, to generate a recommendation, similarities between the target item
and other similar items are used for the computation. Recall that there is a base-
line for evaluating the execution time of computing similarities, which is denoted
An Efficient Clustering-Based Privacy-Preserving Recommender System 401
as k = 0. We use the same notation to describe the baseline that did not use
clustering before computing a recommendation. Figure 3b presents the result
computational time for generating a recommendation. The difference in com-
putational time between the baseline and clustered data is insignificant, where
most computations can be done within 0.1 s regardless of the size of clusters and
the number of items in the system. We stress that the clustering is only beneficial
to the performance when it comes to pre-computing item-to-item similarities as
pipelined executions are made possible after clustering.
To measure the impact of how clustering might affect the accuracy of recom-
mended items, a baseline is set up and compared with our proposed system.
Similarly, the baseline does not employ clustering whilst the proposed system
only computes the predicted score using the data from a cluster. Additionally,
to better represent the accuracy, an extra dataset Jester [14] has been added to
the evaluation. Unlike the MovieLens where data are sparsely distributed, the
Jester dataset contains over 1 million ratings from 24,983 users over 100 items,
which has a higher density rate of around 25% compared to 10% from the Movie-
Lens. Each item I from the Jester dataset has a range from −10 to 10 and 99
indicates that the user has not rated the item. For simplicity, the scale has been
adjusted from 0 to 20. During the clustering, the k initial centroids are chosen at
random, and the clustering is iteratively performed between the RS and SS 10
times to reach an optimal state. The measurement for recommending accuracy
is the Mean Average Error (MAE) between the baseline and proposed system.
We measure the error rate of predicted ratings when comparing the baseline and
the proposed system with various k and I.
n
|yi − xi |
M AE = i=1
n
Figure 4a shows the result of comparing recommending accuracy between the
baseline and proposed system using the MovieLens dataset. Under the setting
I = 200, the baseline gets a predicted score of 2.2, whereas the proposed system
returns 2.21, 2.19 and 2.2 when the number of clusters k is set to 2, 4 and 6
respectively. Adding more items to the dataset does not disrupt the pattern
as can be seen that both the baseline and proposed system perform similarly
regardless of the settings k and I. Replacing the dataset with Jester, the observed
patterns are consistent as shown in Fig. 4b, where both the baseline and proposed
system manage to maintain consistency across different settings k and I. One
exception is that the predicted rating drops significantly when all items are
present in the dataset while the proposed system reduces the rating linearly.
Table 3 shows that the average error rate of the proposed system is less than 1%
when compared to the baseline while improving the performance during item-
to-item similarity computation by k times.
402 J. Luo et al.
2.25 14
Baseline Baseline
k=2 13.5 k=2
k=4 k=4
2.2 13
k=6 k=6
12.5
2.15 12
Rating
Rating
11.5
2.1 11
10.5
2.05 10
9.5
2 9
200 400 600 800 1,000 20 40 60 80 100
Number of items I Number of items I
(a) (b)
MovieLens Jester
I Baseline Ours MAE I Baseline Ours MAE
200 2.2 2.2 0.01 20 10.897 10.846 0.114
400 2.2 2.203 0.03 40 12.625 12.618 0.017
600 2.15 2.17 0.06 60 13.141 13.147 0.076
800 2.07 2.076 0.02 80 11.843 12.02 0.381
1000 2.04 2.03 0.01 100 9.967 11.033 2.504
7 Related Work
Privacy-preserving recommender systems can be divided into two types: crypto-
based recommender systems apply cryptographic methods to protect data while
perturbation-based methods introduce randomised noises into data and/or rec-
ommending mechanisms. Canny [8] proposes the first privacy-preserving rec-
ommender system using homomorphic encryption, which is a type of public key
cryptography that enables computations over the ciphertext space. It applies the
cryptosystem to collaborative filtering for protecting user privacy. Basu et al. [4]
propose a cloud-based collaborative filtering scheme using ElGamal encryption
to enable private computations. Similarly, Erkin et al. [13] propose a user-based
collaborative filtering scheme using Paillier encryption, which is later extended
by the author to reduce computational overhead using an optimised approach
called data packing, enabling multiple encrypted values to be packed and com-
puted once. Badsha et al. [1] propose a privacy-preserving collaborative filtering
scheme using the ElGamal cryptosystem for content-based and item-based filter-
ing. Kim et al. [16] propose a collaborative filtering system using matrix factori-
sation, the authors adopt fully homomorphic encryption for securing data while
maintaining the functionality. Casino and Patsakis [10] propose a clustering-
An Efficient Clustering-Based Privacy-Preserving Recommender System 403
8 Conclusion
In this paper, we propose an efficient, clustering-based privacy-preserving recom-
mender system. Our proposed system employs item-based collaborative filtering
for generating recommendations. All user data are encrypted using ElGamal to
enable computations over ciphertexts while preserving user privacy. To facili-
tate computational burdens imposed by the cryptosystem, a privacy-preserving
clustering mechanism is introduced to boost the performance. The proposed sys-
tem is secure under the semi-honest adversary model. The proposed system is
implemented and experimental results show that the proposed system signifi-
cantly improves performance for preprocessing encrypted data while producing
an accurate rating over the clustered dataset. In the future, we plan to extend the
work by incorporating different clustering approaches and evaluate their impacts
in performance and precisions.
References
1. Badsha, S., Yi, X., Khalil, I.: A practical privacy-preserving recommender system.
Data Sci. Eng. 1(3), 161–177 (2016)
404 J. Luo et al.
2. Badsha, S., Yi, X., Khalil, I., Bertino, E.: Privacy preserving user-based recom-
mender system. In: 2017 IEEE 37th International Conference on Distributed Com-
puting Systems (ICDCS), pp. 1074–1083. IEEE (2017)
3. Badsha, S., et al.: Privacy preserving location-aware personalized web service rec-
ommendations. IEEE Trans. Serv. Comput. 14(3), 791–804 (2018)
4. Basu, A., Vaidya, J., Kikuchi, H., Dimitrakos, T.: Privacy-preserving collaborative
filtering for the cloud. In: 2011 IEEE Third International Conference on Cloud
Computing Technology and Science, pp. 223–230. IEEE (2011)
5. Berkovsky, S., Eytani, Y., Kuflik, T., Ricci, F.: Enhancing privacy and preserving
accuracy of a distributed collaborative filtering. In: Proceedings of the 2007 ACM
Conference on Recommender Systems, pp. 9–16 (2007)
6. Brakerski, Z., Gentry, C., Vaikuntanathan, V.: (Leveled) fully homomorphic
encryption without bootstrapping. ACM Trans. Comput. Theor. (TOCT) 6(3),
1–36 (2014)
7. Calandrino, J.A., Kilzer, A., Narayanan, A., Felten, E.W., Shmatikov, V.: You
might also like: privacy risks of collaborative filtering. In: 2011 IEEE Symposium
on Security and Privacy, pp. 231–246. IEEE (2011)
8. Canny, J.: Collaborative filtering with privacy. In: Proceedings of 2002 IEEE Sym-
posium on Security and Privacy, pp. 45–57. IEEE (2002)
9. Casino, F., Domingo-Ferrer, J., Patsakis, C., Puig, D., Solanas, A.: A k-anonymous
approach to privacy preserving collaborative filtering. J. Comput. Syst. Sci. 81(6),
1000–1011 (2015)
10. Casino, F., Patsakis, C.: An efficient blockchain-based privacy-preserving collabo-
rative filtering architecture. IEEE Trans. Eng. Manage. 67(4), 1501–1513 (2019)
11. Chen, C., Zhou, J., Wu, B., Fang, W., Wang, L., Qi, Y., Zheng, X.: Practical
privacy preserving poi recommendation. ACM Trans. Intell. Syst. Technol. (TIST)
11(5), 1–20 (2020)
12. ElGamal, T.: A public key cryptosystem and a signature scheme based on discrete
logarithms. IEEE Trans. Inf. Theor. 31(4), 469–472 (1985)
13. Erkin, Z., Veugen, T., Toft, T., Lagendijk, R.L.: Generating private recommenda-
tions efficiently using homomorphic encryption and data packing. IEEE Trans. Inf.
Forensics Secur. 7(3), 1053–1066 (2012)
14. Goldberg, K., Roeder, T., Gupta, D., Perkins, C.: Eigentaste: a constant time
collaborative filtering algorithm. Inf. Retrieval 4(2), 133–151 (2001)
15. Harper, F.M., Konstan, J.A.: The movielens datasets: history and context. ACM
Trans. Interact. Intell. Syst. (TIIS) 5(4), 1–19 (2015)
16. Kim, J., Koo, D., Kim, Y., Yoon, H., Shin, J., Kim, S.: Efficient privacy-preserving
matrix factorization for recommendation via fully homomorphic encryption. ACM
Trans. Priv. Secur. (TOPS) 21(4), 1–30 (2018)
17. Li, D., et al.: An algorithm for efficient privacy-preserving item-based collaborative
filtering. Future Gener. Comput. Syst. 55, 311–320 (2016)
18. MacQueen, J.: Classification and analysis of multivariate observations. In: 5th
Berkeley Symposium on Mathematical Statistics and Probability, pp. 281–297
(1967)
19. Meng, S., Qi, L., Li, Q., Lin, W., Xu, X., Wan, S.: Privacy-preserving and sparsity-
aware location-based prediction method for collaborative recommender systems.
Future Gener. Comput. Syst. 96, 324–335 (2019)
20. Paillier, P.: Public-key cryptosystems based on composite degree residuosity
classes. In: Stern, J. (ed.) EUROCRYPT 1999. LNCS, vol. 1592, pp. 223–238.
Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48910-X_16
An Efficient Clustering-Based Privacy-Preserving Recommender System 405
21. Polat, H., Du, W.: Privacy-preserving collaborative filtering using randomized per-
turbation techniques. In: Third IEEE International Conference on Data Mining,
pp. 625–628. IEEE (2003)
22. Polat, H., Du, W.: Privacy-preserving collaborative filtering. Int. J. Electron. Com-
mer. 9(4), 9–35 (2005)
23. Rao, F.Y., Samanthula, B.K., Bertino, E., Yi, X., Liu, D.: Privacy-preserving and
outsourced multi-user k-means clustering. In: 2015 IEEE Conference on Collabo-
ration and Internet Computing (CIC), pp. 80–89. IEEE (2015)
24. Samanthula, B.K., Elmehdwi, Y., Jiang, W.: K-nearest neighbor classification over
semantically secure encrypted relational data. IEEE Trans. Knowl. Data Eng.
27(5), 1261–1273 (2014)
25. Samanthula, B.K., Chun, H., Jiang, W.: An efficient and probabilistic secure bit-
decomposition. In: Proceedings of the 8th ACM SIGSAC Symposium on Informa-
tion, Computer and Communications Security, pp. 541–546 (2013)
26. Sarwar, B., Karypis, G., Konstan, J., Riedl, J.: Item-based collaborative filtering
recommendation algorithms. In: Proceedings of the 10th International Conference
on World Wide Web, pp. 285–295 (2001)
27. Wei, R., Tian, H., Shen, H.: Improving k-anonymity based privacy preservation for
collaborative filtering. Comput. Electr. Eng. 67, 509–519 (2018)
28. Zhu, T., Li, G., Ren, Y., Zhou, W., Xiong, P.: Differential privacy for neighborhood-
based collaborative filtering. In: Proceedings of the 2013 IEEE/ACM International
Conference on Advances in Social Networks Analysis and Mining, pp. 752–759
(2013)
A Differential Privacy Mechanism
for Deceiving Cyber Attacks in IoT
Networks
Guizhen Yang1 , Mengmeng Ge2 , Shang Gao1 , Xuequan Lu1 ,
Leo Yu Zhang1(B) , and Robin Doss1
1
Deakin University, Geelong Waurn Ponds, Australia
{guizhen.yang,shang.gao,xuequan.lu,leo.zhang,robin.doss}@deakin.edu.au
2
University of Canterbury, Christchurch, New Zealand
[email protected]
1 Introduction
Internet of Things (IoT) is a network of physical objects (e.g., devices, instru-
ments, vehicles, buildings and other items) embedded with electronics, circuits,
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 406–425, 2022.
https://doi.org/10.1007/978-3-031-23020-2_23
A Differential Privacy Mechanism for Deceiving Cyber Attacks 407
sensors and network connections to collect and exchange data [1]. It allows these
objects to communicate by wired or wireless communications (e.g., Bluetooth,
ZigBee and 5G) and share data across existing network infrastructure [2]. Nowa-
days, IoT networks are growing rapidly and contain around 28 billion objects [3]
that communicate with each other. They bring a lot of benefits to human beings
but also provide opportunities for attackers to collect valuable information and
launch attacks which may severely impact operations and normal functional-
ity of IoT devices [4,5]. Thus, effective protection and defence mechanisms are
needed to protect the IoT networks from potential attacks.
In an IoT network, devices are usually grouped into different VLANs accord-
ing to their functions and/or locations [6]. Statistical information, such as the
total or average number of devices per VLAN, or the number of VLANs, may
leak the network’s operational information, or expose potential attack targets.
For example, a Radiology department often has a limited number of medical
imaging devices due to the budget limitation. The medical imaging devices col-
lect data from patients and upload it to the server where doctors access patients’
data for diagnosis purposes. Attackers may be able to deduce the VLAN where
these medical imaging devices are located based on the network statistical infor-
mation (e.g., the number of user machines in a VLAN is potentially much larger
than the number of critical devices, such as medical imaging devices or servers,
in a separate VLAN). Once attackers identify a vulnerable Internet-of-Medical
Things (IoMT) device or a vulnerable user machine, they can pivot toward the
server. The consequences are expensive if patients’ private information is dis-
closed. Therefore, it is necessary to minimise the leakage of statistical infor-
mation, increasing the difficulty of deducing potential targets by the attackers,
preventing them from breaking into the network and launching further attacks.
However, there is little prior work considering the security issues caused by
the leakage of statistical information. The motivation of our work lies within the
privacy protection of statistical information of IoT networks. We aim at develop-
ing a defence method to obfuscate the statistical information of an IoT network
and mislead attackers. Figure 1 shows two examples of VLAN obfuscation. In a
healthcare IoT network, we assume there is a vulnerable device ti (in red square,
belonging to a radiologist) on VLAN 3 (i.e., the staff office). It has direct access
to a file server on VLAN 5 which stores medical imaging data from multiple
medical devices on the network. If ti is compromised, the attacker may pivot
and compromise the server.
Intuitively, to prevent the attacker from locating the server through devices
in other VLANs, we can increase the attack cost of identifying a potential target
by hiding true network information. It can be done by increasing the device
diversity, such as deploying decoy ti (Fig. 1(b) and 1(c)), or by changing the
attack surface, such as shuffling ti ’s IP address to make it appear on VLAN
2 but not on VLAN 3 (Fig. 1(d)). When the attackers scan the network, they
may not accurately deduce the operational information of VLANs because of
the obfuscated virtual location of ti . Hence, the attack cost is increased and the
operational information of the network is protected to some extent.
408 G. Yang et al.
However, this kind of simple deception methods do not protect the opera-
tional information well against the attacker with stronger background (i.e., side
channel information). For the scenario considered above, this background knowl-
edge can be derived from the simple fact that the probability of ti on VLAN
3 is much higher than that of the decoy ti on VLAN 2 (Fig. 1(c)). That said,
by simply counting the number of devices on both VLANs, the attacker can
distinguish real ti and fake ti or ti , and easily workaround the aforementioned
deception methods. From this view, it is necessary to also obfuscate the VLAN’s
statistical information (e.g., the number of devices) to offer protection against
informed attackers.
In this paper, we first use differential privacy (DP) to obfuscate VLAN’s
statistical information. The number of devices per VLAN is strategically changed
under a given privacy budget . Two defence mechanisms are then applied to
achieve the obfuscation. Finally, we adopt a greedy algorithm to optimise the
deployment of defence choices and find the trade-off between defence cost and
privacy budget. The defence mechanisms used in this work include: (1) deception
technology to deploy decoys into network [7], and (2) IP-shuffling based Moving
Target Defence (MTD) technology to obfuscate the attack surface [8].
The main contributions of this paper are summarised as follows:
– We are the first to integrate DP with software-defined networking (SDN)-
based MTD and deception technologies to solve the security issues caused by
leakage of statistical information of IoT network. Using VLAN information as
an example, we add the Laplace noise to the number of devices per VLAN and
obtain the obfuscated set of VLANs, based on which, deception technologies
can be further applied by the defender.
A Differential Privacy Mechanism for Deceiving Cyber Attacks 409
2 Related Work
MTD Technologies: Moving target defence [8–10] is one of the common proac-
tive defence mechanisms that has emerged to deceive potential attacks [11,12]. It
aims at hurdling attacks by constantly changing the attack surface. With MTD,
the complexity, diversity and randomness of systems or networks are increased
to disrupt attackers’ actions during the reconnaissance phase of cyber kill chain.
There are three common MTD techniques: shuffling, redundancy and diversity.
In our case, we use IP shuffling which is a common network shuffling technique
for an increased complexity of the IP address space.
Ge et al. [13] re-configured the IoT network topology to deal with non-
patchable vulnerabilities. By maximising the number of patchable nodes along
the route to the base station, the attack effort is increased while maintaining
the average shortest path length. The work [14] considered hybrid approaches
by combining different defence mechanisms. Decoys are strategically deployed
into the network and a patch management solution is applied to solve unpatch-
able vulnerabilities under a constraint budget. Further study in [15] proposed
an integrated defence technique for intrusion prevention. It explains “when to
move” and “how to move”. The former performs network topology shuffling
with four strategies (i.e., fixed/random/adaptive/hybrid), and the latter shuffles
a decoy IoT network with three strategies (i.e., genetic algorithm/decoy attack
path-based optimisation/random).
The work [16] randomly shuffled communication protocols in an IoT net-
work. It solves problems such as “what to move” by utilising moving parameters
to determine shuffled protocol, “how to move” by using a discrete & uniform
probability distribution to determine the next moving parameter, and “when to
move” by adopting fixed or random time interval. The paper also analyses multi-
criteria to find a trade-off among system performance, business impact and the
success probability of a given attack.
1 2
3 4
Added decoys or
Deployment Optimal Metrics values
shuffled IP addresses
generator deployment
(i.e., moved devices)
3 Proposed Approach
To effectively manage nodes (devices) and their data flows, we utilise SDN tech-
nology [22]. An SDN controller communicates with SDN switches in the IoT net-
work. Servers, user machines and IoT devices are connected to the SDN switches.
The switches transform data flows to the SDN controller for further processing.
We also leverage the SDN technology to deploy shuffling-based MTD, as well
A Differential Privacy Mechanism for Deceiving Cyber Attacks 411
as managing the communication between the SDN controller and switches via
virtual-to-real or real-to-virtual IP addresses mapping.
The overall workflow of our proposed approach is shown in Fig. 2. It con-
sists of 4 phases: IoT network model generation, information obfuscation by DP
mechanism, deployment strategy generation using IP shuffling and deception,
and deployment optimisation by finding the trade-off between defence cost and
privacy budget.
In Phase 1, we generate the system model along with node measures based
on the network information. In specific, the IoT network generator takes network
topology as input with node connectivity information. The output is statistical
information of the network (e.g., set of devices in each VLAN and set of VLANs
on a given IoT network) and node measure (e.g., the betweenness centrality
(BC) of each node that captures how much a given node is in-between other
nodes [23]).
In Phase 2, we adopt DP to obfuscate the statistical information of VLANs.
The obfuscation generator takes the statistical information of the network (e.g.,
the number of devices in each VLAN) and the node measures from Phase 1
as input, and adds Laplace noise to the set of devices per VLAN under the DP
framework. The output is the updated number of devices in each VLAN. We
denote the original IoT network as N and the new obfuscated IoT network as
N . For each VLAN k, the number of devices is changed from |Nk | to |Nk | after
obfuscation. There is a possibility that |Nk | < 0 since the Laplace noise is a
random variant. It means that the devices moved out from VLAN k is large
than the devices on VLAN k, which is violated in the real world. Hence, we use
ΔNk∗ = |Nk | − |Nk | as an optimal set of devices that should be moved out from
or added into VLAN k to solve this problem, aiming at adapting to real-world
scenarios, including guaranteeing the number of devices moved out is less than
that of the current live devices. These to-be-moved devices are also candidates
for IP-shuffling based MTD in Phase 3. Therefore, we call ΔNk∗ is an optimal
set of devices after the improved obfuscation.
In Phase 3, we use the deployment generator to update the network infor-
mation as specified by the updated set of devices for each VLAN from the output
of Phase 2 and the original set of devices per VLAN. The deployment genera-
tor deploys the defence strategies produced by the randomisation module or the
optimisation module in Phase 4. The output is the updated IoT network after
the deployment of defences. We use the MTD technology - IP address shuffling
to change the attack surface and the deception technology - decoy to mislead
attackers. As mentioned earlier, we leverage SDN to implement shuffling-based
MTD. In our proposed approach, the SDN controller is also used to manage SDN
switches. The SDN switches are used to forward packets to the SDN controller
for handling the data flow and controlling packet forwarding. We assume each
device has a real IP address (rIP). The rIP is mapped to one virtual IP address
(vIP) which is selected from a group of randomly generated virtual IP addresses
(vIPs). Only the SDN controller and the device know its rIP, while other devices
412 G. Yang et al.
in the IoT network use the mapped vIP to communicate with the device. The
mapping between rIP to vIPs is managed by the SDN controller [24,25].
In Phase 4, we consider two strategies for defence deployment: random and
intelligent strategies. The randomisation module starts by randomly selecting a
VLAN k. Depending on the obfuscation outcome of Phase 2, it either randomly
selects a device for IP shuffling or deploys a decoy on VLAN k. The intelligence
module starts by selecting a VLAN k based on their criticality. Depending on
the obfuscation outcome of Phase 2, it then selects a device for IP shuffling
or deploys a decoy on VLAN k based on the devices’ or decoys’ criticality. In
particular, if the number of devices on VLAN k increases (i.e., ΔNk∗ > 0), the
defender deploys ΔNk∗ number of decoys into VLAN k; If the number decreases
(i.e., ΔNk∗ < 0), the defender moves |ΔNk∗ | number of devices from VLAN k to
another VLAN by shuffling the IP addresses of these devices to that VLAN. As
discussed in Phase 3, the SDN controller can shuffle vIP addresses1 . We develop
a greedy algorithm (GA) to compute the optimal deployment by exploring the
trade-off between defence cost and privacy protection level. GA aims to minimise
the defence cost under different privacy budgets at each stage. The selection
of VLAN, decoy or device can be determined by their criticality. The higher
criticality the object has, the higher priority it takes.
We consider the security metric as the defender’s cost. It is the total cost
of deploying decoys to the IoT network and moving devices from one VLAN to
another (e.g., shuffling IP addresses). The privacy protection level is determined
by the privacy budget used in Phase 2 (i.e., how much Laplace noise to add for
information obfuscation).
SDN controller
Attacker
VLAN 5: Server Room
SDN
Internet
SW4 Severs
SDN VLAN 4: Neurology Department
Router SW 1 SW SW3
……
IoMT Devices
EF IF
VLAN 3: Staff Office
SDN
SDN SW2
Internet DMZ SW1 User Machines
network VLAN 2: Radiology Department
EF: External Firewall
IoMT Devices
IF: Internal Firewall
Internal network
SW: Switch
compromised, attackers may steal the data for economic gain [26]. The disclosure
of patients’ data can pose a serious threat to the health and safety of individuals.
Therefore, we assume these servers could be potential attack targets.
Based on the observation of real-world scenarios, we assume the attackers
have the following capabilities.
– Attackers can leverage various scanning tools to collect information about
the target network (e.g., number of devices, network topology and operating
system of a host) and identify weaknesses for exploitation (e.g., known and
zero-day vulnerability). Attackers are able to utilise some firewall/IDS evasion
techniques to avoid blocking and detection.
– Attackers may be able to identify attack targets with less time or cost by
analysing the collected information. For example, the real location of one
device can be deduced by comparing gathered information (e.g., counting the
number of changed devices per VLAN) before an attack is launched on the
device.
– It is highly unlikely for attackers to directly compromise the servers as they
are assumed to be well-protected due to the traditional defence techniques
placed on the network.
– Attackers lack knowledge of existence of decoy system. Once the attackers
realise the device they interact with is a decoy, they terminate the interaction
immediately and attempt to find a new target.
– Attackers can not compromise the SDN controller and SDN switches which
are assumed to be secure.
Notations Definitions
N Set of devices in a network
N Set of devices in a network after obfuscation
K Set of VLANs
Nk Set of devices in VLAN k
Nk Set of devices in VLAN k after obfuscation
ΔNk∗ An optimal set of devices moved out from or added into VLAN k
after improved obfuscation
m1(k, j) → 0, 1 Function to move a device from VLAN k to VLAN j with MTD
m2(d, k) → 0, 1 Function to deploy a decoy d into VLAN k with deception
c1(k, j) Cost of moving a device from VLAN k to VLAN j when m1(k, j) = 1
c2(d, k) Cost of deploying a decoy d into VLAN k when m2(d, k) = 1
There are two most widely used mechanisms to achieve DP (i.e., Laplace and
Exponential). We focus on the Laplace mechanism, which adds Laplace noise to
the true query answer (i.e., the number of devices per VLAN). Denote Lap(b)
A Differential Privacy Mechanism for Deceiving Cyber Attacks 415
the noise sampled from the Laplace distribution with scaling b, we have the
following definition and properties.
a certain budget), may occur. In this case, the extra devices to-be-moved need to
be taken offline to ensure DP. Clearly, in our example application, it is irrational
to take devices offline as this will disrupt services for patients. Therefore, we
design Algorithm 2 to deal with this situation. In line 13, we regard the number
of devices moved per VLAN as being proportional to the total number of fake
assets added.
In this way, our approach not only ensures the satisfaction of DP but also
avoids taking devices offline, which is an irrational defence method to protect
devices from [21].
where σsd is the total number of shortest paths from the source nodes ts to the
destination node td . The σsd (ti ) is the number of those paths that pass through
the node ti . The node/device with a higher BC plays a more important role in
the network and is more likely to be an attack target. Therefore, in this work, a
device with a higher BC will be shuffled first.
Motivated by the studies on IP address shuffling [24,25], we adopt this MTD
technology in our work. When needed, a device’s rIP can be randomly mapped
to one vIP from a pool of (|K| − 1) vIPs. As the noise introduced by DP is
random, the device of the VLAN under study can be shuffled to any other
(|K| − 1) VLANs. Before shuffling, a new set of (|K| − 1) vIPs for each device
is randomly generated. The communication process between the source device
and destination device under IP shuffling-based MTD (i.e., rIP-to-vIP mapping
and vIP-to-rIP mapping) as bellow.
As we mentioned in Phase 3 in Sect. 3, only the SDN controller and the
device itself know their rIPs while other devices use vIPs to communicate with
each other. When the source device sends a packet to the nearest SDN switch,
the SDN switch transmits the packet to the SDN controller. The SDN controller
receives the packet to map vIP to rIP from the packet header information, and
updates the flow-table entry of all SDN switches (e.g., Open-Flow-Switches).
Each switch uses the flow rules to convert the rIP into the vIP in the packet
header. The SDN switch near the destination device convert the vIP of the des-
tination device in a packet header to its rIP. Hence, both the source device and
418 G. Yang et al.
destination device do not know each other’s rIP and the mapping is transpar-
ent to an end device with no service disruption since rIPs of devices remain
unchanged [24,25].
where M 1(k , k) ∗ C1(k , k) represents the cost of moving devices from VLAN k
to VLAN j, and M 2(d, k) ∗ C2(d, k) is the cost of adding decoys d into VLAN
k.
5 Evaluation
Figure 3 shows an example smart healthcare system where IoT technologies are
heavily adopted [32,33]. It consists of 4 VLANs, with 4 IoMT devices in VLAN2
(e.g., Ultrasound, X-Ray, MRI and CT Scanner in the Radiology Department
that send images to servers), 10 user machines in VLAN3 (i.e., staff office), and
5 IoMT devices in VLAN4 (e.g., Electroencephalography Monitor and Neuron
Endoscopes sensor in the Neurology Department) and 2 servers in VLAN5 (i.e.,
server room). VLAN5 can be accessed by other three VLANs as IoT devices need
to send patients’ information to the servers for storage or processing. VLAN2
and VLAN4 are connected to VLAN3 for administration purposes.
Based on the above structure, we consider 3 different scaled IoT networks
(i.e., small, medium and large) in the case study. For each network scale, we
run 1000 rounds of simulations to evaluate the scalability of our method. In
each round of simulation, the numbers of servers and user machines are fixed,
while the IoT device number varies. For small-scale, we consider 2 servers, 10
user machines, 9 IoMT devices. The network shown in Fig. 3 is of small-scale. For
medium-scale, we consider 2 servers, 50 user machines, and IoMT device number
ranging from 50 to 100 per VLAN with an increment of 25 in each simulation. For
large-scale, we consider 2 severs, 100 user machines, and the IoMT device number
ranging from 125 to 200 per VLAN with an increment of 25 in each simulation.
To evaluate the adaptability of the method, we also consider 2 servers, 100 user
machines, 400 IoMT devices, and increase the number of VLANs from 4 to 7
with an increment of 1 in each simulation.
A Differential Privacy Mechanism for Deceiving Cyber Attacks 419
Fig. 4. Defender’s cost under different privacy budgets on different scaled networks
Fig. 5. Defender’s cost under privacy budget = 0.2 on different scaled networks
Figure 4(a) shows the results of the small-scale IoT network. It can be seen
that the defence costs under both strategies decrease with the increasing pri-
vacy budget. The intelligent selection strategy has a better defence performance
with less defence cost under the same privacy budget. According to [30], if the
healthcare provider has a defence budget of $25,000.00, the intelligent strategy
with a privacy budget of 0.15–0.2 is the best defence option. By adding a small
noise to the number of devices per VLAN, we obfuscate the attacker, and the
defence cost is well under the budget. That suggests a smaller privacy budget
provides a higher protection level.
Figure 4(b) and 4(c) show the defender’s costs under different privacy bud-
gets for medium-scale and large-scale networks. The defence cost decreases with
the increasing privacy budget under DP-Ran and DP-Intel. This is because fewer
devices to be moved or fewer decoys to be added into the networks for obfusca-
tion. We can also see that the defence cost under DP-Intel is lower than that
under DP-Ran with the same privacy budget. It verifies that our approach per-
forms well on different scaled IoT networks and the defence cost decreases with
the increasing privacy budget.
In Fig. 4(b), it can be seen that the 2-50-100-DP-Ran has a higher defence
cost than 2-50-75-DP-Ran but a lower cost than 2-50-50-DP-Ran. It is because
the level of noise added to the number of devices per VLAN is random and the
A Differential Privacy Mechanism for Deceiving Cyber Attacks 421
6 Conclusion
In this work, we are motivated by the attack model where attackers may exploit
the statistical information of IoT networks (e.g., the number of devices per
VLAN), infer the operational information of VLANs and launch attacks. To
address this problem, we utilise a differential privacy mechanism to obfuscate
the network information by adding Laplace noise to change the number of devices
per VLAN. We then use two defence technologies to achieve the obfuscation. We
evaluate our approach by considering different scaled networks to find the trade-
off between defence cost and privacy budget. The simulation results show that
our approach with intelligent selection strategy has a better performance com-
pared to the random selection strategy. In our work, as we focus more on apply-
ing differential privacy mechanism to obfuscate VLANs and protect the network,
the greedy strategy used for implementing MTD and deception technologies is
simplified. In our future work, we will consider more sophisticated and effective
strategies to select VLANs, devices and decoys for deletion or addition, as well
as different MTD techniques for obfuscation. Using different privacy-preserving
solutions, such as (, δ)-DP and Gaussian DP, is also worth exploring.
422 G. Yang et al.
A Proof of Proposition 1
Proof In the case of Algorithm 1, for neighbouring datasets Nk and Nk , with-
out loss of generality, let A be the step of Algorithm 1 that injects Laplace
noise (i.e., Line 3 of Algorithm 1) and X be a random variable that follows
Lap(( |K|·Δ
)). For any output value z, we have:
Pr[A(Nk ) = z]
= −·|z−f (N )|
k
2·|K|·Δ · exp |K|·Δ
)|
−·|z−f (Nk
−·|z−f (Nk )|
−
= exp( |K|·Δ |K|·Δ
)
)|−|z−f (N )|
|z−f (Nk k
= exp(·( |K|·Δ
))
≤ exp( |K| ) . (6)
Thus, each step of Algorithm 1 satisfies As there are |K| steps in Algo-
|K| -DP .
|K|
rithm 1, based on Theorem 1, Algorithm 1 satisfies ( i=1 |K| )-DP . Therefore,
Algorithm 1 satisfies -DP .
Without loss of generality, denote Algorithm 1 as A1 and Algorithm 2 as
A2 . In the case of Algorithm 2, for neighbouring Nk and Nk , let z be the
output value of algorithm A1 and O be the set of output value of algorithm A2 .
According to the discussion above, we have proved A1 satisfies -DP , so we have
Pr[A1 (Nk ) = z]
≤ exp . (7)
Pr[A1 (Nk ) = z]
A Differential Privacy Mechanism for Deceiving Cyber Attacks 423
References
1. Gokhale, P., Bhat, O., Bhat, S.: Introduction to IoT. Int. Adv. Res. J. Sci. Eng.
Technol. 5(1), 41–44 (2018)
2. Atzori, L., Iera, A., Morabito, G.: The internet of things: a survey. Comput. Netw.
54(15), 2787–2805 (2010)
3. Help Net Security. Threat highlight: Analysis of 5+ million unmanaged, iot, and
iomt devices (2020). https://www.helpnetsecurity.com/2020/07/24/analysis-of-5-
million-unmanaged-iot-and-iomt-devices/
4. THALES. IoT security issues in 2022: A business perspective (2020). https://
www.thalesgroup.com/en/markets/digital-identity-and-security/iot/magazine/
internet-threats
5. Ge, M., Kim, D.S.: A framework for modeling and assessing security of the internet
of things. In: 2015 IEEE 21st International Conference on Parallel and Distributed
Systems (ICPADS), pp. 776–781. IEEE (2015)
6. Nayak, A.K., Reimers, A., Feamster, N., Clark, R.: Resonance: dynamic access
control for enterprise networks. In: Proceedings of the 1st ACM Workshop on
Research on Enterprise Networking, pp. 11–18 (2009)
7. Almeshekah, M.H., Spafford, E.H.: Planning and integrating deception into com-
puter security defenses. In: Proceedings of the 2014 New Security Paradigms Work-
shop, pp. 127–138 (2014)
8. Jajodia, S., Ghosh, A.K., Swarup, V., Wang, C., Wang, X.S.: Moving Target
Defense: Creating Asymmetric Uncertainty for Cyber Threats, vol. 54. Springer,
Heidelberg (2011). https://doi.org/10.1007/978-1-4614-0977-9
9. Crouse, M., Prosser, B., Fulp, E.W.: Probabilistic performance analysis of moving
target and deception reconnaissance defenses. In: Proceedings of the Second ACM
Workshop on Moving Target Defense, pp. 21–29 (2015)
10. Wang, C., Lu, Z.: Cyber deception: overview and the road ahead. IEEE Secur.
Priv. 16(2), 80–85 (2018)
11. Cho, J.H., et al.: Toward proactive, adaptive defense: a survey on moving target
defense. IEEE Commun. Surv. Tutor. 22(1), 709–745 (2020)
424 G. Yang et al.
12. Ge, M., Cho, J., Ishfaq, B., Dong, S.K.: Modeling and analysis of integrated proac-
tive defence mechanisms for internet of things. In: Modeling and Design of Secure
Internet of Things (2020)
13. Ge, M., Hong, J.B., Yusuf, S.E., Kim, D.S.: Proactive defense mechanisms for
the software-defined internet of things with non-patchable vulnerabilities. Future
Gener. Comput. Syst. 78, 568–582 (2018)
14. Ge, M., Cho, J.-H., Kamhoua, C.A., Kim, D.S.: Optimal deployments of defense
mechanisms for the internet of things. In: 2018 International Workshop on Secure
Internet of Things (SIoT), pp. 8–17. IEEE (2018)
15. Ge, M., Cho, J.-H., Kim, D.S., Dixit, G., Chen, I.-R.: Proactive defense for internet-
of-things: Integrating moving target defense with cyberdeception. arXiv preprint
arXiv:2005.04220 (2020)
16. Mercado-Velázquez, A.A., Escamilla-Ambrosio, P.J., Ortiz-Rodriguez, F.: A mov-
ing target defense strategy for internet of things cybersecurity. IEEE Access 9,
118406–118418 (2021)
17. Lu, Z., Wang, C., Zhao, S.: Cyber deception for computer and network security:
survey and challenges. arXiv preprint arXiv:2007.14497 (2020)
18. Juels, A., Rivest, R L.: Honeywords: making password-cracking detectable. In:
Proceedings of the 2013 ACM SIGSAC, pp. 145–160 (2013)
19. La, Q.D., Quek, T.Q., Lee, J., Jin, S., Zhu, H.: Deceptive attack and defense game
in honeypot-enabled networks for the internet of things. IEEE Internet Things J.
3(6), 1025–1035 (2016)
20. Tsemogne, O., Hayel, Y., Kamhoua, C., Deugoué, G.: Game theoretic modeling
of cyber deception against epidemic botnets in internet of things. IEEE Internet
Things J. 9, 2678–2687 (2021)
21. Ye, D., Zhu, T., Shen, S., Zhou, W.: A differentially private game theoretic app-
roach for deceiving cyber adversaries. IEEE TIFS 16, 569–584 (2020)
22. ONF. Openflow switch specification (2017). https://opennetworking.org/sdn-
resources/openflow-switch-specification/
23. Cadini, F., Zio, E., Petrescu, C.-A.: Using centrality measures to rank the impor-
tance of the components of a complex network infrastructure. In: Setola, R.,
Geretshuber, S. (eds.) CRITIS 2008. LNCS, vol. 5508, pp. 155–167. Springer, Hei-
delberg (2009). https://doi.org/10.1007/978-3-642-03552-4 14
24. Yoon, S., Cho, J.-H., Kim, D.S., Moore, T.J., Free-Nelson, F., Lim, H.: Attack
graph-based moving target defense in software-defined networks. IEEE Trans.
Netw. Serv. Manag. 17(3), 1653–1668 (2020)
25. Sharma, D.P., Kim, D.S., Yoon, S., Lim, H., Cho, J.-H., Moore, T.J.: Frvm:
flexible random virtual ip multiplexing in software-defined networks. In: 12th
IEEE International Conference On Big Data Science and Engineering (Trust-
Com/BigDataSE), pp. 579–587. IEEE (2018)
26. TrapX. Security’s deception grid (2017). https://www.scmagazine.com/trapx-
security-deceptiongrid/article/681820
27. Dwork, C.: Differential privacy: a survey of results. In: Agrawal, M., Du, D., Duan,
Z., Li, A. (eds.) TAMC 2008. LNCS, vol. 4978, pp. 1–19. Springer, Heidelberg
(2008). https://doi.org/10.1007/978-3-540-79228-4 1
28. Zhu, T., Xiong, P., Li, G., Zhou, W., Philip, S.Y.: Differentially private model
publishing in cyber physical systems. Future Gener. Comput. Syst. 108, 1297–
1306 (2020)
29. Li, N., Lyu, M., Su, D., Yang, W.: Differential privacy: from theory to practice.
Synth. Lect. Inf. Secur. Priv. Trust 8(4), 1–138 (2016)
A Differential Privacy Mechanism for Deceiving Cyber Attacks 425
Hongcheng Xie1(B) , Zizhuo Chen1 , Yu Guo2 , Qin Liu3 , and Xiaohua Jia1
1
City University of Hong Kong, Hong Kong, China
{hongcheng.xie,zizhuo.chen}@my.cityu.edu.hk, [email protected]
2
Beijing Normal University, Beijing, China
[email protected]
3
Wuhan University, Hubei, China
[email protected]
1 Introduction
The service provider can infer their private information, such as driving paths
or daily activities, based on their uploaded locations.
To address the security issue, a line of papers [3,9,11,12,18,20] have been pro-
posed to provide ORH services while ensuring location privacy. The works [3,12]
were proposed to protect data privacy by cloaking the locations. Since cloaking
may result in a loss of matching accuracy, ORide [11] leveraged the cryptographic
primitives to encrypt the precise locations and matched the nearest taxi based on
Euclidean distances. However, Euclidean distance cannot accurately describe the
distances in the road network. In [9], Luo et al. proposed a design that uses Road
Network Embedding (RNE) [13] as the distance metric instead of Euclidean dis-
tance. The authors leveraged Homomorphic Encryption and Garbled Circuits
to protect the RNE locations. However, it needs another non-colluded crypto
provider to assist the service provider, which leads to high bandwidth overhead
and multiple communication rounds. Recently, the authors [20] devised an ORH
scheme that allows a service provider to perform privacy-preserving ride-hailing
services without involving a third server. Nevertheless, recent work shows that
the service provider can infer the underlying plaintext under some scenarios [17].
In this paper, we propose a privacy-preserving ORH scheme that allows an
untrusted service provider to find the nearest taxi for a passenger by itself while
protecting location privacy. Our design leverages RNE [13] to transform the loca-
tions in the road network and calculate the distance between two locations. To
conduct the secure ride-matching, we redesign Privacy-Preserving Hash (PPH)
with Pseudo-Random Functions (PRFs) and propose a secure difference calcu-
lation with PRF-based PPH. With PRF-based PPH, the component in RNE
vectors will be divided and encrypted into several bit-block ciphertexts. Each
block ciphertext corresponds to a mask weighted difference. Using the binary
comparison between the PRF values, the service provider can calculate the RNE
distances from the ciphertexts and find the nearest taxi for one passenger. To
enhance security, we divide the map into several partitions. The partition ID and
ciphertext generation time will be embedded into the block ciphertext. Given
a passenger ciphertext, it ensures that only the taxi ciphertexts from the same
partition and generated at the same time can be used to calculate the distances.
It reduces the number of candidate taxi ciphertexts cryptographically to improve
the system security. The efficient primitive PRF also improves the PPH’s per-
formance significantly. Besides, we design a tagging scheme to further reduce the
computation overhead in PPH. The service provider can compare the PRF values
with the same tag. Security analysis and experimental evaluation demonstrate
that our proposed system is secure and efficient.
2 Related Works
Some studies proposed some non-cryptographic solutions to hide the exact loca-
tions. PrivateRide [12] hides the pick-up and drop-off locations via cloaking.
In [22], the authors proposed a cloaking scheme to match the passenger and taxi
based on their grid IDs. In [4], the authors proposed a cloaking algorithm based
Privacy-Preserving Online Ride-Hailing Matching System 431
3 Preliminaries
3.1 Road Network Embedding
Road Network Embedding (RNE) [13] is a technique that transforms a road
network into a high dimensional space to calculate the approximate distance
between two points. In this scheme, every point in the road network can be
assigned a vector. The distance between two points can be estimated by using
their given vectors. The road network can be defined as a weighted graph G =
(V, E), where V is the set of road intersections, and E is the set of roads. We
assume that G is an undirected graph. Let n denote the size of V , and d(a, b)
denote the length of minimum weighted path between a and b. A point u can be
transformed into an O(log 2 n)-dimension vector as follows.
Let β = O(logn) and κ = O(logn). We define R as a set which consists of
β · κ subsets of V , i.e., R = {S1,1 , ..., S1,κ , ..., Sβ,1 , ..., Sβ,κ }. Each subset Si,j
is a random subset of V with 2i nodes. For example, the subsets S1,1 , ..., Sβ,1
have 2 nodes each. The subsets Sβ,1 , ..., Sβ,κ have 2β nodes each. Let D(u, Si,j )
denote the minimum distance between u and the nodes in Si,j , i.e., D(u, Si,j ) =
minu ∈Si,j d(u, u ). Thus, the embedded vector E(u) of node u can be defined as:
E(u) = (E1,1 (u), ..., E1,κ (u), ..., Eβ,1 (u), ..., Eβ,κ (u)) (1)
Given the embedded vectors E(u) and E(v) of two points u and v, the short-
est distance δ(u, v) between u and v can be estimated by calculating the chess-
board distance between E(u) and E(v), as shown in Eq. 3.
4 Problem Statements
4.1 System Model
Our system model considers a ride-hailing system that helps a passenger find
the nearest taxi in the road network. As shown in Fig. 1, our system consists
of three entities, i.e., service provider, taxis, and passengers. Service provider
is the entity that performs taxi-passenger matching based on their encrypted
locations. It calculates the approximate distances between each taxi and an
incoming passenger based on their ciphertexts and matches them by selecting
the nearest taxi. Taxis are entities waiting for passengers. They encrypt their
Privacy-Preserving Online Ride-Hailing Matching System 433
locations and upload the ciphertexts to Service Provider periodically to find the
matched passenger. Passengers are the entities who want to hail the nearest taxi
to start their trips. They encrypt their locations and upload the ciphertexts to
Service Provider to find the nearest taxi.
According to Eq. 3, to calculate the distance and select the nearest taxi
securely, our design should be able to calculate the comparable difference from
the vector ciphertexts.
Service Provider
Location Request
Result Result
Taxis Passengers
5 Proposed System
5.1 Secure Distance Calculation from PRF-based PPH
In this section, we discuss about how to encrypt the RNE vectors and calculate
the distances between two vectors. Let Ei (u) denote the i-th component of the
RNE vector E(u), and z denote the ID of the partition in the map. Suppose
that there is one passenger up and one taxi ut in the road network. Their RNE
vectors are E(up ) and E(ut ). They are in the partition z and the vectors are
generated at time slot s. To securely calculate the distance between up and ut in
the RNE context, we need to securely calculate the difference between the i-th
pair of components first, i.e., Ei (up ) − Ei (ut ).
434 H. Xie et al.
To encrypt the components Ei (up ) from the passenger, the passenger first
divides the binary representation of Ei (up ) into m bit-blocks with the same
block size l. We denote by [Ei (up )]j the j-th bit-block of Ei (up ), where j counts
from 0 and is indexed from the least significant bit. For instance, we suppose
that Ei (up ) is 41 (“101001” in binary) and it will be divided into 3 bit-blocks
with block size 2. [Ei (up )]2 is “10”, [Ei (up )]1 is “10” and [Ei (up )]0 is “01”. The
component Ei (ut ) from the taxi is also divided into m bit-blocks as above.
We discuss about how to encrypt [Ei (up )]j first. As the block size is l, there
are 2l possible values for one block, i.e., from 0 to 2l − 1. Let q denote the
possible value, i.e., q ∈ [0..2l − 1]. For each q ∈ [0..2l − 1], we calculate the
difference between it and [Ei (up )]j . Note that we need to multiply the difference
by a block weight instead of calculating it directly. Each block [Ei (up )]j has its
position-related block weight, similar to bit weight. We denote by wj the block
weight for the j-th block and define wj = (2l )j . In the aforementioned example,
the weight of [Ei (up )]2 is (22 )2 = 16. The weight represents the contribution
of the difference in one block. Let [Ei (up )]j,q denote the tuple of the possible
value q and the weighted difference between [Ei (up )]j and q. To encrypt one
block [Ei (up )]j , we encrypt all the possible values q to the matchable ciphertexts
in PPH together with their corresponding weighted differences. To protect the
weighted difference, it should be masked by a token so that it can be unmasked
if and only if there is a correct token from the block ciphertext of the taxi. We
will discuss the details later.
The set that needs to be encrypted for [Ei (up )]j is defined as shown in Eq. 5,
including all possible values with their weighted differences.
{[Ei (up )]j,q = (q, (q − [Ei (up )]j ) ∗ wj )|q ∈ [0..2l − 1]} (5)
To encrypt the block [Ei (ut )]j from the taxi, we generate the matchable
ciphertext for [Ei (ut )]j itself instead of all the possible values on the passen-
ger’s side. Our basic idea is to ensure that the matchable ciphertext of [Ei (ut )]j
matches the ciphertext of q if and only if [Ei (ut )]j = q. Thus, the weighted dif-
ference between q and [Ei (up )]j is that between [Ei (ut )]j and [Ei (up )]j so that
the difference is revealed correctly.
Now we focus on how to encrypt one possible tuple [Ei (up )]j,q based on PPH.
We leverage PRF as the matching cryptographic primitive. Let [Ei (uˆp )]j,q denote
the ciphertext of [Ei (up )]j,q . It is defined as
(tagi,j,q , F (H(k1 , q||i||j||z||s), γj ),
(6)
F (H(k2 , q||i||j||z||s), γj ) ⊕ ((q − [Ei (up )]j ) ∗ wj ))
where || is the string concatenation operator, ⊕ is the XOR operator, H and F
are PRFs, γj is a random number shared among all the ciphertexts for block
[Ei (up )]j , and k1 and k2 are two secret keys shared among the passengers and
taxis. They are distributed by a key manager, an independent admittance control
entity that is not involved in taxi matching. tagi,j,q is a tag used to improve the
query efficiency, which is defined as
tagi,j,q = F (H(k1 , q||i||j||z||s), γj )&(2θ − 1) (7)
Privacy-Preserving Online Ride-Hailing Matching System 435
where & is bit-wise AND operator, and θ is a pre-defined value which is smaller
than l. That means we use the last θ bits as the tag of this ciphertext. The
ciphertexts with the same tag can be grouped together. The ciphertext order in
one group can be shuffled. We will discuss about how to use it to improve the
query efficiency later.
ˆ p )]j includes
We denote by [Ei (uˆp )])j the ciphertext of block [Ei (up )]j . [Ei (u
the ciphertexts of all possible tuples [Ei (up )]j,q and the random nunce γj , as
shown in Eq. 8.
ˆ p )]j = {γj , [Ei (uˆp )]j,q |q ∈ [0..2l − 1]}
[Ei (u (8)
(H(k1 , [Ei (ut )]j ||i||j||z||s), H(k2 , [Ei (ut )]j ||i||j||z||s)) (9)
The ciphertexts of Ei (up ) and Ei (ut ) consists of the ciphertexts of all the
blocks respectively, as shown in Eq. 10 and Eq. 11.
?
F (H(k1 , q||i||j||z||s), γj ) = F (H(k1 , [Ei (ut )]j ||i||j||z||s), γj ) (12)
According to Eq. 12, we can find that Eq. 12 holds if and only if q = [Ei (ut )].
The other parameters in PRF also ensures that they are from the j-th block in
the i-th components, from the same zone z, and generated at the same time slot
s.
To improve query efficiency, we can extract the last θ bits of the right side in
Eq. 12, as shown in Eq. 13. We can only test the possible ciphertexts [Ei (uˆp )]j,q
with the same tag, i.e., tag = tagi,j,q , to reduce the number of matching tests.
Once [Ei (uˆ t )]j matches one [Ei (uˆp )]j,q , we can generate the mask maskj
ˆ t )]j and γj from [Ei (u
with H(k2 , [Ei (ut )]j ||i||j||z||s) from [Ei (u ˆ p )]j , as shown
in Eq. 14. According to Eq. 6, we can find that maskj is equal to the mask of
weighted difference (q − [Ei (up )]j ) ∗ wj if [Ei (ut )]j = q, i.e., they are matched.
436 H. Xie et al.
Thus, by using XOR operation, we can reveal the weighted difference ([Ei (ut )]j −
[Ei (up )]j ) ∗ wj from the block ciphertext.
After revealing ([Ei (ut )]j − [Ei (up )]j ) ∗ wj for all j ∈ [0..m], the absolute
difference between the i-th components |Ei (ut ) − Ei (up )| can be calculated as
Eq. 15.
|Ei (ut ) − Ei (up )| = | (([Ei (ut )]j − [Ei (up )]j ) ∗ wj )| (15)
j∈[0..m]
ˆ p ) = {s, z, Ei (u
E(u ˆ p )|i ∈ [0..β · κ]} (17)
As we can calculate the absolute differences for one pair of components, given
the ciphertexts of two RNE vectors, the distance between one passenger and one
taxi can be calculated according to Eq. 3.
In summary, the service provider can calculate the RNE distance between
a passenger and a taxi securely if they are from the same partition and their
ciphertexts are generated in the same time slot.
one in the global map. To improve the accuracy, we let the taxi in the partition
z generate the another extra 8 ciphertexts of its current RNE vectors with z ,
which is the adjacent partition of z. Thus, a taxi will participate the matching
procedure for its partition and its neighbor partitions. Relatively, one hailing
request from a passenger will be served by the taxis from its partition and its
neighbor partitions. This design can improve the query accuracy of our proposed
system.
6 Security Analysis
6.1 Leakage Definition
As the difference between two components are calculated from the revealed
weighted differences in plaintext, our security analysis will focus on the secure
block weighted difference calculation. First we define the following leakage func-
tions:
Leakage Function L1 (u): Let (tagi,j,q , CT1 , CT2 ) denote the ciphertext in
Eq. 6. Given a block value u from one passenger, the leakage function for pas-
sengers is defined as L1 (u) = (|tagi,j,q |, |CT1 |, |CT2 |, l, |γ|), where l is the block
size, and |tagi,j,q |,|CT1 |,|CT2 |, and |γ| are the bit lengths.
Leakage Function L2 (u∗ ): Let (CT1 , CT2 ) denote the ciphertext in Eq. 9.
Given a block value u∗ from one taxi, the leakage function for taxis is defined as
L2 (u∗ ) = (|CT1 |, |CT2 |).
Leakage Function L3 (û, uˆ∗ ): Given two block ciphertexts from a passenger
and a taxi, the leakage function for the comparison is defined as L3 (û, uˆ∗ ) =
(M P, dif, Nt×t ), where M P is the matched possible ciphertext, dif is the
revealed weighted difference, and Nt×t is a symmetric binary matrix that records
the repeated comparisons.
438 H. Xie et al.
6.2 Analysis
Theorem 1. Ω is (L1 , L2 , L3 )-secure if F and H are PRFs.
7 Experimental Evaluation
7.2 Performance
Accuracy: Since RNE estimates the distances in the road network, it may incur
inaccurate result. Moreover, we use partition to reduce the number of candidate
taxis. We evaluate the accuracy of our system and the influence of partition
granularity on accuracy. We generate 100 passengers randomly and count the
number of passengers whose matched taxis from RNE are the same as the ground
truths. From Fig. 2a, the accuracy raises as the component raises. The accuracy
is 98% when the component is 32. Our partition scheme is not influence on the
accuracy.
The Performance of Generation: Figure 2b shows that the passenger’s time
cost of ciphertext generation increases when the number of components increases.
Figure 2c illustrates that taxi’s also increases as the number of components
increases. The taxi’s time cost is smaller than the passenger’s, although the taxi
needs to encrypt 9 vector ciphertexts for different partition IDs. That is because
the passenger needs to encrypt several possible values for each block encryption,
while the taxi only needs to encrypt one value. According to Fig. 2f, as the same
reason, the taxi’s cost is smaller than the passenger’s. It is reasonable because
taxis need to upload their tokens frequently to wait for the passenger.
The Performance of Taxi-Passenger Matching: Our evaluation is con-
ducted under 800 taxis and the partition scheme 10 × 10. According to Fig. 2d,
we can find that the time cost of our scheme is significantly better than the
baseline. From Fig. 2e, the time costs of all the three block settings raise linearly
as the number of components increases. We can find that the time cost decreases
as the block size increases, as the increase of the block size leads to the decrease
of the number of blocks in one vector component. Although the number of the
ciphertexts for the possible values is exponential to the block size in one block,
the service provider needs to compare only a small part of them by using our
tag optimization scheme. The comparison costs in one block with different block
size are close. Thus, less blocks result in less time cost. PRFs provide efficient
ciphertext matching, and our partition design and tagging scheme reduce the
number of ciphertext matching operations.
8 Conclusion
References
1. Aı̈vodji, U.M., Gambs, S., Huguet, M.J., Killijian, M.O.: Meeting points in
ridesharing: a privacy-preserving approach. Transp. Res Part C: Emerging Technol.
72, 239–253 (2016)
2. Cash, D., Liu, F.-H., O’Neill, A., Zhandry, M., Zhang, C.: Parameter-hiding order
revealing encryption. In: Peyrin, T., Galbraith, S. (eds.) ASIACRYPT 2018. LNCS,
vol. 11272, pp. 181–210. Springer, Cham (2018). https://doi.org/10.1007/978-3-
030-03326-2 7
3. Chow, C.Y., Mokbel, M.F., Liu, X.: A peer-to-peer spatial cloaking algorithm for
anonymous location-based service. In: Proceedings of the 14th ACM GIS, pp. 171–
178 (2006)
4. Cui, N., Yang, X., Wang, B.: A novel spatial cloaking scheme using hierarchical
hilbert curve for location-based services. In: Cui, B., Zhang, N., Xu, J., Lian, X.,
Liu, D. (eds.) WAIM 2016. LNCS, vol. 9659, pp. 15–27. Springer, Cham (2016).
https://doi.org/10.1007/978-3-319-39958-4 2
5. Curtmola, R., Garay, J., Kamara, S., Ostrovsky, R.: Searchable symmetric encryp-
tion: improved definitions and efficient constructions. J. Comput. Secur. 19(5),
895–934 (2011)
6. Fan, J., Vercauteren, F.: Somewhat practical fully homomorphic encryption. Cryp-
tology ePrint Archive (2012)
7. Guo, Y., Xie, H., Wang, M., Jia, X.: Privacy-preserving multi-range queries for
secure data outsourcing services. IEEE TCC (2022)
8. Li, F., Cheng, D., Hadjieleftheriou, M., Kollios, G., Teng, S.-H.: On trip planning
queries in spatial databases. In: Bauzer Medeiros, C., Egenhofer, M.J., Bertino,
E. (eds.) SSTD 2005. LNCS, vol. 3633, pp. 273–290. Springer, Heidelberg (2005).
https://doi.org/10.1007/11535331 16
9. Luo, Y., Jia, X., Fu, S., Xu, M.: pride: privacy-preserving ride matching over road
networks for online ride-hailing service. IEEE TIFS 14(7), 1791–1802 (2018)
10. Lynn, B.: On the implementation of pairing-based cryptosystems. Ph.D. thesis,
Stanford University Stanford, California (2007)
11. Pham, A., Dacosta, I., Endignoux, G., Pastoriza, J.R.T., Huguenin, K., Hubaux,
J.P.: Oride: a privacy-preserving yet accountable ride-hailing service. In: 26th
{USENIX} Security 17), pp. 1235–1252 (2017)
12. Pham, A., et al.: Privateride: a privacy-enhanced ride-hailing service. PoPETs
2017(2), 38–56 (2017)
13. Shahabi, C., Kolahdouzan, M.R., Sharifzadeh, M.: A road network embedding tech-
nique for k-nearest neighbor search in moving object databases. GeoInformatica
7(3), 255–273 (2003)
14. Sherif, A.B., Rabieh, K., Mahmoud, M.M., Liang, X.: Privacy-preserving ride shar-
ing scheme for autonomous vehicles in big data era. IEEE IoTJ 4(2), 611–618
(2016)
15. Uber: Uber marks 6 years in Hong Kong (2020). https://www.uber.com/en-HK/
newsroom/uber-marks-6-years-in-hong-kong/
16. Uber: Uber announces results for third quarter 2021 (2021). https://investor.uber.
com/news-events/news/press-release-details/2021/Uber-Announces-Results-for-
Third-Quarter-2021/
442 H. Xie et al.
17. Vivek, S.: Comments on” a privacy-preserving online ride-hailing system without
involving a third trusted server. arXiv preprint arXiv:2112.06449 (2021)
18. Wang, F., et al.: Efficient and privacy-preserving dynamic spatial query scheme for
ride-hailing services. IEEE TVT 67(11), 11084–11097 (2018)
19. Wong, W.K., Cheung, D.W.l., Kao, B., Mamoulis, N.: Secure KNN computation
on encrypted databases. In: Proceedings of the 2009 ACM SIGMOD International
Conference on Management of Data, pp. 139–152 (2009)
20. Xie, H., Guo, Y., Jia, X.: A privacy-preserving online ride-hailing system without
involving a third trusted server. IEEE TIFS 16, 3068–3081 (2021)
21. Yu, H., Jia, X., Zhang, H., Shu, J.: Efficient and privacy-preserving ride matching
using exact road distance in online ride hailing services. IEEE TSC 15, 1841–1854
(2020)
22. Zhu, L., Li, M., Zhang, Z., Qin, Z.: Asap: an anonymous smart-parking and pay-
ment scheme in vehicular networks. IEEE TDSC 17(4), 703–715 (2018)
Efficient and Fine-Grained Sharing
of Signed Healthcare Data in Smart
Healthcare
Jianghua Liu1 , Lei Xu1(B) , Bruce Gu2 , Lei Cui3 , and Fei Zhu4
1
Nanjing University of Science and Technology, Nanjing, China
[email protected]
2
Victoria University, Footscray, Australia
[email protected]
3
Shandong Computer Science Center (National Supercomputer Center in Jinan),
Jinan, China
4
RMIT University, Melbourne, Australia
1 Introduction
The Internet of Things (IoT) offers a significant and beneficial impact on inte-
grating existing and new technologies. Different from the traditional internet, IoT
connects all sorts of connected “Things” (interrelated and intelligence comput-
ing devices) into a comprehensive network to exchange data with others over the
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 443–458, 2022.
https://doi.org/10.1007/978-3-031-23020-2_25
444 J. Liu et al.
1.2 Contribution
Under the deployment of RSS in smart healthcare system, apparently, the data
owner could hide the sensitive information in sharing of healthcare data mean-
while any end-user can still verify the data authenticity. Even through RSS
could realize show-or-hide operations over signed healthcare data, the revealed
data is vulnerable to the additional redaction attack. Moreover, the linkability
of redacted signature with the original signature would invalid the privacy pro-
tection feature of RSS. It is therefore a necessary to eliminate the additional
redaction attack and linkability of RSS in practical applications. Another chal-
lenge of RSS is that the signature length, signature computation and verification
time should satisfy the high efficiency requirement in smart healthcare system.
Aiming to address the security and efficiency issues while deploying RSS in smart
healthcare system, our contributions in this paper can be summarized as follows.
The rest of this paper is organized as follows. Section 2 is devoted to the pre-
liminaries required by this paper. The definitions of RSS is described in Sect. 3.
Section 4 describes our proposed construction. Section 5 gives the analysis of
proposed scheme. Section 6 concludes this paper.
2 Preliminaries
This section firstly provides some general notations over all this paper. Then,
several relative cryptographic primitives are provided, including the access struc-
ture, monotone span program, linear secret sharing scheme, and bilinear pairings.
Efficient and Fine-Grained Sharing of Signed Healthcare Data 447
3.1 Syntax
There are three entities in the framework of RSS, namely the signer, redactor,
and verifier. The implementation of this framework consists of four polynomial
time algorithms (KeyGen, Sign, Verify, Redact) defined as follows:
KeyGen(1λ ): This algorithm takes as input a security parameter 1λ . It outputs
a key pair (pk, sk), where pk is a public key for signature verification, and sk is
a secret key for signing: (pk, sk) ← KeyGen(1λ ).
Efficient and Fine-Grained Sharing of Signed Healthcare Data 449
Sign(sk, M ): On input sk and a message M with n message blocks {mi }ni=1 , this
algorithm outputs a signature σ for M : (M, σ) ← Sign(sk, M ).
Verify(pk, MI , σI ): This algorithm takes as input pk, a message MI and a sig-
nature σI . It outputs a bit b ∈ {0, 1} or ⊥ otherwise, where b = 1 means valid:
b ← Verify(pk, MI , σI ).
Redact(pk, M, I, σ): This algorithm takes as input pk, a message M , a subset
I ⊂ [1, n], and a signature σ. It executes redaction operation and outputs a
signature σI on {mi }i∈I : (MI , σI ) ← Redact(pk, M, I, σ).
– Setup: To obtain a private key (sk, pk), the challenger runs KeyGen and
resets c ← 0 and Q1 ← ∅. Then adversary A receives pk.
– Query Phase: Adversary A executes signature queries to challenger with pk
by adaptively choosing at most |Q1 | message M1 , · · · , M|Q1 | . For each query,
the challenger runs (Mj , σj ) ← Sign(sk, Mj ) and forwards (Mj , σj ) to A,
stores Q1 [c] = (Mj , σj ) and updates c ← c + 1.
– Output: After queries, A outputs a pair (M ∗ , σ ∗ ) and wins the above game if
M ∗ = ∅ and (1) ∀j < c, ∃mk ∈ M ∗ : mk ∈ / Mj and (2) Verify(pk, M ∗ , σ ∗ ) = 1.
450 J. Liu et al.
Unforgeability
An RSS is unforgeable if AdvA (λ) is negligible in Game 1 for any
PPT adversary A even it has access to signatures on messages of its choice,
Privacy 1
where AdvA (λ) = Pr[b = b] − 2 is defined as the advantage that A has in
the above game.
– Setup: To obtain a public key pk and a private key sk, the challenger runs
KeyGen and forwards pk to adversary A.
– Phase 1: The adversary A adaptively chooses |Q2 | message (M1 , M2 , · · · ,
MQ2 ) and requests signature with pk on them. The challenger runs (Mi , σi ) ←
Sign(sk, Mi ) and sends (Mi , σi ) to A for every query.
– Challenge:
(0)
1. After Phase 1, adversary A outputs two messages M 0 = {mj }nj=1 and
(1) (0) (1)
M 1 = {mj }nj=1 satisfies mj = mj for j ∈ I. Then, A sends M 0 , M 1
and I to the challenger.
2. The challenger randomly chooses a bit b ∈ {0, 1} and generates signature
σ b ← Sign(sk, M b ). Then a redacted signature for MIb is computed σIb ←
Redact(pk, M b , σ b , I).
– Phase 2: As in Phase 1, A can proceed signing oracle queries again.
– Guess: Eventually, A wins the above game if b = b, where b is a guess of b
that A exported in this.
Unlinkability
A redactable signature scheme satisfies the unlinkability if AdvA (λ)
is negligible for any PPT adversary A in Game 2, where the advantage of A is
Unlinkability
defined as AdvA (λ) = Pr[b = b] − 12 .
4 Our Construction
In this section, we introduce our main construction, an efficient redactable signa-
ture scheme with fine-grained redaction control for the secure sharing of health-
care data in smart healthcare systems. This construction not only achieves the
Efficient and Fine-Grained Sharing of Signed Healthcare Data 451
control policy P is depicted by the monotone boolean formula. The inputs of this
formula are associated with the healthcare data block in a healthcare document.
This policy can be converted into a monotone span program which is a n × t
452 J. Liu et al.
R
matrix M. Then, a secret s ← Zp value is chosen and a vector ω = (s, y2 , . . . , yt )T
R
in which yi ← Zp is constructed, where s is the secret to be divided into n shares.
For 1 ≤ i ≤ n, it calculates si = M · ω, and each share “belongs” to ρ(i), where
ρ defines each row number i of matrix M as ρ(i) that labels the rows of M
with healthcare data block. Then, it computes (Z1 , . . . , Zn ) ← ( g s1 , . . . , gsn ).
Finally, this algorithm outputs (X, Z1 , . . . , Zn , Y1 , . . . , Yn ) as a public key pk for
verification and then (s, x, y1 , . . . , yn ) as a secret key sk for signing.
Sign(sk, M ): This algorithm takes as inputs a secret key sk and a set of healthcare
$
data M
with l blocks {mi }li=1 . It selects a random σ1 ← G∗1 and computes σ2 ←
l
x+s+ y H(m )
σ1 i
i=1 i
. The output of this algorithm is a signature σ = ( σ1 , σ1 , σ2 ),
where H is a collision resistant hash function and σ 1 is set as 1G2 .
Verify(pk, MI , σ): This algorithm takes as input a public key pk, a set of health-
care data MI with a set of blocks {mi }i∈I and a signature σ (redacted or not).
It checks whether the following equality is satisfied:
H(m )
e(σ1 , Zi )ωi e(σ1 , X
·σ
1 Yi i
) = e(σ2 , g), (1)
i∈I i∈I
where ωi is defined as the constants {ωi ∈ Zp }i∈I such that if the shared
health-
care data blocks satisfies the fine-grained redaction policy then s = i∈I ωi si .
It outputs 1 if the equality holds.
Redact(pk, M, σ, I): This algorithm takes as input a public key pk, a set of
healthcare data M , the corresponding signature σ, and a subset I ⊂ [1, l]. It
$
generates 2 random scalars w, r ← Zp and computes σ1 ← σ1r , σ2 ← σ2r · σ1w ,
1 ← gw i∈I Yi
H(mi )
σ , where I = [1, l]\I. If I = ∅ then σ 1 = gw . In all cases,
the redactor returns the derived signature σI = ( σ1 , σ1 , σ2 ) on MI . (pk, MI , σI )
Correctness. Let ( σ1 , σ1 , σ2 ) be a redacted signature on MI output by the
Redact algorithm. Then we have:
H(m )
e(σ1 , Zi )ωi e(σ1 , X ·σ
1 Yi i
)
i∈I i∈I
Yi Yi
H(mi ) H(mi )
= e(σ1r , gsi )ωi e(σ1r , gx w
· g · )
i∈I i∈I i∈I
(2)
x+w+ li=1 yi H(mi )
=e(σ1r , g) i∈I si ·ωi
e(σ1r , g )
l
r(x+w+ yi H(mi ))
=e(σ1r·s , g)e(σ1 i=1
, g)
l
r(x+s+ i=1 yi H(mi ))
=e(σ1rw · σ1 , g) = e(σ1w · σ2r , g) = e(σ2 , g),
Proof. Let Σ = (KeyGen, Sign, Verify, Redact) denote our construction, and A
be a PPT adversary against the EUF-CMA security. We construct an efficient
algorithm B using A to against Assumption 1. Let C be the challenger in the
following game. Without loss of generality, it is assumed that once A requests a
signature on M or outputs a forgery (M, σ), then M has previously queried to
H.
Setup. The public key pk that B receives from C contains the public param-
eters (p, G1 , G2 , GT , e) along with ( Y ) are set as in Assumption 1. Then,
g , X,
j=n $
algorithm B chooses {αj , βj }j=1 ← Zp and sets Yj ← Y βj gαj . Additionally, a
random function H : {0, 1}∗ → Zp is chosen. It outputs pk ← ( Yj ) and
g , X,
forwards it to A.
Queries. In this phase, the adversary A has access to make polynomial-time
limited queries to H as well as signing oracle Signpk (·). When B receives a
signature generation query on a healthcare document Mi = {mi,1 , . . . , mi,l }
from adversary A, it first answers the random-oracle queries of A with uni-
form elements of Zp , and then requests a signature on mi = βj H(mi,j )
to the signing oracle and so receives σ = (σ1 , σ2 ). The signature
σ satisfies
αj H(mi,j )
e(σ2 , g) = e(σ1 , X · Y βj H(mi,j )
). Finally, B computes σ2 ← σ1 · σ2
and returns σ = (σ1 , σ2 ) to A. The output is a valid signature on Mi from the
view of A since:
454 J. Liu et al.
e(σ2 , g)
αj H(mi,j )
= e(σ1 · σ2 , g)
αj H(mi,j )
= e(σ1 , g) · e(σ2 , g)
(3)
= e(σ1 , g αj H(mi,j )
) · e(σ1 , X · Y βj H(mi,j ) )
·
= e(σ1 , X gαj H(mi,j ) Y βj H(mi,j ) )
H(m )
· (
= e(σ1 , X g αj Y βj )H(mi,j ) ) = e(σ1 , X
· Yj i,j
).
e(σ2∗ , g)
− αj H(m∗
j)
= e(σ1 · σ2 , g)
− αj H(m∗
j)
= e(σ1 , g) · e(σ2 , g)
∗
H(mj ) (4)
= e(σ1 , g− αj H(m∗
j) ·
) · e(σ1 , X Yj )
= e(σ1 , g− αj H(m∗
j) ·
) · e(σ1 , X (Y βj gαj )H(mj ) )
∗
·
= e(σ1 , X Y βj H(mj ) ) = e(σ1 , X
∗
· Y βj H(m∗
j) · Y m∗ ).
) = e(σ1 , X
Under the Assumption 1, this is a valid forgery with respect to public key pk ∗
$
if m∗ has never been queried to the signing oracle. Let {γj }lj=1 ← Zp , and set
βj ← βj −γj and αj ← αj +yγj . The public parameter Y is generated by choosing
$
y ← Zp such that Y = gy . Then one can have gαj Y βj = gαj +yγj Y βj −γj =
gαj Y βj = Yj . Therefore, from A’s point of view, all its signature queries are
answered with the signing oracle from challenger rather than a revised version
from B. Moreover, it is totally independent of the βj in the complete view of the
adversary. Hence, B aborts with a probability upper-bounded by Q q.
Schemes pk σ σI
[25] 1G2 (l + 1)G1 (|I| + 1)G1
2
n +n+2
[8] 2 G1 + nG2 2(G1 + G2 ) 2(G1 + G2 )
[26] (2n + 1)G1 + (n + 1)G2 3G1 + 1G2 3G1 + 1G2
Ours (2n + 1)G2 2G1 + 1G2 2G1 + 1G2
456 J. Liu et al.
6 Conclusion
The efficient sharing of signed healthcare data with privacy preservation issues
in smart healthcare systems are explored. To overcome the security flaws, we
presented an RSS with short signature and fine-grained sharing control, which
realized shared data authentication, privacy protection, unlinkability, and fine-
grained additional redaction control. The security analysis of our RSS indicates
this construction achieves unlinkability and unforgeability which satisfy the secu-
rity demands in sharing of healthcare data in smart healthcare systems. Fur-
thermore, we conducted extensive efficiency analyses of the proposed scheme by
comparing with other related works. The results imply our scheme is sound in
guarding the privacy and authenticity of shared healthcare data with lightweight
resource expense. In our future work, we plan to further design some more
lightweighted implementation, multi-redactor accountability and signer anony-
mous fully unlinkability RSS to improve the security and efficiency for sharing
of healthcare data in smart healthcare systems.
References
1. Johnson, R., Molnar, D., Song, D., Wagner, D.: Homomorphic signature schemes.
In: Preneel, B. (ed.) CT-RSA 2002. LNCS, vol. 2271, pp. 244–262. Springer,
Heidelberg (2002). https://doi.org/10.1007/3-540-45760-7_17
2. Steinfeld, R., Bull, L., Zheng, Y.: Content extraction signatures. In: Kim, K. (ed.)
ICISC 2001. LNCS, vol. 2288, pp. 285–304. Springer, Heidelberg (2002). https://
doi.org/10.1007/3-540-45861-1_22
3. Liu, J., Huang, X., Liu, J.K.: Secure sharing of personal health records in cloud
computing: ciphertext-policy attribute-based signcryption. Futur. Gener. Comput.
Syst. 52, 67–76 (2015)
4. Liu, J., Ma, J., Wu, W., Chen, X., Huang, X., Xu, L.: Protecting mobile health
records in cloud computing: A secure, efficient, and anonymous design. ACM Trans.
Embedded Comput. Syst. (TECS) 16(2), 1–20 (2017)
Efficient and Fine-Grained Sharing of Signed Healthcare Data 457
5. Pöhls, H.C., Karwe, M.: Redactable signatures to control the maximum noise for
differential privacy in the smart grid. In: Cuellar, J. (ed.) SmartGridSec 2014.
LNCS, vol. 8448, pp. 79–93. Springer, Cham (2014). https://doi.org/10.1007/978-
3-319-10329-7_6
6. Lahoti, G., Mashima, D., Chen, W.-P.: Customer-centric energy usage data man-
agement and sharing in smart grid systems. In: Proceedings of the first ACM
Workshop on Smart Energy Grid Security, pp. 53–64 (2013)
7. Pöhls, H.C., Bilzhause, A., Samelin, K., Posegga, J.: Sanitizable signed privacy
preferences for social networks. In: GI-Jahrestagung, p. 409. Citeseer (2011)
8. Sanders, O.: Efficient redactable signature and application to anonymous creden-
tials. In: Kiayias, A., Kohlweiss, M., Wallden, P., Zikas, V. (eds.) PKC 2020. LNCS,
vol. 12111, pp. 628–656. Springer, Cham (2020). https://doi.org/10.1007/978-3-
030-45388-6_22
9. Sanders, O.: Improving revocation for group signature with redactable signature.
In: Garay, J.A. (ed.) PKC 2021. LNCS, vol. 12710, pp. 301–330. Springer, Cham
(2021). https://doi.org/10.1007/978-3-030-75245-3_12
10. Yang, S., Huang, X., Zheng, M., Ma, J.: Ring trapdoor redactable signatures from
lattice. In: Deng, R., et al. (eds.) ISPEC 2021. LNCS, vol. 13107, pp. 190–208.
Springer, Cham (2021). https://doi.org/10.1007/978-3-030-93206-0_12
11. Bauer, D., Blough, D.M., Mohan, A.: Redactable signatures on data with depen-
dencies and their application to personal health records. In: Proceedings of the 8th
ACM Workshop on Privacy in the Electronic Society, pp. 91–100 (2009)
12. Slamanig, D., Rass, S.: Generalizations and extensions of redactable signatures
with applications to electronic healthcare. In: De Decker, B., Schaumüller-Bichl,
I. (eds.) CMS 2010. LNCS, vol. 6109, pp. 201–213. Springer, Heidelberg (2010).
https://doi.org/10.1007/978-3-642-13241-4_19
13. Wu, Z., Hsueh, C., Tsai, C., Lai, F., Lee, H., Chung, Y.: Redactable signatures for
signed CDA documents. J. Med. Syst. 36(3), 1795–1808 (2012)
14. Brown, J., Blough, D.M.: Verifiable and redactable medical documents. In: AMIA
Annual Symposium Proceedings, vol. 2012, p. 1148. American Medical Informatics
Association (2012)
15. Liu, J., Ma, J., Zhou, W., Xiang, Y., Huang, X.: Dissemination of authenticated
tree-structured data with privacy protection and fine-grained control in outsourced
databases. In: Lopez, J., Zhou, J., Soriano, M. (eds.) ESORICS 2018. LNCS, vol.
11099, pp. 167–186. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-
98989-1_9
16. Liu, J., Ma, J., Xiang, Y., Zhou, W., Huang, X.: Authenticated medical documents
releasing with privacy protection and release control. IEEE Trans. Dependable
Secure Comput. 18(1), 448–459 (2019)
17. Liu, J., Hou, J., Huang, X., Xiang, Y., Zhu, T.: Secure and efficient sharing of
authenticated energy usage data with privacy preservation. Comput. Secur. 92,
101756 (2020)
18. Liu, J., et al.: Leakage-free dissemination of authenticated tree-structured data
with multi-party control. IEEE Trans. Comput. 70(7), 1120–1131 (2020)
19. Yan, X., Ng, W.W., Zeng, B., Zhao, B.,. Luo, F, Gao, Y.: P2sim: privacy-preserving
and source-reliable incentive mechanism for mobile crowdsensing. IEEE Internet
Things J. (2022)
20. Beimel, A., et al.: Secure schemes for secret sharing and key distribution (1996)
21. Goyal, V., Pandey, O., Sahai, A., Waters, B.: Attribute-based encryption for fine-
grained access control of encrypted data. In: Proceedings of the 13th ACM Con-
ference on Computer and Communications Security, pp. 89–98 (2006)
458 J. Liu et al.
22. Galbraith, S.D., Paterson, K.G., Smart, N.P.: Pairings for cryptographers. Discret.
Appl. Math. 156(16), 3113–3121 (2008)
23. Pointcheval, D., Sanders, O.: Short randomizable signatures. In: Sako, K. (ed.)
CT-RSA 2016. LNCS, vol. 9610, pp. 111–126. Springer, Cham (2016). https://doi.
org/10.1007/978-3-319-29485-8_7
24. Derler, D., Pöhls, H.C., Samelin, K., Slamanig, D.: A general framework for
redactable signatures and new constructions. In: Kwon, S., Yun, A. (eds.) ICISC
2015. LNCS, vol. 9558, pp. 3–19. Springer, Cham (2016). https://doi.org/10.1007/
978-3-319-30840-1_1
25. Miyazaki, K., Hanaoka, G., Imai, H.: Digitally signed document sanitizing scheme
based on bilinear maps. In: Proceedings of the 2006 ACM Symposium on Informa-
tion, Computer and Communications Security, pp. 343–354 (2006)
26. Sanders, O.: Improving revocation for group signature with redactable signature.
IACR Cryptol. ePrint Arch. 2020, 856 (2020)
Enabling Secure Deduplication
in Encrypted Decentralized Storage
1 Introduction
With the advancement of blockchain, decentralized applications have vigorously
evolved [34–36,48]. Among them, Decentralized Cloud Storage (DCS) acts as
a new storage option (e.g., Storj [16], Sia [14], Filecoin [7]), whose core idea
is to incentivize users to share idle storage and hence build a more economi-
cal and reliable distributed storage network. The outsourced data may indicate
the users’ private information,e.g., geographical location, password, and health
status. Meanwhile, data breaches exist widely [3,17] and threaten the users’
personal privacy. Thus, data privacy protection becomes particularly important.
Data in DCS can be repeatedly stored, making the storage across the net-
work overwhelmed, which increases the demand for data deduplication. Unfor-
tunately, existing DCS designs hardly achieve the demand for optimized storage
space utilization and encrypted data protection at the same time. The repre-
sentative ones like Storj [16] and Sia [14], ensure data security by involving
standard encryption. Data in such systems is first encrypted, and the ciphertext
is split via erasure code [28], then distributed around the network. This strategy
ensures data reliability at the expense of multiple storage of original files. This
leads to the expanded storage of files, which increases the storage overhead of
the system in general. Meanwhile, cross-user data deduplication is omitted since
the user individually encrypt the files. Sharing a common key across users can
mitigate such issue, but inevitably involve the threat of single client compro-
mise [20,22,27]. The other ones, like Filecoin together with InterPlanetary File
System (IPFS) [9], implement deduplication within a single user. Concerning
data security, the data is only protected during transmission in fundamental
design, to keep the system lightweight and free of vendor lock-in [9].
The smart contract [49] is a natural fit for the new DCS scenario, which is an
auto-executed decentralized computing program on the blockchain. Each smart
contract contains storage, script code and is identified by its address. Smart con-
tract are executed by sending public transactions and are permanently recorded,
making it transparent and immutable. Therefore, we consider placing the essen-
tial metadata on blockchain and enable cross-user deduplication in DCS. Yet
due to the openness of the blockchain, one can download the block and analysis
its content [2,6], which incur the risk that users cheating the system and illegally
obtaining the outsourced data. Such features disable the conventional encryp-
tion workflow [20,23,27,33] in which store the metadata in plaintext. We take
this into account and encrypt the metadata before storing it on the blockchain.
Meanwhile, it is unreasonable to set huge data on-chain since the storage on
smart contract has actual cost [49].
We leverage Message-Locked Encryption (MLE) [23] to protect the data pri-
vacy, which enables secure deduplication over encrypted data. But such scheme
still face the client-side short information (e.g., file hash, file tag) attacks like
file ownership cheating [33] and file ciphertext poisoning [50]. Concretely, the
former attack refers to the users who use short information (e.g., illegal acqui-
sition from another channel) to trick the system into adding them to the owner
Enabling Secure Deduplication in Encrypted Decentralized Storage 461
list and further obtain the file. The latter attack indicates the users uploading
ciphertext inconsistent with file tag, thus to deceive the subsequent users.
In this paper, we propose a system built upon smart contract, that enables
cross-user secure deduplication service over encrypted data for DCS. First, to
accomplish optimized storage space utilization and encrypted data protection
concurrently, we propose an encryption workflow on top of Convergent Encryp-
tion (CE) [29], the most prominent MLE scheme. We involve the ciphertext
in major steps, user without the entire file cannot pass the verification, hence
prevent short information attacks. Second, to address the information leakage
caused by the openness of the public blockchain, we encrypt the metadata
with a scheme built upon CE before updating it to smart contract. Through
that, attackers knowing the encrypted metadata can not directly obtain the file
address since the decryption requires the whole file, thus preventing the illegal
analysis from the public. Third, as for storage cost, we only store the minimal
necessary metadata like other designs [34,48], e.g., file index, user index. Our
contributions are summarized as follows:
$
(P, K, E, D, T ), where P denotes parameter generation P ← − P, which deter-
mines the system settings. Say M is the input file, to encrypt M , the key is gen-
erated from K ← KP (M ). Then the ciphertext is derived from C ← EP (K, M )
and decrypted by M ← DP (K, C), and the file tag (work as fingerprint) is gener-
ated through T ← TP (C). In such a scheme, as it is called, K is derived from M
itself. Thus, data owners encrypt the same file resulting in the same ciphertext
without an additional server. In this work, we implement Convergent Encryption
(CE) [29] as the base of our encryption workflow. Concretely, P is set to random
128-bit strings and used in the latter procedure, we use SHA256 for K/T , and
E/D is set to AES-256-CTR with a fixed IV. In the following of this paper, we
use r to denote P in CE, more details refer to Sect. 4.3.
Proof-of-ownership, introduced by Halevi et al. [33], is an essential challenge-
response protocol in client-side deduplication schemes [20,27,50]. It assists the
server to verify whether a user indeed holds a claimed file without receiving
the file, thereby solving the leakage of entire file through file hash (i.e., short
information attack). Initial proof-of-ownership scheme is implemented through
Merkle tree [41] and erasure code [28]. File is first encoded by erasure code and
outputs several chunks. User then conducts a Merkle tree based on the these
chunks and sends the root hash to server. Afterwards, server asks the user to
give the sibling path of random picked leaves. Such path can be securely verified
with root hash [33]. In this work, we adopt and integrate such idea into the user
upload process (more details refer to Sect. 4.3), ensuring that the subsequent
uploader can obtain the previous file address if and only if the user has the
entire file.
3 System Overview
3.1 System Model
Our design in the target DCS scenario consists of three entities, as shown in
Fig. 1: backend storage service (SS ), users (U ), and secure deduplication ser-
vice (DS ). Specifically, U uses a client (e.g., a desktop or web app) to encrypt
and upload files to SS for long-term storage. SS holds the ciphertext uploaded
from U, which is maintained by an emerging decentralized storage provider like
IPFS [9] (as used in our experiment in Sect. 5.1). DS interacts with U and SS
to jointly conduct secure deduplication procedures, to significantly improve the
utilization of the storage space while preventing potential attacks on cheating
ownership of a specific file [33] and poisoning stored ciphertext [50]. Different
from traditional centralized cloud-based schemes [43,44], DS in our design is
instantiated by the smart contract on Ethereum, which guarantees the consen-
sus and correctness of stored metadata.
defraud the ownership or poison the ciphertext to break the integrity of other
users’ files. The ownership cheating attack can be addressed in the literature by
running additional ownership checking steps (a.k.a., proof-of-ownership) before
announcing the deduplication result [20,51]. Particularly, we involve the entire
file ciphertext in the major deduplication steps, hence strengthening our design.
As for poison attacks, the existing solution is to verify whether the uploaded
ciphertext and the tag are consistent [50]. So here, by leveraging the tag consis-
tency [23] property of CE, DS is able to verify if the user obeys the promise and
records the malicious behavior on the blockchain.
Apart from these attacks, another challenge is that an attacker can illegally
access the on-chain data via downloading and analyzing the block content [2,6].
Therefore, file address f id1 shared by its owners cannot be stored in the plaintext
as in the case of conventional cloud-based DS [43,44]. Otherwise, the attacker can
bypass the normal procedure and obtain the corresponding f id directly through
a specific file tag f T , and further access the ciphertext. To tackle this challenge,
we introduce additional protection on f id. f id is encrypted before stored on the
blockchain, and can be decrypted only if the user owns the whole file.
Additionally, we provide a fair charging model by maintaining a user index on
the smart contract. Such index records the system’s deduplication pattern [20],
which refers to the duplicate users storing the same file. The system charges the
user according to the user index, and due to the publicity of the blockchain, the
system cannot deceive the user to charge additional fees. Moreover, in order to
securely add uid to the index, we need to ensure that the user indeed hold the
file and the user is corresponding to the uid. For the former concern, we involve
proof-of-ownership [33] to verify the user. As for the latter issue, we leverage
Lamport scheme [37] to generate a key pair. Communication between U and
DS is signed with the user’s private key, DS can verify the signature using the
user’s public key. Such an approach is proved secure and can not be denied by
users [37]. Furthermore, to resist man-in-the-middle attacks [21], our design is
implemented based on the https protocol.
Lastly, considering the expensive storage cost of smart contract, we are con-
sistent with other blockchain application [34], only storing the index metadata
for deduplication on the blockchain.
Smart Contract
Users
Call/Send 0xabc…
ABI.json
Fig. 2. An illustration of data structures and functions, where “0xabc...” denotes the
contract address, “ABI.json” specifies the actual function in the contract to invoke, and
“Call/Send” means different invoke methods.
Retrieve Request: Since user stores the (f K, f id) locally, user can directly
access f CS from SS by invoking IPFSCat(f id), then obtains f by decrypting
the ciphertext with f K.
computed from the file itself [23]. To mitigate the offline brute-force attacks, we
can either involve an additional independent third-party to obliviously embed a
secret key during the key generation step [22,45] or leverage a number of online
users to securely obtain a random key for a specific file [40]. Moreover, to mitigate
the online brute-force attacks, we can bring the standard rate-limiting strategies
as adopted in [22] and [40] into our design. Here, for easy presentation, we focus
on our main design in the current version and we are aware that the data in our
target public DCS scenario is often hard to predict.
5 Experimental Evaluation
5.1 Setup
We implement a prototype of our system in JavaScript and the smart con-
tract is deployed in Solidity [15]. To evaluate its performance, we realize U and
DS on Alibaba Cloud [1] with an ECS [5] instance (“ecs.c7.2xlarge” in Ubuntu
Server 20.04 LTS). We conduct an IPFS network on the instance of DS as SS.
Specifically, we use Javascript libraries crypto to implement AES-256-CTR and
SHA256. The system uses a single thread and provides a command line inter-
face. In terms of smart contracts, since the operations cost real tokens, it is too
expensive to deploy evaluation in the main network. And the operations need
a long latency of mining to be confirmed, which is inconvenient for evaluation.
Therefore, we first consider evaluating our scheme on a simulated network. We
use Ganache [8] to build a simulated network. Such a network has a same envi-
ronment and the mining time is single CPU cycle, which allows us to focus on the
performance of our encryption scheme. We use Solidity based on 0.8.16+com-
mit.07a7930e, which is the latest version. Then, to evaluate the real-world per-
formance, we also test our system on the test network Rinkeby [13].
To reach a better evaluation and comparison between our design and others,
we choose three other deduplicate schemes at file-level build on IPFS APIs as
our baseline.
Plaintext + IPFS APIs. The most straightforward and naive way of data dedu-
plication, in such a scheme, files are not encrypted. We assume it as client-side
deduplication, that the user computes and sends the file tag f T (i.e., hash value
of file) to the server S, then S compares f T and determines whether to dedu-
plicate the file.
MLE + IPFS APIs. We choose the most common MLE scheme, namely con-
vergent encryption (CE) [29], in which files are encrypted. As a MLE scheme, it
can be expressed as CE = (P, K, E, D, T ) (see Sect. 2). To encrypt the file f , P
generates a 128-bits random sequence P, K is set to SHA256(P ||f ) and returns
f K, f is encrypted and decrypted with f K through AES-CTR with fixed IV, T
takes ciphertext and outputs f T as SHA256(f C). Similarly, the user sends f T
to S for deduplication check and decides whether to upload data.
DupLESS + IPFS APIs. Bellare et al. proposed DupLESS [22] to further resist
brute-force attacks in predictable file sets. Compared with MLE, it involves an
additional key server KS. When encrypting f , the user first interacts with KS
Enabling Secure Deduplication in Encrypted Decentralized Storage 469
and blind-signs f K with a secret key f KS through OPRF [42] protocol. In this
way, any user needs to interact with the KS when obtaining the ciphertext, thus
brute-force attacks can be mitigated by adding a rate limiting strategy [22].
In our implementation, elliptic-curve OPRF (EC-OPRF) [24] is used, which
requires smaller key length and less computation than RSA-OPRF.
Table 1. Summary of tested datasets, the snapshots are originally in tar.gz format,
the size and number of files represent the unzipped files, the Dedup-ratio means the
deduplication ratio.
Snapshots Total size (GB) Total files (103 ) Average size (MB) Dedup-ratio
Kernel 72.62 5650.64 906.86 0.8965
Node 33.83 1304.77 183.27 0.5401
MySQL 108.34 902.68 909.33 0.1408
GoLang 74.89 1977.84 329.12 0.2267
Table 2. (Left) shows the theoretical storage cost for an n-byte file. (Right) illustrates
the metadata size and percentage of tested datasets.
– In plaintext case, the user accesses the file through f T directly, thus we
need to store f T (32 bytes) and f id (34 bytes), which is n + 66 bytes.
– In MLE case, we need to store P (16 bytes random string) to retrieve the
file, together with f T and f id, that is n + 82 bytes in total.
– In DupLESS case, each file needs to maintain a blind-signed key f KS (32
bytes), f T , and f id, which is n + 98 bytes.
– In our design, the cost comes from P , f T , and f id, which sums up with
n + 82 bytes. Particularly, as for UIndex, the uid in our design is 32 bytes,
thus we have f T and several uid to maintain within UIndex. Say m is the
number of uploaded files, k is the average owners each file has, and the storage
of UIndex is approximately 64mk byte.
Fig. 3. Average latency of store requests in tested schemes with different file size rang-
ing from 1 KB to 32 MB.
Enabling Secure Deduplication in Encrypted Decentralized Storage 471
6 Related Work
Commercial Decentralized Storage Services. There are many emerging
DCS products today, i.e., Storj [16], Sia [14], and IPFS [9]. Such products can
be roughly divided into two categories. The first kind, taking Storj and Sia as
an example, ensures data security via some conventional encryption schemes,
but does not consider data deduplication. In Storj, the file is first encrypted via
AES-256, then encoded with erasure codes (the file is split into 80 pieces, and
retrieving the file requires 29 pieces), and then distributed globally [16]. In Sia,
similar to Storj, files are first divided into pieces in the size of 40 MB (the smaller
files will be padded to 40 MB), then encrypted via Threefish [31] and split into 30
pieces at the size of 4 MB (retrieve requires 10 pieces) before distributed. Both
products use erasure codes to ensure data reliability, thus the files are certainly
stored as 2.762 times the original size in Storj (3 times in Sia). Moreover, both
2
In Storj, for erasure code with the factor k = 29 and n = 80, the total storage is
roughly 80/29 ≈ 2.76 times, similarly, Sia will store 3 times.
472 B. Zhang et al.
products do not consider deduplication, the same file will be redundantly stored,
making the situation worse. Another type, represented by IPFS, ensures single-
user deduplication but can hardly guarantee data security. Concretely, in IPFS,
within a certain user, the application uses Merkle DAG [9] (i.e., an improved data
structure based on the Merkle tree) to perform deduplicate check and version
control, and ensure that the same content is only stored once. But the same
content from several users outputs distinct DAGs and returns different f id,
thus preventing the cross-user deduplication. More importantly, data in IPFS is
only encrypted during transmission and finally stored in plaintext, which is an
intentional decision to prevent vendor lock-in [9].
Secure Deduplication Over Encrypted Data. To get rid of the constraints
of the server, realize cross-user data deduplication, and protect data privacy,
Douceur et al. [29] proposed CE, in which the key is derived from the message
to be encrypted, thus users holding the same file result in the same cipher-
text without additional server. Meanwhile, many other secure deduplication
schemes are proposed, e.g., [18,19]. Afterward, Bellare et al. normalized CE
to MLE [23] and proposed privacy, and formalized the security notion of PRV-
CDA and stronger PRV$-CDA. They compared the various encryption schemes
with different privacy strengths (e.g., CE, HCE1, HCE2). Consequentially, some
schemes [20,22,27,51] realize the secure deduplication over encrypted data based
on MLE. Such a scheme prevented offline brute-force attacks on unpredictable
files but is vulnerable to predictable files. To further mitigate such shortcom-
ings, Bellare et al. enhanced MLE by involving an additional key server [22]. To
store the files, a client first generates the file key through MLE, then it needs to
request the key server to blind-sign the file key through OPRF protocol. Thus,
all store requests interact with the key server, where a rate-limiting strategy can
be adopted to block the brute-force attack on predictable files. Moreover, there
is also a line of work that targets block-level settings for a higher deduplication
ratio. For example, BL-MLE [26] designs a dual-level scheme that combines the
block keys and tags together to reduce the metadata size. UWare [27] leverages
the similarity of file blocks to balance the deduplication effectiveness and system
efficiency.
Blockchain-Based Deduplicate Schemes. Li et al. [38] leverage secret shar-
ing scheme with smart contract to realize the deduplication in distributed sce-
nario. File is split into blocks and distributed in several store service providers
(SSPs). Such scheme mitigates the single point of failure in the distributed sce-
nario but suffers from latency and overheads. Furthermore, Tian et al. [48]
proposed a double-server deduplicate model and shared auditing scheme over
encrypted data. In which stores the data index and system logs in blockchain,
and proposed a lightweight authenticator generation algorithm with update
protocol.
Enabling Secure Deduplication in Encrypted Decentralized Storage 473
7 Conclusion
In this paper, we design and implement a blockchain-based cross-user secure
deduplication on encrypted data. Our enhanced encryption involving the entire
file during the major steps, thus ensures data security when facing public
blockchain and prevents the ownership cheating attacks and duplicate poison-
ing attacks. We overcome the challenges come from the transparency feature of
public blockchain, store the encrypted metadata on-chain and let the decryp-
tion requires the entire file thus prevents the public illegal analysis. Moreover,
subsequent users do not need to upload files, which saves bandwidth as well.
Evaluation results show that our design achieves decentralized secure dedupli-
cation with practical on-chain storage and computation cost.
Acknowledgements. This work was supported in part by the National Key R&D
Program of China (No. 2019YFB2102200), the National Science Fund for Distinguished
Young Scholars (No. 61725205), the National Natural Science Foundation of China (No.
62002294, 62202379), and the Fundamental Research Funds for the Central Universities
(No. 3102019QD1001, D5000220127).
References
1. Alibaba cloud official website (2022). https://www.alibabacloud.com/
2. The blockchain data platform - Chainalysis (2022). https://chainalysis.com/
3. Data breach: Latest news & videos, photos about data breach. The Economic
Times (2022). https://economictimes.indiatimes.com/topic/data-breach
4. Downloads - the go programming language (2022). https://go.dev/dl/
5. Elastic compute service (ECS): Elastic & secure cloud servers - Alibaba Cloud
(2022). https://www.alibabacloud.com/product/ecs
6. Ethereum (eth) blockchain explorer (2022). https://etherscan.io/
7. Filecoin: a decentralized storage network (2022). https://filecoin.io/
8. Ganache - truffle suite (2022). https://trufflesuite.com/ganache/
9. IPFS powers the distributed web (2022). https://ipfs.io/
10. Linux kernel source code (2022). https://www.kernel.org/
11. MySQL: Download mysql community server (archived versions) (2022). https://
downloads.mysql.com/archives/community/
12. Previous releases | node.js (2022). https://nodejs.org/download/release/
13. Rinkeby: Network dashboard (2022). https://www.rinkeby.io/
14. Sia - decentralized data storage (2022). https://sia.tech/
15. Solidity programming language (2022). https://soliditylang.org/
16. Storj: Decentralized cloud storage (2022). https://www.storj.io/
17. World’s biggest data breaches & hacks - information is beautiful (2022). https://
informationisbeautiful.net/visualizations/worlds-biggest-data-breaches-hacks/
18. Adya, A., et al.: FARSITE: federated, available, and reliable storage for an incom-
pletely trusted environment. In: Proceedings of the 5th Symposium on Operating
Systems Design and Implementation, pp. 1–14. USENIX Association (2002)
19. Anderson, P., Zhang, L.: Fast and secure laptop backups with encrypted de-
duplication. In: Proceedings of the LISA 2010, pp. 29–40. USENIX Association
(2010)
474 B. Zhang et al.
20. Armknecht, F., Bohli, J.M., Karame, G.O., Youssef, F.: Transparent data dedu-
plication in the cloud. In: Proceedings of the ACM CCS (2015)
21. Asokan, N., Niemi, V., Nyberg, K.: Man-in-the-middle in tunnelled authentication
protocols. In: Security Protocols (2005)
22. Bellare, M., Keelveedhi, S., Ristenpart, T.: DupLESS: server-aided encryption for
deduplicated storage. In: Proceedings of the USENIX Security (2013)
23. Bellare, M., Keelveedhi, S., Ristenpart, T.: Message-locked encryption and secure
deduplication. In: Proceedings of the EUROCRYPT (2013)
24. Burns, J., Moore, D., Ray, K., Speers, R., Vohaska, B.: EC-OPRF: oblivious pseu-
dorandom functions using elliptic curves. IACR Cryptology ePrint Archive, p. 111
(2017)
25. Cai, C., Xu, L., Zhou, A., Wang, C.: Toward a secure, rich, and fair query service
for light clients on public blockchains. IEEE Trans. Dependable Secure Comput.
19, 3640–3655 (2021)
26. Chen, R., Mu, Y., Yang, G., Guo, F.: BL-MLE: Block-level message-locked encryp-
tion for secure large file deduplication. IEEE Trans. Inf. Forensics Secur. 10(12),
2643–2652 (2015)
27. Cui, H., Wang, C., Hua, Y., Du, Y., Yuan, X.: A bandwidth-efficient middleware
for encrypted deduplication. In: Proceedings of IEEE DSC (2018)
28. Dimakis, A., Prabhakaran, V., Ramchandran, K.: Decentralized erasure codes for
distributed networked storage. IEEE Trans. Inf. Theor. 52(6), 2809–2816 (2006)
29. Douceur, J.R., Adya, A., Bolosky, W.J., Simon, D., Theimer, M.: Reclaiming space
from duplicate files in a serverless distributed file system. In: Proceedings of the
IEEE ICDCS (2002)
30. Dutch, M.: Understanding data deduplication ratios. In: SNIA Data Management
Forum, vol. 7 (2008)
31. Ferguson, N., et al.: The skein hash function family. Submission to NIST (round
3), vol. 7, no. 7.5, p. 3 (2010)
32. Fu, M., et al.: Accelerating restore and garbage collection in deduplication-based
backup systems via exploiting historical information. In: USENIX ATC 2014, pp.
181–192 (2014)
33. Halevi, S., Harnik, D., Pinkas, B., Shulman-Peleg, A.: Proofs of ownership in remote
storage systems. In: Proceedings of the ACM CCS (2011)
34. Hu, S., Cai, C., Wang, Q., Wang, C., Wang, Z., Ye, D.: Augmenting encrypted
search: a decentralized service realization with enforced execution. IEEE Trans.
Dependable Secure Comput. 18(6), 2569–2581 (2021)
35. Ivanov, N., Lou, J., Chen, T., Li, J., Yan, Q.: Targeting the weakest link: social
engineering attacks in Ethereum smart contracts. In: Proceedings of the 2021 ACM
Asia Conference on Computer and Communications Security, pp. 787–801 (2021)
36. Kushwah, S., Desai, A., Subramanyan, P., Seshia, S.A.: PSec: programming secure
distributed systems using enclaves. In: Proceedings of the 2021 ACM Asia Confer-
ence on Computer and Communications Security, pp. 802–816 (2021)
37. Lamport, L.: Constructing digital signatures from a one way function. Technical
report, CSL-98, SRI International (1979)
38. Li, J., Wu, J., Chen, L., Li, J.: Deduplication with blockchain for secure cloud
storage. In: Xu, Z., Gao, X., Miao, Q., Zhang, Y., Bu, J. (eds.) Big Data, pp.
558–570 (2018)
39. Li, M., Qin, C., Lee, P.P.C.: CDStore: toward reliable, secure, and cost-efficient
cloud storage via convergent dispersal. In: USENIX ATC 2015, pp. 111–124 (2015)
40. Liu, J., Duan, L., Li, Y., Asokan, N.: Secure deduplication of encrypted data:
refined model and new constructions. In: Proceedings of the CT-RSA (2018)
Enabling Secure Deduplication in Encrypted Decentralized Storage 475
1 Introduction
A geometric range query [1] is to retrieve spatial data records within a given
shape range, such as a circle, rectangle, and polygon. And it has a wide range
of applications in modern life, such as location-based service [25], urban plan-
ning [24], and location-based alert systems [10]. For example, users on social
media can perform a circular range search to find nearby people by the location-
based service.
This work was supported by the National Natural Science Foundation of China (No:
62072240), the National Key Research and Development Program of China (No.
2020YFB1804604), and the Natural Science Foundation of Jiangsu Province (No.
BK20210330).
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 476–495, 2022.
https://doi.org/10.1007/978-3-031-23020-2_27
GRSE with Forward and Backward Security 477
With the continuous growth of spatial data scale, companies and organiza-
tions tend to outsource their spatial datasets to the public cloud server to allevi-
ate local storage and management costs. However, internal and external threats
in cloud services may compromise data privacy. Encryption-before-outsourcing is
an effective way to protect data confidentiality, but it will lose data availability.
Searchable Symmetric Encryption (SSE) [9] is a promising cryptographic primi-
tive which enables the search of encrypted data. Dynamic SSE (DSSE) [15] fur-
ther supports dynamic updates while preserving data confidentiality and searcha-
bility. However, previous SSE schemes mainly focused on non-numerical keyword
queries, for which a simple equality checking is sufficient. The geometric range
queries considered in this paper typically require more complex evaluations. For
example, a circular range query needs to calculate the distance between the
target data and the circle’s center and then compare it with the query radius.
Therefore, this compute-then-compare operation makes it difficult to design an
efficient geometric range searchable encryption scheme.
Nowadays, different cryptographic primitives and tools have been proposed
to support geometric range queries on spatial data, such as Order-Preserving
Encryption (OPE) [27], Predicate Encryption [28], secure k-nearest neighbor
(kNN) computation [38], and so on [16,17,34,37,39]. On the one hand, the
schemes taking these methods as building blocks cannot provide a good balance
between security and efficiency. For instance, the order leakage of OPE can be
used to infer the plaintext values by inference attacks [26]. Predicate Encryption
can enhance security, but expensive pairing operations limit performance in prac-
tice. On the other hand, some schemes support dynamic updates due to location
relocation or facility addition of spatial data, but little consideration is given
to forward and backward security, which is necessary for any newly designed
dynamic schemes. Recently, Wang et al. [37] proposed a forward secure spatial
DSSE scheme based on Order-Revealing Encryption (ORE) [18] and Quadtree
data structure, but the order leakage still exists after comparison in ORE [12].
Besides, the ORE-encrypted index tree will leak the order and distribution of
the entire database before any query. Kermanshahi et al. [17] also considered
forward/backward security, but their two schemes have poor scalability and low
update efficiency with search content disclosure.
In light of the above discussions, we motivate the study of designing a general
forward and backward secure dynamic scheme that supports geometric range
queries on encrypted spatial data with better security. In particular, our scheme
protects the privacy of stored data and search queries without leaking the order of
data. And at a high level, the core idea of our design is to build a two-level index
as distilling from previous solutions [22,34]. Specifically, the first level index
involves decomposing a spatial space into a conceptual hierarchical structure,
transforming a geometric range query into multiple single-keyword queries. The
second level index involves judging whether spatial data is within a query range
by another data structure.
478 M. Yang et al.
– We propose a new forward and backward secure DSSE scheme for geometric
range queries on encrypted spatial data. It effectively converts comparison
evaluations in range queries into simple equality-checking evaluations.
– By giving detailed leakage functions during the update and search operations,
we rigorously prove the security of our scheme.
– Compared with the prior art [17], the experimental results show that our con-
struction has better update performance and comparable search performance
on average. For example, for fixed dimension size 218 and update size 100,
the update time of our scheme is approximately 288× shorter than [17].
2 Related Work
the query condition. And some follow-up works [13,14,22] have improved Wang
et al.’s work, but these works still rely on SSW encryption, so expensive pairing
operations limit performance in practice.
Other works used kNN as building blocks [19,23,39]. Luo et al. [23] used
secure kNN computation with a geometric transformation to enable a generalized
geometric range search on encrypted spatial data. Later, Li et al. [19] broke
Luo’s scheme through an effective attack method and provided an enhanced
solution for multi-dimensional range queries. Xu et al. [39] used secure kNN
computation and the polynomial fitting technique to search encrypted spatial
data with additional access control. In addition, OPE and tree structures (e.g.,
R-tree) are often combined to reduce the search time [16,39].
Taking forward and backward security into account in the dynamic scheme,
recently, Wang et al. [37] proposed an efficient and forward-secure spatial
DSSE scheme based on ORE and Quadtree data structure. But ORE-derived
search tokens are long-term valid, so the server can reuse these tokens without
the client’s permission to test subsequent unmasked data, which reveals more
information during search operations. Kermanshahi et al. [17] also considered
forward/backward security and proposed two concrete schemes. However, the
essence of their idea is to perform two one-dimensional range queries, so its scal-
ability is poor. And the use of binary tree and additive symmetric homomorphic
encryption (ASHE) results in high update cost and search query leakage.
Finally, Table 1 presents a comprehensive comparison between our scheme
and existing schemes.
3 Preliminaries
In this section, we describe the necessary cryptographic primitives and building
blocks used in our scheme. Let λ be the security parameter, negl(λ) be a negli-
$
gible function in λ. The symbol x ← − X denotes x is sampled uniformly random
from a finite set X ; |·| denotes the number of elements in a set; ab denotes the
concatenation of a and b; ∩ denotes the relative position of a point or range in
a specific area.
480 M. Yang et al.
[22,36]. It can run through the entire space and index each discrete unit as an
ordered number. In this way, two adjacent points in a two-dimensional space
are also close after being mapped to a one-dimensional space. Specifically, each
dimension of the two-dimensional spatial space is divided into 2r regions evenly,
and the entire space can then be divided into 22r regions evenly. And each region
can be regarded as a continuous 2r-bits value, where r is the order of the Hilbert
curve. Figure 2 shows three Hilbert curves of order r = 1, 2 and 3. In this paper,
we adopt the method in [21] to convert two-dimensional spatial data into a
one-dimensional value on the Hilbert curve.
dimension has the same size. That is, for any spatial data p = (x, y), where x and
y are the coordinate value of p in x- and y-dimension, we have x, y ∈ [0, T − 1].
At last, let q be a search query, and DB(q) denotes the set of data identifiers
that match q.
We will organize spatial data into a hierarchical storage structure, and
because the number of levels in the hierarchy is denoted by l, thus each spa-
tial data in DB belongs to l girds from level-l to level-1. Then we can associate
every data point with l “keywords”, where “keywords” refer to an artifact repre-
senting the hierarchical grids for search and update operations. Thus to update
a data point, we have to update all “keywords” that contain it. And for a search
query, we can reduce a geometric range query to multiple single-keyword queries.
– Setup(1λ , DB) → (EDB, sk, σ): Given the security parameter λ and the
database DB, the algorithm outputs the encrypted database EDB, the mas-
ter secret key sk, and the client’s internal state σ. And EDB is sent to the
server, sk and σ are secretly stored by the client.
– Search(sk, σ, q; EDB) → (σ , DB(q); EDB ): This is a protocol between the
client whose inputs are a key sk, a state σ, and a query q; and the server
whose input is an encrypted database EDB. At the end of the protocol, the
protocol outputs a new state σ with a set of matching results DB(q) for the
client; and a (possibly) updated database EDB for the server. In this paper,
we conduct multiple single-keyword queries as a geometric range query.
– Update(sk, σ, op, in; EDB) → (σ ; EDB ): This is a protocol between the
client whose inputs are sk and σ, and an operation op ∈ {add, del} with
its input in = (w, ind), where in is parsed as a keyword-identifier pair; and
the server with input EDB. The protocol returns an updated state σ to the
client and an updated encrypted database EDB to the server. In our scheme,
to update a data point, we need to update all “keywords” containing it.
A DSSE scheme is correct if the search protocol returns the correct responses
for each query except with negligible probability. See [6] for more details.
Search Pattern [4]. The leakage function L takes a query list Q as implicit
input, Q records all queries issued so far. And each entry of Q is (u, w) for a search
query on keyword w, or (u, op, in) for an op update query with input in. The
integer u is a timestamp initially set to 0 and incremented at each query. Then
the search pattern (sp) for a keyword w is defined as sp(w) = {u|(u, w) ∈ Q}
(only matches search queries).
5 Construction
5.1 Overview
As mentioned before, the core idea of our design is to build a secure two-level
index, in which the first level is used for navigation and the second for further
filtering. And the first level index is naturally formed by a keyword-based DSSE
scheme (recall Sect. 4). For the second-level index, only the bottommost grid
in the hierarchy will intersect with the query range, requiring further filtering.
So to obtain accurate search results, we fill every level-l grid with the Hilbert
curve1 . Then each data point in DB is ordered by the Hilbert curve and further
represented by a prefix family. Inspired by the ‘XSet’ data structure of Oblivious
Cross-Tags (OXT) protocol [7], which is used to determine if a keyword-file pair
is in an encrypted database, we build a similar comparison set from each prefix
family, named ‘CSet’ as the second level index to judge the relationship between
spatial data and range query. Figure 3 illustrates the construction and search of
the second-level index, the colored area is searched by the server, but the blue
area is the actual query range.
1
Each data point is kept with n digital after decimal point, so if the side length of the
level-l grid is d, we can adopt an r-order Hilbert curve to fill it, where 10n d ≤ 2r .
GRSE with Forward and Backward Security 485
5.2 Description
Let F1 , F2 : {0, 1}λ × {0, 1}∗ → {0, 1}λ be two PRFs, F1 , F2 : {0, 1}λ × N →
{0, 1}λ be two SC-PRFs, H1 , H2 : {0, 1}∗ → {0, 1}λ be two cryptographic hash
functions, (Enc, Dec) be the encryption and decryption algorithms of a secure
symmetric key encryption (SKE) scheme. In this paper, we assume that updates
come in batches. For example, the client makes batch updates once a day.
Algorithm 1 formally describes our scheme with the Setup algorithm, Update
and Search protocols.
Setup. Given the security parameter λ, the client first generates two λ-bits keys:
ks for SKE and ke for SKE. Then, he initializes a global counter gc and sets these
two keys ks and ke , the number of levels in the hierarchy l, the order of adopted
Hilbert curve r and gc as internal state σ. Finally, the client sends an initially
empty encrypted database EDB and CSet to the server.
Before describing Update and Search protocols, we define two functions:
mapPoint and mapRange (see Algorithm 2). These functions will be used
in Update and Search respectively. Briefly, mapPoint is a function for the
client to compute the index of the level-l grid to which the data point belongs
via the before-mentioned hierarchical encoding technique. Then the ancestral
l − 1 grids indexes can be fetched by truncating the last two digits of the level-l
index iteratively. And mapRange is a function for the client to decompose the
query range q in a hierarchical structure into two collections: the grids that are
fully/partially covered by q, and denoted as F CSet/P CSet respectively.
Update. To update a set of data points D into the encrypted database, the
client will generate update tokens in the counter model for D. In specific, for
each update tuple (op, p, ind) ∈ D, the grid index (also known as a keyword w)
is first generated by calling mapPoint function. Then for all grids containing p,
the client fetches the state pair (Twgc , c) from ‘W’, where Twgc is the search token
generated by SC-PRF F1 with keyword token kw as key and current global
counter gc as input, and c is the local update counter initialized to 0. Finally,
the update token tuple (addr, val) is generated by H1 and SKE respectively.
The above is only the processing of the first level index, and the second level
index CSet also needed to be updated for an accurate search result (lines 16–24).
To this end, the client computes the relative position of p in a level-l grid, then
computes its corresponding Hilbert curve value and outputs the prefix family
of it (i.e., F(H(p ∩ w))). Then for each prefix τj ∈ F(H(p ∩ w)), the client
generates second-level search token Tw,τ gc
j
by SC-PRF F2 just as he does for Twgc .
Additionally, the element of CSet (i.e., ctag) is generated based on the hash of
gc
Tw,τ j
and the local counter c. And at the end of the protocol, the global counter
is increased by 1.
Search. To search all data points within a geometric range q, the client first
calls mapRange to get two grid collections F CSet and P CSet. Then for each
keyword w ∈ F CSet, the client generates a forward secure key STw as a first level
search token, which allows only the evaluation of F1 on [0, gc − 1]. While for each
486 M. Yang et al.
Algorithm 1. FBDSSE-GRQ
Setup(λ, l, r) 9: for each w ∈ P CSet do
$
10: kw ← F1 (ks , w)
λ
1: ks , k e ←
− {0, 1} 11: STw ← F 1 (kw , [0, gc − 1])
2: global counter gc ← 0 12: ctokenw ← ∅
3: Set σ ← (ks , ke , l, r, gc)
13: {τ1 , ...., τ|w∩q| } ← S(H(w ∩ q))
4: EDB ← ∅, CSet ← ∅
14: for j = 1 : |w ∩ q| do
5: Send EDB and CSet to the Server.
15: kw,τj ← F2 (ks , w||τj )
Update(σ, D; EDB, CSet) 2 .Cons(kw ,τ , [0, gc−1])
16: STw,τ ← F
j i j
Client:
17: ctokenw [j] ← STw,τj
1: Parse σ as (ks , ke , l, r, gc)
2: W, AddEDB, AddCSet ← ∅
18: end for
3: for each d = (op, p, ind) ∈ D do p = (x, y)
19: tk2 ← tk2 ∪ {(STw , ctokenw )}
20: end for
4: x1 y1 x2 y2 · · · xl yl ← mapPoint(p)
21: tk ← {gc − 1, tk1 , tk2 }
5: for i = l : 1 do
22: Send tk to the Server
6: Let w = x1 y1 x2 y2 · · · xi yi
gc
7: (Tw , c) ← W[w] Server:
gc
8: if (Tw , c) =⊥ then 23: Parse tk as {ctr, tk1 , tk2 }, Res ← ∅
9: kw ← F1 (ks , w) 24: for each ST ∈ tk1 do
10: Tw gc
←F 1 (kw , gc), c ← 0 25: for j = ctr : 0 do
11: end if 26: Tj ← F 1 .Eval(ST, j)
gc
12: W[w] ← (Tw , c + 1) 27: c ← 0, addr ← H1 (Tj ||c)
gc
13: addr ← H1 (Tw ||c) 28: while addr ∈ EDB do
14: val ← SKE.Enc(ke , op||ind) 29: val ← EDB[addr]
15: AddEDB ← AddEDB ∪ {(addr, val)} 30: Res ← Res ∪ {val}
16: if i = l then 31: c ← c + 1, addr ← H1 (Tj ||c)
17: {τ1 , τ2 , ..., τ2r+1 } ← F (H(p ∩ w)) 32: end while
18: for j = 1 : 2r + 1 do 33: end for
19: kw,τj ← F2 (ks , w||τj ) 34: end for
2 (kw,τ , gc) 35: for each (ST, ctoken) ∈ tk2 do
20: T gc ← F
w,τj j 36: for j = ctr : 0 do
21: ctag ← H2 (Tw,τj ||c) 37: Tj ← F 1 .Eval(ST, j)
22: AddCSet ← AddCSet ∪ ctag 38: c ← 0, addr ← H1 (Tj ||c)
23: end for 39: while addr ∈ EDB do
24: end if 40: val ← EDB[addr]
25: end for 41: f lag ← f alse
26: end for 42: for k = 1 : ctoken.size do
27: σ ← ((ks , ke , l, r, gc + 1)) 43: Tj,k ← F 2 .Eval(ctoken[k], j)
28: Send AddEDB, AddCSet to the Server. 44: if H2 (Tj,k ||c) ∈ CSet then
Server: 45: f lag ← true
29: for each (addr, val) ∈ AddEDB do 46: break;
30: EDB[addr] ← val 47: end if
31: end for 48: end for
32: CSet ← CSet ∪ AddCSet 49: if f lag = true then
50: Res ← Res ∪ {val}
Search(σ, q)
51: end if
Client: 52: c ← c + 1; addr ← H1 (Tj ||c)
1: Parse σ as (ks , ke , l, r, gc) 53: end while
2: tk1 , tk2 ← ∅, tk ← {} 54: end for
3: {F CSet, P CSet} ← mapRange(q) 55: end for
4: for each w ∈ F CSet do 56: Send Res to the Client
5: kw ← F1 (ks , w) Client:
6: STw ← F 1 .Cons(kw , [0, gc − 1])
57: Decrypt RES with ke , and return points
7: tk1 ← tk1 ∪ STw identifiers that has not been deleted
8: end for
keyword w ∈ P CSet, the client does similarly as in F CSet, except that he needs
to generate second-level search tokens ctoken to filter out matched data points.
Specifically, the client computes the relative range of q on w and then transforms
it into multiple one-dimensional ranges on the Hilbert curve [8]. Note that for
GRSE with Forward and Backward Security 487
Algorithm 2.
mapPoint 12: return d1 ...dl
Input: the data point p = (x, y), the number 13:end function
of levels in the hierarchy l, and the range of mapRange
spatial space in x- and y-dimension, denoted Input: the query range q, the number of levels
as Tx and Ty in the hierarchy l
Output: a level-l grid x1 y1 . . . xl yl to which p Output: the grid collection F CSet and P CSet
belongs that is fully or partially covered by q
1: x1 ...xl ← Map(x, Tx , l) 1: F CSet, P CSet ← ∅
2: y1 ...yl ← Map(y, Ty , l) 2: for each gird w in level-l do
3: return x1 y1 ...xl yl 3: if w ∩ q = null and w ∈ / q then
1: function Map(d, T, l) 4: P CSet ← P CSet ∪ w
2: min = 0, max = T 5: q ←q\w
3: mid = (min + max)/2 6: end if
4: for i = 1 : l do 7: end for Lines
5: if d < mid then 2-7 are stripping the surrounding grids from
6: di ← 0, max = mid q to get a specific range that is fully covered
7: else by q in hierarchy
8: di ← 1, min = mid 8: Decompose q into fewest girds that exactly
9: end if covers q by hierarchical structure, i.e.,
10: mid = (min + max)/2 F CSet We leverage the method in [31] to
11: end for decompose q
9: return {F CSet, P CSet}
each prefix τj in query prefix family S(H(q ∩ wi )), the client should generates
another constrained key STw,τj as second level search token, which also allows
only the evaluation of F2 on [0, gc − 1]. After receiving search tokens from the
client, the server will traverse an implicit search chain in EDB from the latest
node (corresponding to global counter gc − 1) to the oldest node (corresponding
to 0) to retrieve all matched (encrypted) point identifiers. Particularly, for each
488 M. Yang et al.
search token tuple (ST, ctoken) in tk2 , when a valid val is retrieved from EDB,
the server should check if there exists a search token Tj,k = F2 .Eval(ctoken[k], j)
such that the hash value H2 (Tj,k c) belongs to CSet.
5.3 Comparison
Table 2 gives the complex comparison of the schemes that also build a two-
level index but do not consider forward/backward security and the schemes that
provide forward/backward security but use different approaches from ours. In
comparison, we set a q1 × q2 rectangle as the query range q, where q1 and q2 is
the range of q in x-dimension and y-dimension, respectively. Compared to the
previous solutions, our scheme sacrifice just a little search efficiency for strong
security combined with Table 1.
6 Performance Evaluation
This section presents the performance evaluation of our proposed construction
over encrypted spatial data. The experiment was conducted on a desktop com-
puter with Windows 10 Intel (R) Core (TM) i5-10400F CPU @ 2.90 GHz and 16
GB RAM in Java Programming Language. The security parameter λ is set to
256 bits, and for cryptographic functions, we instantiate PRFs and hash func-
tions via SM3, where P RF (key, data) = Hash(key||data). In addition, SC-PRFs
are instantiated with the tree-based GGM PRF [11]. We set the height of the
tree to 10, which means that if a batch update is carried out once a day, it can
last more than two years in total. Then the data owner can download the entire
database to clean up the deleted entries and re-encrypt the database to restart
the system. In addition, SM4 in the CBC model is used to instantiate SKE. And
in the following experiments, we set the query range to be squared to facilitate
control over the range size. Each experimental result is an average of 10 trials.
105 400
Construction II
r=3
r=5
Time cost (ms)
103 200
Construction II
r=3
r=5
102 100
10 12 14 16 18 200 400 600 800 1,000
Dimension size (2∗ ) Batch size
(a) Update time vs. dimension (b) Update time vs. batch size
size
102 100
Construction II
r=3
80 r=5
Time cost (ms)
101 60
40
Construction II
r=3
r=5 20
100
200 400 600 800 1,000 20 40 60 80 100
Query range [0, ∗]2 Result size
(a) Search time vs. query range (b) Search time vs. result size
Fig. 5. Comparison
query range, and Construction II is better than our r = 5 setting but worse than
our r = 3 setting at the same time. Note that the reasons for the exceptions
at [0,800]×[0,800] are that the query range is exactly decomposed to hierarchal
grids that are fully covered by it in the r = 5 setting, so it corresponds to the
fewest query prefixes than other ranges. While in the r = 3 setting, it decom-
poses into fewer query prefixes than adjacent ranges by mapRange function.
Finally, we fix the query range size and vary the search result size, and Fig. 5(b)
shows that the search time of Construction II is shorter than our r = 5 setting,
which corresponds to the general search case. The search time of Construction
II is slightly longer than our r = 3 setting because the client needs to generate
multiple keys to decrypt the result set due to the use of ASHE. What’s more,
although the search performance of Construction II is better than ours in gen-
eral, it uses the label of the index tree node as the search token, which directly
leaks the range query to the server, resulting in query privacy disclosure.
7 Conclusion
In this paper, we propose a forward and backward private DSSE scheme that
supports geometric range queries over encrypted spatial data. Specifically, we
GRSE with Forward and Backward Security 491
A Appendix
Similar to the proofs in [5,35], we derive a series of games from RealA (1λ )
to IdealA,S (1λ ). By showing that every two consecutive games are indistin-
guishable, we argue that the adversary cannot distinguish RealA (1λ ) from
IdealA,S (1λ ) except with negligible probability. We assume the adversary A
makes at most q1 and q2 polynomial-size queries to the H1 oracle and H2 oracle,
respectively.
Game G0 : G0 is exactly the real-world game. Therefore, we have
Game G5 : It is the last ideal-world game, where the simulator S generates a view
only based on the leakage function L. Let w ← sp(w).min, w||τ ← sp(w||τ ).min
be the timestamp when w and w||τ are retrieved for the first time after Setup,
then w and w||τ are used to uniquely identify the items related to unknown w
and w||τ in MF1 and MF2 , and keyword tokens kw and kw,τ are sampled on
the fly during the search. In addition, instead of directly mapping (Twgc ||c) and
gc
(Tw,τ j
||c) to the random values picked for MH1 and MH2 , we implicitly map
(Twgc ||c) to the global update counter, and (Tw,τ
gc
j
||c) to a pair of a global counter
and a local counter, and program the random oracles H1 and H2 accordingly
with Updates(w) and Updates(w||τ ) during the search, where Updates(w||τ )
was slightly modified to additionally include the order of ctag corresponding to
τ in its adjacent 2r + 1 ctags for simulation.
The update protocol in both games outputs uniformly random values with
the same distribution, and the client output of Search is the same, so G4 and
G5 are indistinguishable. Thus we have
Pr[G4 = 1] = Pr[G5 = 1]
In summary, we have
References
1. Agarwal, P.K., Erickson, J., et al.: Geometric range searching and its relatives.
Contemp. Math. 223, 1–56 (1999)
GRSE with Forward and Backward Security 493
2. Boneh, D., Waters, B.: Conjunctive, subset, and range queries on encrypted data.
In: Vadhan, S.P. (ed.) TCC 2007. LNCS, vol. 4392, pp. 535–554. Springer, Heidel-
berg (2007). https://doi.org/10.1007/978-3-540-70936-7_29
3. Boneh, D., Waters, B.: Constrained pseudorandom functions and their applica-
tions. In: Sako, K., Sarkar, P. (eds.) ASIACRYPT 2013. LNCS, vol. 8270, pp.
280–300. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-42045-
0_15
4. Bost, R.: oϕoς: forward secure searchable encryption. In: Proceedings of the 2016
ACM SIGSAC Conference on Computer and Communications Security, pp. 1143–
1154 (2016)
5. Bost, R., Minaud, B., Ohrimenko, O.: Forward and backward private searchable
encryption from constrained cryptographic primitives. In: Proceedings of the 2017
ACM SIGSAC Conference on Computer and Communications Security, pp. 1465–
1482 (2017)
6. Cash, D., et al.: Dynamic searchable encryption in very-large databases: data struc-
tures and implementation. Cryptology ePrint Archive (2014). https://eprint.iacr.
org/2014/853
7. Cash, D., Jarecki, S., Jutla, C., Krawczyk, H., Roşu, M.-C., Steiner, M.: Highly-
scalable searchable symmetric encryption with support for Boolean queries. In:
Canetti, R., Garay, J.A. (eds.) CRYPTO 2013. LNCS, vol. 8042, pp. 353–373.
Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-40041-4_20
8. Chung, K.L., Tsai, Y.H., Hu, F.C.: Space-filling approach for fast window query
on compressed images. IEEE Trans. Image Process. 9(12), 2109–2116 (2000)
9. Curtmola, R., Garay, J., Kamara, S., Ostrovsky, R.: Searchable symmetric encryp-
tion: improved definitions and efficient constructions. J. Comput. Secur. 19(5),
895–934 (2011)
10. Ghinita, G., Rughinis, R.: An efficient privacy-preserving system for monitoring
mobile users: making searchable encryption practical. In: Proceedings of the 4th
ACM Conference on Data and Application Security and Privacy, pp. 321–332
(2014)
11. Goldreich, O., Goldwasser, S., Micali, S.: How to construct random functions. J.
ACM (JACM) 33(4), 792–807 (1986)
12. Grubbs, P., Sekniqi, K., Bindschaedler, V., Naveed, M., Ristenpart, T.: Leakage-
abuse attacks against order-revealing encryption. In: 2017 IEEE Symposium on
Security and Privacy (SP), pp. 655–672. IEEE (2017)
13. Guo, R., Qin, B., Wu, Y., Liu, R., Chen, H., Li, C.: MixGeo: efficient secure
range queries on encrypted dense spatial data in the cloud. In: Proceedings of the
International Symposium on Quality of Service, pp. 1–10 (2019)
14. Guo, R., Qin, B., Wu, Y., Liu, R., Chen, H., Li, C.: LuxGeo: efficient and secure
enhanced geometric range queries. IEEE Trans. Knowl. Data Eng. (2021). https://
doi.org/10.1109/TKDE.2021.3093909
15. Kamara, S., Papamanthou, C., Roeder, T.: Dynamic searchable symmetric encryp-
tion. In: Proceedings of the 2012 ACM Conference on Computer and Communica-
tions Security, pp. 965–976 (2012)
16. Kamel, I., Talha, A.M., Aghbari, Z.A.: Dynamic spatial index for efficient query
processing on the cloud. J. Cloud Comput. 6(1), 1–16 (2017). https://doi.org/10.
1186/s13677-017-0077-0
17. Kermanshahi, S.K., et al.: Geometric range search on encrypted data with for-
ward/backward security. IEEE Trans. Dependable Secure Comput. 19(1), 698–716
(2020)
494 M. Yang et al.
18. Lewi, K., Wu, D.J.: Order-revealing encryption: new constructions, applications,
and lower bounds. In: Proceedings of the 2016 ACM SIGSAC Conference on Com-
puter and Communications Security, pp. 1167–1178 (2016)
19. Li, X., Zhu, Y., Wang, J., Zhang, J.: Efficient and secure multi-dimensional geo-
metric range query over encrypted data in cloud. J. Parallel Distrib. Comput. 131,
44–54 (2019)
20. Liu, A.X., Chen, F.: Privacy preserving collaborative enforcement of firewall poli-
cies in virtual private networks. IEEE Trans. Parallel Distrib. Syst. 22(5), 887–895
(2010)
21. Liu, X., Schrack, G.: Encoding and decoding the Hilbert order. Softw.: Pract. Exp.
26(12), 1335–1346 (1996)
22. Liu, Z., Wu, L., Meng, W., Wang, H., Wang, W.: Accurate range query with privacy
preservation for outsourced location-based service in IOT. IEEE Internet Things
J. 8(18), 14322–14337 (2021)
23. Luo, Y., Fu, S., Wang, D., Xu, M., Jia, X.: Efficient and generalized geometric
range search on encrypted spatial data in the cloud. In: 2017 IEEE/ACM 25th
International Symposium on Quality of Service (IWQoS), pp. 1–10. IEEE (2017)
24. Mark, D.B., Otfried, C., Marc, V.K., Mark, O.: Computational Geometry Algo-
rithms and Applications. Springer, Berlin (2008). https://doi.org/10.1007/978-3-
540-77974-2
25. Narayanan, A., Thiagarajan, N., Lakhani, M., Hamburg, M., Boneh, D., et al.:
Location privacy via private proximity testing. In: NDSS, vol. 11 (2011)
26. Naveed, M., Kamara, S., Wright, C.V.: Inference attacks on property-preserving
encrypted databases. In: Proceedings of the 22nd ACM SIGSAC Conference on
Computer and Communications Security, pp. 644–655 (2015)
27. Popa, R.A., Li, F.H., Zeldovich, N.: An ideal-security protocol for order-preserving
encoding. In: 2013 IEEE Symposium on Security and Privacy, pp. 463–477. IEEE
(2013)
28. Shen, E., Shi, E., Waters, B.: Predicate privacy in encryption systems. In: Reingold,
O. (ed.) TCC 2009. LNCS, vol. 5444, pp. 457–473. Springer, Heidelberg (2009).
https://doi.org/10.1007/978-3-642-00457-5_27
29. Song, D.X., Wagner, D., Perrig, A.: Practical techniques for searches on encrypted
data. In: Proceeding 2000 IEEE Symposium on Security and Privacy. S&P 2000,
pp. 44–55. IEEE (2000)
30. Stefanov, E., Papamanthou, C., Shi, E.: Practical dynamic searchable encryp-
tion with small leakage. Cryptology ePrint Archive (2013). https://eprint.iacr.org/
2013/832
31. Tsai, Y.H., Chung, K.L., Chen, W.Y.: A strip-splitting-based optimal algorithm for
decomposing a query window into maximal quadtree blocks. IEEE Trans. Knowl.
Data Eng. 16(4), 519–523 (2004)
32. Wang, B., Li, M., Wang, H.: Geometric range search on encrypted spatial data.
IEEE Trans. Inf. Forensics Secur. 11(4), 704–719 (2015)
33. Wang, B., Li, M., Wang, H., Li, H.: Circular range search on encrypted spatial
data. In: 2015 IEEE Conference on Communications and Network Security (CNS),
pp. 182–190. IEEE (2015)
34. Wang, B., Li, M., Xiong, L.: FastGeo: efficient geometric range queries on encrypted
spatial data. IEEE Trans. Dependable Secure Comput. 16(2), 245–258 (2017)
35. Wang, J., Chow, S.S.: Forward and backward-secure range-searchable symmetric
encryption. Proc. Priv. Enhancing Technol. 1, 28–48 (2022)
GRSE with Forward and Backward Security 495
36. Wang, X., Ma, J., Li, F., Liu, X., Miao, Y., Deng, R.H.: Enabling efficient spatial
keyword queries on encrypted data with strong security guarantees. IEEE Trans.
Inf. Forensics Secur. 16, 4909–4923 (2021)
37. Wang, X., Ma, J., Liu, X., Miao, Y., Zhu, D.: Spatial dynamic searchable encryp-
tion with forward security. In: Nah, Y., Cui, B., Lee, S.-W., Yu, J.X., Moon, Y.-S.,
Whang, S.E. (eds.) DASFAA 2020. LNCS, vol. 12113, pp. 746–762. Springer, Cham
(2020). https://doi.org/10.1007/978-3-030-59416-9_48
38. Wong, W.K., Cheung, D.W.L., Kao, B., Mamoulis, N.: Secure KNN computation
on encrypted databases. In: Proceedings of the 2009 ACM SIGMOD International
Conference on Management of Data, pp. 139–152 (2009)
39. Xu, G., Li, H., Dai, Y., Yang, K., Lin, X.: Enabling efficient and geometric range
query with access control over encrypted spatial data. IEEE Trans. Inf. Forensics
Secur. 14(4), 870–885 (2018)
40. Xu, L., Sun, S., Yuan, X., Liu, J.K., Zuo, C., Xu, C.: Enabling authorized encrypted
search for multi-authority medical databases. IEEE Trans. Emerg. Top. Comput.
9(1), 534–546 (2019)
41. Xu, L., Yuan, X., Zhou, Z., Wang, C., Xu, C.: Towards efficient cryptographic data
validation service in edge computing. IEEE Trans. Serv. Comput. (2021). https://
doi.org/10.1109/TSC.2021.3111208
42. Zhang, Y., Katz, J., Papamanthou, C.: All your queries are belong to us: the power
of {File-Injection} attacks on searchable encryption. In: 25th USENIX Security
Symposium (USENIX Security 16), pp. 707–720 (2016)
43. Zhu, H., Lu, R., Huang, C., Chen, L., Li, H.: An efficient privacy-preserving
location-based services query scheme in outsourced cloud. IEEE Trans. Veh. Tech-
nol. 65(9), 7729–7739 (2015)
Blockchain Security
Towards Secure and Trustworthy Flash
Loans: A Blockchain-Based Trust
Management Approach
Abstract. Flash loan has become one of the most creative tools in DeFi
industry. The explosive development of flash loan is due to its circum-
vention to borrower default risk and platform liquidity risk. But it also
greatly reduces the cost required by the attacker to execute an attack.
Hackers can use flash loans to obtain a large amount of disposable funds
in a very short period of time, and then exploit the vulnerabilities in
smart contracts to carry out attacks and steal a large amount of wealth.
Therefore, a trustworthy framework has become one of the security mea-
sures that flash loan platforms must take. This paper makes a com-
prehensive study on flash loan, especially flash loan attack. Firstly, we
briefly introduce the basic concept, platforms and application scenarios
of flash loan, summarize the existing flash loan attack events and classify
them. After that, we compare the existing credit scoring agencies. Then,
we introduce the RFM model in marketing and improve it by combin-
ing the on-chain and off-chain behaviors of users. Finally, we propose a
trustworthy architecture combining the improved RFM model with the
role-based trust assessment model and periodic node behavior trust eval-
uation model. The future development of DeFi and Flash Loan is also
analyzed.
1 Introduction
1.1 Background and Motivation
In recent years, DeFi platform loans have exploded. The extended portfolio is
becoming more diversified, and hidden financial risks are emerging. Flash loan
was born and became one of the most creative and disruptive DeFi tools. It
differs from traditional loans in an important feature that it does not need any
collateral and credit approval process, greatly reducing the loan threshold for
both borrowers and lenders. Flash loans themselves rely on smart contracts,
and the lending process is instantaneous, meaning the entire loan process may
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 499–513, 2022.
https://doi.org/10.1007/978-3-031-23020-2_28
500 Y. Xie et al.
only take a few seconds. If the borrower does not repay the money in a single
blockchain transaction, the loan process will be reversed as if it never happened.
This key difference is why borrowers are able to get a loan quickly without any
collateral or credit checks because it removes the risks of default. The existence
of flash loan itself has no vulnerability, but it enables attackers to leverage a huge
amount of funds at a very low cost in an extremely short period of time, and
carry out price manipulation or arbitrage among multiple protocols, resulting in
a large number of fund losses of DeFi platforms.
To solve this problem, credit models that collect both on-chain and off-chain
information and transform it into intuitive credit scores have been proposed
as a promising solution. Ideally, a well-developed credit model is an industry-
recognized and decentralized measure of credit. Specific individual risks are
standardized while avoiding errors caused by single-dimensional strong rejection
rules and solving the problem of how to integrate fragmented and unstructured
information into a scientific accounting system. To achieve this, we investigated
and analyzed the two most important steps in credit evaluation, data collection
and user behavior quantification, and proposed an improved method to identify
trusted users and grant them discriminated rank of authority.
There are few existing studies on flash loan, and most security schemes focus on
transaction detection and vulnerability mining, ignoring the importance of user
credibility. Therefore, from the perspective of trustworthiness, it is necessary
to further study how to use user on-and-off-chain information to analyze user
behavior. In order to fill the gap in this field, this paper makes contributions in
the following aspects:
1. We give a comprehensive overview of flash loan and flash loan attacks, classify
and summarize the application scenarios and attack events, and prospect and
analyze them from the perspective of trustworthiness.
2. We reconstruct the traditional RFM model to make it more in line with the
usage scenarios in the DeFi field, calculate the corresponding variables of each
user in a standardized way, solve the problem that unstructured information
is difficult to integrate, and quantified the on-chain and off-chain behavior of
users.
3. We propose a trustworthy architecture for identifying abnormal users. The
reconstructed RFM model is combined with the permission control model and
periodic node credit evaluation model to generate dynamic and sustainable
user credit scores, and give different loan permissions to users with different
ranks.
Uniswap V2 is essentially flash Swap rather than flash Loan. The advantage
of Uniswap V2 is that it is more flexible than the previous platforms whose loan
currency and repayment currency must be the same, allowing users to make
payments in other tokens. But Uniswap V2 still charges a 0.3% handling fee,
resulting in a sharp drop in profits [15].
apply for a new loan, finally then repay the flash loan with the loan, so as to
realize the collateral swapping. Finally refinancing allows users to successfully
obtain a lower interest rate loan without any external funding.
Bidding Up Arbitrage and Manipulating Oracle Machine attack modes are essen-
tially the use and manipulation of net worth calculation. In fact, they want to
raise the price of their own assets with the help of other people’s capital and
then sell at a high price for profit. The targets here can be machine gun pools,
lending platforms, leveraged trading platforms, and other DeFi modules.
On February 16,2020, bZx was attacked and lost 360,000 dollars in 15 s [21].
The attacker first borrowed 10,000 ETH from dYdX, then used it to hoard
wBTC, and then used bZx margin trading to transfer orders to KyberSwap,
which basically tripled the price of wBTC. However, when the attack occurred,
the built-in integrity checks were not started. Finally the attacker got a 71%
arbitrage profit and the flowchart is shown in Fig. 1.
Oracle Machine mainly obtains price information in two ways. One is to simply
take existing off-chain price data from a price API or exchange. Another way is to
calculate the immediate price by querying the chain of decentralized exchanges.
504 Y. Xie et al.
6 Relevant Models
The heart of the bayesian network inference prediction is the reliability of the
prior probability and conditional probability and the rationality of the prior
probability which is obtained by statistical analysis and expert advice mainly.
This part needs to be combined with the user’s real identity and the third party
credit platforms by assigning different reliability to multiple off-chain agencies.
Thus, a trust evaluation model and abnormal behavior detection algorithm can
be implemented based on node behavior detection. The direct trust value, sta-
tistical trust value, and recommended trust value are taken as the input of
the abnormal behavior detection algorithm to calculate the comprehensive trust
value of node behavior and judge whether there are malicious attacks on the
network. Bayes network has great advantages in predicting trend changes under
the action of multiple factors, as it can be combined with many advantages of
Bayes network for the trust evaluation of user nodes on trading platforms.
Towards Secure and Trustworthy Flash Loans 507
The five user characteristics mentioned above can be applied to the basic
indicators of RFM, so that each behavior type corresponds to one indicator,
which makes our data richer and more meaningful. To a certain extent, the
shortcoming of hysteresis in RFM model is alleviated. In addition, due to the
instability of on-chain transactions and the volatility of virtual currency prices,
these five indicators alone are not a good measure of user value. Therefore, we
added an indicator V (Volatility) on the basis of the original RFM model to
reflect the standard deviation of each transaction amount. For example, when
a user makes a flash loan transaction, V is the standard deviation of each loan
amount within a limited time.
Now our RFM model has six dimensions. To categorize users, we need to
divide each dimension again with a gradient. As the values of the six dimensions
differ greatly, each indicator is generally divided into 3–4 layers by the labeling
method. The first level is the last user with the most recent transaction time and
the fourth level is the last user with the most recent transaction time. In this way,
each user will have six tags. Obviously, users with all six dimensions in tier1 are
the most valuable and trustworthy, because they have the most recent transac-
tion time, the largest transaction frequency and number, the largest transaction
volume, and the most stable transaction amount. In addition, we can also use
methods such as K Means clustering analysis to mark customers with more
homogeneous characteristics and compare the results with the marking method
to achieve better customer segmentation.
Towards Secure and Trustworthy Flash Loans 509
The data mentioned above are weighted according to the proportion to get
the final trust value of the user, and compared with the minimum trust value
of the system to analyze whether the user is an abnormal user. For users with
different registration time, different weights are given. For example, the trust
value of new users accounts for a higher weight in the calculation process of
off-chain information and guarantee information, which falls down over time.
For users with a long registration time, the proportion of historical things will
become higher and higher until reaching the threshold.
There are two ways to calculate the minimum trust value. One is to calculate
the trust value of the known malicious users and take their maximum value as
the minimum trust value. The second is to take the minimum value of each step
of weighting operation in theory, there is subjective judgment; Third, each step
of the weighted calculation takes the maximum value of different malicious users
and combines the maximum value of all malicious users into a threshold value.
Towards Secure and Trustworthy Flash Loans 511
VolaƟlity
Mining
TransacƟons
Similarity
Whitelist
At the same time, this model aims to pursue the lowest false positive value
and higher recall rate as possible. We can create an intermediate state between
malicious users and ordinary users to maximize the experience of normal users
who are misjudged as malicious users. To a certain extent, the permissions of this
type of user are restricted, such as reducing the loan amount, and the permissions
of the users as normal users are dynamically restored with the growth of the
user’s usage time.
9 Conclusion
In recent years, security problems in the field of decentralized finance, especially
those related to flash loan, have become increasingly serious. In addition to
code audit and transaction detection, building a secure and reliable trustworthy
system is one of the solutions. This paper introduces the basic concepts and
functions of flash loan, and generalizes and analyzes the categories and specific
attack events of flash loan attacks. Furthermore, the existing credit platforms
have been introduced, and an improved RFM model based on users’ on-chain
and off-chain behaviors has been proposed. Finally, A potential overall Trust
architecture is proposed by combining role-based trust assessment model and
periodic node behavior trust evaluation model with the improved RFM model.
References
1. Amler, H., Eckey, L., Faust, S., Kaiser, M., Sandner, P., Schlosser, B.: DeFi-ning
DeFi: challenges & pathway. In: 2021 3rd Conference on Blockchain Research &
Applications for Innovative Networks and Services (BRAINS), pp. 181–184(2021).
https://doi.org/10.1109/BRAINS52497.2021.9569795
2. Zhou, L., Qin, K., Cully, A., Livshits, B., Gervais, A.: On the just-in-time discovery
of profit-generating transactions in DeFi protocols. In: 2021 IEEE Symposium on
Security and Privacy (SP), pp. 919–936(2021). https://doi.org/10.1109/SP40001.
2021.00113
3. Liu, B., Szalachowski, P., Zhou, J.: A first look into DeFi Oracles. In: 2021
IEEE International Conference on Decentralized Applications and Infrastructures
(DAPPS), pp. 39–48 (2021). https://doi.org/10.1109/DAPPS52256.2021.00010
4. Qin, K., Zhou, L., Gamito, P., Jovanovic, P., Gervais, A.: An empirical study of
DeFi liquidations: incentives, risks, and instabilities. In: The 21st ACM Internet
Measurement Conference, IMC 2021, New York, NY, USA, pp. 336–350 (2021).
https://doi.org/10.1145/3487552.3487811
5. Gudgeon, L., Perez, D., Harz, D., Livshits, B., Gervais, A.: The decentralized finan-
cial crisis. In: 2020 Crypto Valley Conference on Blockchain Technology (CVCBT),
pp. 1–15(2020). https://doi.org/10.1109/CVCBT50464.2020.00005
6. Luo, R., et al.: DeFi security: a preliminary exploration of attacks, detection and
defense. J. Guangzhou Univ. Nat. Sci. Ed., 1–15 (2022)
7. Wang, B., et al.: BLOCKEYE: hunting for DeFi attacks on blockchain. In: 2021
IEEE/ACM 43rd International Conference on Software Engineering: Companion
Proceedings (ICSE-Companion), pp. 17–20 (2021). https://doi.org/10.1109/ICSE-
Companion52605.2021.00025
8. Ferreira Torres, C., Iannillo, A.K., Gervais, A., State, R.: The eye of horus: spotting
and analyzing attacks on Ethereum smart contracts. In: Borisov, N., Diaz, C. (eds.)
FC 2021. LNCS, vol. 12674, pp. 33–52. Springer, Heidelberg (2021). https://doi.
org/10.1007/978-3-662-64322-8 2
9. Qin, K., Zhou, L., Livshits, B., Gervais, A.: Attacking the DeFi ecosystem with
flash loans for fun and profit. In: Borisov, N., Diaz, C. (eds.) FC 2021. LNCS, vol.
12674, pp. 3–32. Springer, Heidelberg (2021). https://doi.org/10.1007/978-3-662-
64322-8 1
Towards Secure and Trustworthy Flash Loans 513
10. Wang, D., Wu, S., Lin, Z.: Towards a first step to understand flash loan and its
applications in DeFi ecosystem. In: Proceedings of the 9th International Workshop
on Security in Blockchain and Cloud Computing, SBC 2021, pp. 23–28 (2021).
https://doi.org/10.1145/3457977.3460301
11. Tefagh, M., Bagheri, F., Khajehpour, A., Abdi, M.: Atomic bonded cross-chain
debt. In: 2020 the 3rd International Conference on Blockchain Technology and
Applications, ICBTA 2020, New York, NY, USA, pp. 50–54 (2020). https://doi.
org/10.1145/3446983.3446987
12. Mackinga, T., Nadahalli, T., Wattenhofer, R.: TWAP Oracle attacks: easier done
than said? In: 2022 IEEE International Conference on Blockchain and Cryptocur-
rency (ICBC), pp. 1–8 (2022). https://doi.org/10.1109/ICBC54727.2022.9805499
13. Aave homepage. https://aave.com/. Accessed 01 Aug 2022
14. dYdX homepage. https://dydx.exchange/. Accessed 05 Aug 2022
15. UNISWAP homepage. https://uniswap.org/. Accessed 05 Aug 2022
16. Cream homepage. https://app.cream.finance/. Accessed 06 Aug 2022
17. V-CRED homepage. http://www.v-cred.trade/. Accessed 10 Aug 2022
18. Xu, J., Ackerer, D., Dubovitskaya, A.: A game-theoretic analysis of cross-chain
atomic swaps with HTLCs. In: 2021 IEEE 41st International Conference on Dis-
tributed Computing Systems (ICDCS), pp. 584–594 (2021). https://doi.org/10.
1109/ICDCS51616.2021.00062
19. Boonpeam, N., Werapun, W., Karode, T.: The arbitrage system on decen-
tralized exchanges. In: 2021 18th International Conference on Electrical Engi-
neering/Electronics, Computer, Telecommunications and Information Technol-
ogy (ECTI-CON), pp. 768–771 (2021). https://doi.org/10.1109/ECTI-CON51831.
2021.9454673
20. Cecchetti, E., Yao, S., Ni, H., Myers, A.C.: Compositional security for reentrant
applications. In: 2021 IEEE Symposium on Security and Privacy (SP), pp. 1249–
1267 (2021). https://doi.org/10.1109/SP40001.2021.00084
21. bZx homepage. https://bzx.network/. Accessed 05 Aug 2022
22. Yearn homepage. https://yearn.finance/. Accessed 05 Aug 2022
23. Lendf.me homepage. https://cryptobonuses.com/. Accessed 05 Aug 2022
24. Eleven.Finance homepage. https://eleven.finance/. Accessed 05 Aug 2022
25. TrueFi homepage. https://truefi.io/. Accessed 11 Aug 2022
26. ARCx homepage. https://arcx.game/passport. Accessed 10 Aug 2022
27. CreDA homepage. https://www1.creda.app/home. Accessed 08 Aug 2022
28. Parikh, Y., Abdelfattah, E.: Clustering algorithms and RFM analysis performed on
retail transactions. In: 2020 11th IEEE Annual Ubiquitous Computing, Electronics
& Mobile Communication Conference (UEMCON), pp. 0506–0511 (2020). https://
doi.org/10.1109/UEMCON51285.2020.9298123
29. Shahen, J., Niu, J., Tripunitara, M.: Cree: a performant tool for safety analysis of
administrative temporal role-based access control (ATRBAC) policies. In: IEEE
Transactions on Dependable and Secure Computing, vol. 18, no. 5, pp. 2349–2364
(2021). https://doi.org/10.1109/TDSC.2019.2949410
Forward Traceability for Product
Authenticity Using Ethereum Smart
Contracts
1 Introduction
Counterfeiting is a significant problem in supply chains. A prominent attack
pattern counterfeiters use is the infiltration of fake products within a legitimate
supply chain [15], making fake products to be sold as legit by the supply chain
retailers themselves. Assume a scenario where a manufacturer of counterfeit
Ray-Ban sunglasses wants to sell fake products as authentic. A way to do this,
without causing alarm, is by selling them through a legitimate supply chain. A
case in point: in 2012 the United States bought counterfeits of the drug Avastin
sold by legitimate retailers [15].
Counterfeiting is a lucrative criminal activity. Lou et al. [11] estimate the
global counterfeit market value at 400 billion dollars. Counterfeit products are
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 514–523, 2022.
https://doi.org/10.1007/978-3-031-23020-2_29
Forward Traceability for Product Authenticity 515
not bound to regulations and are usually of lesser quality. This situation can
have a severe impact, especially in the pharmaceutical supply chain where fake
medicine impacts the patient’s life [19]. Counterfeits also cause reputational and
financial damage to the owner of the original product [15].
There are numerous articles on countering counterfeiting in supply chains [8,
15,17–19]. A key idea in this direction is traceability, whereby a product is traced
from its origin to its destination. Products whose trace is incomplete or lost are
thus regarded as potentially fake. We observe, however, that most traceability
solutions in the literature [2,18] do not verify trace correctness as products move
throughout the supply chain, limiting themselves to storing traceability data.
This makes those solutions unsuited for real-time counterfeit detection.
Contributions. In this short paper, we introduce the notion of forward trace-
ability as the capacity of supply chain participants to verify each step taken by
a product under the assumption that the product’s path has been established
at its origin. We make this notion formal within a formalism based on Labelled
Transition Systems. To our knowledge, ours is the first definition of supply chain
traceability that allows supply chain participants to verify the authenticity (trace
correctness) of the products they handle. To illustrate the practicality of forward
traceability, we design and implement a technical proof-of-concept of forward
traceability in Ethereum.
Organisation. The paper is organized as follows. In the next section, we give
an overview of related research. Section 3 formally defines forward traceability.
Section 4 shows our proof of concept in Solidity of a system satisfying forward
traceability. In Sect. 5, we evaluate the costs of our implementation. Lastly, we
conclude our work in Sect. 6.
2 Related Work
Our work is influenced by path authentication protocols, such as Pathchecker
[12], Tracker [1], Checker [3], and StepAuth [2]. Like in path authentication
protocols, a product in a forward traceability system is expected to go through
a pre-established path. Path authentication protocols, however, do not satisfy
traceability, because supply chain participants cannot tell, for example, the origin
of a product.
Lately, blockchain has been introduced in traceability solutions [6,7,11,14,
19]. For example, Salah et al. [14] provide a proof-of-concept traceability frame-
work for soybeans in the agricultural supply chain using smart contracts. Sunny
et al. [16] use Microsoft Azure Blockchain Workbench instead. Their approach
is inflexible, as it assumes a fixed supply chain topology. Westerkamp et al. [20]
provide a traceability solution using non-fungible tokens. Their method tokenizes
every physical object to an NFT. Their protocol allows products to be split and
combined into new products. Munoz et al. [4] present an NFT-based traceability
solution specific to the logging industry.
Even though blockchain-based solutions may suffer from scalability issues [13],
they have the attractive feature of making data immutable. Commercial traceabil-
ity providers like EverLedger and TradeLens use blockchain technology, indicating
516 F. Heikamp et al.
its relevancy. However, none of the solutions above defines trace correctness, mak-
ing them unsuitable for applications where a product’s path has to be verified.
Others, like [5,10,18], are either based on a custom-made blockchain or restricted
to specific supply chain domains, such as copyright of digital pictures and prove-
nance.
We further observe that several approaches use a fixed supply chain topology
for their traceability solution. If the supply chain changes, the whole solution
has to be rewritten. Our solution is not bound by such restrictions.
We provide a comparison table (Table 1) to show the difference between the
various blockchain-based traceability solutions mentioned earlier. Observe that
most of them are specific to a supply chain type.
3 Forward Traceability
We define a forward traceability system as a system that can reconstruct and
verify past events and is also able to determine future steps that a product has
to take.
Forward traceability works as follows: we have a supply chain producing
products. We also have actions that are applied to products. An event is an
action applied to a product at a time and location. The state of a supply chain
describes which events have been applied to the product. We call this state a
trace because it documents the history of the product. This is the first half of
forward traceability. The second half is about how we verify a product. The
verification is built around the valid predicate. If the valid predicate holds for
a product, then we know the product is authentic. The benefit of using a valid
predicate is that it allows for multiple solutions. If a predicate does not perform
well we can try another interpretation without changing the definition of forward
traceability. In our interpretation, we build the valid predicate that states that
Forward Traceability for Product Authenticity 517
a product has to follow a specific path to be authentic. This approach has been
used before in the context of path authentication [1,2,12].
We let supply chain participants store information about the product they
handle in the form of events.
Definition 2 (Event). Let A be the set of actions supply chain participants per-
form on products. An event is a tuple (x, action, actor, timestamp, data), where
x ∈ X is a product, action ∈ A an action, actor ∈ P a supply chain participant,
timestamp is the date and time, and data is auxiliary data. We use E to denote
the set of all events and eactor to denote an event e executed by an actor a.
A supply chain traceability system tracks a product through the supply chain.
4.1 Requirements
4.2 Design
In our implementation, we distinguish three different actions: “register partici-
pant”, “register product”, and “update product”. We model these actions using
three smart contracts. The essential one is the product smart contract. Every
physical product is an instance of this contract. The other two contracts are
lookup tables for products and participants. These smart contracts list all users
and products and provide address-to-name translations. Our implementation is
available on GitHub1 .
After a product is registered, the product is updated sequentially by the
addresses specified in the path. The updating participant has to prove two things:
it is the next step in the path and it possesses the secret key obtained from the pre-
vious step. If the participant is the next step, a new event is generated and added
to the Product smart contract. After that, the verify function is executed on the
latest event. The verify function checks if the data signature matches the data and
if the hmac of the previous event is correct. It can check the last part because the
message sender should have the right key to verify the hmac. The message sender
cannot prove ownership if the key is unavailable. We assume that the participant
has some means to transport the shared secret key securely to the next owner. If
the verify function returns false, the transaction is reverted, and the smart contract
is restored. The sequence diagram for the update phase is seen in Fig. 2.
In line with previous work, we rely on the fact that data in the blockchain
is immutable, i.e. an adversary cannot change or delete traceability data. Fur-
thermore, using a shared key between participants, we do not solely rely on
blockchain security. An adversary would need to obtain both the private key
and shared key to update the trace of a product. In future work, we would
like to include a more thorough security analysis. This security analysis should
formally prove that our system is secure under a given threat model.
5 Evaluation
Our protocol is evaluated on cost. Our evaluation on cost is in line with current
research on traceability systems [4,20].
5.1 Setup
Our experiment runs on an Ubuntu 22.04 VirtualBox VM with two virtual CPU
cores and 8 GB of memory. Testing is done using the truffle/mocha testing suite.
The experiment is constructed so that everything except for the path length
changes. We calculated the cost of an operation by taking the balance difference
before and after the operation. We use the web3.eth.getBalance call to enquire
about the balance in wei.
For our experiment, we initialized 256 products and 10 participants. The
path length for the products ranges from 1 to 256. The maximum path length
is set to 256 because a single product will rarely be read more than 256 times.
5.2 Results
Figure 3 shows the total GAS cost plotted against path length. Table 2 shows
the costs for various path lengths (between 1 and 256) in GAS, Eth, and A$.
Our primary unit for costs is gas because they remain fixed. For simplicity, we
assume that the gas cost is 10Gwei and an Eth to A$ rate of A$2300.
Figure 3 shows that total costs scale linearly with path length. This is in line
with results from other research [4,20]. The “add product to lookup table” step
remains constant because it is independent of path length. Create scales linearly
because it has to allocate more bytes to store a larger path. The update function
scales linearly because it has to be executed |path| times.
Forward Traceability for Product Authenticity 521
The costs can be significantly reduced with some optimizations. Each par-
ticipant is represented using an unsigned integer (uint32) instead of an address
to reduce the required storage for a path by a factor of 8. It can be further
optimized by moving all data to off-chain storage and only keeping references
on-chain. Also, note that costs can be divided among participants. In that case,
522 F. Heikamp et al.
the update costs for 256 can be divided by 256, which is about 5 dollars each.
Tracking individual items might be too expensive. Batching is an often employed
mechanism to save costs. It will decrease the granularity but will decrease costs
as well. For example, if one ship is in batches of 100, they could use one tag for
one batch, so the costs per unit are the total cost divided by 100.
It is important to note that traceability always comes at a cost, even in
traditional settings. A traceability solution should be cheap enough so that the
benefits outweigh the costs.
6 Conclusion
In this paper, we introduce the notion of forward traceability. A forward trace-
ability system is stricter than a traditional traceability system because it has
two additional requirements. It needs to automatically verify traceability data
and know the future steps a product is expected to take in the supply chain. Our
concept offers a new way of determining product authenticity, which is especially
useful when real-time detection is required.
We define traceability using a transition system and introduce trace correct-
ness as the expectation that a product has been going through a pre-defined
path. We argue that our definition is flexible enough to accommodate other
interpretations of a valid trace. We provided a proof of concept using Ethereum
smart contracts, demonstrating that forward traceability is feasible.
For future work, we plan to perform a formal security analysis of our system
design. We also plan to include privacy requirements, allowing participants to
limit the information they share. Because our preliminary experiments show that
the costs of our forward traceability are not low, we will explore more efficient
implementations. The code and data for our work are available on GitHub.
Acknowledgements. The work has been supported by the Cyber Security Research
Centre Limited whose activities are partially funded by the Australian Government’s
Cooperative Research Centres Programme.
References
1. Blass, E.o., Elkhiyaoui, K., Molva, R., Antipolis, E.S.: Tracker: security and pri-
vacy for RFID-based supply chains. In: In NDSS 2011, 18th Annual Network and
Distributed System Security Symposium, 6–9 February 2011, p. 2011 (2011)
2. Bu, K., Li, Y.: Every step you take, I’ll be watching you: practical StepAuth-
Entication of RFID paths. IEEE Trans. Inf. Foren. Secur. 13(4), 834–849 (2018).
https://doi.org/10.1109/TIFS.2017.2768022
3. Elkhiyaoui, K., Blass, E.o., Molva, R.: Checker: on-site checking in RFID-based
supply chains. In: In Proceedings of the Fifth ACM Conference on Security and
Privacy in Wireless and Mobile Networks, WISEC 2012, pp. 173–184. ACM (2012)
4. Felipe Munoz, M., Zhang, K., Shahzad, A., Ouhimmou, M.: LogLog: a blockchain
solution for tracking and certifying wood volumes. In: 2021 IEEE International
Conference on Blockchain and Cryptocurrency (ICBC), pp. 1–9 (2021). https://
doi.org/10.1109/ICBC51069.2021.9461153
Forward Traceability for Product Authenticity 523
5. Igarashi, T., Kazuhiko, T., Kobayashi, Y., Kuno, H., Diehl, E.: Photrace: A
blockchain-based traceability system for photographs on the internet. In: 2021
IEEE International Conference on Blockchain (Blockchain), pp. 590–596 (2021).
https://doi.org/10.1109/Blockchain53845.2021.00089
6. Islam, M.D., Shen, H., Badsha, S.: Integrating blockchain into supply chain safe-
guarded by PUF-enabled RFID. Internet Things 18, 100505 (2022). https://doi.
org/10.1016/j.iot.2022.100505
7. Jing, Z., Hu, N., Song, Y., Song, B., Gu, C., Pan, L.: On the design and implemen-
tation of a blockchain-based data management system for ETO manufacturing.
Appl. Sci. 12(18), 9184 (2022)
8. Khalil, G., Doss, R., Chowdhury, M.: A novel RFID-based anti-counterfeiting
scheme for retail environments. IEEE Access 8, 47952–47962 (2020). https://doi.
org/10.1109/ACCESS.2020.2979264
9. Kuhn, M., Funk, F., Franke, J.: Blockchain architecture for automotive traceability.
Procedia CIRP 97, 390–395 (2021). https://doi.org/10.1016/j.procir.2020.05.256
10. Kumar, V., Agrawal, T.K., Wang, L., Chen, Y.: Contribution of traceability
towards attaining sustainability in the textile sector. Text. Clothing Sustain. 3(1),
1–10 (2017). https://doi.org/10.1186/s40689-017-0027-8
11. Lou, M., Dong, X., Cao, Z., Shen, J., He, D.: SESCF: a secure and efficient supply
chain framework via blockchain-based smart contracts. Sec. and Commun. Netw.
2021 (2021). https://doi.org/10.1155/2021/8884478
12. Ouafi, K., Vaudenay, S.: Pathchecker: an RFID application for tracing products in
suply-chains. In: In Workshop on RFID Security – RFIDSec 2009, pp. 1–14 (2009)
13. Pearson, S., et al.: Are distributed ledger technologies the panacea for food trace-
ability? Glob. Food Secur. 20, 145–149 (2019). https://doi.org/10.1016/j.gfs.2019.
02.002
14. Salah, K., Nizamuddin, N., Jayaraman, R., Omar, M.: Blockchain-based soybean
traceability in agricultural supply chain. IEEE Access Pract. Innov. Open Solut.
7, 73295–73305 (2019). https://doi.org/10.1109/ACCESS.2019.2918000
15. Soon, J.M., Manning, L.: Developing anti-counterfeiting measures: the role of smart
packaging. Food Res. Int. 123, 135–143 (2019). https://doi.org/10.1016/j.foodres.
2019.04.049
16. Sunny, J., Undralla, N., Madhusudanan Pillai, V.: Supply chain transparency
through blockchain-based traceability: an overview with demonstration. Comput.
Ind. Eng. 150, 106895 (2020). https://doi.org/10.1016/j.cie.2020.106895
17. Syed, N.F., Shah, S.W., Trujillo-Rasua, R., Doss, R.: Traceability in supply chains:
a Cyber security analysis. Comput. Secur. 112, 102536 (2022). https://doi.org/10.
1016/j.cose.2021.102536
18. Toyoda, K., Mathiopoulos, P.T., Sasase, I., Ohtsuki, T.: A novel blockchain-based
product ownership management system (POMS) for anti-counterfeits in the post
supply chain. IEEE Access Pract. Innov. Open Solut. 5, 17465–17477 (2017).
https://doi.org/10.1109/ACCESS.2017.2720760
19. Uddin, M.: Blockchain medledger: hyperledger fabric enabled drug traceability
system for counterfeit drugs in pharmaceutical industry. Int. J. Pharm. 597, 120235
(2021). https://doi.org/10.1016/j.ijpharm.2021.120235
20. Westerkamp, M., Victor, F., Küpper, A.: Tracing manufacturing processes using
blockchain-based token compositions. Digit. Commun. Netw. 6(2), 167–176 (2020).
https://doi.org/10.1016/j.dcan.2019.01.007
BSB: Bringing Safe Browsing
to Blockchain Platform
Zhuang Zhou1 , Cheng Tan1,2(B) , Shiyun Liu1 , Rongwei Yu3 , Siwei Wu4 ,
and Shengwu Xiong2
1
School of Computer Science and Artificial Intelligence,
Wuhan University of Technology, Wuhan 430070, China
{305271,cheng_tan,liushiyun}@whut.edu.cn
2
Sanya Science and Education Innovation Park, Wuhan University of Technology,
Sanya 572000, China
[email protected]
3
School of Cyber Science and Engineering, Wuhan University, Wuhan 430072, China
[email protected]
4
College of Computer Science and Technology, Zhejiang University, Hangzhou
310007, China
[email protected]
1 Introduction
Blockchain platform achieves trusted asset transfer across users without a third
party. Smart contracts which are executed on top of Blockchain platform have
been used as the back-end of Dapps for payments, crowd funding, voting, or gov-
ernance [33]. Among them, Blockchain-asset-enabled finance ecosystem (DeFi)
have attracted a recent surge in popularity with millions of daily transaction
volume, billions of locked up United States dollar (USD), as well as a plethora of
newly emerging protocols (for lending, staking, and exchanges) [44]. The great
profits attracted cybercriminals to fix their gaze on those Dapps and exploit their
Blockchain back-end, smart contracts. Code-based vulnerabilities in smart con-
tracts were usually exploited through attack transactions to steal cryptocurrency
or tokens [23], which loss was over billions of USD [6].
In recent years, the security issues on smart contracts attract increasing
attentions from researchers. By analyzing contract code and checking for known
vulnerable patterns, static analysis [10,14,15,19,24,27,31,34,36] can be used to
detect vulnerabilities in a deployed contract. Dynamic analysis [12,13,18,29]
is to detect vulnerabilities by executing the deployed contracts. Recent works
[4,42,43] also replay history transactions and record EVM bytecode-level traces
to detect predefined attacks. With the rapid growth of the DeFi ecosystem,
security issues were also reported [37,38,41,44].
Aside from vulnerability assessment, studies on real-world Dapp attacks and
frauds are also conducted to detect the contracts deployed by cybercriminal, such
as phishing [40], Ponzi [5], and honeypot [35]. Blockchain platform urgently needs
an effective method to help users stay away from unsafe contracts in order to
create an enticing investment environment [8]. In this paper, unsafe contracts
include those contracts which are vulnerable, phishing, Ponzi, and honeypot.
However, there is a gap between users, owners, and security researchers of
smart contract. Contract vulnerability exploit details were usually published
through academic papers, chart rooms, and blogs. Such negative methods can-
not guarantee that contract owners or users can get the details in time [16], while
the details may be utilized by cybercriminals. To avoid such consequences, some
authors refrained from mentioning any particular smart contract [18], which in
turn affect users and owners to learn about the vulnerabilities. Meanwhile, to
accept responsible disclosure, some Dapp owners have to leave contact infor-
mation on their front-end, which are conflict with the anonymous feature of
Blockchain platform. After responsible disclosure, contract owners may still have
no intention to patch the vulnerabilities until attack incidents happen [25], as it
is quite cumbersome to deal with a vulnerable contract and restore a safe state.
Users may not verify the safety of smart contract before making transactions,
which make them suffer unnecessary loss.
In summary, a bridge is needed to effectively disseminate detection results
from security researchers to users and owners of smart contract. Safe Browsing
(SB) is a popular security service to protect web users by showing warnings to
them when they attempt to navigate to dangerous sites or download danger-
ous files. SB also notifies webmasters when their websites are compromised by
526 Z. Zhou et al.
malicious actors and helps them diagnose and resolve the problem so that their
visitors stay safe [11]. Inspired by SB, we wish to take advantage of existing secu-
rity analysis results to prevent users making transactions with unsafe contracts,
and motivate contract owners patching the vulnerabilities in time.
Our work: In this paper, we design a Blockchain Safe Browsing (BSB) plat-
form, and implement it on Ethereum Blockchain, which is the most prominent
framework for Dapps [39], with over 15 million contracts deployed [26].
We integrate BSB with Ethereum wallet to provide two functionalities: user
warning, and contract owner notify. Based on the shared results from security
researchers, contract blacklist can be generated to provide user warning service.
Users can query whether target contracts are unsafe before making transactions
with them. Similar to SB, the general detection procedure of user warning is to
check if the target contract is present on a list of unsafe contracts, collected and
maintained by a remote server [2]. We will reserve a local filter that contains
the blacklist on the client side to circumvent heavy communication overhead.
We hope that such warnings can avoid users making transactions with unsafe
contracts, as their assets maybe stolen by cybercriminals. No matter vulnera-
ble contracts are exploited or not, such warnings will motivate contract owners
patching the vulnerabilities as quickly as possible, otherwise users may have no
willing to make transactions with their contracts.
From another perspective, an integrated contract blacklist, whose contents
are contributed by different security researchers, would certainly improve user
experience as each researcher is likely to hold a list of unsafe contracts that oth-
ers do not possess [10,13,15,18,19,24,36,42]. We name those contract security
researchers who share their results as blacklist providers.
User warning service shall be free to the users, otherwise they have no need
to use it. To ensure user experience and against the latest threats, contract
blacklist shall be updated continuously, which is not easy for blacklist providers.
Breidenbach [3] uses bug bounties to incentivize security analyses of smart con-
tracts, which bridges the bounty payer and the bug finder. Profits will bring
blacklist providers the motivation to keep updating. We develop an incentive
method in contract owner notify mechanism to help blacklist providers gain
profits from shared results. Contract owners will pay a little for the vulnera-
bility exploit details of their contracts, which are the most valuable assets of
blacklist providers. To prevent vulnerability exploit details from being leaked
to the adversaries, the public key of contract owners will be recovered and uti-
lized to encrypt the vulnerability exploit details, so that only the private key
of contract owners can decrypt them. To directly notify contract owners about
contract vulnerabilities, BSB platform will verify the identities of the users, and
vulnerable contract owners will be notified that there are vulnerabilities in their
contracts, and they can purchase related vulnerability reports to study vulner-
ability exploit details.
To the best of our knowledge, BSB is the first design that enables safe brows-
ing on Blockchain platform. Our contributions are as follows:
BSB: Bringing Safe Browsing to Blockchain Platform 527
1) We propose the first BSB platform which attracts researchers sharing their
research results to support user warning service and contract owner notify
mechanism. The former warns users before they make transactions with
unsafe contracts, while the latter notifies contract owners that vulnerabilities
are in their contracts, and helps them obtain vulnerability exploit details.
2) To prevent vulnerability exploit details from being leaked, an encryption
mechanism is developed based on the public key cryptography of Blockchain
platform. Such a mechanism guarantee that only contract owners can decrypt
the encrypted data.
3) We implement a full-fledged BSB prototype, consisting of a client for users,
a handler for blacklist providers, and a server for data management. The
evaluation with real datasets shows the efficiency of our design.
2 Preliminaries
2.1 Ethereum and Smart Contract
Dapps utilizes a set of smart contracts as its on-chain back-ends, for the purposes
such as encoding task logic and maintaining persistent storage of its consensus-
critical states [18], while also contains offchain components such as its front-end
528 Z. Zhou et al.
(e.g., a website) for communicating with users. For example, Fomo3D [42], is
powered by 5 smart contracts that handles the transactions for different actions,
like buying keys, withdrawing from vault, picking a vanity name, etc.
As famous Dapps, DeFi supports a multitude of different financial applica-
tions [38], such as List of Booking, Automated Market Maker (AMM), Stable-
coin, Flash Loans, etc. Uniswap is an AMM Dapp which provides the cryptocur-
rency exchange service. Liquidity providers need to deposit a pre-determined
amount of cryptocurrencies to the pool in the AMM. In return for providing
liquidity to the protocol, they can earn fees from trades in their pool.
A wallet is a software application that serves as the primary user interface to
Ethereum [1]. The wallet controls access to a user’s money, managing keys and
addresses, tracking the balance, and creating and signing transactions. In addi-
tion, some Ethereum wallets can also interact with contracts, such as ERC20
tokens. Wallets don’t have custody of users’ funds, they are just tools for man-
aging EOAs, which means that users can swap wallet providers at any time.
3 System Overview
BSB platform bridges three different entities: the user, who wants to make trans-
actions with smart contracts; the contract owner, who deploys the vulnerable
contracts; and the blacklist provider, who has expertise and capabilities to col-
lect, verify and update a list of unsafe contracts.
As shown in Fig. 1, Blacklist providers rely on the handlers to upload research
results to the server. They shall encrypt the reports which contains the exploit
details of contract vulnerabilities before uploading. The server is responsible for
generating contract blacklist for local enquiry, and responding report request
BSB: Bringing Safe Browsing to Blockchain Platform 529
User
Local enquiry
Handler Client
Provider
Server Blacklist
Handler Client
Report request
Provider
Contract
owner
from the clients. The clients automatically download the latest contract black-
list from the server to provide two functionalities. The users rely on the client for
checking whether target contract is known to be unsafe(the blue line). The own-
ers of known vulnerable contracts will be notified that there are vulnerabilities
in their contracts, and they can apply for those vulnerability exploit details(the
red line).
Threat Model and Assumptions. To ensure the correctness of uploaded
research results, we ensure that blacklist providers are contract security
researchers as well, who have the incentive to study and detect unsafe contracts.
During registration process, a manual verification is set up to verify the identi-
ties of blacklist providers as security researchers of smart contract. In this work,
blacklist providers can gain profits from shared research results, which attract
them willingly and periodically upload data to the platform. We assume those
blacklist providers are semi-trusted. They faithfully share their research results,
as fake results will seriously affect their reputations.
Meanwhile, we consider that users are semi-trusted as well. They may be
masqueraded by adversaries. However, they should be unable to obtain the vul-
nerability exploit reports by using the client, as those can only be decrypted by
the private key of contract owners.
4 Design
To improve the practicality of BSB, we wish to generate an integrated con-
tract blacklist whose contents are contributed by different blacklist providers.
Shared research results will be standardized and authorized, while the vulnera-
bility exploit reports will be priced and encrypted. The public key of contract
owners will be recovered and used to encrypt the reports of their contracts to
avoid the details being leaked. The reports will be traded to contract owners to
gain profits for security researchers, which inspires them to periodically upload
their research results to the platform. Based on contract blacklist, user warning
service can avoid users making transactions with unsafe contracts, which moti-
vate contract owners to patch their contracts in time. To achieve contract owner
530 Z. Zhou et al.
notify mechanism, BSB will confirm the EOAs of contract owners and push
related vulnerable contract lists to them. The users can purchase the reports
and decrypt them by the private key to obtain the details.
Warning User
yes
3 User warning Contract
User
Contract url or owner?
Matching?
address
yes
11 Data processing
BSB Unsafe contract Request
BSB handler Registration
Provider data credential
Fig. 2. Flowchart of our BSB platform: 1) the arrow −→ shows the routine of data
processing initiated by blacklist provider; 2) the arrow shows the process of contract
owner notify and report request; 3) the arrow ⇒ shows the complete detection routine
when there is a match in local enquiry.
exploit details shall be encrypted and priced before uploading. To achieve con-
tract owner notify mechanism, we define contract owner as the sender’s EOA in
external transaction which directly create contract or trigger an internal trans-
action to create contract. In data table, GridFS ID is utilized to locate encrypted
vulnerability reports. With data table, a contract blacklist will be generated to
support the functionalities of BSB client.
Unsafe contract information is public to all the users, while the reports of
vulnerability exploit details are only available to contract owners. To prevent
the details being leaked, BSB handler encrypts the vulnerability reports locally
before sending to BSB server. ECC is utilized by Ethereum to achieve EOA
generation and transaction verification. Each contract owner holds its private
key. We recover the public key of contract owner to encrypt the report so that
none can decrypt it except the owner of the private key.
Algorithm 1 illustrates the detailed procedure for Ethereum public key recov-
ery. With the recovered public key and the report as the input, we utilize the
ECIES encryption algorithm locally to calculate ciphertext public key, cipher-
text, symmetric algorithm parameters, and MAC code. Those output will be
stored in a file called encrypted report which will be uploaded to BSB server.
BSB client
3
Verify
Success
Report
5 Implementation
We implemented three major components of BSB platform: BSB handler, BSB
server, and BSB client. Next, we will describe their implementation in detail.
To make BSB platform easy to use, we build our client application in the form of
website. BSB client aims to warn users before they make transactions with unsafe
contracts, and help contract owners obtain vulnerability reports to support them
patching their contracts in time. BSB client includes three functions: blacklist
query, report request, and Ethereum wallet.
We integrate an Ethereum wallet into BSB client so that each user has to log
in an EOA before using the functionalities provided by BSB client. We choose to
integrate MetaMask extension because it implements a light crypto wallet and a
gateway to Blockchain apps [20]. MetaMask is a software cryptocurrency wallet
used to interact with the Ethereum Blockchain. It allows users to access their
Ethereum wallet through a browser extension or mobile app, which can then
be used to interact with Dapps. MetaMask is commonly used, as its browser
extension had over 30 million monthly active users in June 2022.
After logged in, BSB client automatically downloads the latest contract black-
list from BSB server. Similar to SB, BSB client also requires local storage for
data to circumvent heavy communication overhead. A local copy of contract
blacklist is loaded in the memory to speed query operations. Yet its implemen-
tation is rather straightforward. All data with respect to contract blacklist is
fetched from BSB server updated by blacklist providers. Our implementation
carries through the principle of accelerating the client-side operations as much
as possible, achieving a rather low-level runtime memory cost in the meanwhile.
We will discuss the local overhead of BSB client in Sect. 6.
BSB: Bringing Safe Browsing to Blockchain Platform 535
6 Evaluation
We evaluate the overhead imposed by BSB components on each party, and the
end-to-end throughput and latency of the application using BSB platform. We
deploy our BSB server on the AWS EC2 instance “t2.micro” (1 vCPU with 1 GB
RAM) in Linux (Ubuntu server 20.04 LTS), which is deployed in Tokyo, Asia.
We recorded the storage consume of uploaded data, and evaluated the memory
overhead and the time consume of contract blacklist generation. We evaluated
the usage of BSB handler and BSB client on the following three devices: (i)
laptop: MacBook Pro equipped with 2.4 GHz Intel Core i5 CPU, 16 GiB RAM,
(ii) laptop: with 2.7 GHz Intel i7, 16 GiB RAM, Windows, (iii) desktops: with
2.9 GHz Intel i7, 4 GB RAM, Linux. We evaluated the encryption time and
upload time of BSB handler. As for BSB client, the overhead of user warning
service and contract owner notify mechanism were evaluated seriously.
Two real datasets are used respectively in our instance: D1 - 104 contracts
which contain vulnerabilities like reentrancy, access control, arithmetic, bad ran-
domness, etc. D2 - 2880 contracts which are recognized as phishing, Ponzi, or
honeypot. Among 104 vulnerability exploit reports for D1 dataset, 46 txt format
reports are from 1 KB to 10 KB, 10 doc format reports are from 10 KB to 1
MB, and 48 pdf format reports are from 1 MB to 10 MB.
Plaintext Size (kB) Ciphertext Size (kB) EncryptTime (ms) UploadTime (ms)
1 4 11.49 216.26
10 35 25.39 292.58
100 380 40.56 805.33
1,000 3,500 387.44 6,053.42
10,000 35,000 2,866.22 50,774.31
reports are small in number but great in storage overhead. The average storage
overhead of each encrypted report is over 13,157 kB. Considering the great stor-
age overhead of encrypted reports, we may decouple GridFS database from BSB
server to extend or implement distributed processing in the future.
After data table has been updated by blacklist providers, BSB server auto-
matically generates a contract blacklist to support the functionalities of BSB
client. We further estimated the average time consume and storage overhead
to create contract blacklist. To facilitate quantitative comparison, we generated
simulation data to populate data table. As shown in Table 2, the storage over-
head increases linearly as the entries increase. The time consume grows slowly
with the increase of entries. When the number of entries increases to 40,000, the
time consume skyrockets due to the memory swap of the node.
Table 2. Average time consume and storage overhead for creating contract blacklist.
Table 3. Average overhead to download contract blacklist and load it into the memory.
7 Discussion
Discussion on (Malicious) Blacklist Providers. As a safe browsing plat-
form, the malicious party might leverage BSB as an attack vector against smart
contracts/Dapps. They may insert a number of fake reports about safe con-
tracts, so that they can obtain illegal profits from ransom or promotion. In
540 Z. Zhou et al.
8 Conclusion
In this paper, we propose a BSB platform which is able to disseminate smart
contract detection results to smart contract users and vulnerable contract own-
ers. Based on shared results, contract blacklist can be generated to provide user
warning service, which is able to warn users before they make transactions with
unsafe contracts. A contract owner notify mechanism is developed to push vul-
nerability exploit details to contract owners to help vulnerabilities being patched
BSB: Bringing Safe Browsing to Blockchain Platform 541
in time, and no detail leak will happened during its operation. Among the mech-
anism, the researchers will gain profits from shared data, which in turn inspire
them keep uploading their research results. Our evaluation shows the efficiency
of BSB platform. In the future, we would like to migrate to our safe browsing
framework to other popular Blockchain platforms.
References
1. Antonopoulos, A.M., Wood, G.: Mastering Ethereum: Building Smart Contracts
and DApps. O’Reilly Media, Sebastopol (2018)
2. Bell, S., Komisarczuk, P.: An analysis of phishing blacklists: Google safe browsing,
OpenPhish, and PhishTank. In: Proceedings of the Australasian Computer Science
Week Multiconference, pp. 1–11 (2020)
3. Breidenbach, L., Daian, P., Tramèr, F., Juels, A.: Enter the hydra: towards princi-
pled bug bounties and Exploit-Resistant smart contracts. In: 27th USENIX Secu-
rity Symposium (USENIX Security 18), pp. 1335–1352 (2018)
4. Chen, T., et al.: SODA: a generic online detection framework for smart contracts.
In: Proceedings of the 27th Network and Distributed System Security Symposium.
(NDSS) (2020)
5. Chen, W., Zheng, Z., Cui, J., Ngai, E., Zheng, P., Zhou, Y.: Detecting ponzi
schemes on ethereum: towards healthier blockchain technology. In: Proceedings
of the 2018 World Wide Web Conference, pp. 1409–1418 (2018)
6. Coghlan, J.: More than $1.6 billion exploited from defi so far in
2022. https://cointelegraph.com/news/more-than-1-6-billion-exploited-from-defi-
so-far-in-2022 (2022)
7. Cui, H., Zhou, Y., Wang, C., Wang, X., Du, Y., Wang, Q.: PPSB: an open and
flexible platform for privacy-preserving safe browsing. IEEE Trans. Dependable
Secure Comput. 18(4), 1762–1778 (2019)
8. Du, Y., Zhou, A., Wang, C.: Enhancing cryptocurrency blocklisting: a secure, trust-
less, and effective realization. In: 2022 IEEE 42nd International Conference on
Distributed Computing Systems (ICDCS), pp. 1133–1143. IEEE (2022)
9. Fan, B., Andersen, D.G., Kaminsky, M., Mitzenmacher, M.D.: Cuckoo filter: prac-
tically better than bloom. In: Proceedings of the 10th ACM International on Con-
ference on emerging Networking Experiments and Technologies, pp. 75–88 (2014)
10. Frank, J., Aschermann, C., Holz, T.: ETHBMC: a bounded model checker for
smart contracts. In: 29th USENIX Security Symposium (USENIX Security 20),
pp. 2757–2774 (2020)
11. Google: Google safe browsing (2022). https://safebrowsing.google.com/
542 Z. Zhou et al.
12. He, J., Balunović, M., Ambroladze, N., Tsankov, P., Vechev, M.: Learning to fuzz
from symbolic execution with application to smart contracts. In: Proceedings of
the 2019 ACM SIGSAC Conference on Computer and Communications Security,
pp. 531–548 (2019)
13. Jiang, B., Liu, Y., Chan, W.: ContractFuzzer: fuzzing smart contracts for vulnera-
bility detection. In: 2018 33rd IEEE/ACM International Conference on Automated
Software Engineering (ASE), pp. 259–269. IEEE (2018)
14. Jiao, J., Kan, S., Lin, S.W., Sanan, D., Liu, Y., Sun, J.: Semantic understanding
of smart contracts: executable operational semantics of solidity. In: 2020 IEEE
Symposium on Security and Privacy (SP), pp. 1695–1712. IEEE (2020)
15. Kalra, S., Goel, S., Dhawan, M., Sharma, S.: ZEUS: analyzing safety of smart
contracts. In: Network and Distributed System Security Symposium (NDSS), pp.
1–12 (2018)
16. Karalabe: How to pwn fomo3d, a beginners guid (2018). https://www.reddit.com/
r/ethereum/comments/916xni/how_to_pwn_fomo3d_a_beginners_guide/
17. Kogan, D., Corrigan-Gibbs, H.: Private blocklist lookups with checklist. In: 30th
USENIX Security Symposium (USENIX Security 21), pp. 875–892 (2021)
18. Krupp, J., Rossow, C.: teEther: Gnawing at ethereum to automatically exploit
smart contracts. In: 27th USENIX Security Symposium (USENIX Security 18),
pp. 1317–1333 (2018)
19. Luu, L., Chu, D.H., Olickel, H., Saxena, P., Hobor, A.: Making smart contracts
smarter. In: Proceedings of the 2016 ACM SIGSAC Conference on Computer and
Communications Security, pp. 254–269 (2016)
20. MetaMask: The crypto wallet for Defi, Web3 Dapps and NFTs | metamask (2022).
https://metamask.io/
21. Minier, T.: bloom-filters - v3.0.0 (2022). https://callidon.github.io/bloom-filters/
22. Nakov, S.: Practical cryptography for developers book (2022). https://cryptobook.
nakov.com/
23. Nguyen, T.D., Pham, L.H., Sun, J.: sGUARD: towards fixing vulnerable smart
contracts automatically. In: 2021 IEEE Symposium on Security and Privacy (SP),
pp. 1215–1229. IEEE (2021)
24. Nikolić, I., Kolluri, A., Sergey, I., Saxena, P., Hobor, A.: Finding the greedy, prodi-
gal, and suicidal contracts at scale. In: Proceedings of the 34th Annual Computer
Security Applications Conference, pp. 653–663 (2018)
25. OpenZeppelin: Exploiting an erc777-token uniswap exchange (2019). https://
github.com/OpenZeppelin/exploit-uniswap#exploit-details
26. Perez, D., Livshits, B.: Smart contract vulnerabilities: vulnerable does not imply
exploited. In: 30th USENIX Security Symposium (USENIX Security 21), pp. 1325–
1341 (2021)
27. Permenev, A., Dimitrov, D., Tsankov, P., Drachsler-Cohen, D., Vechev, M.: VerX:
safety verification of smart contracts. In: 2020 IEEE Symposium on Security and
Privacy (SP), pp. 1661–1677. IEEE (2020)
28. Rezai, A., Keshavarzi, P., Moravej, Z.: Secure scada communication by using a
modified key management scheme. ISA Trans. 52(4), 517–524 (2013)
29. Rodler, M., Li, W., Karame, G.O., Davi, L.: Sereum: protecting existing smart
contracts against re-entrancy attacks. In: Network and Distributed System Security
Symposium. (NDSS) (2019)
30. Rodler, M., Li, W., Karame, G.O., Davi, L.: EVMPatch: timely and automated
patching of ethereum smart contracts. In: 30th USENIX Security Symposium
(USENIX Security 21), pp. 1289–1306 (2021)
BSB: Bringing Safe Browsing to Blockchain Platform 543
31. So, S., Lee, M., Park, J., Lee, H., Oh, H.: VERISMART: a highly precise safety
verifier for ethereum smart contracts. In: 2020 IEEE Symposium on Security and
Privacy (SP), pp. 1678–1694. IEEE (2020)
32. Studio, G.: Ethereum: number of active addresses (2022). https://studio.glassnode.
com/metrics?a=ETH&m=addresses.ActiveCount
33. Su, L., et al.: Evil under the sun: understanding and discovering attacks on ethereum
decentralized applications. In: 30th USENIX Security Symposium (USENIX Secu-
rity 21), pp. 1307–1324 (2021)
34. Torres, C.F., Schütte, J., State, R.: Osiris: hunting for integer bugs in ethereum
smart contracts. In: Proceedings of the 34th Annual Computer Security Applica-
tions Conference, pp. 664–676 (2018)
35. Torres, C.F., Steichen, M., et al.: The art of the scam: demystifying honeypots
in ethereum smart contracts. In: 28th USENIX Security Symposium (USENIX
Security 19), pp. 1591–1607 (2019)
36. Tsankov, P., Dan, A., Drachsler-Cohen, D., Gervais, A., Buenzli, F., Vechev, M.:
Securify: practical security analysis of smart contracts. In: Proceedings of the 2018
ACM SIGSAC Conference on Computer and Communications Security, pp. 67–82
(2018)
37. Wang, D., Feng, H., Wu, S., Zhou, Y., Wu, L., Yuan, X.: Penny wise and pound
foolish: quantifying the risk of unlimited approval of ECR20 tokens on ethereum.
In: 25th International Symposium on Research in Attacks, Intrusions and Defenses
(RAID 2022) (2022)
38. Wang, D., et al.: Towards understanding flash loan and its applications in Defi
ecosystem (2020). arXiv preprint arXiv:2010.12252
39. Wood, G., et al.: Ethereum: a secure decentralised generalised transaction ledger.
Ethereum Project Yellow Pap. 151(2014), 1–32 (2014)
40. Wu, J., et al.: Who are the phishers? Phishing scam detection on ethereum via
network embedding. IEEE Trans. Syst. Man Cybern. Syst. PP, 1–11 (2020)
41. Wu, S., et al.: DeFiRANGER: detecting price manipulation attacks on DeFi appli-
cations (2021). arXiv preprint arXiv:2104.15068
42. Wu, S., et al.: Time-travel investigation: toward building a scalable attack detection
framework on ethereum. ACM Trans. Softw. Eng. Methodol. (TOSEM) 31(3), 1–
33 (2022)
43. Zhang, M., Zhang, X., Zhang, Y., Lin, Z.: TXSPECTOR: uncovering attacks in
ethereum from transactions. In: 29th USENIX Security Symposium (USENIX
Security 20), pp. 2775–2792 (2020)
44. Zhou, L., Qin, K., Cully, A., Livshits, B., Gervais, A.: On the just-in-time discovery
of profit-generating transactions in DeFi protocols. In: 2021 IEEE Symposium on
Security and Privacy (SP), pp. 919–936. IEEE (2021)
Blockchain-Powered Systems
Practical Anonymous Multi-hop Locks
for Lightning Network Compatible
Payment Channel Networks
1 Introduction
Bitcoin has established itself as an alternative global payment system. Instead of
managing transactions in a ledger controlled by a (trusted) centralized institute,
Bitcoin records transactions in the Bitcoin blockchain, a public ledger maintained
by a set of mutually distrusted nodes. These nodes, often known as miners, ensure
the ledger’s consistency through a robust consensus process based on proof-of-
work. While the process makes Bitcoin decentralised and permissionless, this
rather expensive consensus process limits the Bitcoin transaction rate to at most
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 547–560, 2022.
https://doi.org/10.1007/978-3-031-23020-2_31
548 M. Liu and M. H. Au
2 Preliminaries
2.1 Anonymous Multi-hop Lock (AMHL)
We recall the definition of AMHL from [13]. Here Ui denotes the i-th participant
of the multi-hop payment, with U0 being the sender, and Un being the receiver.
Definition 1 (AMHL). An AMHL is a tuple of five algorithms/protocols,
namely, (KGen, Setup, Lock, Rel, Vf ), described as follows.
– {(ski , pk), (skj , pk)} ← (KGenUi (1λ ), KGenUj (1λ )): On input security
parameter 1λ , the key generation protocol returns a shared public key and
a secret key ski (skj , respectively) to Ui and Uj . This protocol is cryptocur-
rency and payment channel specific. For example, it involves the creation of
a multi-sig address for payment channel in Bitcoin.
550 M. Liu and M. H. Au
– {sI0 , ..., (sIn , kn )} ← (SetupU0 (1λ , U1 , ..., Un ), SetupU1 (1λ ), ..., SetupUn (1λ )):
On input a vector of identities (U1 , ..., Un ) and the security parameter 1λ , the
setup protocol returns sIi to user Ui where i ∈ [0, n] and returns a additionally
key kn to Un . This protocol allows the sender, U0 , to create payment route
with Un being the receiver. The states sI0 , . . . , sIn allows the users along the
payment route to setup the locks, and kn allows the receiver to open the last
lock.
– {(i+1 , sR L I I
i ), (i+1 , si+1 )} ← (LockUi (si , ski , pk), LockUi+1 (si+1 , ski+1 , pk)):
the locking protocol allows Ui (with state si ) and Ui+1 (with state sIi+1 ) to
I
setup a lock. The lock protocol returns a lock, denoted as i+1 , a right state
sR L
i to Ui , and a left state si to Ui+1 .
– {0, 1} ← V f (, k): On input a lock , and a key k, this algorithm outputs a
bit b ∈ {0, 1}. If V f (, j) = 1, we say k is an opening key of lock .
– k ← Rel(k, (sIi , sR L
i , si )): On input an opening key k and a triple of states
(si , si , si ), the release algorithm returns a new key k . Looking ahead, this
I R L
algorithm is used by user i to obtain an opening key for its left lock given
the opening key of its right lock. That is, if k is an opening key of the lock
between user Ui and Ui+1 (i.e., lock i+1 )), this algorithm outputs k which is
an opening key of the lock between s and Ui (i.e., lock i ).
AMHL Implies PCN. We now explain how these algorithms are used to sup-
port multi-hop payment for any cryptocurrency supporting conditional payment
where condition can be represented as locks and opening keys.
1. First, each pair of participants along the route create the link with each other
by invoking KGen algorithm that simulates the opening of payment channels
and the creating of an address controlled by both parties in the channel.
2. The sender invokes the Setup protocol and inputs the users’ identities along
the payment route he has picked. Upon completion of this protocol, each user
along the route obtains its secret state, and the receiver (i.e., Un ) additionally
receives a key kn .
3. In the locking phase, each pair of users along the route cooperate to generate
a lock . The successful lock generation represents that Ui has committed
that if Ui+1 can “open” the lock, Ui will execute the specific and application-
dependent action (e.g., transfer bitcoins to Ui+1 ). We say Ui+1 successfully
opens lock i if it reveals key ki such that V f (i , ki ) returns 1.
4. After finishing the locking phase, the receiver Un can immediately release its
left lock (i.e., n ) with the key kn . Un−1 can then make use of kn and the
Rel algorithm to obtain a key for n−1 . In other words, each intermediary
can recover a valid key for its left lock with the valid key of its right lock by
calling the Rel algorithm.
information. We consider the common reference string (CRS) model and assume
all parties have access to the same string (generated by a trusted party according
to some distribution). Specifically, an NIZKs in the CRS model consists of three
efficient algorithms, namely, nizk.G, nizk.P, nizk.V. Common reference string crs
is generated by algorithm nizk.G(λ). Algorithm π ← nizk.P(crs, w, x) is used by
the prover to generate the proof and algorithm {0, 1} ← nizk.V(crs, x, π) is used
by the verifier to verify the proof, where x and w denotes the statement and its
witness respectively.
Efficient (in terms of proof size and verification time) construction of UC-
secure NIZK exists (in the common reference string model). We use the basic
lifting technique of C∅C∅ framework [8] on ZK-SNARKs to instantiate the UC-
secure NIZK1 . The formal definition can be found in [8].
3 Security Model
Security of AMHL is formally defined by [13] in the universal composability
framework [4]. Informally speaking, security is established when the behaivor
of all parties in the real-world is indistinguishable to an ideal world where all
computational are conducted through a trusted party (aka ideal functionality).
The following definition formally capture this requirement.
Attacker Model. We model the users along the payment route as Turing
machines that interact with ideal functionality F through secure and authen-
ticated channels. We model the adversary A as a PPT machine that is given
access to the interface corrupt(·) which takes the user identifier U as the input
and responds with the secret state of U . After being corrupted, the user U ’s
incoming and outgoing communications are routed through A. We consider the
static corruption model that requires the adversary to invoke corrupt(·) and
input user identifiers ahead of time.
1
We only require the NIZK to be weak UC-secure. A weak UC-secure NIZK allows an
adversary to maul an existing proof to a new proof for the same statement. Looking
ahead, it suffices for our construction since we merely require witness to be extracted
in the UC setting. Thus we use the basic lifting technique of [8] which only achieve
this weak version of UC security.
552 M. Liu and M. H. Au
Ideal Functionality. We recall the ideal functionality for the AMHLs here.
Instead of modelling the overall characterization of PCNs, ideal functionality
Famhl only model the functionality of locks. Specifically, each pair of users needs
to create a link with each other, which is similar to the opening of the channel
in PCNs. We recall notations of Famhl first. U and L denote sets of users and
locks, respectively, which are used to keep track of users and locks. The entry
(lidi , Ui , Ui+1 , f, lidi+1 ) will be stored where lid is the unique lock identifier along
the route in L, Ui and Ui+1 are users linked by the lock lid. The status of locks
is represented by the flag ∈ {Init, Lock, Rel}. The next lock identifier lidi+1 is
also in the entry. The function (getStatus(·)) is used to extract lock information
when taking the lock identifier as the input, and updateStatus(·, ·) function is
used to change the status of the lock. The definition of the ideal functionality is
given as follows.
Each pair of users along the route can use the KeyGen algorithm to create
the link with each other. The Setup interface allows user U0 (i.e., sender) to set
up a path starting from U0 along the route. The Lock interface provides a user
with a way to promise a lock with its right neighbor. The Release algorithm
provides the user with an interface to release the lock with its left neighbor if
the user is either the receiver or its right lock has been released before. Finally,
the GetStatus interface allows one to extract the current information of the lock.
Discussion. As discussed in [13], AMHL give a useful abstraction for the con-
struction of PCN. We briefly discuss the intuitive requirements of an AMHL,
including correctness, atomicity, consistency and relationship anonymity, and
how the above ideal functionality captures these requirements.
We further note that in the ideal functionality, setup is invoked by the sender
and thus the sender knows the route. The implication of the modelling choice
is that the sender always know the payment path, which, as stated in [13], is
necessary.
4 Construction
2
We recommend λ1 = 256 and λ2 = 168 for 128-bit security.
3
In our implementation, we use SHA256. In the security analysis, we require that H
is collision-resistant.
Practical AMHL for LN-Compatible Payment Channel Networks 555
sn ← {1, 0}λ2
kn = G(sn )
n = H(kn )
∀i ∈ [n − 1, 1] : si ← {1, 0}λ2
ki = ki+1 ⊕ G(si )
i = H(ki )
compute the statement xi = ( i i+1 , si , ·) and
the witness wi = (ki+1 , ·) s.t (xi , wi ) ∈ Rcrs
πi ← nizk.P(crs, xi , wi )
x ,π
i i n ,sn
←−−− −
−−−
→
b ← nizk.V(crs, xi , πi )
if b = 0 then abort
return ( i i+1 , si ) return (0 1 , 0) return (( n , 0, 0), sn )
Fig. 1. The setup protocol between the sender and other participants.
i+1
−−−→
Rel(k, (sI , sR , sL ))
parse sIi as ( , s)
return k ⊕ G(s)
V f( )
return 1 if H(k) = and 0 otherwise
Fig. 2. The lock protocol is executed between Ui and Ui+1 for i = 0 to n. The rel pro-
tocol is executed by participant Ui when it receive the key from Ui+1 . Tthe verification
algorithm is used to check the validity of the key.
556 M. Liu and M. H. Au
Security Analysis. Theorem 1 states the security of our construction. Its proof
will be available in the full version of this paper.
5 Performance Evaluation
We instantiated hash function H with SHA-256 that is compatible with Bit-
coin and the LN5 . We use the basic lifting in C∅C∅ framework [8] to instantiate
our weak UC-secure NIZK from RSA-OAEP encryption with 2048-bit modulus,
4
Looking ahead, existence of such ki+1 is not sufficient. We must ensure that the
simulator is able to extract the witness. This, in combination with the collision-
resistance property of H, ensures Ui that if the right lock is released, he/she will be
able to release its left lock.
5
For simplicity, the off-chain pseodrandom generator G is also instantiated using
SHA-256.
Practical AMHL for LN-Compatible Payment Channel Networks 557
6 Conclusion
We construct an efficient version of LN-compatible AMHL, and prove that our
construction is UC-secure assuming the hash function is collision-resistant, the
zero-knowledge proof system is weak UC-secure, and the existence of an efficient
pseudorandom generator. We instantiate the LN-compatible AMHL based on the
efficient weak-UC secure zero-knowledge proof system from C∅C∅ framework [8]
and SHA256. Furthermore, our construction can be deployed directly to LN.
Performance evaluation illustrates that the our construction is practical: for a
payment with 4 hops, the total communication cost is merely 1458 bytes.
References
1. Androulaki, E., Karame, G.O., Roeschlin, M., Scherer, T., Capkun, S.: Evaluating
user privacy in bitcoin. In: Sadeghi, A.-R. (ed.) FC 2013. LNCS, vol. 7859, pp.
34–51. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-39884-1_4
2. Barber, S., Boyen, X., Shi, E., Uzun, E.: Bitter to better—how to make bitcoin a
better currency. In: Keromytis, A.D. (ed.) FC 2012. LNCS, vol. 7397, pp. 399–414.
Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-32946-3_29
3. Blum, M., Feldman, P., Micali, S.: Non-interactive zero-knowledge and its appli-
cations (extended abstract). In: Simon, J. (ed.) Proceedings of the 20th Annual
ACM Symposium on Theory of Computing, 2–4 May 1988, Chicago, Illinois, USA,
pp. 103–112. ACM (1988). https://doi.org/10.1145/62212.62222
4. Canetti, R.: Universally composable security: a new paradigm for cryptographic
protocols. In: 42nd Annual Symposium on Foundations of Computer Science,
FOCS 2001, 14–17 October 2001, Las Vegas, Nevada, USA, pp. 136–145. IEEE
Computer Society (2001). https://doi.org/10.1109/SFCS.2001.959888
5. Decker, C., Wattenhofer, R.: A fast and scalable payment network with bitcoin
duplex micropayment channels. In: Pelc, A., Schwarzmann, A.A. (eds.) SSS 2015.
LNCS, vol. 9212, pp. 3–18. Springer, Cham (2015). https://doi.org/10.1007/978-
3-319-21741-3_1
6. Green, M., Miers, I.: Bolt: anonymous payment channels for decentralized curren-
cies. In: Thuraisingham, B.M., Evans, D., Malkin, T., Xu, D. (eds.) Proceedings of
the 2017 ACM SIGSAC Conference on Computer and Communications Security,
CCS 2017, Dallas, TX, USA, 30 October–03 November 2017, pp. 473–489. ACM
(2017). https://doi.org/10.1145/3133956.3134093
7. Heilman, E., Alshenibr, L., Baldimtsi, F., Scafuro, A., Goldberg, S.: Tum-
bleBit: an untrusted bitcoin-compatible anonymous payment hub. In: 24th
Annual Network and Distributed System Security Symposium, NDSS 2017,
San Diego, California, USA, 26 February–1 March 2017. The Internet Soci-
ety (2017). https://www.ndss-symposium.org/ndss2017/ndss-2017-programme/
tumblebit-untrusted-bitcoin-compatible-anonymous-payment-hub/
8. Kosba, A., et al.: C0C0: a framework for building composable zero-knowledge
proofs. Cryptology ePrint Archive (2015)
9. Kosba, A.E., Papamanthou, C., Shi, E.: xJsnark: a framework for efficient verifi-
able computation. In: Proceedings of the 2018 IEEE Symposium on Security and
Privacy, SP 2018, 21–23 May 2018, San Francisco, California, USA, pp. 944–961.
IEEE Computer Society (2018). https://doi.org/10.1109/SP.2018.00018
Practical AMHL for LN-Compatible Payment Channel Networks 559
10. Koshy, P., Koshy, D., McDaniel, P.: An analysis of anonymity in bitcoin using
P2P network traffic. In: Christin, N., Safavi-Naini, R. (eds.) FC 2014. LNCS,
vol. 8437, pp. 469–485. Springer, Heidelberg (2014). https://doi.org/10.1007/978-
3-662-45472-5_30
11. Li, P., Miyazaki, T., Zhou, W.: Secure balance planning of off-blockchain payment
channel networks. In: 39th IEEE Conference on Computer Communications, INFO-
COM 2020, Toronto, ON, Canada, 6–9 July 2020, pp. 1728–1737. IEEE (2020).
https://doi.org/10.1109/INFOCOM41043.2020.9155375
12. Malavolta, G., Moreno-Sanchez, P., Kate, A., Maffei, M., Ravi, S.: Concurrency
and privacy with payment-channel networks. In: Thuraisingham, B.M., Evans, D.,
Malkin, T., Xu, D. (eds.) Proceedings of the 2017 ACM SIGSAC Conference on
Computer and Communications Security, CCS 2017, Dallas, TX, USA, 30 October–
03 November 2017, pp. 455–471. ACM (2017). https://doi.org/10.1145/3133956.
3134096
13. Malavolta, G., Moreno-Sanchez, P., Schneidewind, C., Kate, A., Maffei, M.:
Anonymous multi-hop locks for blockchain scalability and interoperability. In:
26th Annual Network and Distributed System Security Symposium, NDSS
2019, San Diego, California, USA, 24–27 February 2019. The Internet Soci-
ety (2019). https://www.ndss-symposium.org/ndss-paper/anonymous-multi-hop-
locks-for-blockchain-scalability-and-interoperability/
14. McCorry, P., Möser, M., Shahandasti, S.F., Hao, F.: Towards bitcoin payment
networks. In: Liu, J.K., Steinfeld, R. (eds.) ACISP 2016. LNCS, vol. 9722, pp.
57–76. Springer, Cham (2016). https://doi.org/10.1007/978-3-319-40253-6_4
15. Meiklejohn, S., Orlandi, C.: Privacy-enhancing overlays in bitcoin. In: Brenner,
M., Christin, N., Johnson, B., Rohloff, K. (eds.) FC 2015. LNCS, vol. 8976, pp.
127–141. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-48051-
9_10
16. Meiklejohn, S., et al.: A fistful of bitcoins: characterizing payments among men
with no names. In: Papagiannaki, K., Gummadi, P.K., Partridge, C. (eds.) Proceed-
ings of the 2013 Internet Measurement Conference, IMC 2013, Barcelona, Spain,
23–25 October 2013, pp. 127–140. ACM (2013). https://doi.org/10.1145/2504730.
2504747
17. Poon, J., Dryja, T.: The bitcoin lightning network: scalable off-chain instant pay-
ments (2016)
18. Prihodko, P., Zhigulin, S., Sahno, M., Ostrovskiy, A., Osuntokun, O.: Flare: an
approach to routing in lightning network. White Paper, 144 (2016)
19. Reid, F., Harrigan, M.: An analysis of anonymity in the bitcoin system. In: 2011
IEEE 3rd International Conference on Privacy, Security, Risk and Trust (PAS-
SAT), PASSAT/SocialCom 2011, and 2011 IEEE 3rd International Conference
on Social Computing (SocialCom), Boston, MA, USA, 9–11 October 2011, pp.
1318–1326. IEEE Computer Society (2011). https://doi.org/10.1109/PASSAT/
SocialCom.2011.79
20. Rivest, R.L., Shamir, A., Adleman, L.M.: A method for obtaining digital signa-
tures and public-key cryptosystems (reprint). Commun. ACM 26(1), 96–99 (1983).
https://doi.org/10.1145/357980.358017
21. Sivaraman, V., et al.: High throughput cryptocurrency routing in payment chan-
nel networks. In: Bhagwan, R., Porter, G. (eds.) 17th USENIX Symposium on
Networked Systems Design and Implementation, NSDI 2020, Santa Clara, CA,
USA, 25–27 February 2020, pp. 777–796. USENIX Association (2020). https://
www.usenix.org/conference/nsdi20/presentation/sivaraman
560 M. Liu and M. H. Au
22. Spagnuolo, M., Maggi, F., Zanero, S.: BitIodine: extracting intelligence from the
bitcoin network. In: Christin, N., Safavi-Naini, R. (eds.) FC 2014. LNCS, vol.
8437, pp. 457–468. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-
662-45472-5_29
23. Tairi, E., Moreno-Sanchez, P., Maffei, M.: A2 l: anonymous atomic locks for scalabil-
ity in payment channel hubs. In: 42nd IEEE Symposium on Security and Privacy,
SP 2021, San Francisco, CA, USA, 24–27 May 2021, pp. 1834–1851. IEEE (2021).
https://doi.org/10.1109/SP40001.2021.00111
24. Tang, W., Wang, W., Fanti, G.C., Oh, S.: Privacy-utility tradeoffs in routing cryp-
tocurrency over payment channel networks. Proc. ACM Meas. Anal. Comput. Syst.
4(2), 29:1–29:39 (2020). https://doi.org/10.1145/3392147
25. Tripathy, S., Mohanty, S.K.: MAPPCN: multi-hop anonymous and privacy-
preserving payment channel network. In: Bernhard, M., et al. (eds.) FC 2020.
LNCS, vol. 12063, pp. 481–495. Springer, Cham (2020). https://doi.org/10.1007/
978-3-030-54455-3_34
Blockchain Based Regulatory Technology
Deployment for Real Estate Transaction
1 Introduction
The inauguration of bitcoin in 2008 [1] has brought a great deal of public attention
to the potential of blockchain and the disruptive effect this technology can instigate in
different areas such as finance and supply chain [2]. It occurred the same year as the
“subprime” financial crisis that spurred a wave of new regulations to tighten the scrutini-
sation of financial institutions and their products. The crisis was predominantly caused by
complex mortgage-backed securities (MBS), leading to the concealment of systematic
and underlying risks by sophisticated mathematical models [3]. New regulations aim-
ing to improve transparency, and the disclosure of organisational governance and risks,
inevitably lead to higher reporting and compliance costs. Financial institutions spend
over US$214 billion annually to meet compliance requirements [4]. Regulatory tech-
nology (RegTech) has since been introduced to relieve the growing burden of regulatory
compliance.
Global real estate represents the single largest asset class, with a total value estimated
at US$326.5 trillion in 2020 [5]. It is more than the value of the global equity and debt
market combined [6, 7]. The real estate industry is also heavily regulated. Despite its
stake, it still relies profoundly on manual and inefficient processes to fulfil regulatory
requirements, causing problems such as high transaction costs, long settlement periods,
and low liquidity [8]. This research conducts a literature review and semi-structured
interviews with industry stakeholders to analyse how RegTech can be deployed via
blockchain technology to tackle the existing challenges faced by the real estate industry.
Current studies and use cases in blockchain-based solutions for the real estate industry
can be broadly categorised into two groups. One group utilises tokenisation to represent
shares of a legal entity that holds the title to a property [9–11]. This initiative explores
possibilities to improve liquidity and fractionalise ownership. Another group deploys
permissioned blockchains as an alternative to the existing centralised land registry system
[12, 13]. Both groups, however, offer limited insights to resolve the issues faced by the
real estate industry fundamentally. This research, therefore, aims to fill these gaps by
exploring blockchain-based RegTech deployment opportunities that can considerably
improve processes related to property transactions and satisfy regulatory requirements.
This paper makes the following contributions:
We concluded that an enhanced process that can efficiently fulfil regulatory require-
ments could resolve a significant portion of the challenges faced by the real estate
industry. The remainder of this paper is organised as follows: Sect. 2 describes the
existing problems in the real estate industry and reviews current use cases of adopting
blockchain technology for this industry. Section 3 explains the research methodology
and the rationale behind it. Section 4 illustrates and analyses the survey results and
performs an in-depth study of the mortgage process as the foremost opportunity to
deploy blockchain-based RegTech. The ideal attributes of a real estate transaction are
presented, followed by a discussion of the features of blockchain technology that sup-
port these attributes. Section 5 provides a detailed solution architecture for the mortgage
process. Section 6 discusses the limitations of such blockchain-based RegTech deploy-
ment. Finally, Sect. 7 concludes the research and explores the implications for future
development.
2 Background
This section provides an overview of the real estate industry’s challenges, blockchain
use cases, and the rationale behind this research.
The real estate industry is heavily regulated and has made modest improvements in its
processes and systems. Studies revealed it has been difficult to introduce new technology
as many stakeholders are involved, often with conflicting interests [9]. The fear of job
loss due to automated workflow and disintermediation also leads to resistance to change
[14]. The challenges can be summarised into four categories:
Blockchain Based Regulatory Technology Deployment 563
sector. There is also no detailed framework that describes how to implement data
consolidation on the blockchain.
• Land registry on blockchains has been put into practice [12, 14, 26]. Nevertheless, all
use cases utilise permissioned blockchain. Transactions are validated and recorded
only by the land authority and some authorised third parties, such as banks and real
estate agents [31]. The public is not allowed to participate. Besides, in jurisdictions
where people do not generally trust the land registry, the authorities have little incentive
to transform the land registry into a transparent system. They also perceive blockchain
as a tool to undermine their control [32].
• Real estate is the largest asset class globally, valued at US$326.5 trillion in 2020 [5],
more than the value of the global equity market of US$120.4 trillion [6] and the debt
market of US$119 trillion combined [7].
• The challenges described in Sect. 2.1 are mainly attributed to complex systems and
processes involving human intervention in fulfilling the regulatory requirements at
different phases of a property transaction.
• Regulations, however, are not intended to reduce efficiency and complicate pro-
cesses. They help organisations and individuals engage in business activities fairly and
securely. If appropriately implemented, regulatory compliance should improve results
for all stakeholders creating better product value, providing consumer protection,
managing systematic risks, ensuring economic stability, and promoting efficiency,
competitiveness, and a satisfying experience.
• As explained in Sect. 2.3, the current research and use cases for blockchain deployment
in the real estate industry are not addressing its fundamental challenges [9, 26, 30].
• Moreover, there has not been an industry-wide survey to understand the actual prob-
lems this industry is facing and to design the most relevant possible solution for such
issues.
• The real estate industry is ideal for studying how RegTech can resolve regulatory
compliance challenges, improve process efficiency, and minimise risks. Blockchain
exhibits an astounding number of characteristics that can deploy RegTech effectively.
3 Research Methodology
The research takes a phased approach by defining the main research question and guid-
ing questions based on findings from the literature review. Semi-structured interviews
are conducted with twenty-one industry stakeholders to uncover the sector’s main prob-
lems. The research analyses findings from the survey and identifies the most profound
566 R. R. R. Chao et al.
The process inefficiencies category receives the most grievances (63 instances), fol-
lowed by information irregularities (38) and high capital requirements (28). The severity
of these categories is similar within the range of 3.8–4.2, except for the “single point
of failure” category, which records 2.4. The number of issues raised with the “single
point of failure” category is also low at only five instances. A remarkable discovery is
that mortgage-related problems account for 43% of all the issues raised and appear in
every category of challenges. One may attribute the high percentage to 48% of inter-
viewees being homeowners or property investors. Nonetheless, the in-depth study in
Sect. 4.1 strongly indicates that the mortgage application process represents a significant
opportunity for RegTech deployment using Blockchain technology.
Despite the issues raised, participants were generally satisfied with real estate trans-
actions in Australia. The conveyance process has improved and streamlined gradually
over the years. Participants have not identified any significant flaws in the process. The
calibre of solicitors and conveyancers in Australia is considered high. Some functions
have been digitised, including signing contracts on a tablet and on-site deposit transfers.
These digitised processes help provide a smoother experience for buyers and vendors.
Blockchain Based Regulatory Technology Deployment 567
The mortgage process has been identified as the most significant opportunity for in-depth
study for the following reasons:
• Mortgage-related issues account for 43% of all the issues raised in the survey.
• Although the mortgage application process is a financial servicing process, it is a
crucial part of most real estate transactions [33]. It also likely represents the most
significant share of property investment and the borrower’s financial debt.
• From lenders’ perspective, mortgage comprises a significant portion of the lending
business. The global mortgage market revenue is estimated to be US$11.5 trillion in
2021 [34], 51% of the total financial services market of US$22.5 trillion [35].
• As a result of the 2008 mortgage-backed securities financial crisis, compliance costs
for financial institutions have increased dramatically to a staggering US$214 billion
in 2021 [4].
• The introduction of RegTech in the mortgage process can represent considerable
benefits for lenders regarding compliance costs, operational efficiency, risk mitigation
and competitiveness. It also presents enormous value to borrowers in controlling their
data, obtaining better mortgage products and overall user experience.
• Unlike current blockchain initiatives described in Sect. 2.2, blockchain-based RegTech
deployment in the mortgage process does not require substantial disintermediation nor
a significant overhaul of the existing legal system. It is, therefore, likely to encounter
the least social and political barrier.
• In addition, a thorough search for related research in the First Quartile (Q1) journal
has not returned tangible results.
Hence, despite the original intention to identify opportunities in real estate transac-
tions, we have focussed on the mortgage process for an in-depth study to propose an
appropriate blockchain-based RegTech deployment solution. The research has further
investigated, in addition to borrowers, the pain points of lenders and regulators, who are
the other two critical stakeholders in the mortgage process.
Borrowers’ Pain Points
• Lack of control: Borrowers generally feel the mortgage requirement is rigid, pro-
viding limited product variety. The mortgage business is highly protected, with little
competition and motivation for product innovation. As interest rates rise, borrowers
are eager to see more innovative and competitive mortgage products. Borrowers also
criticise a lack of measures to control their data and high-quality advisory support
to strengthen their financial positions over time to help them obtain a better rate in a
mortgage application.
• Lack of efficiency: Mortgage application is tedious, manual-driven, time-consuming
and repetitive.
• Lack of transparency: The application process is opaque regarding evaluation cri-
teria, processing lead time, status updates and access to competitive products. Lead
time is long (30–60 days), uncertain and varies largely by cases and lenders.
568 R. R. R. Chao et al.
• Maintain privacy: While evaluating the solution proposed in Sect. 6, the interviewees
specifically raised concerns about privacy protection measures on the blockchain.
Regulators
• The high entry barrier for new players. In addition to ensuring compliance, regulators
understand the cost of regulatory compliance that raises the entry barrier restricting
competition [3].
• Multiple regulators with different requirements lead to complex and inefficient compli-
ance processes. In Australia, the primary regulators for mortgage compliance include
the following:
– Australian Securities & Investments Commission (ASIC) ensures responsible
lending conduct [16, 17].
– Australian Prudential Regulation Authority (ARPA) licenses and regulates financial
institutions and receives mortgage lending reports [37].
Blockchain Based Regulatory Technology Deployment 569
We decoded the pain points into six desired attributes that constitute an ideal mortgage
process. Table 1 explains in detail the six attributes. The same table also describes how
the characteristics of permissionless blockchain can support each attribute. The control
and efficiency attributes are essential throughout the mortgage process. Control attribute
enables stakeholders to interact directly with processes and data without relying on
unnecessary intervention. Efficiency attribute concerns both functions and data. It is
enhanced by the transparency and immutability of processes and data, ensuring verifia-
bility. Lastly, a transparent system such as the blockchain must embed effective privacy
measures to protect data owners.
Table 1. Six desired attributes of an ideal mortgage process and the supporting blockchain
characteristics.
Table 1. (continued)
• RF.1 During the Inquire stage, regulations require lenders to perform adequate
inquiries to borrowers concerning their requirements, objectives, and financial
situations.
• RF.2 In the Verify stage, regulations require lenders to prove adequate verification of
information obtained to ensure accuracy and reliability. Verification is usually done
manually and is laborious, requiring experienced and skilled staff to uncover errors
and fraud.
• RF.3 The Assess stage requires lenders to perform an adequate assessment to ensure
the product offer is not “unsuitable” for the borrower.
• RF.4 Contract management contains four stages:
• RF.4.1 Mortgage advertisements must include comparison rates and fees.
Blockchain Based Regulatory Technology Deployment 571
• RF.4.2 Before entering a contract, lenders must provide a summary of contract details
and the borrower’s statutory rights & obligations.
• RF.4.3 When entering a contract, lenders must provide the borrower with a written
agreement.
• RF.4.4 During the contract term, the lender must provide a periodical account
statement to the borrower.
The proposed solution contains two phases. The first phase is the Pre-Mortgage Inquiry
phase, which corresponds to the Inquiry stage (RF.1). This stage is often treated hastily in
real life, and borrowers usually need to provide only two months of financial information.
Contrary to current practice, our solution emphasises the importance of the Inquiry stage
to understand the customer well and verify data at the source. We recommend that the
inquiry process begins sufficiently before the mortgage application process. Government
and financial institutions should invest in the necessary infrastructure to understand the
customers in depth, provide financial advisory services and strengthen consumers’ data
control, as summarised in Fig. 3.
572 R. R. R. Chao et al.
• MI.1 Borrower first establishes a digital identity verified and signed by the government
in the form of NFT. It will be stored in the borrower’s digital wallet, recorded on the
blockchain and is not transferable to other parties.
• MI. 2 Borrower then links this digital identity NFT with their bank account. The
corresponding bank would issue an NFT representing the borrower’s account, also
stored in the borrower’s digital wallet. The digital wallet allows the borrower to share
data, sign-off transactions and interact with smart contracts.
• MI. 3 At the borrower’s consensus, the bank will synchronise data associated with the
borrower’s bank account to the blockchain. The introduction of consumer data rights
legislation [18] in 2020 enables individuals to authorise financial institutions to share
their data with third parties. The data recorded onto the blockchain is similar to how
blockchain platforms currently record cryptocurrency transactions. The blockchain is
a distributed ledger technology to record transactions and is well-positioned to support
this task. It provides a complete picture of the borrower’s income, investment portfolio
and expenses. The data is linked directly with the bank account NFT.
• MI.4 Borrowers take control of their data and share it with suitable financial service
providers for different purposes.
– MI.4.1 Government access for compliance requirements can be made via the
identity NFT. Due to system transparency, regulators can tailor the reporting
requirements without the involvement of financial service providers.
– MI.4.2 Borrowers can choose to share data anonymously for financial advisory
services. As described in Sect. 4.1, it takes time for individuals to establish a credible
and traceable record, improve their financial position, and determine their financial
objectives and requirements.
Blockchain Based Regulatory Technology Deployment 573
– MI.4.3 Consumers can also monetise their data for market research, advertisements,
or other commercial purposes, without disclosing their identity. Consumers control
data sharing through the access control functions of digital wallets.
– MI.4.4 Mortgage advertisements can tailor their offers to match borrowers’ needs
and automatically display other comparative rates and fees (RF.4.1).
– MI.4.5 Borrowers can apply for a mortgage by sharing only necessary data and iden-
tity attributes, such as age and citizenship, to prove their eligibility. The application
can be done once and submitted seamlessly to various vendors without repetitive
and manual processes.
Phase 1 provides a non-intrusive way to inquire about the borrowers and assists in
building an appealing personal credit portfolio that lenders would welcome. Lenders
who understand better a customer’s financial situation and payback ability can minimise
the mortgage risk and provide a more competitive mortgage product to the customer.
There are two requirements for the proposed inquiry process framework:
• An open data format standard guarantees interoperability with different systems and
high efficiency in the data processing.
• Identity and data written to the blockchain must be verified and signed by the sources,
such as the government and banks. Third parties can verify the data’s authentic-
ity through these sources’ public keys. This requirement ensures data integrity and
prevents time-consuming but often fruitless verification.
6. Lenders can use smart contracts to instantly verify (RF.2) the borrower’s data using
the public keys of data sources (MI.2). Manual verification for error or fraud detec-
tion is no longer necessary. Transparency (A.3) allows regulators to inspect the
smart contracts’ logic, the corresponding process executed, events and data retrieved
directly to confirm compliance.
7. Smart contracts can also automate the mortgage assessment process (RF.3). A
borrower can instantly review the progress status, evaluation criteria and results.
8. A pre-approval is confirmed with initial conditions lodged into smart contracts for
the borrower’s review (RF.4.2). This enables the borrower to search for properties
that meet the mortgage contract requirements.
9. Lenders can carry out property valuation off-chain based on the borrower’s selection
and update the state of smart contracts accordingly.
10. Through smart contracts, a borrower can review the terms and conditions of the
mortgage contract in addition to the written document (RF.4.3). The blockchain
will also record corresponding activity logs and make them available for reporting
or spot check by the regulator.
11. Smart contracts can also manage the escrow account for the borrower’s property
deposit fund and the lender’s mortgage fund. The funds can be processed based on
the terms and conditions pre-determined by the borrower and lender in the mortgage
contract.
12. Smart contracts can also facilitate the bidding process, replacing the role of auc-
tioneer. Prospective buyers link their escrow account with the blockchain-enabled
Blockchain Based Regulatory Technology Deployment 575
bidding process and bid online. The property is sold to the highest bidder at the
vendor’s will. Every bid detail is recorded on the blockchain, allowing follow-up
review by regulators or the public.
13. Smart contracts can complete settlement by transferring allocated funds in the
facilitated escrow account according to a pre-defined schedule. Smart contracts can
also facilitate ownership tokenisation, real estate transactions, conveyance process,
and land registration, as described in Sect. 2.2.
14. During the mortgage term (RF.4.4), smart contracts can facilitate repayment with
monthly statements and balance updates available to borrowers and regulators.
15. The entire mortgage data and documents are linked with the case NFT. All
mortgage-associated information is transparent, verifiable, and immutable. The
NFT, with its associated data and smart contracts, fully represent the originated
mortgage’s ownership and economic value. These features allow the NFT to be
traded easily in a secondary market. Lenders, regulators, and investors can assess
the risk as a standalone item or a part of a more extensive portfolio for systematic
risk review.
5.4 Discussion
The design of the blockchain-based RegTech mortgage process solution is first based on
analysing the survey results from interviewing real estate industry stakeholders, focus-
ing on the pain points raised by borrowers, lenders and regulators. These pain points are
further decoded into six attributes essential for an ideal mortgage process. The design
incorporates the six attributes into a conceptual model for Australia’s mortgage regula-
tory framework to form the solution architecture. The solution emphasises the importance
of the pre-mortgage inquiry stage for regulators and lenders:
• Standardise the data format to avoid system interoperability issues and other
inefficiencies in the data processing.
• Verify and sign the data by trusted sources, such as the government, banks, and lenders.
• Adapting to the decentralisation of permissionless blockchain allows all stakeholders
complete control of their data.
Figure 5 demonstrates how the design correlates with Australia’s mortgage regulatory
framework. Phase 1, the Pre-Mortgage Inquiry phase, focuses on meeting the needs
of borrowers. It provides them with the necessary infrastructure to control their data,
access services and manage privacy directly. Contrary to current practice, nearly half
of the solution architecture is geared towards the inquiry stage to ensure the necessary
information that is accurate, verified and immutable.
Phase 2, the Mortgage phase, builds on the Phase 1 infrastructure to equip lenders and
regulators with the efficiency enabled by blockchain. Smart contracts can automate data
consolidation, verification, assessment, pre-approval, contract review, fund and transfer
management, bidding, settlement, and post-mortgage repayment. The bank account and
mortgage NFT links with the entire process event log and corresponding data, allowing
regulators to examine it flexibly and conveniently.
576 R. R. R. Chao et al.
6 Limitations
Despite its potential to significantly improve the efficiency of regulatory compliance and
resolve the existing real estate industry challenges, blockchain-based RegTech deploy-
ment in real estate transactions is still in its early stage. Evaluation of the proposed solu-
tion with industry stakeholders has incorporated several improvements into the solution
in Sect. 5. The review also identifies various limitations listed below that could impede its
adoption in the real world. It is also important to point out that the proposed solution is a
high-level design that demonstrates how to solve the problems identified in the mortgage
process and create value for primary stakeholders. It does not contain implementation
details specifying data formats, system components or codes. The research recommends
a future study to put forth a detailed implementation plan.
real estate transactions or associated mortgage approval. The privacy and data secu-
rity mechanisms must be defined and confirmed at the beginning stage of blockchain
solution development [32]. Privacy can be attained by cryptography computation.
The case of Zerocash illustrates the possibility of providing transparency for verify-
ing the system’s state while preserving the complete anonymity of investors using
sophisticated cryptography [42].
• Legal Enforceability of Smart Contracts. Smart contracts are versatile in automating
all main processes of real estate transactions, including token ownership transfer,
mortgage application and approval, fund transfer, mortgage repayment, and default
handling. Conditions and logic depicted in a traditional contract can be executed on
the blockchain with minimal manual intervention. The current legal system, however,
has not been positioned to support the practice of smart contracts. Court challenges
may arise to overturn the action taken by smart contracts.
7 Conclusion
Real estate is the largest asset class in the world, and property transactions are high-stake
and highly regulated activities. Nevertheless, existing property transaction processes are
complex, manual-driven, error-prone, time-consuming, and costly. Effective RegTech
deployment can considerably enhance property transaction processes to fulfil regulatory
requirements. We outlined the challenges faced by the real estate industry, many of which
are related to inefficiencies in fulfilling regulatory requirements. We proposed the desired
attributes of ideal mortgage transactions for regulatory compliance and illustrated how
blockchain properties could effectively empower these attributes. The research presented
opportunities to deploy blockchain-based RegTech in real estate transactions and detailed
such implementation for the scenario of the mortgage application process.
Permissionless blockchain, a decentralised platform, is transparent and open for all
stakeholders to participate directly. Transactions and data on the network are verifiable,
immutable, and secure. Smart contracts can automate these processes and minimise
manual intervention while seamlessly fulfilling regulatory requirements. We conclude
that permissionless blockchain can support RegTech deployment in real estate trans-
actions. This study identified three main limitations that could hinder the widespread
adoption of blockchain-based RegTech deployment, i.e., digital identity infrastructure,
privacy on blockchain and legal enforceability of smart contracts. The expansion of the
current study would be: (i) to investigate the framework for e-ID on the permissionless
blockchain; (ii) to define a comprehensive privacy protection measure in a transparent
and open blockchain platform; and (iii) to adapt the legal system to enforce smart con-
tracts so that they can effectively automate processes in fulfilling associated regulatory
requirements. It is reasonable to believe a blockchain-based RegTech implementation
will hold numerous promises for the real estate industry, where efficiency, trust and
security elements are imperative to the stakeholders.
578 R. R. R. Chao et al.
References
1. Nakamoto, S.: Bitcoin: A Peer-to-Peer Electronic Cash System (2008). https://doi.org/10.
1007/s10838-008-9062-0
2. Malhotra, D., Saini, P., Singh, A.K.: How blockchain can automate KYC: systematic review.
Wireless Pers. Commun. 122(2), 1987–2021 (2021). https://doi.org/10.1007/s11277-021-089
77-0
3. Gozman, D., Liebenau, J., Aste, T.: A case study of using blockchain technology in regulatory
technology. MIS Q. Exec. 19(1), 19–37 (2020)
4. Counting the cost (Cost of compliance vs Cost of Non-compliance) (2021). https://1rs.io/
2021/10/11/counting-the-cost-cost-of-compliance/
5. Savills. The total value of global real estate. Report, Savills Research (2021). https://www.
savills.com/impacts/Impacts3_pdfs/The_total_value_of_global_real_estate.pdf
6. Research Quarterly: Fixed Income - Issuance and Trading (2021). SIFMA. https://web.
archive.org/web/20210513170717/https://www.sifma.org/wp-content/uploads/2021/01/US-
Research-Quarterly-Fixed-Income-Issuance-Trading-2021-04-13-SIFMA.pdf
7. Global Equity Markets Primer. SIFMA (2021). https://www.sifma.org/wp-content/uploads/
2021/11/SIFMA-Insights-Global-Equity-Markets-Primer-FINAL-FOR-WEB.pdf
8. Dijkstra, M.: Blockchain: Towards Disruption in the Real Estate Sector: An exploration on
the impact of blockchain technology in the real estate management process. Delft University
of Technology, Delft (2017)
9. Baum, A.: Tokenization - the future of real estate investment? J. Portfolio Manage. 47(10),
41–61 (2021)
10. Gupta, A., Rathod, J., Patel, D., Bothra, J., Shanbhag, S., Bhalerao, T.: Tokenization of real
estate using blockchain technology. In: Zhou, J., et al. (eds.) ACNS 2020. LNCS, vol. 12418,
pp. 77–90. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-61638-0_5
11. Smith, J., Vora, M., Benedetti, D.H., Yoshida, K., Vogel, Z.: Tokenized Securities &
Commercial Real Estate. MIT Management Sloan School (2019)
12. Rizzo, P.: Sweden’s blockchain land registry to begin testing in March. Coin-
Desk (2017). https://www.coindesk.com/markets/2017/01/10/swedens-blockchain-land-reg
istry-to-begin-testing-in-march/
13. Shuaib, M., Daud, S.M., Alam, S., Khan, W.Z.: Blockchain-based framework for secure and
reliable land registry system. Telkomnika 18(5), 2560–2571 (2020)
14. Manski, S.: Building the blockchain world: Technological commonwealth or just more of the
same? Strateg. Chang. 26(5), 511–522 (2017)
15. National Consumer Credit Protection Act 2009. https://www.legislation.gov.au/Details/C20
20C00215
16. Regulatory Guide 273 Mortgage brokers: Best interests duty. https://asic.gov.au/media/564
1325/rg273-published-24-june-2020.pdf
17. Schedule 1 to the National Consumer Credit Protection Regulations 2010. https://www.legisl
ation.gov.au/Details/F2022C00106
18. Consumer Data Right. https://www.oaic.gov.au/consumer-data-right/cdr-legislation
19. Spielman, A.: Blockchain: digitally rebuilding the real estate industry. Doctoral dissertation,
Massachusetts Institute of Technology (2016)
20. Saull, A., Baum, A., Braesemann, F.: Can digital technologies speed up real estate
transactions? J. Property Invest. Finan. 38(4), 349–361 (2020)
21. Veuger, J.: Trust in a viable real estate economy with disruption and blockchain. Facilities
(Bradford, West Yorkshire, England) 36(1/2), 103–120 (2018)
22. Shuaib, M., et al.: Identity model for blockchain-based land registry system: a comparison.
Wireless Commun. Mob. Comput. (2022)
Blockchain Based Regulatory Technology Deployment 579
23. Wüst, K., Gervais, A.: Do you need a blockchain? (2017). https://eprint.iacr.org/2017/375.
pdf
24. Vos, J., Lemmen, C., Beentjes, B.: Blockchain based land administration: feasible, Illusory
or a Panacea. In: Paper prepared for presentation at the 2017 world bank conference on land
and poverty (2017)
25. Pankratov, E., Grigoryev, V., Pankratov, O.: The blockchain technology in real estate sector:
experience and prospects. In: IOP Conference Series: Materials Science and Engineering,
vol. 869, no. 6, p. 062010 (2020)
26. Kshetri, N.: Blockchain as a tool to facilitate property rights protection in the Global South:
lessons from India’s Andhra Pradesh state. Third World Quart. 43(2), 371–392 (2022)
27. Wouda, H.P., Opdenakker, R.: Blockchain technology in commercial real estate transactions.
J. Property Invest. Finan. (2019)
28. Konashevych, O.: General concept of real estate tokenization on blockchain. Eur. Property
Law J. 9(1), 21–66 (2020)
29. Konashevych, O.: Constraints and benefits of the blockchain use for real estate and property
rights. J. Prop. Plan. Environ. Law (2020)
30. Garcia-Teruel, R.M.: Legal challenges and opportunities of blockchain technology in the real
estate sector. J. Prop. Plan. Environ. Law 12(2), 129–145 (2020)
31. Schneider, J., Blostein, A., Lee, B., Kent, S., Groer, I., Beardsley, E.: “Goldman Sachs equity
research profiles in innovation”, Blockchain Putting Theory into Practice, Goldman Sachs,
New York, NY (2016)
32. Monrat, A.A., Schelén, O., Andersson, K.: A survey of blockchain from the perspectives of
applications, challenges, and opportunities. IEEE Access 7, 117134–117151 (2019)
33. Financial Times: Banks adopt blockchain for mortgage valuation system (2016). www.ft.
com/content/c856787c-9523-11e6-a1dc-bdf38d484582
34. Mortgage Lending Market Research, 2031 (2022). https://www.alliedmarketresearch.com/
mortgage-lending-market-A17282
35. Financial Services: Sizing the Sector in the Global Economy. (2021). https://www.invest
opedia.com/ask/answers/030515/what-percentage-global-economy-comprised-financial-ser
vices-sector.asp
36. Regtech responsible lending webinar. https://asic.gov.au/for-business/innovation-hub/asic-
and-regtech/asic-regtech-initiative-series-2019-20/regtech-responsible-lending-webinar//
event-details
37. Reporting Practice Guide - ARPA (2020). https://www.apra.gov.au/sites/default/files/RPG%
20223.0%20January%202018.pdf
38. Data to be Reported - RBA (2020). https://www.rba.gov.au/securitisations/data-to-be-rep
orted/
39. Bandyopadhyay, R.: Land system in India: A historical review. Economic and Political
Weekly, A149-A155 (1993)
40. Maeng, S.H., Essaid, M., Ju, H.T.: Analysis of ethereum network properties and behaviour
of influential nodes. In: 2020 21st Asia-Pacific Network Operations and Management
Symposium (APNOMS), pp. 203–207. IEEE, September 2020
41. Sullivan, C., Burger, E.: E-residency and blockchain. Comput. Law Secur. Rev. 33(4), 470–481
(2017)
42. Sasson, E.B., et al.: Zerocash: decentralised anonymous payments from bitcoin. In: 2014
IEEE Symposium on Security and Privacy, pp. 459–474(2014)
CVallet: A Blockchain-Oriented
Application Development for Education
and Recruitment
Zoey Ziyi Li1(B) , Joseph K. Liu1 , Jiangshan Yu1 , Dragan Gasevic2 ,
and Wayne Yang1
1
Department of Software System and Cybersecurity, Monash University, Melbourne,
Australia
[email protected]
2
Department of Human Centred Computing, Monash University, Melbourne,
Australia
1 Introduction
Education credentials, such as certificates, qualifications, transcripts and other
proofs of educational achievements, have been widely accepted as “employability
currency” in labour markets all over the world [14]. On the one hand, individ-
ual learners invest a significant amount of time and money to accumulate their
“employability currency” in exchange for better-paid positions when negotiat-
ing with their future employers. In 2020–21, the average tuition fees for a full-
time undergraduate student (attending 4-year programs) ranged from US$14,200
1.1 Motivations
The close relationship between education credentials and potentially higher-paid
job positions leads to attractive incentives that drive people’s fraudulent inten-
tions and behaviours of credential counterfeits and theft. In the past decade,
the production of forged credentials has become a global issue, with numerous
credential factories selling fake diplomas, degrees, and transcripts [2]. A simple
google search of “buy fake certificates” can return pages of credentialing fraud-
sters. Not only can these fraudsters make forged certificates look authentic with
institutions’ stamps, signatures and seals, some of them even promise to insert
the fake learning record into a targeted institution’s internal database and fool
the national education authority’s verification website [3]. It would appear that
anything can be faked as long as the purchasers are ready to pay a high price,
which seriously undermines the value of credentials and educational equity. As
a result, to prevent employment fraud, hiring companies have to face rising
costs on recruitment verification and lean on screening services [9]. According
to a recent industry outlook, the global market of employment screening ser-
vices reached US$4,957 million in 2020 and is expected to double in 2028 [21].
This phenomenon is deteriorating under the global epidemic of COVID-19, where
national or regional lockdowns drive more online education programs that gener-
ate various types and vast amounts of credentials. Despite the fact that countries
around the world have issued rigorous regulations and laws to protect education
credentials’ quality and authenticity, there is an unstoppable trend that trust
between stakeholders is eroding [2].
Alternatively, blockchain technology promises to offer an effective comple-
ment for traditional regulations and management to fix the trust issue. One suc-
cessful practical case of blockchain is Bitcoin, a digital alternative of fiat currency
that replaces the traditional trust model with the use of cryptographic proof and
distributed network. In the education credentialing scenario, agreed by numerous
studies [8,9,11], blockchain technology can benefit education with the following
attributes: 1) decentralization can reduce the risks of centralized management of
learning records and prevent single-point attacks; 2) immutability can prevent
credentials from being maliciously modified by any party; 3) transparency can
rebuild trust between stakeholders and guarantee the authenticity of credentials,
declared achievements and skills; and 4) self-sovereignty authorize students to
take full control over their credentials in a privacy-preserving way. One recent
survey study[11] has categorized the blockchain applications into five areas after
examining all the papers published after 2016: degree verification (28.75%), edu-
cational record management (22.5%), students’ professional ability evaluation
582 Z. Z. Li et al.
(18.75%), institute systems (15%), and online learning environments (15%). All
of these practices indicate promising potentials of blockchain applications in the
education field.
– Short of DApp development guidelines: the blockchain wave has driven the
fast development of applications with various functions, but there is no stan-
dardized and complete method to guide developers’ practices [12]. This leads
to such problems as ambiguous product positioning, designed functions that
can not directly solve users’ pain points, overly redundant and complex archi-
tecture, and some hidden security risks [12].
– Lack of collaboration between DApp clusters: most of the current DApps fall
into solo development that does not extend and support each other’s existing
functions, leading to a waste of resources and a less collaborative development
community [9].
– Legal and regulation issue: decentralisation, as the distinctive benefit of
blockchain, eliminates single authority and centralised operation. However,
it may also violate some national or regional authorities’ interests and local
data protection regulations [11];
– Social’ awareness and user-acceptance issue: the public has insufficient expe-
rience and awareness of blockchain technology. Besides, the previous appli-
cation designs lack systematic users involvement strategies, which may also
lead to low user acceptance of the DApp [9];
– Blockchain-related issue: there always exist trade-off considerations when
choosing a suitable blockchain that best matches the business requirements.
Different blockchain types come along with different consensus mechanisms
that can affect blockchain transaction speed and workload threshold [9,11],
which in turn affect DApp performance and user experiences. Additionally,
blockchain technology is evolving, and how it can integrate and interoperate
with established systems and what roles it plays within the whole ecosystem
lacks enough empirical practice [25].
1.3 Contribution
This study, in an effort to increase blockchain adoption rate in industries, makes
the following contributions through three aspects: methodological, social and
industrial.
early stage, this adapted approach and practical case validation can provide
implications for future research in user-centred blockchain software engineer-
ing.
2. Socially, we involve 97 learners and 12 recruiters from 9 industries to join the
DApp development, which process can increase not only social awareness of
this new technology but also user-acceptance of the DApp. More importantly,
we carefully examine the learners’ interactions with education credentials and
learn from recruiters’ empirical verification methods. This effort differentiates
our prototype from previous studies since it is developed upon authentic social
analysis instead of laboratory assumptions. Therefore, the prototype function-
ality can better anchor the stakeholders’ pain points and solve existing social
problems.
3. Industrially, we develop a blockchain-based educational achievements man-
agement and verification system, named CVallet (stem from CV + Wallet),
that provides stakeholders with practical tools to improve their work effi-
ciency. The enterprise dashboard can reduce recruiters’ workload in the cur-
rent recruitment procedure with one-stop verification. The lifelong learners
dashboard is a digital wallet to store, manage and share individuals’ learning
credentials in a secure and verifiable manner. In addition, the system is devel-
oped in a modular manner with higher extensible potentialities. It supports
functional extensions based on business development and user requirements
changes in the future. Besides, the proof-of-concept application is based on
the Algorand blockchain with lower running costs and faster performance.
2 Background
Blockcerts [22] is the first and most widespread credentialing system, focused on
issuance and verification of credentials, developed by MIT Media Lab since 2016.
It supports education providers to create and issue cryptographically-signed aca-
demic credentials through transactions on either Bitcoin or Ethereum blockchain
with their learners. The signed credentials includes some metadata to support
later verification such as blockchain receipt (contains transaction ID), recipi-
ent’s profile, issuer’s ID and url, public key, and signature. The verification steps
584 Z. Z. Li et al.
include fetching and comparing these metadata (e.g. hash of the certificate and
the Merkle root) that stored on blockchain are aligned with the values on the
credentials. Therefore, it can support any party to verify the authenticity and
integrity of the credentials through its verification portal. In other words, any
modification or fraudulence can be detected if this information is not matched
with each other. However, authors in [1] tested the security of Blockcerts by
using a fabricated issuer profile with a valid key pair to issue fake credentials
that can slip through all the validation steps.
QualiChain [4,13] is a Pan-European decentralised platform, funded by the
European Union, for storing, sharing and verifying both educational and employ-
ment certificates. Compared to Blockcerts, Qualichain aims to cover a lot more
comprehensive application scenarios: (i) supporting lifelong learning; (ii) sup-
porting smart curriculum design; (iii) staffing the public sector; and (iv) provid-
ing HR consultancy and competency management services. This leads to very
complex architecture design of the system and confusion of the system’s goals.
Even though the project team runs a number of workshops to engage users and
promote QualiChain products, some users reflected that the purposes of the
application “need to be made clearer” in their recent deployment report [13].
Besides, the user interfaces are not intuitive and concise for users to interact
with according to its official pilot evaluation report [16]. These users’ feedback
may indicate the ambiguity of the product positioning of each pilot and the
complex functional architecture of the system design.
Another education-employment focused proposal is called E2 C-Chain [10].
Besides of comparing hashes and signatures, it innovatively introduces an incen-
tive mechanism to involve participating nodes (users) to verify the authenticity
of educational and employment information. Firstly, employees choose a set of
credentials or skills that should be verified by the system. Then, the system-
selected verifiers will act as endorsers for each credential or skill. Every endorser
has a particular weight score that represent the verification weight. When the
total weight scores reach to a valid threshold, the credential or skill is verified
successfully and can be added to a new block. The good aspect of this mecha-
nism is the authenticity of credentials and previous working experiences do not
rely on the issuers any more, but instead they rely on the public recognition
through endorsement. But the negative side is the verification has to wait for
a few rounds of endorsement, and if the verify weight cannot reach the qualify-
ing score, the skill or certificate cannot finish the verification. As such, it may
not be more efficient than the traditional reference check in current recruitment
practices.
A few other projects, though not focused on recruitment verification, are
closely related to secure education records transferring. BOLL [17] supports
learning records transferring between different institutions by defining three
types of smart contracts. However, since every learning activity will trigger dif-
ferent smart contracts that update the learning logs on the chain, the BOLL
system’s execution requires different gas fees. Moreover, its performance depends
on the amount of computational resource and power that leads to a long
CVallet: A Blockchain-Oriented Application Development 585
waiting period (the tested average waiting time is 14 min per transaction). Com-
paratively, Mishra et al. [15]’s proposed system’s performance and scalability
improve greatly (15 s per block) by moving some implementations off-chain. It
also adds up a privacy-preserving mechanism for sharing students’ credentials.
However, since it was also built on Ethereum blockchain, the PoW consensus
limits performance improvements.
Fig. 1. A layered comparison between current applications and our proposed prototype.
3 Methodology
3.1 BOSE
BOSE is an emerging term in recent years that refers to software engineering
practices to facilitate DApp development and was firstly proposed by Porru et al.
[18] in 2017. Marchesi et al. [12] developed BOSE into a nine-step engineering
approach named ABCDE, which can support the complete development life-
cycle, from designing, developing, and deploying the application and ongoing
maintenance including 1) set the goals of the system; 2) find the actors who
interact with the DApp; 3) define user stories; 4) divide the system into two
subsystems; 5) design the smart contracts; 6) code and test the smart contracts;
7) design user interfaces; 8) code and test the interfaces; and 9) integrate, test
and deploy the DApp system [12]. It is noticeable that this method sets system
goals as the starting point to lead the following steps, which may mislead the
system design directions due to insufficient user study and ambiguous under-
standings of requirements. Besides, the method is based on the adaptation of
Agile methods, the original goal of which is to obtain timely market feedback
and user requirements changes. This may indicate that researchers have been
implicitly aware of the importance and difficulty of understanding multiple user
needs beforehand. But they did not propose a specific strategy to solve this dif-
ficulty. Therefore, co-design seems to be a promising approach to address this
problem for the following reasons.
3.2 Co-design
Co-design approaches have gained increasing recognition for establishing a
shared vision between application developers and industrial stakeholders. They
have been proven to offer systematic strategies to ensure the implemented sys-
tems meet stakeholders’ desired needs and the designed functions rely on the
evidence collected through co-design processes [24]. The benefits of co-design
include [23]: 1) benefit the designed project with better-defined services, more
efficient design process and more loyalty of users; 2) benefit users with a better
fit of their requirements and higher satisfaction; and 3) benefit the organization
with better relations between customers and service provider and more successful
innovations.
In education settings, there is a trend to involve educational stakeholders to
join a co-design approach underpinning the development of education technology
tools in order to increase users’ acceptance and adoption of new technologies. For
example, Tsai et al. [24] highlight the value of co-design in learning analytics tools
development, identify the design needs and elicit users’ requirements through
several stages of user participatory processes and analysis. Pozdniakov et al. [19]
adopt co-design methods to design and deploy a real-time monitoring tool used
in classrooms. It has split the design into two parts: co-design study in close
collaboration with teachers and validation study of an authentically designed
interface. Both studies start with users’ investigation through interviews, ana-
lyzing their pain points, and using collected data to support decision-making
in application design. The attributes of co-design approaches may overcome the
limits of BOSE and empower DApps with higher user acceptance.
CVallet: A Blockchain-Oriented Application Development 587
– The preliminary design stage aims to narrow a large industry scope down
to a few most desired and feasible points, define the targeted user groups
and collect essential information for the next development stage. It includes
four steps: 1) set general goals through industry analysis; 2) engage users
through co-design; 3) elicit functional requirements of the system based on
the evidence collected from the last step; and 4) develop use cases diagram
to present interactions between actors and the system.
– The architecture design stage makes decisions about what functionality
should be allocated to what components within the system, and how compo-
nents constructed into a whole system. It includes: 1) trade-off considerations
that may affect cost efficiency (type of blockchain), performance (on-chain
& off-chain data storage), and security (consensus protocol) et.[25]; and 2)
architectural illustration to demonstrate the system structure, which presents
what roles the blockchain is playing and how it interacts with other compo-
nents. The decision-makings of this stage should reflect on the results of the
preliminary design stage.
– The implementation stage includes: smart contract development, user inter-
face development, test and deploy the combined DApp system, reassess the
588 Z. Z. Li et al.
development goals, and adjust the design of previous steps. Noticeably, the
whole design procedure is not a linear process but a dynamic and recipro-
cating process where each stage lays a foundation for the next stage and
the results of each stage act as reflections of previous stages’ revisions and
improvements.
4 CVallet Development
This section describes the design and development of the CVallet system using
the proposed DApp development methodology.
– Phase 1 aims to understand how learners interact with their education cre-
dentials in practices. This phase involves two steps. In step one, we involved
97 learners to collect their real-life experiences of managing, sharing and cer-
tifying credentials (the survey is accessible at: learners survey). Based on the
findings of step one, we developed more targeted interview questions in step
two. We invited six participants to join the interview game with seven sce-
narios (the interview is accessible at: learners interview).
– Phase 2 aims to find out 1) the concurrent verification procedure, 2) verifica-
tion criteria and methods, and 3) verification challenges in industries, there-
fore we invited 12 senior recruiters to join the consultation interview phase
(A sample of interview questions is accessible at: Recruiters interview). All of
the participants have more than five years of working experience in verifying
educational and employment credentials. Their working background can cover
nine industries: headhunters, tertiary institutions, digital media, investment
consulting, oil and mining, consumer goods, non-for-profits, and real estate
and information technology.
CVallet: A Blockchain-Oriented Application Development 589
After the data collection of the two phases, two coders conducted three rounds
of thematic coding supported by NVivo and reached a Cohen’ kappa score of
0.93 in the last round (The full coding scheme accessible at: complete codebook).
The data analysis leads to the following remarkable findings:
CVallet Architecture. Our proposed CVallet (as seen in Fig. 3) has four lay-
ers: User Interface Layer, Identity Management Layer, Credential Management
Layer and Blockchain Layer, and each layer contains multiple components and
functional modules (only the main components and modules are displayed). The
592 Z. Z. Li et al.
Fig. 4. Workflow demonstration. Note: numbers 1 to 4 denote the order from VC’s
generation to verification, and a, b, and c indicate three ways are available to perform
the process.
Multiple DIDs are associated with the user’s UUID. We provide both on-chain
and off-chain credential verification options; credentials can be verified either
through a smart contract or registration information in CVallet. As for the front-
end interfaces, we developed different dashboards for different user groups.
Implementation Settings. We implemented our code in Python for the back-
end server, JavaScript for the front-end interface and MongoDB for the off-chain
data storage. We created a smart contract for on-chain verification and deployed
it on the Algorand Testnet. The following are the main tools and frameworks
used in CVallet:
Deployment Settings. We use all free tier server instances that Heroku pro-
vides to deploy our back-end server and front-end interface in the US region. The
free server RAM is 512 MB in size, and the network bandwidth is soft limited
at 2 TB per app per month (around 800 bits per second). MongoDB free version
single cluster is used for the off-chain data storage. The original credential file
with a 1-page pdf can be up to 1 MB. The size of a verifiable credential is much
smaller because it only contains metadata. It varies from 1 KB to 2 KB with the
W3C data model. In the CVallet system, we support both ways above.
Time. The request-response time or execution time requirements vary amongst
industries in different sectors. For example, those dot-com companies that do
most of their internet business require a response time of a half second. In com-
parison, 5 s for the response time is enough for manufacturing industries. To
evaluate the performance of the CVallet, firstly, we tested the first packet arrival
took around 240 ms and the internet latency around 1 s. Then we test the two
primary functions: credential uploading and verification. These two functions are
relatively time-consuming compared with others. For each of the 10 trials, we
choose a smaller file of 4 KB and a larger one of 663 KB. The smaller sized file
results average execution times of 1.29 s and 1.21 s for credential uploading and
verification respectively. While the comparable time expenses for the larger file
are 1.912 and 1.843 s in corresponding tasks. In addition, the average execution
time heavily depends on many factors, such as internet speed, server configura-
tion, server bandwidth, database performance, etc. We use free version servers
and database tiers in our settings. It is accessible with an uploading time within
2 s and a verification time within 1.5 s in the credential uploading and verification
scenario. In the future, we plan to deploy the CVallet system in an enterprise
configuration and evaluate its performance.
594 Z. Z. Li et al.
Appendix
Shared Concerns
User Stories
Fig. 6. Use case diagram Note: actors on the left side of the system boxes are initiators,
while right-side actors are responders. The same-coloured actors indicate the same user
group.
596 Z. Z. Li et al.
References
1. Baldi, M., Chiaraluce, F., Kodra, M., Spalazzi, L.: Security analysis of a blockchain-
based protocol for the certification of academic credentials. arXiv preprint
arXiv:1910.04622 (2019)
2. Caldarelli, G., Ellul, J.: Trusted academic transcripts on the blockchain: a system-
atic literature review. Appl. Sci. 11(4), 1842 (2021)
3. Chung, F.: The great Aussie degree scam: forgers raking in thousands selling bogus
qualifications (2015). https://www.news.com.au/finance/work/careers/the-great-
aussie-degree-scam-forgers-raking-in-thousands-selling-bogus-qualifications/
news-story/37a95801652821f9357ba94c20bbf29a
4. Consortium, Q.: Decentralised qualifications’ verification and management for
learner empowerment, education reengineering and public sector transformation.
https://cordis.europa.eu/project/id/822404
5. Consortium, W.W.W., et al.: Verifiable credentials data model 1.1: expressing ver-
ifiable information on the web (2022). https://www.w3.org/TR/vc-data-model/
6. National Center for Education Statistics: Price of attending an undergraduate
institution. The Condition of Education (2020)
7. Gallagher, S.R.: Educational credentials come of age: a survey on the use and value
of educational credentials in hiring. Center for the Future of Higher Education &
Talent Strategy (2018)
8. Grech, A., Camilleri, A.F.: Blockchain in education. Publications Office of the
European Union, Luxembourg (2017)
9. Li, Z.Z., Liu, J.K., Yu, J., Gasevic, D.: Blockchain-based solutions for education
credentialing system: Comparison and implications for future development. In:
2022 IEEE International Conference on Blockchain (Blockchain), pp. 79–86 (2022).
https://doi.org/10.1109/Blockchain55522.2022.00021
10. Liyuan, L., Meng, H., Yiyun, Z., Reza, P.: E2̂ c-chain: a two-stage incentive edu-
cation employment and skill certification blockchain. In: 2019 IEEE International
Conference on Blockchain, pp. 140–147. IEEE (2019)
11. Loukil, F., Abed, M., Boukadi, K.: Blockchain adoption in education: a systematic
literature review. Educ. Inf. Technol. 26(5), 5779–5797 (2021)
12. Marchesi, L., Marchesi, M., Tonelli, R.: ABCDE-agile block chain DApp engineer-
ing. Blockchain Res. Appl. 1(1–2), 100002 (2020)
13. Mikroyannidis, A.: Work-in-progress: piloting smart blockchain badges for lifelong
learning. In: Auer, M.E., Hortsch, H., Michler, O., Köhler, T. (eds.) Mobility for
Smart Cities and Regional Development - Challenges for Higher Education. ICL
2021. Lecture Notes in Networks and Systems, vol. 389. Springer, Cham (2022).
https://doi.org/10.1007/978-3-030-93904-5_74
14. Milligan, S., Kennedy, G.: To what degree? alternative micro-credentialing in a
digital age. In: Visions for Australian Tertiary Education, pp. 41–54 (2017)
15. Mishra, R.A., Kalla, A., Braeken, A., Liyanage, M.: Privacy protected blockchain
based architecture and implementation for sharing of students’ credentials. Inf.
Process. Manage. 58(3), 102512 (2021)
16. Nadia Politou (ATOS), Ingo Keck (TIB), Panagiotis Kokkinakos, Christos Bot-
sikas(NTUA): Qualichain pilot evaluation and lessons learnt. Technical report
(2022). https://alfresco.epu.ntua.gr/share/s/-eTjAueIQ5-9mH_G2Om0nQ
17. Ocheja, P., Flanagan, B., Ueda, H., Ogata, H.: Managing lifelong learning records
through blockchain. Res. Pract. Technol. Enhanced Learn. 14(1), 4 (2019). https://
doi.org/10.1186/s41039-019-0097-0
CVallet: A Blockchain-Oriented Application Development 597
18. Porru, S., Pinna, A., Marchesi, M., Tonelli, R.: Blockchain-oriented software engi-
neering: challenges and new directions. In: 2017 IEEE/ACM 39th International
Conference on Software Engineering Companion. IEEE (2017)
19. Pozdniakov, S., et al.: The question-driven dashboard: How can we design analytics
interfaces aligned to teachers’ inquiry? In: 12th International Learning Analytics
and Knowledge Conference (LAK22) (2022)
20. Reed, D., et al.: Decentralized identifiers (DIDs) v1. 0: core architecture, data
model, and representations. W3C Working Draft 8 (2022)
21. Research, A.M.: Employment screening services market outlook 2028 (2021). https:
//www.researchandmarkets.com/reports/5031500/employment-screening-services-
market-by-service?utm_source=BW&utm_medium=PressRelease&utm_code=f5px
fl&utm_campaign=1571725+-+Global+Employment+Screening+Services+Market
+(2021+to+2028)+-+by+Service%2c+Application+and+Geography&utm_exec=ja
mu273prd
22. Ronning, A., Chung, W.W.: Blockcerts v3 proposal (2019)
23. Steen, M., Manschot, M., De Koning, N.: Benefits of co-design in service design
projects. Int. J. Des. 5(2), 53–60 (2011)
24. Tsai, Y.S., Singh, S., Rakovic, M., Lim, L.A., Roychoudhury, A., Gasevic, D.:
Charting design needs and strategic approaches for academic analytics systems
through co-design. In: 12th International Learning Analytics and Knowledge Con-
ference (LAK22) (2022)
25. Xu, X., Weber, I., Staples, M.: Architecture for Blockchain Applications. Springer,
Cham (2019). https://doi.org/10.1007/978-3-030-03035-3
Decentralized Access Control for Secure
Microservices Cooperation
with Blockchain
Ning Xi, Yajie Li, and Jin Liu(B)
1 Introduction
Cloud-native technology greatly improves the quality of various modern IT appli-
cations, such as smart transportation [5], smart home [17], and smart healthcare
[2]. Microservices are the core of cloud-native application architecture. Built as a
distributed set of small, independent services that interact through a shared fab-
ric, microservices enable a highly efficient and flexible approach to delivery the
large, complex cloud-native applications by cooperation [3]. Each microservice
is encapsulated with a specific business capability and its data. Heterogeneous
services can cooperate centered around APIs provided by cloud-native architec-
tures, such as REST, gRPC, and NATS protocols.
However, loosely coupled services pose a great security challenge to applica-
tion security during their cooperation, i.e., unauthorized access to cross-service
Supported by the Major Research plan of the National Natural Science Foundation of
China (Grant No. 92167203), the National Key R&D Program of China (Grant No.
2018YFE0207600), Natural Science Basis Research Plan in Shaanxi Province of China
(Grant No. 2022JM-338).
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 598–614, 2022.
https://doi.org/10.1007/978-3-031-23020-2_34
Decentralized Access Control for Secure Microservices Cooperation 599
data and service. Adversaries could access sensitive data or services by calling
the exposed cross-service API instead of calling the target service directly. Access
control provides a basic and effective way to protect individual service and their
data [6,9]. [24] proposed a key management scheme based on hierarchical access
control. [13] is dedicated to solving the adaptive scheduling scheme based on
data flow management policy. Remote control communication is implemented
based on authentication in [19].
Above access control policies rely on a central authority for management.
The centralized framework is suffering from a single point of failure. Besides,
it is difficult to realize individualized access control due to the high cost of the
management of complex policies. Therefore, [21] proposed a decentralized access
control scheme for service access. Each Manufacturer can define and manage its
policies. The decentralized way simplifies the management, significantly improves
the QoS, and overcomes the bottleneck of the single point of failure. This method
simplifies the management overhead of complex policies and overcomes the prob-
lems caused by centralization, but it also introduces new problems. [14] has
proposed the first decentralized access control scheme for microservices in the
cloud. It realizes a high-efficient and secure microservice management. However,
decentralized approaches also arise some serious security issues in mircoservices
cooperation. On the one hand, different microservices may define conflict poli-
cies. On the other hand, some malicious vendors could use their privileges to
deliver the microservice to illegal users by encapsulating the original one as a
new microservice. So the consistency of policies has become a major challenge
in those decentralized schemes.
Given the challenges existing in the above approaches, we propose a novel
decentralized access control scheme for secure microservices cooperation based
on the blockchain. Firstly, we provide a decentralized access control framework
for loosely coupled services. Service vendors can define the individualized access
policies by themselves instead of a central authority, which is more practical in
the distributed cloud-native system. Secondly, we build a permission blockchain
to maintain the consistency of the access control policies. Each policy on the
blockchain cannot be directly tampered with by cloud platform managers. There-
fore, we can overcome the security threats caused by illegal access policies. The
contributions of this paper are as follows:
(1) For service calls between microservices, combined with the immutability of
blockchain, an access control model based on a permission graph is designed
to reduce policy storage overhead, realizing safe and efficient distributed
access control.
(2) We design a permission extraction scheme based on static analysis, which
can accurately extract the calling relationship between microservices before
the service is deployed and run on the cloud platform.
(3) We design a blockchain-based permission decision-making scheme, which
implements a decision-making management mechanism based on consensus
among multiple manufacturers, ensures immutability and consistency, and
effectively avoids unauthorized access and cross-service unauthorized access.
600 N. Xi et al.
2 Related Work
To solve the problem of cross-service unauthorized access in microservices, we
summarize the current related methods, including the following four categories.
Automatic Generation of Policies. The traditional centralized access con-
trol mechanism requires unified policy management by security managers, which
is difficult to meet the security sharing requirements of distributed big data. In
particular, security managers may be untrustworthy and risk policy leakage.
Documentation can better express the developer’s intent, but such documenta-
tion does not always exist [16,23]. At the same time, these methods are often
coarse-grained and incomplete due to the limitations of Natural Language Pro-
cessing(NLP). Generally, we infer rule criteria and policy structure from traf-
fic through collected traces or historical data. The effectiveness of this scheme
depends on the granularity and completeness of the tracking [22]. In addition,
applications run ahead of time to collect data, which can lead to an attack on
Windows.
Secure Communication Between Microservices. Reference [8] Adjust the
interconnection between microservices through the aggregation and distribu-
tion functions of the gateway. When registering a microservice, the microservice
itself creates uniquely identified endpoints bound to event channels or meth-
ods. Reference [12] presented a graph-based access control that automatically
creates a model of legitimate communication relationships, with interactive
updates through an easy-to-understand interface. This solution implements a
self-learning IoT firewall. But there is a lack of filtering of traffic on the first
boot.
Attribute-Based Access Control. The literature [10] implemented attribute-
based access control (ABAC) and proposes AoT. AoT is an authentication and
access control scheme for IoT device lifecycle, that facilitates secure (in terms
of stronger authentication) wireless interoperability of new and guest devices in
a seamless manner. Based on the non-interactive multi-authority ABE (NI-MA-
ABE) scheme. [25] proposed a completely decentralized outsourced ABE scheme
(FDO-ABE) as the access control architecture of MEC. However, the downside
of this approach is that the modeling process is time-consuming and error-prone,
making them unsuitable for flexible microservice applications.
Decentralized Access Control for Secure Microservices Cooperation 601
In order to ensure the security of service calls between microservices and prevent
malicious attacks and tampering by attackers, the security model of this paper
involves the security requirements of three roles.
Based on the system model and threat model, we design an automatic generation
scheme for inter-service access control policies for microservices using blockchain.
Its overall framework is shown in Fig. 2.
The flow is shown as follows. It is divided into the permission extraction
phase and the permission decision-making phase. In the permission extraction
phase, static analysis and taint tracking technology are used to obtain the request
permission graph of microservices accessing other services through the network,
and the calling relationship between microservices can be accurately extracted
before the service is deployed and run on the cloud platform. In the decision-
making phase, based on the blockchain, we generate the permission decision
relationship graph of microservices to determine whether the request relationship
can be authorized. Through the Microservice manufacturers uploading the basic
service call list, we realize the decision management mechanism based on multi-
manufacturer consensus.
Table 1. Java and Python semantic libraries for common service calls in microservices.
Case 1: When there is a corresponding package name in the source code, first
start to traverse each line of code, extract the function name in the code through
regular expressions and match the function name in the semantic library, then
record the number of lines of code segments that satisfy the representation, and
finally output this line of code.
Case 2: If the function package name is not referenced in the source code, we
consider that there is no external service call request.
Reverse Tracking. Statements with service calls are identified in the source
code, then uses as starting points to perform backward taint propagation on
the control flow graphs. By doing so, we can get the program fragments associ-
ated with each call. Finally, traverse the slice to obtain the complete call path
information.
More specifically, the source code of the identification is input into the direc-
tion tracking algorithm, which is used as the starting point for pollution trans-
mission, and the program slices related to the stain are output. After obtaining
the identification code, the variable name extraction and function parameter
extraction are carried out on this line of code. After obtaining the parameter
data of the pollution source, iterative traversal propagation is generally divided
into three cases: assignment, path splicing, and function call. The tainted param-
eters are extracted for the statements in these three cases respectively, and then
the parameters are added to the tainted list for the next iterative traversal
tracking.
Algorithm 1. topo( )
Require: RequesSvc_Json
Ensure: GRequest (request relationship topology graph)
1: for i in RequesSvc_Json do
2: nodes.append(svc_dict[“source_svc ])
3: nodes.append(svc_dict[“name ])
4: edges.append((svc_dict[“source_svc ], svc_dict[“name ]))
5: // remove duplicates
6: G = nx.Graph()
7: nx.draw(G, with_labels = T rue, node_color = y , )
8: plt.show()
9: end for
Channels: We design two channels, C1 and C2, each responsible for the com-
munication between different data owners and the blockchain. They provide a
completely independent communication mechanism. When a chain code defini-
tion is submitted to a channel, the smart contract in the chain code are available
to applications on that channel. It is essential for data and communications to
maintain privacy. The independence of C1 and C2 is of sufficiency to help orga-
nizations separate them from the workflows of different counterparties. More
importantly, it is sufficient to enable them to coordinate independent activities
when necessary.
Smart contracts: We design two smart contracts, SC1 and SC2, each respon-
sible for the communication to generate access control policies for microservices.
They read and write ledger data in the corresponding channel and application
code.
The above design is mainly applied to the microservice permission generation
phase and the permission decision-making phase.
the ledger L2. (2) According to the service list, the data is taken from the ledger
L1 to generate the permission graph and uploaded to the ledger L2 to determine
when the microservice does not have a permission graph in the ledger L2. If
the request graph in the application is a subset of the permission graph, it is
considered that the call can be authorized, otherwise the authorization is denied.
The representation method of the relevant graphs in this design are all pre-
sented in the data structure of the adjacency list. In the AccessMatrix field of
SvcMatrix, it is composed of an array of type SvcInfo in L1.
We perform the following steps when the request relationship graph uploaded
by the service platform already exists in the ledger L2. First, read the correspond-
ing permission graph, and traverse the list of security access services involved
in the service. Then it is determined whether the list in the request graph is a
subset of the security list in the permission graph. If it is a subset, it means that
the request path where the service is located in the request graph can be autho-
rized. At this point, the next service path determination can be performed. If the
subset condition is not met, the authorization is denied. The result is returned
to the service platform. The specific algorithm is shown in Algorithm 2.
Algorithm 2. DecisionMaking( )
Require: GRequest (microservice permission request graph) and SLedger2 (the ledger
L2 corresponding to SC2)
Ensure: decision-making result
1: get microservice ID, GRequest .SvcID
2: if GRequest .SvcID exists in ledger L2 then
3: obtain the permission graph GP ermission of the microservice from the ledger L2
GP ermission = S.Ledger2 .ReadAsset(Ledge2, GRequest .SvcID)
4: if every term SaveSvc in GRequest .AccessM atrix is not a subset of
GP ermission .AccessM atrix then
5: Permission Dined
6: Permission Granted
7: else
8: Connect Ledger1 create new Matrix: Svc2Matrix()
9: DecisionMaking()
10: end if
11: end if
The request is sent to the smart contract SC2 if the upload request graph is
not recorded in L2. SC2 queries the ledger L1 according to the service ID involved
in the request graph to obtain the security access service list corresponding to the
service ID and returns the data to SC2. SC2 encapsulates the data in SvcMatrix
format. Finally, the permission decision-making is executed. Algorithm 3 shows
the specifics.
Decentralized Access Control for Secure Microservices Cooperation 609
Algorithm 3. Svc2Matrix( )
Require: GRequest (microservice permission request graph)
Ensure: GP ermission (permission graph corresponding to microservice)
1: GP ermission = GRequest .SvcID, GRequest .SvcN ame, AccessM atrix
2: channel2 post GRequest to channel1
3: Channel1:
4: for SvcID in GRequest do
5: Get SvcInf o from Ledger1
6: append(GP ermission .AccessM atrix, SvcInf o)
7: channel1 post GP ermission to channel2
8: channel2 update Ledger2 with GP ermission and CreateAsset()
9: end for
5 Experiments
In this section, we explore the capabilities and security of the blockchain-based
inter-microservice access control policy automatic generation method described
above. Our evaluation aims to answer the following three questions:
Q1: What are the advantages of our proposed scheme over other advanced meth-
ods?
Q2: How efficient is the microservice when it updates the calling relationship
(add microservice calls and delete microservice calls)?
Q3: How does the access control mechanism affect the performance of the appli-
cation itself?
5.2 Security
Based on the characteristics of blockchain, such as centerless, transparent, and
distributed, we verify the security improvements brought by the proposed app-
roach to microservice applications. In Table 2 we analyze the security differ-
ences between several common access control policy schemes and our design
610 N. Xi et al.
scheme. The focus of our solution is that the access control mechanism relies
on the whitelist provided by the microservice manufacturers, and based on the
blockchain, multi-manufacturer consensus decision-making is realized.
5.3 Efficiency
The feature of the method we propose is that when the calling policies between
microservices changes, new microservices are called and deleted according to
the whitelist provided by the microservice manufacturers, without rebuilding
the generated graph. Therefore, the purpose of this experiment is to evaluate
microservices deployment, add new microservice calls, and reduce access control
processing time in the case of microservice calls. Specifically, we mainly focus on
three situations:
We compare access control methods based on graphs and decision trees [7],
and the experimental results are shown in Fig. 5.
It can be seen from Fig. 5(a) that when new policies are added, adding
new callings relationship to the existing policies can effectively reduce policy
redundancy. For example, when adding 540 strategies, the running time of [7] is
1952 ms, while ours is around 715 ms. The running time is reduced by at least
half.
As can be seen from Fig. 5(b), when a microservice is deleted, the call rela-
tionship diagram of the microservice is always smaller than the permission policy
diagram composed of the whitelist provided by the microservice manufacturer.
Therefore, there is no need to regenerate new policies, reducing the overhead of
uploading policies to the blockchain and improving performance. Experimental
results show that our running time is within half of the running time of [7].
We counted the time required to make a decision when adding a service call
and deleting a service call in the microservice, as shown in Fig. 6.
Decentralized Access Control for Secure Microservices Cooperation 611
Fig. 5. Comparison of the running time of (a) Policies addition and (b) Policies
Removal.
5.4 Performance
6 Conclusion
References
1. Alohaly, M., Takabi, H., Blanco, E.: A deep learning approach for extracting
attributes of ABAC policies. In: Proceedings of the 23nd ACM on Symposium
on Access Control Models and Technologies, pp. 137–148 (2018)
2. Baker, S.B., Xiang, W., Atkinson, I.: Internet of things for smart healthcare: tech-
nologies, challenges, and opportunities. IEEE Access 5, 26521–26544 (2017)
3. Gannon, D., Barga, R., Sundaresan, N.: Cloud-native applications. IEEE Cloud
Comput. 4(5), 16–21 (2017)
4. Islam, M.A., Madria, S.: A permissioned blockchain based access control system
for IoT. In: 2019 IEEE International Conference on Blockchain (Blockchain), pp.
469–476. IEEE (2019)
5. Jan, B., Farman, H., Khan, M., Talha, M., Din, I.U.: Designing a smart transporta-
tion system: an internet of things and big data approach. IEEE Wirel. Commun.
26(4), 73–79 (2019). https://doi.org/10.1109/MWC.2019.1800512
6. Keller, A., Ludwig, H.: The WSLA framework: specifying and monitoring service
level agreements for web services. J. Netw. Syst. Manage. 11(1), 57–81 (2003)
7. Li, X., Chen, Y., Lin, Z., Wang, X., Chen, J.H.: Automatic policy generation for
{Inter-Service} access control of microservices. In: 30th USENIX Security Sympo-
sium (USENIX Security 21), pp. 3971–3988 (2021)
8. Lu, D., Huang, D., Walenstein, A., Medhi, D.: A secure microservice framework for
IoT. In: 2017 IEEE Symposium on Service-Oriented System Engineering (SOSE),
pp. 9–18. IEEE (2017)
9. Lu, L., Li, Z., Wu, Z., Lee, W., Jiang, G.: CHEX: statically vetting android apps for
component hijacking vulnerabilities. In: Proceedings of the 2012 ACM Conference
on Computer and Communications Security, pp. 229–240 (2012)
10. Neto, A.L.M., et al.: AoT: authentication and access control for the entire IoT
device life-cycle. In: Proceedings of the 14th ACM Conference on Embedded Net-
work Sensor Systems CD-ROM, pp. 1–15 (2016)
11. Ouaddah, A., Abou Elkalam, A., Ait Ouahman, A.: FairAccess: a new blockchain-
based access control framework for the internet of things. Secur. Commun. Netw.
9(18), 5943–5964 (2016)
12. Pahl, M.O., Aubet, F.X., Liebald, S.: Graph-based IoT microservice security. In:
NOMS 2018–2018 IEEE/IFIP Network Operations and Management Symposium,
pp. 1–3. IEEE (2018)
13. Panno, D., Riolo, S.: A new centralized access control scheme for D2D-enabled
mmWave networks. IEEE Access 7, 80697–80716 (2019)
14. Preuveneers, D., Joosen, W.: Access control with delegated authorization policy
evaluation for data-driven microservice workflows. Future Internet 9(4), 58 (2017)
15. Preuveneers, D., Joosen, W.: Towards multi-party policy-based access control in
federations of cloud and edge microservices. In: 2019 IEEE European Symposium
on Security and Privacy Workshops (EuroS&PW), pp. 29–38. IEEE (2019)
16. Saadaoui, A., Scott, L.S.: Web services policy generation based on SLA require-
ments. In: 2017 IEEE 3rd International Conference on Collaboration and Internet
Computing (CIC), pp. 146–154. IEEE (2017)
614 N. Xi et al.
17. Solaimani, S., Keijzer-Broers, W., Bouwman, H.: What we do - and don’t - know
about the smart home: an analysis of the smart home literature. Indoor Built
Environ. 24(3), 370–383 (2015)
18. Thwin, T.T., Vasupongayya, S.: Blockchain-based access control model to preserve
privacy for personal health record systems. Secur. Commun. Netw. 2019, 1–15
(2019)
19. Vince, T., Slavko, O.: Enhanced centralized access control system. In: 2019 IEEE
International Conference on Modern Electrical and Energy Systems (MEES), pp.
474–477 (2019)
20. Vučinić, M., Tourancheau, B., Rousseau, F., Duda, A., Damon, L., Guizzetti, R.:
OSCAR: object security architecture for the internet of things. Ad Hoc Netw. 32,
3–16 (2015)
21. Wang, S., Zhang, Y., Zhang, Y.: A blockchain-based framework for data sharing
with fine-grained access control in decentralized storage systems. IEEE Access 6,
38437–38450 (2018)
22. Xiang, C., et al.: Towards continuous access control validation and forensics. In:
Proceedings of the 2019 ACM SIGSAC Conference on Computer and Communi-
cations Security, pp. 113–129 (2019)
23. Yu, L., Zhang, T., Luo, X., Xue, L., Chang, H.: Toward automatically generating
privacy policy for Android apps. IEEE Trans. Inf. Forensics Secur. 12(4), 865–880
(2016)
24. Zhang, Q., Wang, Y.: A centralized key management scheme for hierarchical access
control, vol. 4, pp. 2067–2071 (2004)
25. Zhang, Z., Huang, G., Hu, S., Zhang, W., Wu, Y., Qin, Z.: FDO-ABE: a fully
decentralized lightweight access control architecture for mobile edge computing.
In: 2021 IEEE 6th International Conference on Computer and Communication
Systems (ICCCS), pp. 193–198. IEEE (2021)
Blockchain-Based Access Control
for Secure Smart Industry Management
Systems
1 Introduction
The advancement of communication and Internet-of-Things (IoT) technologies
has pushed the rapid development of smart industries or industry 4.0 to allow
more efficient and customizable production and logistic operations. However, IoT
devices collect a massive amount of data associated with their surroundings and
influence cloud computing resources for storing and examining data to extract
valuable insights.
Cloud technologies [4] is a superior technology that solves the problems in
smart manufacturing systems. By offering the necessary platforms and infras-
tructure, cloud computing technology ensures efficient data management at a
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 615–630, 2022.
https://doi.org/10.1007/978-3-031-23020-2_35
616 A. P. Kalapaaking et al.
reasonable price. As a result, cloud service providers may manage data from
smart manufacturing service providers effectively and affordably.
However, cloud-based smart manufacturing systems bring up some security
and trust issues. The centralized nature of cloud-based data storage enables a
single authority to oversee the management of cloud-based data storage. As a
result, the cloud service provider is susceptible to a single point of failure for the
smart manufacturing services and stored transaction data. However, most cloud
service providers employ advanced security measures to thwart outside cyber-
attacks. For example, an untrustworthy employee of the cloud service provider
could alter or tamper with customer data or transactions. Therefore, internal
cyberattacks against the cloud platform are not secure.
Blockchain is a distributed system that links data structure for data storage,
ensuring the data is resistant to modification. Initially, blockchain applications
were limited to cryptocurrencies and financial transactions. The invention of
smart contracts oversees the development of more diverse application scenarios
such as healthcare [11] and supply chains [12]. Since blockchain is a decentralized
system, it can solve a single point of failure from the cloud. To prevent resources
stored in the cloud from being accessed or stolen by illegal users, access control
is required for supplementary solutions.
Therefore, a trustworthy smart manufacturing system is needed to guarantee
the integrity of stored data and maintain the proper accessibility of the users’
data in smart manufacturing management systems. The contributions of our
work are summarized as follows:
2 Related Work
Azaria et al. [17] proposed a decentralized management system, creating a pro-
totype that showed an immutable database that provided access to their data
via the facilities acting as miners in a blockchain network. These projects rely
on proof-of-work (PoW) consensus processes, which demand a lot of processing
power.
Although data retrieval is still computationally intensive, Wang et al. [1]
developed the blockchain-based Data Gateway to encourage end-users to own,
monitor, and exchange their data. Measa et al. [8] also proposed using blockchain
to publish and transfer resource usage rights regulations between users. However,
they only used a hypothetical proof-of-concept Bitcoin implementation.
Blockchain-Based Access Control 617
Based on the current works, none of these earlier publications discuss the
use of smart contracts with role-based access control systems, particularly with
smart manufacturing based on the Internet of Things. In Table 1, summarize the
key point from our proposed method from the previous work.
3 Proposed Framework
This section presents our proposed blockchain-based access control. First, we
present an overview of the system architecture. Next, we discuss the various
components of our proposed framework in detail.
Thus, it is paramount that user roles are verified given the sensitive nature
of the data. However, role specifications themselves may be tampered and so, to
ensure trustworthy definition and verification of roles, smart contracts are used.
Here, we integrate blockchain into the system, with smart contracts being
deployed to all blockchain nodes. User authentication details (e.g., user id and
roles) are stored within the blockchain to harden against modification attacks.
Moreover, customers’ transaction data is stored distributively amongst the
blockchain nodes. Overview of the proposed framework is illustrated in Fig. 1.
To ease explanation in later sections, we break down the components of the
proposed framework as follows:
– Cloud Service Provider (CSP) acts as the interface between users and
data, allowing direct communication and acting as an intermediary by answer-
ing user requests with results contained within. The actual query operation
itself is performed by the ACM.
– Access Control Manager (ACM) only allows authorised access to data
by users via requests. This involves user registration, role validation, and the
retrieval of user rights. To ensure trustworthiness, it communicates with the
blockchain network for user role validation.
– Blockchain Authentication Manager (BAM) communicates with the
ACM on behalf of the blockchain. It receives a user-role validation task as
a transaction, communicating with other nodes to validate and retrieves the
correct role with the help of smart contracts.
– Blockchain Database Manager (BDM) is another node in the blockchain
network. Generally, it is responsible for executing transactions in the
blockchain network, performing operations on blockchain data, and producing
authenticated results.
where:
620 A. P. Kalapaaking et al.
p.type ⊆ U, (2)
∀atti ∈ param.Att , param.Att ⊆ Att ∧ atti ∈ g . (5)
The RBACM model is defined in a smart contract (SC) to ensure the trust-
worthy validation of accessibility based on the semantics AR. The formal defi-
nition of the smart contract can be provided as below:
Definition 3.4. A smart contract (SC) is a tuple:
Step-1: Initialization. The data owner, the access control layer (ACM ), the
blockchain authentication manager (BAM ), and the blockchain data manager
(BDM ) all generate keys as part of the initialization process. Assume that
KeyGen() is a key generation algorithm based on public-key cryptography that
generates a public-key (P K) and private-key (P R) pair. Using KeyGen(), the
data owner creates a key pair made up of a public key (P KDO ) and a private
key (P RDO ). The data owner will use this key pair to deploy the smart con-
tract and carry out its activities. The data owner preserves P RDO as a secret
and shares P KDO with the cloud’s ACM and the blockchain network’s BAM .
Using KeyGen(), ACM also creates a key pair, including a public key (P KACM )
and a private key (P RACM ). The key-pairs for BAM and BDM are generated
similarly as follows: P KBAM , P RBAM , and P KBDM , P RBDM .
Step-2: Generation and Deployment of Smart Contracts. In this stage,
the data owner establishes roles for various user types and sets the access control
rules (AR) depending on those user types. The data owner then uses AR as
described in Definition 3.4 to create a smart contract (SC). In order to deploy
SC in the blockchain network, the data owner sends a transaction to the BAM
called T xSC . Formally, T xSC can be written as follows:
where:
– IDBAM is the unique ID of the blockchain authentication manager (BAM ).
– IDDO is the unique ID of the data owner representing the transaction gen-
erator.
– costSC is the price of running the transaction T XSC .
– Sign(SC, P RDO ) is the signed smart contract SC that is constructed using
a digital signature technique with the data owner’s private key P RDO .
A smart contract scripting language for the blockchain platform can be used to
create SC. The blockchain platform for this study is Ethereum, and SC is created
using the Solidity programming language. Section 4.1 discusses the implementa-
tion specifics. Figure 2 shows the SC creation and deployment operations.
Step-3: User Registration. By giving each user one or more roles in this stage, the
data owner creates new users and registers them. When a user is created, roles are
assigned, and the user roles are stored on the blockchain. The data owner issues
a blockchain transaction called T xU R . The Blockchain Data Manager (BDM )
receives T xU R from the data owner, which is forwarded to the blockchain network
for inclusion in the blockchain. The following is a formal representation of T xU R :
where:
– IDBDM is the unique ID of the blockchain data manager (BDM ).
– IDDO is the unique ID of the data owner representing the transaction gen-
erator.
622 A. P. Kalapaaking et al.
where:
– IDACM is the unique ID of ACM denoting the transaction generator.
– IDBAM is the unique ID of the blockchain authentication manager (BAM ).
– costV is the cost of executing the transaction T XV .
– IDSC is the smart contract’s unique ID.
– Sign(p.role, P RACM ) is the signed user role that is produced using a digital
signature schemes with ACM’s private-key P RACM .
In the blockchain network, BAM propagates T xV to verify user roles. Using
the smart contract SC, the user role is verified. The matching rights (p.rights)
of the user are then returned to BAM , signed by BAM , and sent to ACM .
Sign(p.rights, P RBAM ) can be used to represent the signed rights. ACM then
gives the user p the rights. The user role validation procedure based on smart
contracts is represented by the Algorithm 1.
Step-5: Accessibility Based Operation. The user does the action in this
stage in accordance with the responsibilities and rights granted to the user. The
sequence diagram for the entire accessibility-based operation is shown in Fig. 3.
An end user is initially authenticated by the CSP. The end user then issues an
ACM inquiry request. The ACM retrieves the rights for the user and confirms
the roles with BAM. After then, the ACM sends the query request to the BDM
for processing. For the request, the BDM creates a query result and transmits
it to the CSP. The end-user receives the result from CSP.
4 Experimental Results
In this section, we show several experiments conducted to evaluate the perfor-
mance of our proposed framework and discuss the results.
·105
2
1.5
Required Gas
Next, we examine at the time cost to produce the query results in Fig. 5 where
several concurrent query operations are performed and then transmitted to the
ACM to be processed. The goal is to imitate concurrent consumers querying the
blockchain for particular sets of data. All queries are forwarded via the ACM to
the BDM, which controls network-wide query activities. The timings displayed
reflect projected peaks and troughs within operational times for different simul-
taneous query requests of 100 to 300. According to the results, execution times
rise linearly as the number of requests increases. Even at the upper end, we saw
responses in 86 s for 300 simultaneous requests, which would serve all users in
626 A. P. Kalapaaking et al.
a typical mid-size smart manufacturing. Please note that when the system is
implemented on more potent machines, these timings will dramatically improve.
Figure 6 shows the execution times for the deployment ( ) and verifica-
tion ( ) of smart contracts in our framework. In this experiment, blockchain-
deployed smart contracts are made for various permissions within certain posi-
tions. We also confirm their rights in order to be thorough. Giving the admin
permission to complete the order after carefully reviewing the quality and quan-
tity is one example. Therefore, the client can inform the manufacturer if there
is an issue with the products (such as a wrong amount or a damaged item).
The deployment phase, which demands around 115 to 130 ms over the 20
usage rights we defined, is more time-consuming, as was to be expected. With a
speed range of 5 to 15 ms, the verification phase is quicker. Both phases have a
slight rising trend, with the time taken growing as more rights are added. With
the manager, accountant, technician, and administrative personnel all having
distinct and purposeful usage rights within their responsibilities, it is envisaged
that the chosen number of 20 will more than satisfy standard smart manufacturer
requirements.
In Fig. 7 we analyze the time needed to generate the blockchain for the smart
manufacturer data across various amounts of records ( ) and nodes ( ).
The objective is to monitor performance as we scale up the number of partici-
pating nodes and records in the network. We scale the number of records from
10,000 to 50,000 after limiting the number of blockchain nodes to 4. As a result,
we observe a rising linear trend, with 10K records starting at 1.069 s and 50K
records ending at 2.155 s. This indicates the potential of incorporating a substan-
tial amount of manufacturer-provided IoT data into the system, such as access
control and consumer transactions. The processing time will be shortened by
using a full server with greater power.
·105
Execution Time (ms)
1
0.8
0.6
0.4
0.2
100 200 300
Simultaneous Requests
20 140
5 110
V
0 100
5 10 15 20
User Rights per Role
Fig. 6. Deployment and verification times of specific usage rights within user roles
4.3 Discussion
The proposed framework integrates blockchain and smart contract technology.
This ameliorates some of the known issues with centralized cloud platforms as
we seek to decentralize important access-control mechanisms and thus harden
them against attacks. The immutability afforded by the blockchain is a crucial
pillar of this framework, with malicious actors facing an uphill task if they wish
to tamper with actual data. Further, as the roles and rights of system users
are defined in smart contracts, which in turn are also replicated to all nodes in
the blockchain, attacks such as privilege escalations or false authorizations are
minimized.
Each data request is submitted as a blockchain transaction in the sug-
gested architecture. These transactions comprise the creation of smart contracts
(T xSC ), registration of users (T xU R ), and validation of user roles (T xV ). The
associated transaction generator uses public-key cryptography to sign each of the
transactions above digitally. The signature will be secure if the correct key set-
tings are applied. Using the aggregated key, users can confirm the search result.
Because of this, even a 51% attack cannot change the query result. Hence, the
proposed framework guarantees the verifiability of the query result.
628 A. P. Kalapaaking et al.
·104
5 20
Number of Records
Number of Nodes
4 15
3
10
2 records
nodes 5
1
0 500 1,000 1,500 2,000 2,500
Execution Time (ms)
Fig. 7. Generation times across number of records and nodes
Results presented in Sect. 4, highlight the efficacy and performance of the pro-
posed blockchain-enabled role-based access control (RBAC). The experiments
show that execution times for most operations (i.e., generation and verification
of user roles) follow a linear trend without spikes as we increase the number of
records and nodes within the network. With the limited source in mind, we pos-
tulate that a larger variant of the proposed approach would perform better in an
environment with more powerful machines. It is reasonable to expect that sig-
nificant smart manufacturing would be able to accommodate the computational
requirements.
5 Conclusion
In this paper, a blockchain-based access control framework is proposed to ensure
the integrity of the data and transaction within the context of a smart manu-
facturing. First, a decentralized data storage model is introduced that stores
the transactions records in the blockchain. The blockchain of records are repli-
cated across multiple nodes to ensure integrity and to protect against tampering.
Second, a smart contract-based access control mechanism is proposed to define
the roles of different system users. Different roles and their corresponding rights
can be created and stored in multiple smart contracts to be deployed in the
blockchain network. The smart contracts are replicated amongst nodes in the
network, with user role creation and validation tasks generated only via valid
blockchain transactions. Accordingly, false user roles cannot be created and none
of the existing user roles can be modified by an attacker. As seen in the experi-
mental results, the proposed role-based access control (RBAC) using smart con-
tracts is cost-effective. Moreover, execution times for smart contract generation
Blockchain-Based Access Control 629
and verification tasks showed linear characteristics, which points both to the effi-
ciency and scalability of the approach. The hierarchy of roles necessary for the
beneficial role and proper management is not taken into account by the current
approach. Our future goal is to include a hierarchical model for roles and rights
management.
References
1. Azaria, A., Ekblaw, A., Vieira, T., Lippman, A.: MedRec: using blockchain for
medical data access and permission management. In: 2016 2nd International Con-
ference on Open and Big Data (OBD), pp. 25–30. IEEE (2016)
2. Cruz, J.P., Kaji, Y., Yanai, N.: RBAC-SC: role-based access control using smart
contract. IEEE Access 6, 12240–12251 (2018)
3. Guo, H., Meamari, E., Shen, C.C.: Multi-authority attribute-based access con-
trol with smart contract. In: Proceedings of the 2019 International Conference on
Blockchain Technology, pp. 6–11 (2019)
4. Hayes, B.: Cloud computing (2008)
5. Karatas, E.: Developing Ethereum blockchain-based document verification smart
contract for Moodle learning management system. Online Submission 11(4), 399–
406 (2018)
6. Labs, W.: Web3j. https://docs.web3j.io/
7. Lee, W.-M.: Testing smart contracts using ganache. In: Beginning Ethereum Smart
Contracts Programming, pp. 147–167. Apress, Berkeley, CA (2019). https://doi.
org/10.1007/978-1-4842-5086-0 7
8. Di Francesco Maesa, D., Mori, P., Ricci, L.: Blockchain based access control.
In: Chen, L.Y., Reiser, H.P. (eds.) DAIS 2017. LNCS, vol. 10320, pp. 206–220.
Springer, Cham (2017). https://doi.org/10.1007/978-3-319-59665-5 15
9. Mukhopadhyay, M.: Ethereum Smart Contract Development: Build Blockchain-
Based Decentralized Applications Using Solidity. Packt Publishing Ltd (2018)
10. Ouaddah, A., Abou Elkalam, A., Ait Ouahman, A.: FairAccess: a new blockchain-
based access control framework for the internet of things. Secur. Commun. Netw.
9(18), 5943–5964 (2016)
11. Rahman, M.S., Khalil, I., Bouras, A.: Formalizing dynamic behaviors of smart
contract workflow in smart healthcare supply chain. In: Park, N., Sun, K., Foresti,
S., Butler, K., Saxena, N. (eds.) SecureComm 2020. LNICST, vol. 336, pp. 391–402.
Springer, Cham (2020). https://doi.org/10.1007/978-3-030-63095-9 25
12. Rahman, M.S., Khalil, I., Bouras, A.: A framework for modelling blockchain based
supply chain management system to ensure soundness of smart contract workflow.
In: HICSS, pp. 1–10 (2021)
13. Tilkov, S., Vinoski, S.: Node. js: using javascript to build high-performance network
programs. IEEE Internet Comput. 14(6), 80–83 (2010)
14. Wang, S., Zhang, Y., Zhang, Y.: A blockchain-based framework for data sharing
with fine-grained access control in decentralized storage systems. IEEE Access 6,
38437–38450 (2018)
630 A. P. Kalapaaking et al.
15. Wimmer, C., Würthinger, T.: Truffle: a self-optimizing runtime system. In: Pro-
ceedings of the 3rd Annual Conference on Systems, Programming, and Applica-
tions: Software for Humanity, pp. 13–14 (2012)
16. Xia, Q., Sifah, E.B., Asamoah, K.O., Gao, J., Du, X., Guizani, M.: MedShare:
trust-less medical data sharing among cloud service providers via blockchain. IEEE
Access 5, 14757–14767 (2017)
17. Yue, X., Wang, H., Jin, D., Li, M., Jiang, W.: Healthcare data gateways: found
healthcare intelligence on blockchain with novel privacy risk control. J. Med. Syst.
40(10), 218 (2016)
18. Zyskind, G., Nathan, O., et al.: Decentralizing privacy: using blockchain to protect
personal data. In: 2015 IEEE Security and Privacy Workshops, pp. 180–184. IEEE
(2015)
Attacks
Driver Locations Harvesting Attack
on pRide
1 Introduction
and drivers’ encrypted locations and forwards the same to the rider along with
P R(g) where g is the driver’s grid id. Rider decrypts the distances1 and picks
the shortest distance D0 . It then performs two checks over the list of sorted dis-
tances. First, is Di − D0 < D0 − Ddiag ?, where Di is the distance for ith driver
and Ddiag is the length of the diagonal of the grid, and second, does the model
predict no new ride request emerging in the driver’s grid within a short time
period? When both these conditions are satisfied, the rider informs SP about
the selected index i after which the SP facilitates secure ride establishment with
the rider and selected driver.
In order to optimize their ride matching, the paper proposes enhanced pRide
built on top of the basic pRide protocol, but having a different method to pick
the optimum driver. They show that they get better results when a driver also
provides her encrypted distance to the farthest corner of her grid. This way the
rider can use that distance, instead of Ddiag in the aforementioned check to
select the optimum driver. However, the authors notice that if such a distance is
decrypted by an adversarial rider, she can launch an inference attack to obtain
driver’s locations. In order to thwart such an attack, the paper proposes a novel
method where the driver provides SP with her encrypted distances to the four
corners of her grid. SP then picks random integers to homomorphically blind
the distances before sharing the same with the rider. Rider then decrypts the
blinded distances and applies a private comparison algorithm which determines
the result of the inequality Di − D0 < D0 − Dmaxdist , where Dmaxdist is the
distance between the driver and the farthest corner of her grid g. Finally, using
this inequality and P R(g), it outputs the optimum selected driver.
As described earlier, in the enhanced pRide protocol, the SP homomorphi-
cally blinds the encrypted distances with random integers before sharing them
with the rider. In this paper, we show that such a blinding scheme is insecure,
whence an adversary rider can recover the underlying distances and then deduce
the locations of at least 80% of the drivers responding to a single ride request of
the rider when using the enhanced pRide protocol.
The pRide paper shows that their enhanced scheme is more effective with the
same level of security as that of the basic version with only a small compromise
in its efficiency. In addition, by way of experiments, they show their computation
cost is significantly better compared to a state-of-the-art protocol named ORide
[12]. We note here that the method in the basic pRide protocol where the SP
employs the homomorphic property of SHE to compute the Euclidean distance
between driver and rider to share the encrypted distances with rider is identical
to what is described in the ORide paper. The part that is different is that in the
ORide paper to pick the nearest driver, only drivers inside the rider’s grid are
1
Henceforth in the paper, we use the term distance to mean squared Euclidean dis-
tance.
636 S. Murthy and S. Vivek
chosen as candidate drivers, whereas in the pRide protocol, only drivers outside
the rider’s grid are candidate drivers so as to optimize in a global perspective.
In [5], Kumaraswamy et al. demonstrated a driver locations harvesting attack
by honest-but-curious riders on the ORide protocol, where they determine the
exact locations of 40% of drivers participating in the ORide protocol. In the same
paper, the authors also provide a mitigation solution wherein a driver gives her
perturbed location instead of her actual location. The aforementioned attack on
the ORide protocol and the mitigating solution are both applicable to the basic
pRide protocol.
In [10], Murthy et al. demonstrated a driver locations harvesting attack,
again by honest-but-curious adversary riders, using triangulation on the ORide
protocol, where they show that they can determine the exact locations of all
participating drivers in the ORide protocol. Further, they extend their method
onto the mitigation solution suggested by [5] and show that they can determine
locations of between 25% to 50% of the participating drivers.
As mentioned earlier, in the pRide protocol, the method where the rider
obtains encrypted driver distances is identical to that in the ORide protocol.
Due to this, any location harvesting attack on ORide, like in the cases of [5] and
[10], are also directly applicable to the basic pRide protocol.
results are summarized in Table 1. We show that we can obtain exact driver
locations of up to 80% of drivers who respond to a rider’s request.
Our attack invalidates Theorem 4, pp. 9, of the pRide paper [4], which states
that pRide is adaptively Laccess semantically secure against semi-honest adver-
saries, where Laccess gives the access pattern of the SP and rider, which is simply
the list of drivers that respond to a specific ride request. Hence, when our attack
is combined with that in [10], the driver location security of the pRide paper is
fully compromised, and so is the mitigation solution of [5] if applied to the basic
pRide protocol. We stress that the attack from [10] is not directly applicable to
the pRide protocol, but works only in combination with our attack.
The rest of the paper is organized as follows. Section 2 describes the pRide
protocol. Section 3 describes our attack. Section 4 gives details about our experi-
ments and results. Section 5 gives some of the recent works in privacy-preserving
RHS, followed by conclusions.
2. During system initialization, the SP divides its area of its operation into
rectangular grids of suitable sizes (size is based on sufficient ride density so
as to maintain rider anonymity) and publishes the same. For example, a city
like New York City together with its surrounding boroughs, where the SP
is allowed to provide rides as permitted by local authorities, can be termed
as the SP’s area of operation.
3. Drivers, available to offer rides, submit their real-time grid id to the SP to
enable it to maintain a driver distribution map.
4. Rider, wishing to hail a ride, generates a key pair (public key pk , private
key sk ) from the FV SHE scheme [1], encrypts her location using pk , and
submits a ride-request along with her location ciphertext, her current grid
id and pk to the SP. The FV SHE scheme works on integers, hence, the
coordinates of users are encoded as integers using UTM format2 .
5. SP keeps a record of ride requests in each grid and maintains a real-time ride
request distribution map in every time period. It makes use of Convolutional
long short-term memory (Convolutional LSTM [15]) to train a prediction
model with the ride request distribution information. Based on a temporal
sequence of grid information, SP obtains prediction result P R(g), a non-
negative integer which predicts the number of requests in the next time
period for grid id g.
6. As soon as SP receives the ride request, it performs a driver search with a
search radius (SR) in a preset order of grids starting with the grid nearest
to rider. The rider’s grid is not searched so as to avoid the nearest driver
who would always be found in the rider’s grid. When SR = 1, only grids
adjacent to the rider are searched. Using the driver distribution map, SP
creates a list of candidate drivers and forwards the ride-request to all such
drivers.
7. When the ith driver di receives the ride-request, she encrypts her location
using pk and forwards it to SP.
8. SP homomorphically computes the square of the Euclidean distance between
the rider and drivers’ locations. It then forwards these distances to rider
along with driver id i and P R(gi ), gi is i’s grid id.
9. Rider uses sk to decrypt the distances and sorts them to obtain the smallest
distance D0 . For each distance in the sorted list, she runs the following two
checks to pick the optimum driver:
(a) 2D0 − Di > Ddiag , where Di is the distance for ith driver and Ddiag is
the length of the diagonal of the grid.
(b) P R(gi ), where gi is the driver’s grid id, which checks if no new ride request
is emerging in a short time in grid gi .
10. As soon as both the aforementioned conditions are satisfied, rider determines
the optimum driver and informs the same to SP to continue with secure ride
establishment between rider and selected driver.
11. In order to improve the effectiveness of driver selection, the authors notice
that they can minimize the empty distance travelled by the driver by using
2
Universal Transverse Mercator: a map-projection system for geographical locations
[19].
Driver Locations Harvesting Attack on pRide 639
Dmaxdist instead of Ddiag in the ride selection check (Step 9), where Dmaxdist
is the distance between the driver and the farthest corner in her grid. How-
ever, the authors realize that an adversary rider, after decryption, can use
Dmaxdist to launch an inference attack to obtain driver’s precise location.
They, therefore, propose enhanced pRide to thwart such an attack.
12. In the enhanced pRide protocol, each driver, in addition to sending encryp-
tions of her coordinates, also sends the encryptions of distances to each
corner of her grid to the SP.
13. To pick the optimum driver, rider now needs to perform the check 2D0 −
Di > Dmaxdist , for each driver i, using a private comparison algorithm, as
explained below (Steps 15, 16 and 17).
14. As in the earlier basic pRide protocol, rider receives a list of distances to
each of the candidate drivers, decrypts them and selects the smallest D0 .
15. In order to find the optimum driver, for each Di , i > 0, rider sets D =
2D0 − Di , encrypts D as D and sends D
and i to SP.
16. SP receives encrypted distances to each of the four corners of the ith driver’s
grid as (D
ll , D
lu , Drl , Dru ). SP generates random positive blinding integers
e and r, and homomorphically blinds each of the ciphertexts as
= e · D
V + r
ll = e · D
V ll + r
V
lu = e · Dlu + r (1)
V
rl = e · Drl + r
V .
ru = e · Dru + r
In our attack described in Sect. 3, we show that we can determine the under-
lying distance values when given only their blinded values, where blinding is
done as described in Step 16. We then go on to use the distances to get the
precise coordinates of responding drivers.
3 Our Attack
In this section, we present our driver location harvesting attack on the enhanced
pRide protocol by a honest-but-curious adversary rider (R). R issues a single ride
request as per the pRide protocol. SP will not be able to distinguish between a
ride request issued by an adversary rider versus another by a legitimate rider.
In this section, for ease of exposition, we explain the recovery of location of one
particular driver Dp , who has responded to ride request by R, shown in Fig. 1.
Dp is located at distance δ from R. Our attack extends easily to all responding
drivers, since each response is handled independently by the SP.
We recall here the steps of pRide and enhanced pRide protocols from
Sect. 2.1. In Step 14, the rider R obtains the distances between herself and all
the responding drivers in the clear (distance between R and Dp is δ). In addi-
tion, from Step 16, R receives the ciphertexts (V , V
ll , V
lu , Vrl , Vru ), which after
decryption gives (V , Vll , Vlu , Vrl , Vru ). We know that D is the encryption of
2D0 − δ, and
+ r
V =e · D
ll + r
Vll = e · D
Vlu = e · D
lu + r (2)
Vrl = e · D
rl + r
Vru = e · D ,
ru + r
Fig. 1. Recovered driver locations shown as small dots each in grid g1 through g4 .
and rider, using which driver distances are computed homomorphically. In order
to pick the closest driver, the distances need to be sorted which will need a
high-depth circuit resulting in an inefficient implementation with SHE. Hence,
the rider, in the basic pRide protocol, receives all encrypted distances, decrypts
and sorts them to pick the closest driver efficiently. Using the distances to all
drivers, the rider is able to perform the attacks described in [5] and [10], on the
basic pRide protocol.
As described in Section of 2.1, the enhanced pRide protocol, SP homomor-
phically blinds the distances to the four corners of drivers’ grid, using random
positive integers (Eq. 1). However, as we show in Sect. 3.1, this blinding method
is insecure.
The mitigation solution of [5], where the locations are perturbed, can be
applied to the pRide protocol. While the attack of [10] is still applicable on the
basic pRide protocol, we look at our attack on its enhanced version, when the
mitigation solution is applied to the pRide protocol. In that case, in response to
a ride request, the driver would pick a uniform random location inside a circle
of radius τ around her original location. She then sends the encryption of that
random location to the SP, as well as the encrypted distances from the random
location to each of the corners of her grid. We note that τ should not be too large,
as that would have an adverse effect on driver selection by rider. Our attack,
where we retrieve the distances to grid corners, described in Sect. 3.1, would be
applicable without any change. However, one of the retrieved location(s), in this
case, would be the random location picked by the driver instead of her actual
location. The adversary could then apply the attack of [10] to uncover the actual
driver locations, with a high probability. Since the retrieved locations might not
be on a motorable road due to perturbation, the effectiveness of being able to
use Google Nearest Road API to retrieve driver locations need to studied.
644 S. Murthy and S. Vivek
Our experiments were run on grids of size about 4 km2 superimposed on maps
of 4 large cities around the world, namely, Los Angeles, London, New York City
and Paris. The size of the grid is comparable to what is reported in the pRide
paper. We have done experiments with the number of drivers as 5, 15 and 25
per grid, in each case distributed randomly throughout each grid but located
on motorable areas. We note here that the number of drivers does not have a
bearing on our attack since the SP encrypts and blinds each driver’s distances
independent of one other.
In each of the maps, we picked random driver locations situated on motorable
roads. Next, a rider location was picked from a random grid in the map. As
explained in Sect. 3.1, grids adjacent to the rider’s grid was examined and dis-
tances between drivers in those grids and the rider were made available to the
rider. Except for the predicted result (P R) values, this is same as what is avail-
able to the rider in the pRide protocol. The P R values do not have any bearing
on our attack since they do not have any effect on either blinding or encryption
of distances.
Next, from each of the adjacent grids and for each driver in such grid, the
distances from each such driver to her respective grid corners were computed, and
blinded using random integers picked from the range [1, 224 ], as the maximum
UTM (northing) value of 107 can be represented using 24 bits. In addition, a
distance value known to the adversary is also blinded using the same random
integers. These blinded distances were made available to the adversary rider.
Again, this exactly mimics the behaviour of the enhanced pRide protocol.
Finally, we run the attack described in Sect. 3 to retrieve the distances fol-
lowed by retrieving the driver locations.
Remark 1: It is claimed that the security of the pRide protocol relies on the hard-
ness of obtaining the blinding parameters when given only the blinded values.
We show in our attack that the adversary can recover the blinding parameters
with a high probability.
the order of grid traversal is known a priori, the new attack has to compute
equiprobable locations in each of the possible grids and continue with our driver
retrieval attack, as described in Sect. 3.2.
4.2 Results
The results of our experiments are tabulated in Table 1. The pRide paper uses
a 64 × 64 grid over the city of Chengdu, China, and mentions a maximum of
16000 drivers in their experiments, which translates to about 4 drivers per grid
on average. As it can be much larger in high density areas in the city, we run our
experiments with 5, 15 and 25 drivers per grid. It takes less than 1 s to recover
the locations of 25 drivers.
In order to retrieve the distances, we first recover the blinding integers e and
r as described in Sect. 3.1. As shown in Table 1, we can retrieve at least 80%
of the distances successfully, averaged from 10 runs of the experiments for each
driver count over each city. In the unsuccessful cases, we find that the value of
the blinding value e retrieved by our algorithm is a multiple of the actual value
of e, and we report this as a failure.
Next, we use the successfully retrieved distances to obtain the precise driver
locations. Here, we use our attack described in Sect. 3.2. We see that this part
correctly retrieves close to 99% of the driver locations. Hence, our overall driver
location harvesting algorithm retrieves at least 80% of the drivers participating
in the enhanced pRide protocol.
5 Related Works
There is a large body of work on privacy-preserving RHS which consider preserv-
ing privacy of drivers and riders. ORide [12] and PrivateRide [13], both proposed
by Pham et al., were some of the early works that aimed to preserve rider pri-
vacy against SP and drivers. While PrivateRide makes use of a cloaking region
to maintain privacy, ORide scheme is based on SHE to encrypt driver and rider
locations so as to make use of homomorphic properties of SHE to select nearest
driver. Kumaraswamy et al. [5] proposed an attack that aims to determine loca-
tions of drivers participating in the ORide protocol. In their attack, an adversary
rider can reveal locations of up to 40% of drivers who respond to a single ride
request. They provide a countermeasure to thwart the attack while preserving
sufficient anonymity. Murthy et al. [10] proposed an attack that uses triangula-
tion by four colluding adversaries to obtain locations of all drivers participating
in the ORide protocol.
Luo et al. [7] proposed a privacy-preserving ride-matching service also named
pRide. Their protocol involves using two non-colluding servers: SP and CP (a
third-party crypto server), and uses Road Network Embedding (RNE) [14] such
that the road network is transformed to a higher dimension space to enable
efficient distance computation between the network entities. However, the dis-
advantage of their scheme is the use of two non-colluding servers which incurs
inter-server communication costs. Yu et al. [22] proposed lpRide protocol which
also uses RNE but uses a modified version of Paillier encryption scheme [11]
to preserve privacy of participating entities. Vivek [17] demonstrated an attack
on the lpRide protocol where they show that any rider or driver can learn the
coordinates of other participating riders. TRACE [18] is a privacy-preserving
dynamic spatial query RHS scheme proposed by Wang et al., that uses a quadtree
structure and provides high-efficiency in terms of complexity and communica-
tion overhead. Kumaraswamy et al. [6] demonstrated an attack on the TRACE
protocol where the SP can identify the exact locations of riders and drivers. Xie
et al. [21] proposed a protocol that also uses RNE to efficiently compute shortest
distances. Their scheme makes use of property-preserving hash functions where
the SP can not only compute the rider to driver distances, but also pick the
nearest driver. This way they eliminate the need for an auxiliary crypto server.
All the works listed earlier picks the nearest driver to fulfil a ride request. pRide
[4], proposed by Huang et al., does not match the nearest driver but considers
a global matching strategy with the aim of reducing the empty distance trav-
elled by driver to pick the rider. Murthy et al. [10] gave an attack on the ORide
protocol, using triangulation, where they recover locations of all participating
drivers. In addition, by using more number of colluding adversaries, they show
they can recover locations of up to 50% of drivers participating in the variant of
ORide protocol that uses the mitigation solution of [5].
Driver Locations Harvesting Attack on pRide 647
6 Conclusions
In this paper, we presented an attack on enhanced pRide [4] protocol, a privacy-
preserving RHS. We show that an honest-but-curious adversary rider can deter-
mine the coordinates of about 80% of drivers responding to the rider’s ride
request as per the pRide protocol.
From Sect. 1.1, we see that locations of all drivers participating in the basic
pRide protocol can be recovered by one or more adversary riders. As per the
protocol, the rider chooses the optimum driver when given the plaintext distances
to all drivers, and this fact is exploited by the adversary. Alternatively, the SP
can select the optimum driver homomorphically. Since sorting and searching are
high-depth circuits, it is not efficient to perform these operations using SHE
schemes. However, FHE schemes can be explored to evaluate their suitability for
practical RHS solutions.
The enhanced pRide protocol needs to perform comparisons and in order to
preserve privacy, the values are blinded. However, since the order needs to be
preserved, the blinding values are the same for all the comparands, which leads
to the attack. Other secure order-preserving techniques need to be explored.
However, as shown in [9], careful analysis is needed which would otherwise lead
to further attacks.
In summary, we show that although protocols may seem secure in theory, a
thorough analysis should be done which otherwise would expose severe vulner-
abilities and security holes, as demonstrated by our attack in this paper.
References
1. Fan, J., Vercauteren, F.: Somewhat practical fully homomorphic encryption. Cryp-
tology ePrint Archive (2012). http://eprint.iacr.org/2012/144
2. Google: Google Maps Platform (2019). https://developers.google.com/maps/
documentation/roads/intro/. Accessed 01 Aug 2022
3. Google: Google Maps Platform, client libraries for google maps web services (2019).
https://developers.google.com/maps/web-services/client-library. Accessed 01 Aug
2022
4. Huang, J., Luo, Y., Fu, S., Xu, M., Hu, B.: pRide: privacy-preserving online ride
hailing matching system with prediction. IEEE Trans. Veh. Technol. 70(8), 7413–
7425 (2021). https://doi.org/10.1109/TVT.2021.3090042
5. Kumaraswamy, D., Murthy, S., Vivek, S.: Revisiting driver anonymity in ORide. In:
AlTawy, R., Hülsing, A. (eds.) SAC 2021. LNCS, vol. 13203, pp. 25–46. Springer,
Cham (2022). https://doi.org/10.1007/978-3-030-99277-4 2
6. Kumaraswamy, D., Vivek, S.: Cryptanalysis of the privacy-preserving ride-hailing
service TRACE. In: Adhikari, A., Küsters, R., Preneel, B. (eds.) INDOCRYPT
2021. LNCS, vol. 13143, pp. 462–484. Springer, Cham (2021). https://doi.org/10.
1007/978-3-030-92518-5 21
648 S. Murthy and S. Vivek
7. Luo, Y., Jia, X., Fu, S., Xu, M.: pRide: privacy-preserving ride matching over road
networks for online ride-hailing service. IEEE Trans. Inf. Forensics Secur. 14(7),
1791–1802 (2019)
8. Mordor Intelligence: Ride-Hailing Market - Growth, Trends, Covid-19 Impact, And
Forecasts (2022–2027) (2020). https://www.mordorintelligence.com/industry-
reports/ride-hailing-market. Accessed 23 July 2022
9. Murthy, S., Vivek, S.: Cryptanalysis of a protocol for efficient sorting on SHE
encrypted data. In: Albrecht, M. (ed.) IMACC 2019. LNCS, vol. 11929, pp. 278–
294. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-35199-1 14
10. Murthy, S., Vivek, S.: Passive triangulation attack on oRide (2022). https://doi.
org/10.48550/ARXIV.2208.12216. https://arxiv.org/abs/2208.12216
11. Nabeel, M., Appel, S., Bertino, E., Buchmann, A.: Privacy preserving context
aware publish subscribe systems. In: Lopez, J., Huang, X., Sandhu, R. (eds.) NSS
2013. LNCS, vol. 7873, pp. 465–478. Springer, Heidelberg (2013). https://doi.org/
10.1007/978-3-642-38631-2 34
12. Pham, A., Dacosta, I., Endignoux, G., Troncoso-Pastoriza, J.R., Huguenin, K.,
Hubaux, J.: ORide: a privacy-preserving yet accountable ride-hailing service. In:
Kirda, E., Ristenpart, T. (eds.) 26th USENIX Security Symposium, USENIX Secu-
rity 2017, Vancouver, BC, Canada, 16–18 August 2017, pp. 1235–1252. USENIX
Association (2017)
13. Pham, A., et al.: PrivateRide: a privacy-enhanced ride-hailing service. PoPETs
2017(2), 38–56 (2017). https://doi.org/10.1515/popets-2017-0015
14. Shahabi, C., Kolahdouzan, M.R., Sharifzadeh, M.: A road network embedding
technique for k-nearest neighbor search in moving object databases. In: Voisard,
A., Chen, S. (eds.) ACM-GIS 2002, Proceedings of the Tenth ACM International
Symposium on Advances in Geographic Information Systems, McLean, VA (near
Washington, DC), USA, USA, 8–9 November 2002, pp. 94–10. ACM (2002)
15. Shi, X., Chen, Z., Wang, H., Yeung, D.Y., Wong, W.K., Woo, W.C.: Convolutional
LSTM network: a machine learning approach for precipitation nowcasting. In: Pro-
ceedings of the 28th International Conference on Neural Information Processing
Systems - Volume 1, NIPS 2015, pp. 802–810. MIT Press, Cambridge (2015)
16. Stein, W., et al.: Sage Mathematics Software (Version 8.6). The Sage Development
Team (2019). http://www.sagemath.org
17. Vivek, S.: Attacks on a privacy-preserving publish-subscribe system and a ride-
hailing service. In: Paterson, M.B. (ed.) IMACC 2021. LNCS, vol. 13129, pp. 59–71.
Springer, Cham (2021). https://doi.org/10.1007/978-3-030-92641-0 4
18. Wang, F., et al.: Efficient and privacy-preserving dynamic spatial query scheme for
ride-hailing services. IEEE Trans. Veh. Technol. 67(11), 11084–11097 (2018)
19. Wikipedia contributors: Universal Transverse Mercator coordinate system
(2020). https://en.wikipedia.org/wiki/Universal Transverse Mercator coordinate
system. Accessed 01 Aug 2022
20. Wikipedia contributors: Coprime Integers (2022). https://en.wikipedia.org/wiki/
Coprime integers. Accessed 09 Aug 2022
21. Xie, H., Guo, Y., Jia, X.: A privacy-preserving online ride-hailing system without
involving a third trusted server. IEEE Trans. Inf. Forensics Secur. 16, 3068–3081
(2021)
22. Yu, H., Shu, J., Jia, X., Zhang, H., Yu, X.: lpRide: lightweight and privacy-
preserving ride matching over road networks in online ride hailing systems. IEEE
Trans. Veh. Technol. 68(11), 10418–10428 (2019)
Rebound Attacks on SKINNY Hashing
with Automatic Tools
1 Introduction
In this work, we focus on the security analysis of SKINNY [1] family of lightweight
block ciphers on Matyas-Meyer-Oseas (MMO) hashing mode [13]. Since intro-
duced in CRYPTO’16, SKINNY attracts great attention from the community. It
not only has competitive performance but also provides strong security guaran-
tees in both single key as well as related key settings. A great amount of work
ranging from standard cryptanalysis of the block cipher to constructing other
cryptographic structures such as hash functions and the Authenticated Encryp-
tion with Associated Data (AEAD) schemes based on the block cipher has been
published since it’s proposed.
Two block sizes, i.e., 64-bit and 128-bit are specified for the SKINNY family.
For each block size n, the tweakey size t is defined as n, 2n and 3n for different
variants which are denoted by SKINNY-n-t. For example, if n = 128, t = 384, we
have the variant SKINNY-128-384. As there are too many works published on
SKINNY, to explain our work in a neat and concise way only the related works
are briefly introduced.
Related Work. In ToSC’20, Delaune et al. [6] proposed a new approach which
combines the Mix-Integer Linear Programming (MILP) tool and the Constraint
Programming (CP) tool to search for boomerang distinguishers on SKINNY.
In this work, we extend their work to design advanced automatic models to
search truncated differential trails of the SKINNY variants. In ASIACRYPT’21,
Dong et al. [8] presented a MILP-based technique to mount quantum rebound
attacks on the SKINNY-128-384 MMO hashing. Later in CRYPTO’22, Dong et
al. [7] combine triangulation and rebound attack to further increase the attacked
rounds of SKINNY-128-384 MMO in both classical and quantum settings.
2 Preliminaries
SKINNY is a family of lightweight tweakable block ciphers that follow the classical
substitution-permutaion network (SPN) and the TWEAKEY framework [11].
There are 6 variants in the SKINNY family each of which is denoted by SKINNY-
n-t, where n (resp. t) denotes the block size (resp. tweakey size). Specifically, the
block size n ∈ {64, 128} and the tweakey size t = z · n with z ∈ {1, 2, 3}. The
number of rounds of SKINNY-64-64/128/192 and SKINNY-128-128/256/384 are
32/36/40 and 40/48/56 respectively. The internal states of both the 64-bit and
128-bit versions are represented with 4 × 4 array of cells with each cell being a
nibble in case of n = 64 and a byte in case of n = 128. The tweakey which can
contain both key and tweak material are essentially a group of z 4 × 4 arrays
Rebound Attacks on SKINNY Hashing with Automatic Tools 651
SKINNY-128-256-MMO
Target Attack Rounds Time C-Mem qRAM Setting Ref
Compression Free-start 15/48 255.8 – Classical Sect. 5.2
Function 17/48 249.5 – Quantum Sect. 5.1
any Any 264 – any [2, 10, 18]
any any 242.7 – 242.7 Quantum [3]
any any 251.2 225.6 – Quantum [4]
SKINNY-128-384-MMO
Compression Free-start 19/56 251.2 – Classical [7]
Function 21/56 246.2 – Quantum [7]
19/56 235 – Classical Sect. 4
where z ∈ {1, 2, 3}. For all the SKINNY variants, the cells of state and tweakey
are numbered row-wise. The round operations are described in the following and
illustrated with Fig. 1.
1. SubCells (SC) - The non-linear substitution layer that adopts 4-bit (resp.
8-bit) S-box for n = 64 (resp. n = 128) variants.
2. AddConstants (AC) - Xoring round constants to the first three cells of the first
column of the internal state.
3. AddRoundTweakey (ART) - Adding tweakey (denoted by tki ) to the internal
state. Namely, the first two rows of tki are xor’ed. The round tweakey is
computed with
– z = 1: tki = (T K1 )i
– z = 2: tki = (T K1 )i ⊕ (T K2 )i
– z = 3: tki = (T K1 )i ⊕ (T K2 )i ⊕ (T K3 )i
where (T K1 )i , (T K2 )i and (T K3 )i of the i-th round are generated with the
tweakey scheduling algorithm.
4. ShiftRows (SR) - Circular right shift on each row of the internal state. The
number of shifts in each row j is j for 0 ≤ j ≤ 3.
5. MixColumns (MC) - Multiplying each column of the internal state by a 4 × 4
binary matrix which is non-MDS, i.e.,
⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞
a 1011 a a 0100 a
⎜ b ⎟ ⎜1 0 0 0⎟ ⎜ b ⎟ ⎜ b ⎟ ⎜0 1 1 1⎟ ⎜ b ⎟
MC ⎜ ⎟ ⎜ ⎟ ⎜ ⎟ −1 ⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎝ c ⎠ = ⎝0 1 1 0⎠ × ⎝ c ⎠ and MC ⎝ c ⎠ = ⎝0 1 0 1⎠ × ⎝ c ⎠ . (1)
d 1010 d d 1001 d
652 S. Li et al.
tk
hi−1
SR MC
0 1 2 3
mi−1 EK ⊕ hi
4 5 6 7 SC AC >>>1
8 9 10 11 ATK >>>2
12 13 14 15 >>>3
h0 = IV
hi = f (mi−1 , hi−1 ) ⊕ mi−1 , where i ∈ {1, · · · , n}.
Here m denotes the message which is spilt into n message blocks mi , hi are the
intermediate variables or chaining values, and IV is the abbreviation for initial
value or initial vector.
Fbw Fin Ff w
In this section, the multiple inbound technique that concatenates several 1-round
inbound phases is proposed to extend the rounds covered in the inbound phase.
Essentially, those 1-round inbound phases are connected by free bytes of the
corresponding tweakeys. Therefore, it must be ensured that the value assign-
ments to the related tweakeys of different rounds are not over-defined through
the tweakey scheduling algorithm.
Rebound Attacks on SKINNY Hashing with Automatic Tools 655
ki ki+1
wi−1 yi zi wi yi+1 zi+1 wi+1 xi+2
SB,AK SR MC SB,AK SR MC SB
Fig. 4. The 3-round multiple inbound phases1 (The gray boxes represent the active
cells. The green and red boxes indicate the values are concerned.) (Color figure online)
In the multiple inbound phase, given the differential trail generated by the
MILP-CP based automatic tools, the goal is to find state and key pairs that
conform to the selected inbound phase. By taking advantage of the degrees of
freedom from the subkeys ki and ki+1 which can be efficiently calculated from
tweakeys, the inbound phase is implemented with low memory. In specific,
– valid values of involved bytes in round states wi−1 , xi , wi , xi+1 , wi+1 , xi+2 are
first computed according to the (differential distribution table) DDT of the
S-box where the input/output values satisfying input/output differences are
stored. Note that xi , i.e., the intermediate state after SB and before AK oper-
ations, is not reflected in Fig. 4 considering that it shares the same difference
pattern with wi−1 .
– valid values for pair of xj , wj can be further eliminated according to the inner
operations of round function such as SB, SR, and MC. For example, green cells
in Fig. 4 are traced in the following way,
• xi [9, 12] pass AK without change;
• yi [3, 6, 9, 12] pass to zi [3, 7, 11, 15];
• and wi [3, 7, 11, 15] = MC(zi [3, 7, 11, 15]).
Similar treatments apply to those red cells. As a consequence, wi [15] is related
with both wi−1 and xi+2 which can be utilized as an effective filter for pairs.
When all valid values in wj [12, 13, 14, 15](j ∈ {0, 1, . . . , r − 1}) are deter-
mined, we merge them to find a valid pair of state and subkeys. For instance, if
we randomly pick a value for wi−1 [12] and wi [15], the value of wi [3] can be easily
obtained as wi [3] = SB(wi−1 [12]) ⊕ wi [15] according to the MixColumn opera-
tion (1). By randomly picking another value for xi+2 [7], wi+1 [7] is computed
656 S. Li et al.
from wi+1 [7] = SB−1 (xi+2 [7]). Likewise, zi+1 [3] is equal to wi+1 [7] in accordance
with the MixColumn operation (1), and yi+1 [3] = zi+1 [3] due to the ShiftRow
operation. Hence, subkey value ki+1 [3] = SB(wi [3]) ⊕ yi+1 [3].
In a nutshell, with this multiple inbound technique, the pairs of states as
well as subkeys that follow the sophisticated inbound differential trail of longer
rounds are effortlessly generated.
38 b8 bb fa a1 9b 93
b8 6b af 12 4f
33 bb 2b 8c e7 35
b8 bb c1 37 e7 94
w7 w7
20 54 91 ff
14 38 05 b1
k8 k8
e0 3b 94 e0 3b 94 e0 3b 94 80 b0 94 de 1e 78 41 fe 4a e9 be fe 4a e9 be f8 45 5a a7
80 80 80 e0 3b 94 bc bb 3a 2d a8 83 3f 9c 9c a8 83 3f fe 4a e9 be
SB e0 3b
AK e0 3b
SR e0 3b
MC e0 3b 80
SB f8 93 af a0
AK fa 93 af a0
SR af a0 fa 93
MC 33 08 79 ac
80 b0 80 b0 80 b0 94 8a a9 af 49 8a a9 af 49 a9 af 49 8a 51 ea 13 2d
x8 y8 z8 w8 x8 y8 z8 w8
fe 29 cf 17 52
6a 8b 06 00
k9 k9
3 52 b9 3 52 47 3 52 47 d2 34 5c ab fb fb 4b f9 fb fb 4b f9 04 7a ab e6
46 54 3 46 54 3 3 46 54 3 52 47 df 9c b2 db b5 17 b4 db db b5 17 b4 fb fb 4b f9
SB 54 47 3
AK 54 47 3
SR 3 54 47
MC 46 47
SB 12 55 f1 00
AK 10 55 f1 00
SR f1 00 10 55
MC 2a b5 07 e1
6 6 6 6 4a 0e 81 f0 4a 0e 81 f0 0e 81 f0 4a 0a fb 5b ac
x9 y9 z9 w9 x9 y9 z9 w9
27 4c 79 5e
bb f2 0a a9
k10 k10
25 4b dc ba 17 6c 90 c3 49 6c 90 c3 49 f9 f4 19 f0
2c 9 29 2c 9 29 29 2c 9 fe fe 2c f2 45 0c 26 5b 5b 45 0c 26 6c 90 c3 49
SB 25 8
AK 25 8
SR 8 25
MC 29 24 2c
SB d8 e3 6b 18
AK da e3 6b 18
SR 6b 18 da e3
MC 30 5d d6 c5
8 8 8 8 25 5a fe 7c 00 5a fe 7c 00 fe 7c 00 5a 07 88 19 aa
x10 y10 z10 w10 x10 y10 z10 w10
00 1f e3 c0
91 44 fc 80 dc
k11 k11
85 85 85 a0 85 a1 f2 cf 25 e2 f2 d0 c6 22 f2 d0 c6 22 23 c2 69 3d
91 91 85 04 66 86 22 40 9a 06 fe fe 40 9a 06 f2 d0 c6 22
SB 80 85 85
AK 80 85 85
SR 85 80 85
MC 91 85 80 85
SB a5 74 47 37
AK a7 74 47 37
SR 47 37 a7 74
MC b9 77 3d 72
a0 21 a0 21 a0 21 85 80 6b 96 25 08 6b 96 25 08 96 25 08 6b b5 e7 61 56
x11 y11 z11 w11 x11 y11 z11 w11
69 4b 55 cb
b7 30 87 95
k12 k12
43 3 23 43 3 23 43 3 23 3 2 3 c1 3e b1 b0 a8 75 e4 7b a8 75 e4 7b 67 83 54 75
43 43 43 43 3 23 ee 61 87 e8 59 51 00 7d 7d 59 51 00 a8 75 e4 7b
SB 23 3 43 3
AK 23 3 43 3
SR 43 3 23 3
MC 3 23 3
SB f6 ed b0 ec
AK f4 ed b0 ec
SR b0 ec f4 ed
MC cd b5 a5 ed
3 2 3 2 3 2 3 e3 af 1a 44 e3 af 1a 44 af 1a 44 e3 18 99 10 96
x12 y12 z12 w12 x12 y12 z12 w12
20 c 20 0 1 2 3 eb 82 4d e4 0 1 2 3
b8 20 20 4 5 6 7 06 e4 1f fc 4 5 6 7
SB 20 20 b8 8 9 10 11
SB 27 e3 a3 b7 8 9 10 11
20 12 13 14 15 95 76 35 40 12 13 14 15
x13 x13
(a) (b)
Fig. 5. The 6-round multiple inbound phase of SKINNY-128-384: (a) The value of dif-
ferences are given; (b) The value of state and subkey of one of the pair are given. And
the values of ki are the XOR of subkeys and constants of AC operator.
658 S. Li et al.
1. Let’s first consider the states from z10 to x11 in Fig. 5(a). According to the def-
inition of SKINNY round function, we have z10 [9, 11, 13] = SR(x10 [11, 9, 14])
and all active bytes of w10 can be deduced by assessing DDT with fixed value
of differences specified in Fig. 5(a). In the second column of z10 and w10 , we
have conditions “w10 [5] ⊕ w10 [13] = z10 [9]” and “w10 [1] ⊕ w10 [13] = z10 [13]”
corresponding to Equation (1), both of which provide a filter of 2−8 . As
the differences of the inbound trail are dedicatedly determined in advance,
there are enough pairs to verify the filters derived from a given differences.
For example, if (w10 [5], w10 [13], z10 [9]) ∈ (DDT[00x ][00x ] × DDT[8x ][a0x ] ×
DDT[47x ][8x ]) are assigned for the condition “w10 [5] ⊕ w10 [13] = z10 [9]”,
where DDT[00x ][00x ] represents a full set containing {00x , 01x , .. . . . , ffx }, and
DDT[8x ][a0x ] is the subset of DDT with input-output differences (8x , a0x ), the
size of all combinations of pairs is therefore |DDT[00x ][00x ] × DDT[8x ][a0x ] ×
DDT[47x ][8x ]| = 256 · 24 · 23 > 28 .
2. When the value of w10 [13] is chosen in the last step, z11 [12] is determined
with the related round operations as well. In addition, with all active bytes of
w11 deduced through the DDT of round 12, state values of z11 [8, 9, 10, 11] are
computed with Eq. (1) accordingly. The condition w11 [0] ⊕ w11 [12] = z11 [12]
in the first column of z11 and w11 is deduced in the same way, which acts as
another filter of 2−8 .
3. Perform similar steps from z8 to w12 , we get a data and key pair as shown in
Fig. 5(b) conforming to the whole 6-round inbound trail.
The starting points collected in the multiple inbound phase are exhaustively
checked in the outbound phase to search at least one pair that fulfill the outbound
trail at the same time. In this work, a 19-round free-start collision attack on
the SKINNY-128-384 MMO hashing mode with complexity 235 is successfully
obtained. Note that it’s a practical free-start collision attack.
30 a0 10 b0 ac 1c 1c ac
4 ac ff 68 ac
4 4 4 8b 78 b9 39
4 4 4 4 ac a9 1c aa
w7 w7
d2 83 45 7d
f5 16 e2 c0
k8 k8
5 5 6 5 5 6 5 5 6 5 5 00 90 90 00 d2 13 d5 7d d2 13 d5 7d 92 36 f7 ac
1 1 1 5 5 6 00 ff 02 00 f5 e9 e0 c0 c0 f5 e9 e0 d2 13 d5 7d
SB 1 5 5
AK 1 5 5
SR 5 5 1
MC 5 5
SB 28 d1 f6 b5
AK 2a d1 f6 b5
SR f6 b5 2a d1
MC 36 40 c3 31
6 5 5 1 6 5 5 1 5 5 1 6 5 4 6 00 b6 90 08 00 b6 90 08 b6 90 08 00 24 a6 ff ac
x8 y8 z8 w8 x8 y8 z8 w8
11 f0 01 bf
93 f6 90 55 76
k9 k9
1 1 1 1 1 1 8 3 68 13 ef 00 79 e3 ee bf 79 e3 ee bf ef 00 ff 44
1 6 8 93 1 6 8 8 93 1 6 1 1 6e 81 67 f4 98 11 32 82 82 98 11 32 79 e3 ee bf
SB 1 6
AK 1 6
SR 1 6
MC 8 93
SB 13 32 86 1c
AK 11 32 86 1c
SR 86 1c 11 32
MC 04 84 00 00
5 1 8 5 1 8 1 8 5 1 6 c9 10 ff 00 c9 10 ff 00 10 ff 00 c9 ff ff ff 8d
x9 y9 z9 w9 x9 y9 z9 w9
10 b0 0 1 2 3 bf 65 ff 8d 0 1 2 3
b8 b0 4 5 6 7 f1 16 0f fb 4 5 6 7
SB 18 b0 8 9 10 11
SB 4b 8b 65 65 8 9 10 11
20 8 12 13 14 15 ff ff ff 20 12 13 14 15
x10 x10
(a) (b)
Fig. 6. The 3-round multiple inbound phase of SKINNY-128-256: (a) The value of dif-
ferences are given; (b) The value of state and subkey of one of the pair are given. And
the values of ki are the XOR of subkeys and constants of AC operator.
660 S. Li et al.
30 a0 10 b0 65 d0 35 96
b0 80 80 ac d1 16 16
80 10 30 0e 65 41 48
a0 80 b0 63 95 13 23
w6 w6
7c a0 11 a5
12 34 4c 67 72
k7 k7
c0 80 40 80 c0 80 40 80 c0 80 40 80 c0 a4 61 a0 40 d8 c1 b1 e5 d8 c1 b1 e5 30 d1 29 54
52 c0 c0 40 c0 c0 c0 40 c0 c0 80 40 80 00 48 80 80 34 04 e7 f2 f2 34 04 e7 d8 c1 b1 e5
SB c0 40 40
AK c0 40 40
SR 40 c0 40
MC c0 40 80 80
SB 5b a4 88 91
AK 59 a4 88 91
SR 88 91 59 a4
MC 7a a5 5d 43
c0 c0 80 c0 c0 80 c0 c0 80 c0 c0 80 c0 15 60 81 c1 15 60 81 c1 60 81 c1 15 50 50 e8 41
x7 y7 z7 w7 x7 y7 z7 w7
26 3a 70 1b
b4 76 6d d3
k8 k8
4 4 4 7 4 a5 48 f5 4d 83 72 85 56 83 72 85 56 95 f6 d3 97
c4 2 4 3 c4 2 4 3 3 c4 2 4 4 51 8a ce a7 e5 fc a3 74 74 e5 fc a3 83 72 85 56
SB 6 4 3 3
AK 6 4 3 3
SR 3 3 6 4
MC c7 4
SB dc a3 74 85
AK de a3 74 85
SR 74 85 de a3
MC 00 60 22 00
4 4 3 6 4 4 3 6 4 3 6 4 3 3 6 62 62 01 88 62 62 01 88 62 01 88 62 f7 f7 5b f5
x8 y8 z8 w8 x8 y8 z8 w8
8 28 0 1 2 3 60 c7 46 69 0 1 2 3
28 4 5 6 7 82 ec 30 44 4 5 6 7
SB a 28 8 9 10 11
SB 65 a1 e8 65 8 9 10 11
20 20 8 12 13 14 15 ef ef 7c e7 12 13 14 15
x9 x9
(a) (b)
Fig. 7. The 3-round multiple inbound phase of SKINNY-128-256: (a) The value of dif-
ferences are given; (b) The value of state and subkey of one of the pair are given. And
the values of ki are the XOR of subkeys and constants of AC operator.
The differential trail of the first classical free-start collision attack on 15-round
SKINNY-128-256 MMO hashing mode is given in Fig. 10 in Appendix A. The
multiple inbound phase includes 3 rounds starting from round 7 to round 9.
The way to find starting points in the inbound phase is exactly the same as the
17-round attack in Sect. 5.1.
An example of the precomputed starting point shown in Fig. 7 also satisfies
the differential of the last two rows of w5 to x6 . Since the outbound phase that
excludes the S-boxes in the last two rows of x6 happens with probability 2−55.8 ,
the final time complexity of the 15-round free-start collision attack is 255.8 in
classical setting.
Rebound Attacks on SKINNY Hashing with Automatic Tools 661
6 Conclusions
In this paper, we investigate the security of the SKINNY MMO hashings in
quantum and classical settings with respect to collision attacks. Typically, the
rebound method is used to achieve the collision attacks on SKINNY-128-256 and
SKINNY-128-384 MMO hashings. We develop the MILP-CP based automatic
tools to search truncated differential trails of longer rounds for the SKINNY
variants. The multiple inbound phase technique is also proposed to cover more
rounds. Totally, we present a practical 19-round free-start collision attack on
SKINNY-128-384 MMO in classical setting, a 17-round (resp. 15-round) free-start
collision attack on SKINNY-128-256 MMO in quantum (resp. classical) setting.
As far as we know, all those attacks are the currently best results of collision
attacks on those SKINNY hashings. These results serve as an indication that,
to achieve long-term security to the post-quantum era, current symmetric-key
crypto-systems require careful security re-evaluation or even re-design before
being adopted by post-quantum cryptography schemes.
6a
TK2 d5 ab
b5 6a
d5
bf
TK1 bf bf
bf bf
bf
-1 -1
a1 a1
SB SR MC SB SR MC SB SR MC SB SR MC SB SR MC SB SR MC
S. Li et al.
ac
56 58
ac
ab 56
bf
bf bf
bf
bf bf
2b b8 b8 b8 38 b8 bb e0 3b 94 e0 3b 94 e0 3b 94 80 b0 94 3 52 b9 3 52 47 3 52 47 25 85 85 85
33 33 b8 80 80 80 e0 3b 94 46 54 3 46 54 3 3 46 54 3 52 47 2c 9 29 2c 9 29 29 2c 9 91 91
a1
SB 2b 2b
SR 2b
MC 2b
SB bb bb
SR bb
MC 33 bb
SB e0 3b e0 3b
SR e0 3b
MC e0 3b 80
SB 54 47 3 54 47 3
SR 3 54 47
MC 46 47
SB 25 8 25 8
SR 8 25
MC 29 24 2c
SB 80 85 85 80 85 85
SR 85 80 85
MC
2b 38 38 38 b8 bb 80 b0 80 b0 80 b0 94 6 6 6 6 8 8 8 8 25 a0 21 a0 21 a0 21
bb dd
76
b0 60 c1
b0 60
58
bf bf bf
bf bf
bf
a0 85 a1 43 3 23 43 3 23 43 3 23 3 2 3 20 c 20 20 b8 20 20 b8 20 20 80 80 80 80 2 8 10
85 43 43 43 43 3 23 b8 20 20 b8 20 20 b8 20 20 20 b8 20 80 80 80 80 80 80 80 80 80 80 2 2 2
91 85 80 85
SB 23 3 43 3 23 3 43 3
SR 43 3 23 3
MC 3 23 3
SB 20 20 b8 20 20 b8
SR 20 b8 20
MC 20 20
SB 80 80 80 80
SR 80 80
MC 80
SB 2 2
SR 2
MC SB SR MC SB SR MC
85 80 3 2 3 2 3 2 3 20 20 20 80 2 2 2 2 8 8 8
6e
0 1 2 3
c1 4 5 6 7
8 9 10 11
bf
12 13 14 15
SB SR MC
active constant
round 18 round 19
86 d
TK2 43
21 86
43
a7 a7
TK1 a7
a7 a7
a7
55 1 21 1 21 1 1 1 20 20 20 20 20 20 8 20 20 aa 80 80 80 80 80 80
e4 e4 21 1 20 20 20 20 20 20 20 20 80 80 80 80 80 80
SB SR MC SB SR MC e4
SB 55 55
SR 55
MC 55
SB 1 1
SR 1
MC 1
SB 20 20
SR 20
MC 20
SB 80 80
SR 80
MC
55 21 21 21 1 21 1 20 28 20 20 28 20 28 20 20 20 80 80 80
1a
34 69
d 1a
34
a7
a7 a7
a7 a7
a7
c0 3 4 bd 4 4 4 4 4 5 5 6 5 5 6 5 5 6 5 5 1 1 1 1 1 1 8 3 10 b0 10 b0 10 b0 20 90 90 90
80 80 c0 c0 c0 c0 c0 c0 4 1 1 1 5 5 6 1 6 8 93 1 6 8 8 93 1 6 1 1 b8 b0 b8 b0 b8 b0 10 b0 50 90 9e 90 90 9e
80
SB c0 c0
SR c0
MC c0 c0 c0
SB 4 4 4 4 4 4
SR 4 4 4
MC 4 4 4
SB 1 5 5 1 5 5
SR 5 5 1
MC 5 5
SB 1 6 1 6
SR 1 6
MC 8 93
SB 18 b0 18 b0
SR 18 b0
MC a0
SB 90 90
SR 90
MC
80 3 3 3 c0 4 4 4 4 4 4 4 6 5 5 1 6 5 5 1 5 5 1 6 5 4 6 5 1 8 5 1 8 1 8 5 1 6 20 8 20 8 20 8 8 10 10 10
0 1 2 3
a7
d3
a7 4 5 6 7
69 d3
a7 8 9 10 11
a7
a7
a7 a7 12 13 14 15
-1
10 c3 c3 c3
90 c3 c3 c3 c3 74
9e
SB c3 c3
SR c3
MC SB SR MC SB SR MC SB SR MC SB SR MC
active constant
round 12 round 13 round 14 round 15 round 16 round 17
TK3
2
TK2 4 8
1 2
4
2
TK1 2 2
S. Li et al.
2 2
2
-1
21 20 20 20
6 6 a a
SB SR MC SB SR MC SB SR MC SB SR MC 6
SB 21 21
SR 21
MC 21
SB 28 28
SR 28
MC
21 20 20 20
20
10 41
20
8 10
2
2 2
2
2 2
28 20 20 b0 80 80 b0 80 80 b0 80 80 30 a0 10 b0 c0 80 40 80 c0 80 40 80 c0 80 40 80 c0 4 4 4 7 4 8 28 8 a 8 a 8 20 10 90 10 90 10 90
20 80 80 80 b0 80 80 52 c0 c0 40 c0 c0 c0 40 c0 c0 80 40 80 c4 2 4 3 c4 2 4 3 3 c4 2 4 4 28 28 28 8 a 10 10 10 10 10 10 10 90 c3 43 c3 c3
28 a SB 30 10 30 10
SR 10 30
MC 80 10 30
SB c0 40 40 c0 40 40
SR 40 c0 40
MC c0 40 80 80
SB 6 4 3 3 6 4 3 3
SR 3 3 6 4
MC c7 4
SB a 28 a 28 SR 28 a MC a SB 10 10
SR 10
MC 10
SB c3 c3
SR c3
MC
28 20 30 90 30 90 30 90 a0 80 b0 c0 c0 80 c0 c0 80 c0 c0 80 c0 c0 80 c0 4 4 3 6 4 4 3 6 4 3 6 4 3 3 6 20 20 8 20 20 8 20 8 20 20 90 90 90 90 c3 c3 c3
0 1 2 3
82
82 4 5 6 7
41
2 8 9 10 11
2
2 12 13 14 15
b0 80
SB SR MC SB SR MC SB SR MC
c3 b0 b0 b0
active constant
round 12 round 13 round 14 round 15
References
1. Beierle, C., et al.: The SKINNY family of block ciphers and its low-latency variant
MANTIS. In: Robshaw, M., Katz, J. (eds.) CRYPTO 2016. LNCS, vol. 9815, pp.
123–153. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53008-
55
2. Bernstein, D.J.: Cost analysis of hash collisions: will quantum computers make
SHARCS obsolete. SHARCS 9, 105 (2009)
3. Brassard, G., HØyer, P., Tapp, A.: Quantum cryptanalysis of hash and claw-free
functions. In: Lucchesi, C.L., Moura, A.V. (eds.) LATIN 1998. LNCS, vol. 1380,
pp. 163–169. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0054319
4. Chailloux, A., Naya-Plasencia, M., Schrottenloher, A.: An efficient quantum col-
lision search algorithm and implications on symmetric cryptography. In: Takagi,
T., Peyrin, T. (eds.) ASIACRYPT 2017. LNCS, vol. 10625, pp. 211–240. Springer,
Cham (2017). https://doi.org/10.1007/978-3-319-70697-9 8
5. Damgård, I.B.: A design principle for hash functions. In: Brassard, G. (ed.)
CRYPTO 1989. LNCS, vol. 435, pp. 416–427. Springer, New York (1990). https://
doi.org/10.1007/0-387-34805-0 39
6. Delaune, S., Derbez, P., Vavrille, M.: Catching the fastest boomerangs application
to SKINNY. IACR Trans. Symmetric Cryptol. 2020(4), 104–129 (2020). https://
doi.org/10.46586/tosc.v2020.i4.104-129
7. Dong, X., Guo, J., Li, S., Pham, P.: Triangulating rebound attack on AES-like
hashing. Cryptology ePrint Archive (2022)
8. Dong, X., Zhang, Z., Sun, S., Wei, C., Wang, X., Hu, L.: Automatic classical and
quantum rebound attacks on AES-like hashing by exploiting related-key differen-
tials. In: Tibouchi, M., Wang, H. (eds.) ASIACRYPT 2021. LNCS, vol. 13090, pp.
241–271. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-92062-3 9
9. Grover, L.K.: A fast quantum mechanical algorithm for database search. In: Pro-
ceedings of the Twenty-Eighth Annual ACM Symposium on Theory of Computing,
pp. 212–219 (1996)
10. Hosoyamada, A., Sasaki, Yu.: Finding hash collisions with quantum computers by
using differential trails with smaller probability than birthday bound. In: Canteaut,
A., Ishai, Y. (eds.) EUROCRYPT 2020. LNCS, vol. 12106, pp. 249–279. Springer,
Cham (2020). https://doi.org/10.1007/978-3-030-45724-2 9
11. Jean, J., Nikolić, I., Peyrin, T.: Tweaks and keys for block ciphers: the TWEAKEY
framework. In: Sarkar, P., Iwata, T. (eds.) ASIACRYPT 2014. LNCS, vol. 8874, pp.
274–288. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-45608-
8 15
12. Lamberger, M., Mendel, F., Rechberger, C., Rijmen, V., Schläffer, M.: Rebound dis-
tinguishers: results on the full whirlpool compression function. In: Matsui, M. (ed.)
ASIACRYPT 2009. LNCS, vol. 5912, pp. 126–143. Springer, Heidelberg (2009).
https://doi.org/10.1007/978-3-642-10366-7 8
13. Matyas, S.M.: Generating strong one-way functions with cryptographic algorithm.
IBM Tech. Discl. Bull. 27, 5658–5659 (1985)
14. Mendel, F., Rechberger, C., Schläffer, M., Thomsen, S.S.: The rebound attack:
cryptanalysis of reduced whirlpool and. In: Dunkelman, O. (ed.) FSE 2009. LNCS,
vol. 5665, pp. 260–276. Springer, Heidelberg (2009). https://doi.org/10.1007/978-
3-642-03317-9 16
15. Menezes, A.J., van Oorschot, P.C., Vanstone, S.A.: Handbook of Applied Cryp-
tography. Instructor 202101 (2021)
666 S. Li et al.
16. Merkle, R.C.: One way hash functions and DES. In: Brassard, G. (ed.) CRYPTO
1989. LNCS, vol. 435, pp. 428–446. Springer, New York (1990). https://doi.org/
10.1007/0-387-34805-0 40
17. Sasaki, Yu., Wang, L., Wu, S., Wu, W.: Investigating fundamental security require-
ments on whirlpool: improved preimage and collision attacks. In: Wang, X., Sako,
K. (eds.) ASIACRYPT 2012. LNCS, vol. 7658, pp. 562–579. Springer, Heidelberg
(2012). https://doi.org/10.1007/978-3-642-34961-4 34
18. van Oorschot, P.C., Wiener, M.J.: Parallel collision search with cryptanalytic appli-
cations. J. Cryptol. 12(1), 1–28 (1999)
19. Zalka, C.: Grover’s quantum searching algorithm is optimal. Phys. Rev. A 60(4),
2746 (1999)
20. Zhandry, M.: A note on the quantum collision and set equality problems. arXiv
preprint arXiv:1312.1027 (2013)
A Combination Reduction Algorithm
and Its Application
1 Introduction
Subversion attack (SA) refers to an attack method in which an attacker tam-
pers with the internal operation process of some cryptosystems, and embeds a
backdoor to steal user’s information or private keys. It is difficult for users to
detect whether the internal algorithm of the cryptosystem has been tampered
with. Therefore, SA exists inside machines with strong invisibility. Besides, SA
can be applied to many fields, such as public key encryption, digital signature,
and will pose a serious threat to the security of the existing cryptosystems.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 667–683, 2022.
https://doi.org/10.1007/978-3-031-23020-2_38
668 W. Yang et al.
The research on the subversive attack technology can be traced back to the
concept of subliminal channels proposed by Simmons [1] in 1984. The sublim-
inal channel technology is the prototype of SA, and can transmit messages for
designated receivers and senders. In addition, they took “criminal problems” as
an example, and constructed the subliminal channel technology by using digital
signatures. In 1996, Young and Yung [2] studied the SETUP (secretly embed-
ded trapdoor under protection) attack, and given generalized and standard-
ized definition. This attack could embed backdoors into black-box cryptosys-
tems. In 2013, Snowden et al. [3] exposed the United States Project Prism, and
showed that U.S. government agencies spy on users by embedding backdoors
in widely used cryptosystems. Backdoors could make systems far less reliable
as thought. The Snowden incident has aroused scholars’ interest in SA. Subse-
quently, researching the subversive attack technology in the existing cryptosys-
tems has become a hot topic.
In a cryptosystem, by combining the concept of black-box cryptography and
the SETUP attack, Bellare, Paterson and Rogaway [4] proposed an algorithm
substitution attack (ASA) that can replace the encryption algorithm. The secu-
rity of this attack is non-adaptive and non-continuous. In 2015, Mironov and
Stephens-Davidowitz [5] proposed “Cryptographic Reverse Firewall” (CRF) via
imitating the real firewall in the traditional network security system. CRF pre-
vents message leakage by modifying the messages sent and received in protocols.
Thus, CRF effectively resists the attack behavior existing inside machines. In
the same year, Atensive, Magri and Venturi [6] proposed a symmetric subver-
sion attack model over digital signature schemes. Particularly, when an attacker
attacks with an adaptive and continuous manner, the signature scheme should
remain unforgeable. But the attack only satisfies weak undetectability. In 2017,
Liu et al. [7] proposed a more general asymmetric subversion attack model with
strong undetectability and signature key recoverability.
With the rapid development of quantum technology, public-key cryptosys-
tems rely on difficult problems in traditional number theory, will be insecure
any more. Therefore, public-key cryptosystems that can resist quantum attacks
have received lots of attentions. Lattice-based cryptography can resist quantum
attacks, and is the most promising candidate among post-quantum cryptography
algorithms because of its simple operations and strong security guarantee. There
are many public-key encryption schemes in lattices. In 1998, Silverman, Hoff-
stein and Pipher [8] designed a public-key encryption scheme in NTRU lattices.
In 2005, the LWE encryption scheme was introduced by Regev [9] for encrypt-
ing the single-bit message, and its security relies on the LWE problem. In 2008,
Peikert, Vaikuntanathan and Waters [10] given a multi-bit version of the LWE-
based encryption scheme in [9]. They have the same public key size. However,
the amortized running time of each message bit is only Õ(n), and the cipher-
text extension length is small. In 2010, Lyubashevsky, Peikert and Regev [11]
proposed a public-key cryptosystem from ring-LWE, which reduced the size of
public keys using ring structures and improved the efficiency.
A Combination Reduction Algorithm and Its Application 669
According to the idea of Young and Yung [12,13] about backdoors for RSA
and discrete logarithms, in 2017, Kwant et al. [14] used the ECC backdoor to
attack NTRU encryption scheme. In this attack, attackers can recover the under-
lying message efficiently from some ciphertext. In 2018, Xiao and Yu [15] showed
how to subvert the ring-LWE encryption scheme, which embed ring-LWE back-
doors by encoding techniques. As the security of the attack also depends on
the ring-LWE problem, the whole scheme is post-quantum secure. In 2019, by
embedding the NTRU ciphertext in the encryption scheme [9], Yang et al. [16]
successfully constructed a backdoor for the LWE-based encryption scheme
designed by Regev. Moreover, the attacker recovered the underlying message,
only using the private key of NTRU. And the core problem of this construction
is to solve the Inhomogeneous Small Integer Solution problem (ISIS).
In this paper, we similarly construct a subversion attack on the multi-bit
version of the LWE scheme proposed by Vaikuntanathan and Waters [10]. To
embed the underlying message into the ciphertext, the key problem of the con-
struction can still be transformed into solving the ISIS problem. Therefore, the
success rate of solving the ISIS problem will directly affect the attack effect of
the SA. Then, we combine basic reduction algorithms, and form a new reduction
algorithm, to improve the success rate of solving this problem. This algorithm
calls combination reduction algorithm to reduce the lattice, and obtains a better
lattice reduction basis. Furthermore, we improve the success rate of solving the
ISIS problem, that is, the attack effect of subversion attack.
(n−1) (n−1)
√ 1+ 2(β−1) 2(β−1)
BKZ poly(n) · TSVP (β) αβ αβ
n−1 n−1
Segment-LLL n3 (log n)A (4/3 + ε) 4 (4/3 + ε) 2
Notes: n: lattice dimension; A: computing the number of bit operations required for
O(n2 ) bit integer arithmetic; TSVP (β): the running time of calling the enumeration
algorithm on the β dimension lattice base; αβ := b1 /b̃β .
2 Preliminaries
2.1 Lattice and Discrete Gaussian Distribution
n
Given n linearly independent vectors b1 , . . . , bn ∈ Rm , Λ(B) = { xi bi , xi ∈ Z}
i=1
is called a lattice generated by b1 , . . . , bn , where B = (b1 , . . . , bn ) is a basis.
−πx2
For any x ∈ Rn and α ∈ R+ , ρα (x) := exp( ) is called an n-
α2
dimensional Gaussian function. In particular, for any n-dimensional lattice Λ,
ρα (x)
DΛ,α (x) := ,x ∈ Λ
ρα (Λ)
is named the discrete Gaussian distribution over Λ.
Remark 1. (Security) In 2011, Stehlé and Steinfeld [28] given a reduction from
the worst case problem on an ideal lattice to a certain NTRU problem. Precisely,
on the circular polynomial ring R = Z[x]/(xN + 1), N = 2r , r ∈ Z+ , the NTRU
cryptosystem is IND-CPA secure, if the γ-Ideal-SVP problem over ideal lattice
is hard. Recently, Yu et al. [29] generalized the provable security of the prime
number N . In our work, the parameters of NTRU scheme is based on [29].
Moreover, we assume NTRU scheme satisfies IND$-CPA security [16]. IND$-
CPA security is a little different from the IND-CPA security. In the game used
to define IND$-CPA security, when the adversary chooses plaintext to challenge
the encryption oracle, if b = 1, oracle returns ciphertext, and if b = 0, the oracle
returns a random vector in ZN q .
Definition 1 (LWE Distribution, [9]). For a secret vector s ∈ Znq , the LWE
distribution As,χ over Znq ×Zq as the one obtain by: sampling a ← U (Znq ), x ← χ
(χ is a discrete Gaussian distribution), and returning (a, b = s, a + x mod q).
Lemma
√ √2 (Correctness, [16]). For a given prime q ≥ 4pm, real α ≤ 1/(p ·
m · ω( lg n)), the algorithm LWEDec decrypts correctly with overwhelming
probability, over the matrix X is randomly selected from the error distribution
χ.
√
Lemma
√ 3 (Security, [16]). For a given prime q ≥ 4pm, real α ≤ 1/(p · m ·
ω( lg n)), and m ≥ 3(n + ) lg q, the LWE cryptosystem is IND-CPA secure,
assuming that Decision-LWE is hard.
Game DETECTD
Π,Π
Enc(pk, spk, m, m )
n)
(ssk, spk) ←$ KGen(1 b ←$ {0, 1}
n
(sk, pk) ←$ KGen(1 ) if (b=1) then
Choose m, m randomly c ←$ Enc(m, pk)
Send (pk, spk, m, m ) to Enc else
b ←$ D(spk, pk, sk, c)
c ←$ Enc(m, m , spk, pk)
return b return c to D
Game AMRA
Π,Π
Enc(m , pk, spk)
n)
(ssk, spk) ←$ KGen(1 m ←$ M
(sk, pk) ←$ KGen(1 ) n
c ←$ Enc(m, m , spk, pk)
m ←$ AEnc (spk, ssk, pk) return c
return m = m
2
3. D(l) ≤ (α/δ)k D(l + 1), l = 1, ..., m,
2
4. δ k b∗kl 2 ≤ αb∗kl+1 2 , l = 1, ..., m.
The ISIS problem [30] is described as: given parameters (n, m, q, ε), random
matrix A ∈ Zn×m q and a fixed vector y ∈ Zn , find a non-zero vector e ∈ Zm
such that Ae = y mod q and e ≤ ε. When ε = poly(n) and q ≥ ε · w(n log n),
there exists a reduction from certain ISIS problem to a worst-case lattice SIVPγ
√
problem with γ = ε · Õ( n).
The basic idea of solving the ISIS problem is to transform ISIS into hard
problem in a specific lattice. Then, by using LLL, BKZ, Segment-LLL and other
lattice basis reduction algorithms on this lattice to solve hard problems, we
obtain the solution of ISIS. For a given ISIS problem, consider the (m + n + 1)-
dimensional full-rank lattice basis C:
⎛ ⎞
Im×m 0m×1 ATn×m
⎝ 01×m 1 yn×1 T ⎠ ∈ Z(m+n+1)×(m+n+1) ,
0n×m 0n×1 qIn×n
– An attacker runs KGenntru (1λ ) algorithm and generates the subversion keys
as
(h, (f, g)) ←$ KGenntru (1λ ).
• Enc(pk, spk, m, m ): Assume m ∈ R2 . The subversion encryption algorithm
contains three sub-algorithms Encntru , LatticeSolve and LWEEnc .
– Encntru (m , spk): Given the underlying message m ∈ R2 and NTRU public
key h, outputs the temper ciphertext c by
Let N = lt, then c can be rewrote as c = (c1 , . . . , ct ), where ci ∈ Zlq .
– LatticeSolve(Al×m , ci ): Input matrix Al×m and vector ci , the output vector
ei satisfies
Al×m ei ≡ ci (mod q),
where q is the modulo parameter of NTRU and ei ∈ Zm .
– LWEEnc (mi , pk, ei ): Input message mi ∈ Zp , public key Ā and ei , calculate
m = Decntru (c , f ).
The core of the subversion attack is the ISIS problem: eT ATl×m = cTl×1 mod q.
In general, the selected l will lead a higher rank of the corresponding lattice
basis C, and get the solution of the ISIS problem directly through the lattice
reduction algorithm is difficult. In 1993, Cohen [33] used the intersection lattice
method to reduce the dimension of the embedded lattice basis.
The details are as follows: Consider the full-rank lattice Mi (1 ≤ i ≤ l) of
dimension (m + 2):
⎛ ⎞
Im×m 0m×1 aTi
⎝ 01×m 1 ei ⎠ ∈ Z(m+2)×(m+2) , (1)
01×m 0 q
678 W. Yang et al.
If the intersection L contains the short vector ±v = (e, −1, 0)T , then e can
be obtained through lattice reduction algorithm by Algorithm 2.
Algorithm 4. LatticeSolve
Input: A basis AT ∈ Zm×n q , integer k with k|n, the blocksize β and the upper limit
of the number of loops num.
Output: Vector ±v
1: For 1 ≤ i ≤ n, construct matrix Mi from Eq (1)
2: Set Li = L(Mi )
3: Calculate basis B of intersection lattice L by Eq (2)
4: for c = 1; c ≤ num; c + + do
5: Segment-LLL(B, k)
6: BKZ(B, β)
7: if ±v belong to the reduced matrix B, then
8: return v
9: break
10: end if
11: end for
12: return ⊥
Since Ae ≡ c (mod q), the ciphertext pair can be expressed as:
Theorem 1. Let Π denotes the public key encryption scheme, and the subver-
Enc,
sion attack scheme is Π = (KGen, Recv). If D is a PQSU adversary on
Π that can query the oracle of Enc at most k times, then
(D) ≤ .
AdvΠ,Π
5 Experiment Analysis
Fig. 1. The success rate of combinato- Fig. 2. The success rate of BKZ algo-
rial reduction algorithm. rithm.
680 W. Yang et al.
Fig. 3. The running time of the combi- Fig. 4. The running time of the BKZ
natorial reduction algorithm. algorithm.
In Figs. 1 and 2, we can see that the success rate of the combined reduction
algorithm in solving the ISIS problem is higher than that of using only the BKZ
algorithm. Moreover, in Figs. 3 and 4, we can see that our scheme takes a long
time to run the combined reduction algorithm. But when l ≥ 12, both reduction
algorithms are difficult to obtain the solution of the ISIS problem.
Table 4. The success rate of BKZ Table 5. The success rate of combina-
reduction algorithm. torial reduction algorithm.
6 Conclusion
In this paper, we construct a subversive attack on the multi-bit version of the
LWE public key encryption scheme. Moreover, our experiments show that the
combined reduction algorithm can increase the success rate of solving the ISIS
problem, and improve the effect of the subversion attack.
A Appendix
Proof. In game Gi , Si denotes b = b , A is an adversary, the game is described
in Table 6.
Game G1 and G2 differ only in the encryption stage: In game G1 , the vector
c1 ←$ Encntru (m , spk), while in game G2 , c1 ←$ ZN q . 1 = |Pr[S2 ] − Pr[S1 ]| is
negligible, since the IND$ − CPA security of NTRU encryption scheme.
Game G2 and G3 differ only in the LatticeSolve stage: In game G2 , the
vector e1 ←$ LatticeSolve(A, c1 ), while in Game G3 , e1 ←$ Zm . In game
G2 , c1 is sampled from ZN q randomly, and Ae1 ≡ c1 (mod q ). When matrix
A is fixed, it is hard to distinguish between e1 ←$ LatticeSolve(A, c1 ) and
e1 ←$ Zm . Thus 2 = |Pr[S3 ] − Pr[S2 ]| is negligible.
In game G3 , the vector e1 is sampled from Zm randomly and the algorithm
Enc is consistent with the algorithm in the original LWE encryption scheme.
Therefore,
3 = |2 Pr[S3 ] − 1| = 0.
Let = 21 + 22 + 3 , the advantage of D to detect SA satifies:
(D) = |2 Pr[S1 ] − 1|
AdvΠ,Π
= |2 Pr[S1 ] − 2 Pr[S2 ] + 2 Pr[S2 ] − 2 Pr[S3 ] + 2 Pr[S3 ] − 1|
≤ |2 Pr[S1 ] − 2 Pr[S2 ]| + |2 Pr[S2 ] − 2 Pr[S3 ]| + |2 Pr[S3 ] − 1|
= 21 + 22 + 3
= .
Because NTRU and LWE encryption scheme are both post-quantum crypto-
graph, this conclusion still holds even though adversy has quantum computing
capabilities.
Enc(m, pk, spk)
Enc(m, pk, spk)
Enc(m, pk, spk)
c1 ←$ Encntru (m , spk) c1 ←$ ZN
q c1 ←$ ZN
q
e1 ←$ LatticeSolve(A, c1 ) e1 ←$ LatticeSolve(A, c1 ) e1 ←$ Zm
c ←$ Enc (m, pk, Ā, e1 ) c ←$ Enc (m, pk, Ā, e1 ) c ←$ Enc (m, pk, Ā, e1 )
682 W. Yang et al.
References
1. Simmons, G.J.: The prisoners’ problem and the subliminal channel. In: Chaum, D.
(ed.) Advances in Cryptology 1983, pp. 51–67. Springer, MA (1984). https://doi.
org/10.1007/978-1-4684-4730-9_5
2. Young, A., Yung, M.: The dark side of Black-Box cryptography or: should we
trust capstone? In: Koblitz, N. (ed.) CRYPTO 1996. LNCS, vol. 1109, pp. 89–103.
Springer, Heidelberg (1996). https://doi.org/10.1007/3-540-68697-5_8
3. Ball, J., Borger, J., Greenwald, G., et al.: Revealed: how US and UK spy agencies
defeat internet privacy and security. Know Your Neighborhood 6, 1–10 (2013)
4. Bellare, M., Paterson, K.G., Rogaway, P.: Security of symmetric encryption against
mass surveillance. In: Garay, J.A., Gennaro, R. (eds.) CRYPTO 2014. LNCS, vol.
8616, pp. 1–19. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-
44371-2_1
5. Mironov, I., Stephens-Davidowitz, N.: Cryptographic reverse firewalls. In: Oswald,
E., Fischlin, M. (eds.) EUROCRYPT 2015. LNCS, vol. 9057, pp. 657–686. Springer,
Heidelberg (2015). https://doi.org/10.1007/978-3-662-46803-6_22
6. Ateniese, G., Magri, B., Venturi, D.: Subversion-resilient signature schemes. In:
Ray, I., Li, N., Kruegel, C. (eds.) CCS 2015, pp. 364–375. New York, NY, USA
(2015). https://doi.org/10.1145/2810103.2813635
7. Liu, C., Chen, R., Wang, Y., Wang, Y.: Asymmetric Subversion Attacks on Signa-
ture Schemes. In: Susilo, W., Yang, G. (eds.) ACISP 2018. LNCS, vol. 10946, pp.
376–395. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-93638-3_22
8. Hoffstein, J., Pipher, J., Silverman, J.H.: NTRU: a ring-based public key cryptosys-
tem. In: Buhler, J.P. (ed.) ANTS 1998. LNCS, vol. 1423, pp. 267–288. Springer,
Heidelberg (1998). https://doi.org/10.1007/BFb0054868
9. Regev, Oded.: On lattices, learning with errors, random linear codes, and cryptog-
raphy. J. ACM. 56(6), 1–40 (2009)
10. Peikert, C., Vaikuntanathan, V., Waters, B.: A framework for efficient and compos-
able oblivious transfer. In: Wagner, D. (ed.) CRYPTO 2008. LNCS, vol. 5157, pp.
554–571. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-85174-
5_31
11. Lyubashevsky, V., Peikert, C., Regev, O.: On ideal lattices and learning with errors
over rings. In: Gilbert, H. (ed.) EUROCRYPT 2010. LNCS, vol. 6110, pp. 1–23.
Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13190-5_1
12. Young, A., Yung, M.: Kleptography: using cryptography against cryptography.
In: Fumy, W. (ed.) EUROCRYPT 1997. LNCS, vol. 1233, pp. 62–74. Springer,
Heidelberg (1997). https://doi.org/10.1007/3-540-69053-0_6
13. Young, A., Yung, M.: Malicious cryptography: Exposing Cryptovirology. Wiley, J.,
and Sons, Indiana (2004)
14. Kwant, R., Lange, T., Thissen, K.: Lattice klepto. In: Adams, C., Camenisch, J.
(eds.) SAC 2017. LNCS, vol. 10719, pp. 336–354. Springer, Cham (2018). https://
doi.org/10.1007/978-3-319-72565-9_17
15. Xiao, D., Yu, Y.: Klepto for ring-LWE encryption. Comput. J. 61(8), 1228–1239
(2018)
16. Yang, Z., Chen, R., Li, C., et al.: On the security of LWE cryptosystem against
subversion attacks. Comput. J. 63(4), 495–507 (2020)
17. Lenstra, A.K., Lenstra, H.W.,Lovász, L.: Factoring polynomials with rational coef-
ficients. Mathematische Annalen. 261, 515–534 (1982)
A Combination Reduction Algorithm and Its Application 683
18. Schnorr, C.P.: A more efficient algorithm for lattice basis reduction. J. Algor. 9(1),
47–62 (1988)
19. Schnorr, C.P., Euchner, M.: Lattice basis reduction: improved practical algorithms
and solving subset sum problems. Math. Program. 66(1), 181–199 (1994)
20. Koy, H., Schnorr, C.P.: Segment LLL-reduction of lattice bases. In: Silverman, J.H.
(ed.) CaLC 2001. LNCS, vol. 2146, pp. 67–80. Springer, Heidelberg (2001). https://
doi.org/10.1007/3-540-44670-2_7
21. Chen, Y., Nguyen, P.Q.: BKZ 2.0: better lattice security estimates. In: Lee, D.H.,
Wang, X. (eds.) ASIACRYPT 2011. LNCS, vol. 7073, pp. 1–20. Springer, Heidel-
berg (2011). https://doi.org/10.1007/978-3-642-25385-0_1
22. Aono, Y., Wang, Y., Hayashi, T., Takagi, T.: Improved progressive BKZ algorithms
and their precise cost estimation by sharp simulator. In: Fischlin, M., Coron, J.-S.
(eds.) EUROCRYPT 2016. LNCS, vol. 9665, pp. 789–819. Springer, Heidelberg
(2016). https://doi.org/10.1007/978-3-662-49890-3_30
23. Lu, L., Liu, W., Li, J.: An effective LLL reduction algorithm. J. Wuhan Univ. Natl.
Sci. Ed. 41(8), 1118–1124 (2016)
24. Micciancio, D., Regev, O.: Worst-case to average-case reductions based on gaussian
measures. In: Proceedings of the 45th Symposium on Foundations of Computer
Science. (eds.) FOCS 2004, pp. 372–381. IEEE (2004). https://doi.org/10.1109/
FOCS.2004.72
25. Howgrave-Graham, N., Silverman, J.H., Whyte, W.: Choosing parameter sets for
NTRUEncrypt with NAEP and SVES-3. In: Menezes, A. (ed.) CT-RSA 2005.
LNCS, vol. 3376, pp. 118–135. Springer, Heidelberg (2005). https://doi.org/10.
1007/978-3-540-30574-3_10
26. Howgrave-Graham, N., et al.: The impact of decryption failures on the security
of NTRU encryption. In: Boneh, D. (ed.) CRYPTO 2003. LNCS, vol. 2729, pp.
226–246. Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-45146-
4_14
27. Chen, C., Hoffstein, J., Whyte, W., et al.: NIST PQ Submission: NTRUEncrypt A
lattice based encryption algorithm. https://csrc.nist.gov/Projects/PostQuantum-
Cryptography/Round-1-Submissions. Accessed 23 Jan 2018
28. Stehlé, D., Steinfeld, R.: Making NTRU as Secure as Worst-Case Problems over
Ideal Lattices. In: Paterson, K.G. (ed.) EUROCRYPT 2011. LNCS, vol. 6632, pp.
27–47. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-20465-4_4
29. Yu, Y., Xu, G., Wang, X.: Provably secure NTRU instances over prime cyclo-
tomic rings. In: Fehr, S. (ed.) PKC 2017. LNCS, vol. 10174, pp. 409–434. Springer,
Heidelberg (2017). https://doi.org/10.1007/978-3-662-54365-8_17
30. Gentry, C., Peikert, C., Vaikuntanathan, V.: Trapdoors for hard lattices and new
cryptographic constructions. In: Ladner, R., Chair, P. (eds.) STOC 2008, pp. 197–
206. New York, NY, USA (2008). https://doi.org/10.1145/1374376.1374407
31. Bai, J., Liu, N., Li, Z.: New lattice reduction algorithm based on Gauss and LLL
reduction. J. Comput. Eng. 39(11), 147–149 (2013)
32. Peng, L., Hu, L., Huang, Z., et al.: Actual complexity of modular knapsack vec-
tor problem and practical security of a lattice based public key cryptosystem. J.
Cryptol. Res. 1(3), 225–234 (2014)
33. Cohen, H.: A Course in Computational Algebraic Number Theory. Springer-Verlag,
Berlin (1993)
34. Shoup, V.: N.T.L A library for doing number theory. http://www.shoup.net/ntl/
26-8-2018. Accessed 23 Jun 2021
Cryptographic Algorithms
and Protocols
Evaluating the Security
of Merkle-Damgård Hash Functions
and Combiners in Quantum Settings
1 Introduction
In light of recent and projected progress in building quantum computers [18,21],
more and more quantum algorithms have recently been applied to cryptanalysis
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 687–711, 2022.
https://doi.org/10.1007/978-3-031-23020-2_39
688 Z. Bao et al.
tion is quantum one-way function, and the lower bound of the number of queries
required by preimage attacks is O(2n/2 )—that given by the generic Grover’s
search algorithm. It is reckoned in [10] that similar proof to that in [20] could
be done also with the Matyas-Meyer-Oseas (MMO) mode compression function.
These works provide provable security lower bound for the Merkle-Damgård con-
structions in quantum settings. Yet, the rich set of tools invented in previous work
to do generic attacks, which provide security upper bound, on Merkle-Damgård
hash constructions in classical settings still remain to be fully exploited in quan-
tum settings.
Besides the single hash functions, we also re-evaluate the security of hash
combiners in quantum settings. We focus on two typical hash combiners, i.e.,
the concatenation combiner and the exclusive-or (XOR) combiner. Given two
(independent) hash functions H1 and H2 , the concatenation combiner returns
H1 (M )H2 (M ), and the XOR combiner returns H1 (M ) ⊕ H2 (M ). In practice,
people may wonder whether we can combine existing hash functions to achieve
long term security instead of replacing existing infrastructure to new ones (in
SSL v3 [17] and TLS 1.0/1.1 [13,14], MD5 and SHA-1 were combined in vari-
ous ways, including concatenation combiner and XOR combiner [16]). The main
purpose of hash combiners might be to achieve security amplification, i.e., the
hash combiner offers higher security strength than its component hash functions,
or to achieve security robustness, i.e., the hash combiner remains secure as long
as at least one of its component hash functions is secure. We know from the
results of previous cryptanalyses that in the classical setting, the hash combin-
ers are not as secure as expected (e.g., guarantee its security if either underlying
hash function remains secure, or as secure as a single ideal hash function). Con-
cretely, the attacks on XOR combiners by Leurent and Wang [28] in 2015 and
on concatenation combiners by Dinur [15] in 2016 showed surprising weaknesses,
which either contradicts the intended purposes of security robustness or security
amplification. These results were then improved and summarized by Bao et al. in
[6,7]. However, some techniques used in previous cryptanalyses of hash combiners
in the classical setting cannot be directly accelerated using quantum comput-
ers (e.g., those attacks on combiners exploiting properties of random functional
graphs). Whereas generic attack is accelerated in the quantum setting, that is,
the security upper bound of an ideal hash function is lower. Thus, the broken
primitives (e.g., the investigated hash combiners) in the classical setting might
be unbroken (no better attacks than the most generic attack) in the quantum
setting. So, we investigate this question and aim to provide references.
Table 1. Security status of Merkle-Damgånd hash functions and hash combiners (poly-
nomial factors are ignored for exponential complexities)
The attacks in quantum settings are divided into two scenarios, depending
on whether cheaply accessible quantum random access memory is available or
not, and they are named Scenario R1 and Scenario R2 . Scenario R1 refers qRAM
supporting access in constant time regardless of the size of the memory, while
it costs O(R) time for each access to quantum memory of size O(R) and also
linear time for each access to classical memory in Scenario R2 .
This article is organized as follows. In the next Sect. 2, we introduces some
basic notions and algorithms used in quantum computation. Section 4 and 5 are
the demonstration of several attacks on Merkle-Damgård structures and hash
combiners. Section 6 concludes the results and presents some open problems.
We revise some important techniques for our attack belong with the quantum
version of these techniques in Sect. 3.
m1 m2 ··· mL−1 mL
/ b / b / b / b
n/ n/ n/ n/ n/ n/
IV h h ··· h h H(M )
x0 x1 ··· xL−2 xL−1 xL
The XOR combiner and concatenation combiner based hash functions fol-
lowing MD structure are demonstrated in the following figures.
H2 (M )
IV2 h2 h2 ··· h2 ··· h2
y0 y1 ··· yi−1 yi yL−1
H2 (M )
IV2 h2 h2 ··· h2 ··· h2
y0 y1 ··· yi−1 yi yL−1
2.2 QRAM
Problem 1. Let F be a Boolean function, F : {0, 1}n →{0, 1}. Suppose that there
is only one x such that F (x) = 1. Then, find x.
In the classical setting, the number of queries to find x√is approximately 2n ,
while Grover’s algorithm can find x by making only O( 2n = 2n/2 ) queries.
That is, in the quantum setting, the time complexity for the database search
problem is quadratic faster than the classical ones. Due to the optimality of the
algorithm, the 2n/2 complexity is the tight security level of preimage resistance
of hash functions in quantum setting, as summarized in Table 2.
Table 2. Comparison of security upper bounds of ideal hash functions in classical and
quantum settings (polynomial factors are ignored for exponential complexities).
Some variants of Problem 1 involve the general case with |{x : F (x) =
= 2t . Then, with high probability, Grover’s algorithm returns x after making
1}|
O( 2n /2t ) quantum queries to F .
Evaluating the Security of Merkle-Damgård Hash Functions 693
Problem 2. Let H : {0, 1}n → {0, 1}n be a random function. Find x and x such
that H(x) = H(x ).
In the classical setting, finding collisions of a random function in range {0, 1}n
can be done after making O(2n/2 ) queries, following the Birthday Paradox. While
the BHT algorithm makes use of Grover’s algorithm to find a collision in O(2n/3 )
queries. Due to the optimality of the algorithm, 2n/3 is also the tight security
level of the collision resistance of hash functions, in Scenario R1 . In this paper,
we consider the situation where qRAM is available, and the BHT algorithm can
be applied efficiently for the collision finding problem of hash functions.
Scenario R2 . In this situation, each lookup operation within the memory
of size O(2n/3 ) costs O(2n/3 ) time, hence resulting in an inefficient algorithm
even slower than the birthday attack. Chailloux et al. [11] proposed an efficient
algorithm (denoted by CNS) to find a collision of hash function in time Õ(22n/5 )
with a quantum computer of O(n) qubits, but large classical memory of size
Õ(2n/5 ).
gates (i.e., Scenario R1 ). Very recently, to tackle with the situation that qRAM
is not cheap and accessing R qubits quantum memory costs O(R) operators
or quantum gates, Jaques and Schrottenloher in [22] improved the quantum
walk algorithm for golden collision problem (a more general case of the element
distinctness problem), there the new algorithm requires O(N 6/7 ) computations
and O(N 2/7 ) quantum memory, without using the qRAM. More explicitly, the
assumption on the memory model in the quantum walk algorithm in [22] is that
quantum memory is costly to access but free to maintain, which seems more
realistic than Scenario R1 . Thus, in this paper, when discussing the complexities
of the presented attacks that calling a quantum walk algorithm in Scenario R2 ,
we follow this assumption.
Joux in [24] proposes an efficient way to obtain a large set of messages mapping
a starting state to a common ending state on iterated hash functions, which is
known as Joux’s multi-collisions.
m1 m2 mt t
x0 xt ≡ x0 xt
m1 m2 mt
In Scenario R2 , we can replace the BHT algorithm with the algorithm in [11],
which requires O(22n/5 ) computations and n/5
O(2 ) classical memory. Then, the
resulted quantum algorithm 1 requires O t · 22n/5 quantum queries and O(2n/5 )
classical memory.
Note that this quantum version of the Joux’s multi-collision will be used in
building more complex structures (interchange structure in Sect. 3.4), and in the
presented preimage attacks (Sect. 5.1 and 5.2).
Kelsey and Schneier in [26] invented the expandable message, which is similar to
Joux’s multi-collision. By generating t collisions with pairs of message fragments
of length (1, 2i + 1) for i ≈ {0, 1, . . . , t − 1}, one can get 2t colliding messages
whose lengths cover the range of [t, t + 2t − 1] (see Fig. 5). The complexity is of
2t + t · 2n/2 computations. This expandable message can be used to bypass the
Merkle-Damgård strengthening and carry out a long message second-preimage
attack on MD with roughly 2n /L computations for a given challenge of L blocks.
Expandable Message (EM) in Quantum Settings. Since the main idea of building
a 2t -expandable message is finding the collision between a message of a single
block and a message of length 2i + 1 for 0 ≤ i ≤ t − 1, this step can be done
by applying the BHT algorithm in quantum setting. Similar to finding collisions
in quantum setting for building Joux’s multi-collision, for each i, we calculate
696 Z. Bao et al.
m1 m2 mt t
x0 xt ≡ x0 xt
0
[0]2 m1
1
[0]2 m2 t−1
[0]2 mt
i
the hash value x∗i−1 of message [0]2 from the hash value xi−1 , and find a pair
of message blocks (mi , mi ) such that h(xi−1 , mi ) = h(x∗i−1 , mi ) = xi . Then the
constructing a message of length s [t, t + 2t − 1] step is proceeded in the same
way as in the classical setting, as we look at the decomposition of s − t in t-bit
i
binary base. We select the long message [0]2 mi in the iteration i if the i-th LSB
of s − t is equal to 1, otherwise, we select the single block message mi instead.
The complexity of this quantum algorithm is different from classical expandable
message algorithm just by the collision search step; hence, it is of 2t + t · 2n/3
quantum computations in Scenario R1 , or of 2t + t · 22n/5 quantum computations
using CNS algorithm in Scenario R2 .
This quantum version of the expandable message will be used in the presented
quantum second-preimage attack on the MD hash function (Sect. 4.2).
Kelsey and Kohno in [25] invented the diamond structure. Similar to Joux’s
multi-collisions and Kelsey and Schneier’s expandable message, diamond is also
a kind of multi-collision. The difference is that, instead of mapping a single start-
ing state to a final state in the form of sequential chain, a 2t -diamond maps a set
of 2t starting states to a common final state in the form of a complete binary tree
(see Fig. 6). Blackburn in [8] pointed out that the construction method and its
complexity provided in [25] have a flaw, and offered a more rigorous analysis and
√ (n+t)
construction method. The method in [8] requires O( t · 2 2 ) message blocks
√ (n+t)
and n· t·2 2 computations, and will be converted into quantum method later
in this section. Kortelainen and Kortelainen in [27] presented another method for
constructing the diamond structure. The new method could reduce the message
(n+t)
requirement to O(2 2 ). However, it becomes more intricate by separating the
procedure into jumps, phases, and steps. During different phases and steps, dif-
ferent number of new messages are added and old messages are recycled, which
makes the phases and steps more dynamic and the workloads are not balanced
compared with previous methods.
Diamond is originally used in herding attacks on hash functions [25]. In [3–
5], Andreeva et al. exploited the diamond structure to develop generic second-
preimage attacks on Dithered hash function and Hash-Twice. Besides, the dia-
mond structure was also used to device a second-preimage attack on Merkle-
Evaluating the Security of Merkle-Damgård Hash Functions 697
Damgård hash function with shorter messages than that in the long-message
second-preimage attack in [26].
x1 m00
x10
m
10
x2 m 01 x20
x3 m02
x11 1
m2
m1
0
x4 m 03
x
x5 m04
x12
m 21
12
x6
m
m 05 x21
x7 m06
x13 3
m1
x8 m 07
Fig. 6. A 23 -diamond
1
In graph G, if there exists a set of edges, no two of which share a vertex, then the
set of edges is called a matching. M is a maximum matching in G if no matching
in G contains more edges than M does. If matching M in G contains every vertex,
then M is called a perfect matching. Our goal here, is to find a perfect matching in
G = (V, E), of which the vertex set is V = {x1 , . . . , x2t } and (xi , xj ) ≈ E if xi and xj
generate an obtained collision.
698 Z. Bao et al.
Leurent and Wang in [28] invented the interchange structure, which is used
to devise a preimage attack on the XOR combiner. The interchange structure
Evaluating the Security of Merkle-Damgård Hash Functions 699
contains a set of messages MIS and two sets of states A and B, such that for any
pair of states (Ai , Bj | Ai A, Bj B), one can pick a message M from MIS such
that Ai = H1 (IV1 , M ) and Bi = H2 (IV2 , M ). To build a 2t -interchange structure
(with 2t states for each hash function), one can cascade 22t − 1 building modules
named switches. The effect of a switch is that a state in one computation chain
of one hash function can make pair with two states in two computation chains
of the other hash function. A switch can be built using multi-collisions and the
birthday attack (see Fig. 7a). The total complexity to build a 2t -interchange
structure is of Õ(22t+n/2 ) computations.
H1 A3
A2
A1
H1
IV1 A0
aj MMC M̂ aj
M̂
ai MMC M̂ ai
H2 B3
H2
B2
bk bk
MMC B1
IV2 B0
M M M M M M M M M M M
the hash value of H1 from different states (ai , aj ) and some pair of message
(M̂ , M̂ ). These two steps can be replaced by the quantum algorithm for building
Joux’s multi-collisions and the quantum walk algorithm for the element distinct-
ness problem. The quantum algorithm for building a single switch is described
as follows in Algorithm 3.
In Scenario R1 , the complexity of Algorithm 3 is dominated by the building
a multi-collision in Step 1, since Step 2 requires O((2n/2+1 )2/3 ) = O(2n/3 ) quan-
tum
ncomputations
and O(2n/3 ) quantum memory. Hence, Algorithm
n 3 requires
n/3
O ·2 quantum queries to the compression functions, O · 2n/3 quan-
2 2
tum time and O(2n/3 ) quantum memory. n
In Scenario R2 , Step 1 needs O · 22n/5 quantum computations and
2
O(2n/5 ) classical memory, but when it comes to Step 2, the number of com-
putations is higher, that is, O((2n/2+1 )6/7 = O(23n/7 ) quantum computations
and O((2n/2 )2/7 ) = O(2n/7 ) quantum memory. Therefore, in this model, the
time complexity for Algorithm 3 to build a single switch is of O(23n/7 ).
The framework for building a 2t -interchange structure in quantum setting is
the same as in the classical setting. One builds the required 22t − 1 switches as
the following: first, build a single switch from (a0 , b0 ) to each of (a0 , bk ); then,
for each k, build switches from (a0 , bk ) to all (aj , bk ) for all j = 0, ..., 2t − 1.
To reach the chain (aj , bk ) from (a0 , b0 ), we first find the switch to jump from
(a0 , b0 ) to (a0 , bk ) in the first step, then find the switch to jump from (a0 , bk )
to (aj , bk ) in the
n second step.
Then the complexity to build an interchange
2t+n/3
structure is O ·2 for both quantum queries and time and O(2n/3 )
2
quantum memory in Scenario R1 , or O(22t+3n/7 ) and O(2n/5 ) classical memory,
O(2n/7 ) quantum memory in Scenario R2 .
This quantum version of the interchange structure will be used in the pre-
sented quantum preimage attack on the XOR-combiners (Sect. 5.1).
and O(2n/3 ) qRAM in Scenario R1 . Since the time complexity to find a collision
of any hash function is O(2n/3 ) in Scenario R1 , we can see that, same as in the
classical setting, the quantum security of MD structure against multi-collision
attack is only polynomial higher than the collision resistance of its compression
function. In Scenario R2 , 2t -collisions of an MD hash function can be obtained by
combining Joux’s method and CNS algorithm with time complexity O(t · 22n/5 )
and requires O(2n/5 ) classical memory.
For an n-bit hash function, a security upper bound with respect to (second-)
preimage attack in the quantum setting is directly provided by a plain Grover’s
algorithm, that is O(2n/2 ) quantum computations. Thus, only attacks with
complexity lower than the Grover’s search algorithm can be seen as success-
ful attacks. For the preimage resistance of MD hash construction, we cannot
achieve better attacks than a plain Grover’s search on an ideal hash. For the
second-preimage resistance of MD hash construction, basing on the long-message
second-preimage attack in [26], one can launch a quantum attack with the com-
plexity lower than the generic Grover’s attack.
Given message Mtarget of length 2k + k + 1, the goal is to find a second-
preimage whose hash value is equal to that of the Mtarget . The quantum attack
is described in Algorithm 4.
because it is dominated by the searching step, in which we can simply replace the
quantum memory by a classical memory of size O(2n/5 ). This attack exponen-
tially speeds up the plain quantum attack using Grover’s search, and also expo-
nentially improves the classical attack, of which the time complexity is O(2n ).
Compared to the quantum preimage attack on one MD hash function of n
bits, the attack on concatenated combiners only require a constant factor of more
evaluations.
Second-Preimage Attack. Since the second-preimage attack can be implied
from the preimage attack, the complexity is similar to the preimage attack.
The quantum herding attack on a single MD hash function has been introduced
in Sect. 4.3. In this section, we adapt the quantum herding attack to concatena-
tion of two MD hashes. The framework of the attack follows that of the classical
attack in [4], in which the main idea is that by constructing a multi-collision
MMC for H1 one can use the messages in MMC to builds a diamond structure for
H2 . The high level description of the attack is as follows, which is also illustrated
by the figure in Algorithm 7.
and finding message fragments linking from collision values to one of starting
points of diamonds. To build MDS2 , we need 2k iterations to merge pairs of
hash values into one. This step costs O(2k · (2n/2 )6/7 ) = O(23n/7+k ) computa-
tions and O(2n/7 ) quantum memory size. Then, the precomputation phase is
of O (n − k + (nk)/2) · 22n/5 + 23n/7+k = O(23n/7+k ) time complexity, using
O(2n/5 ) classical memory, and O(2n/7 ) quantum memory size.
The best-case Complexity. The best attack is achieved when k satisfies
3n/7+k = n/2−k/6, i.e., k = 3n/49. It gives the time complexity of O(224n/49 ).
6 Conclusions
References
1. Aaronson, S., Shi, Y.: Quantum lower bounds for the collision and the element
distinctness problems. J. ACM (JACM) 51(4), 595–605 (2004)
2. Ambainis, A.: Quantum walk algorithm for element distinctness. SIAM J. Comput.
37(1), 210–239 (2007)
3. Andreeva, E., et al.: New second-preimage attacks on hash functions. J. Cryptol.
29(4), 657–696 (2016)
4. Andreeva, E., Bouillaguet, C., Dunkelman, O., Kelsey, J.: Herding, second preimage
and trojan message attacks beyond Merkle-Damgård. In: Jacobson, M.J., Rijmen,
V., Safavi-Naini, R. (eds.) SAC 2009. LNCS, vol. 5867, pp. 393–414. Springer,
Heidelberg (2009). https://doi.org/10.1007/978-3-642-05445-7_25
5. Andreeva, E., Bouillaguet, C., Fouque, P.-A., Hoch, J.J., Kelsey, J., Shamir, A.,
Zimmer, S.: Second preimage attacks on dithered hash functions. In: Smart, N.
(ed.) EUROCRYPT 2008. LNCS, vol. 4965, pp. 270–288. Springer, Heidelberg
(2008). https://doi.org/10.1007/978-3-540-78967-3_16
6. Bao, Z., Dinur, I., Guo, J., Leurent, G., Wang, L.: Generic attacks on hash com-
biners. J. Cryptol. 1–82 (2019)
710 Z. Bao et al.
7. Bao, Z., Wang, L., Guo, J., Gu, D.: Functional graph revisited: updates on (second)
preimage attacks on hash combiners. In: Katz, J., Shacham, H. (eds.) CRYPTO
2017. LNCS, vol. 10402, pp. 404–427. Springer, Cham (2017). https://doi.org/10.
1007/978-3-319-63715-0_14
8. Blackburn, S.R., Stinson, D.R., Upadhyay, J.: On the Complexity of the Herding
Attack and Some Related Attacks on Hash Functions. Cryptology ePrint Archive,
Report 2010/030 (2010). http://eprint.iacr.org/2010/030
9. Brassard, G., HØyer, P., Tapp, A.: Quantum cryptanalysis of hash and claw-free
functions. In: Lucchesi, C.L., Moura, A.V. (eds.) LATIN 1998. LNCS, vol. 1380,
pp. 163–169. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0054319
10. Canteaut, A., et al.: Saturnin: a suite of lightweight symmetric algorithms for post-
quantum security. IACR Trans. Symmetric Cryptol. 2020(S1), 160–207 (2020).
https://doi.org/10.13154/tosc.v2020.iS1.160-207
11. Chailloux, A., Naya-Plasencia, M., Schrottenloher, A.: An efficient quantum col-
lision search algorithm and implications on symmetric cryptography. In: Takagi,
T., Peyrin, T. (eds.) ASIACRYPT 2017. LNCS, vol. 10625, pp. 211–240. Springer,
Cham (2017). https://doi.org/10.1007/978-3-319-70697-9_8
12. Damgård, I.: A design principle for hash functions. In: Brassard, G. (ed.) Advances
in Cryptology - CRYPTO’89. LNCS, vol. 435, pp. 416–427. Springer, Heidelberg,
Germany, Santa Barbara, CA, USA (Aug 20–24, 1990)
13. Dierks, T., Allen, C.: The TLS protocol version 1.0. RFC 2246, 1–80 (1999).
https://doi.org/10.17487/RFC2246
14. Dierks, T., Rescorla, E.: The transport layer security (TLS) protocol version 1.1.
RFC 4346, 1–87 (2006). https://doi.org/10.17487/RFC4346
15. Dinur, I.: New attacks on the concatenation and XOR hash combiners. In: Fis-
chlin, M., Coron, J.-S. (eds.) EUROCRYPT 2016. LNCS, vol. 9665, pp. 484–508.
Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-49890-3_19
16. Fischlin, M., Lehmann, A., Wagner, D.: Hash function combiners in TLS and
SSL. In: Pieprzyk, J. (ed.) CT-RSA 2010. LNCS, vol. 5985, pp. 268–283. Springer,
Heidelberg (2010). https://doi.org/10.1007/978-3-642-11925-5_19
17. Freier, A.O., Karlton, P., Kocher, P.C.: The secure sockets layer (SSL) protocol
version 3.0. RFC 6101, 1–67 (2011). https://doi.org/10.17487/RFC6101
18. Google: Google Quantum Computing. https://research.google/teams/applied-
science/quantum/
19. Grover, L.K.: A fast quantum mechanical algorithm for database search. In: Pro-
ceedings of the Twenty-eighth Annual ACM Symposium on Theory of Computing,
pp. 212–219 (1996)
20. Hosoyamada, A., Yasuda, K.: Building quantum-one-way functions from block
ciphers: davies-meyer and merkle-damgård constructions. In: Peyrin, T., Galbraith,
S. (eds.) ASIACRYPT 2018. LNCS, vol. 11272, pp. 275–304. Springer, Cham
(2018). https://doi.org/10.1007/978-3-030-03326-2_10
21. IBM: IBM Quantum Computing. https://www.ibm.com/quantum-computing/
22. Jaques, S., Schrottenloher, A.: Low-gate quantum golden collision finding. Cryp-
tology ePrint Archive, Report 2020/424 (2020). https://eprint.iacr.org/2020/424
23. Jha, A., Nandi, M.: Some Cryptanalytic Results on Zipper Hash and Concatenated
Hash. Cryptology ePrint Archive, Report 2015/973 (2015). http://eprint.iacr.org/
2015/973
24. Joux, A.: Multicollisions in iterated hash functions. application to cascaded con-
structions. In: Franklin, M. (ed.) CRYPTO 2004. LNCS, vol. 3152, pp. 306–316.
Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-28628-8_19
Evaluating the Security of Merkle-Damgård Hash Functions 711
25. Kelsey, J., Kohno, T.: Herding hash functions and the nostradamus attack. In:
Vaudenay, S. (ed.) EUROCRYPT 2006. LNCS, vol. 4004, pp. 183–200. Springer,
Heidelberg (2006). https://doi.org/10.1007/11761679_12
26. Kelsey, J., Schneier, B.: Second Preimages on n-Bit Hash Functions for Much Less
than 2n Work. In: Cramer, R. (ed.) EUROCRYPT 2005. LNCS, vol. 3494, pp.
474–490. Springer, Heidelberg (2005). https://doi.org/10.1007/11426639_28
27. Kortelainen, T., Kortelainen, J.: On diamond structures and trojan message
attacks. In: Sako, K., Sarkar, P. (eds.) ASIACRYPT 2013. LNCS, vol. 8270, pp.
524–539. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-42045-
0_27
28. Leurent, G., Wang, L.: The sum can be weaker than each part. In: Oswald, E.,
Fischlin, M. (eds.) EUROCRYPT 2015. LNCS, vol. 9056, pp. 345–367. Springer,
Heidelberg (2015). https://doi.org/10.1007/978-3-662-46800-5_14
29. Merkle, R.C.: One way hash functions and DES. In: Brassard, G. (ed.) CRYPTO
1989. LNCS, vol. 435, pp. 428–446. Springer, New York (1990). https://doi.org/
10.1007/0-387-34805-0_40
30. National Institute for Standards and Technology, USA: Post-Quantum Cryp-
tography Standardization (2017). https://csrc.nist.gov/projects/post-quantum-
cryptography
31. Shor, P.W.: Algorithms for quantum computation: discrete logarithms and factor-
ing. In: 35th Annual Symposium on Foundations of Computer Science, Santa Fe,
New Mexico, USA, 20–22 November 1994, pp. 124–134. IEEE Computer Society
(1994). https://doi.org/10.1109/SFCS.1994.365700
32. Zalka, C.: Grover’s quantum searching algorithm is optimal. Phys. Rev. 60(4),
2746 (1999)
33. Zhandry, M.: A note on the quantum collision and set equality problems. arXiv
preprint arXiv:1312.1027 (2013)
34. Zhandry, M.: How to record quantum queries, and applications to quantum indif-
ferentiability. In: Boldyreva, A., Micciancio, D. (eds.) CRYPTO 2019. LNCS, vol.
11693, pp. 239–268. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-
26951-7_9
An Efficient Lattice-Based Encrypted
Search Scheme with Forward Security
1 Introduction
Public-key encryption with keywords search (PEKS) allows conducting retrieval
over the encrypted database, which protects data privacy and keeps data search-
ability. Classical PEKS schemes include three parties, data owner, receiver who
has a pair of public key and secret key, and a server. Generally, the data owner
encrypts data using the receiver’s public key and then uploads the encrypted data
to the (cloud) server. To perform the retrieval of encrypted data, the receiver
computes a search token using his own secret key and sends it to the server as
a search request. Except supporting secure storage, the server also conducts a
match (test) between the encrypted data and the given token, and returns the
corresponding retrieval results if the match succeeds.
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 712–726, 2022.
https://doi.org/10.1007/978-3-031-23020-2_40
An Efficient Lattice-Based Encrypted Search Scheme with Forward Security 713
However, as data user, the receivers’ secret keys are often exposed because of
careless store or network attacks. In PEKS schemes, an adversary can compute
search tokens of any keywords based on the exposed secret key. Considering
practical applications, searchable encryption systems often support dynamically
adding files under the cloud storage. The combination of the exposed tokens and
the newly added files will lead to the leakage of data privacy. Forward security
provides one of the solutions to minimize the damage resulting from the exposure
of secret keys.
Contributions and Technique Roadmaps: In this work, we show a lattice-
based PEKS scheme with forward security, considering the attack from quantum
computers. Different from previous schemes, this scheme combines the binary
tree structure and lattice basis extension algorithm to achieve a one-way key
evolution mechanism. This mechanism supports that the receiver’s secret keys
are updated with the change of time periods, to achieve forward security. Such
a one-wayness guarantees that even though a current key is compromised, an
adversary can not generate a valid search token of past time to search cipher-
text. Then this scheme further employs the minimal cover set to achieve the
update of the receiver’s secret keys with time periods, based on the key evo-
lution mechanism. Compared with the previous scheme, our scheme is more
efficient. Moreover, during the process of secret key update, the public key in
our scheme is fixed, which saves unnecessary storage overhead.
Inspired by the works [1,10,15], most specifically, we use the leaf nodes of a
binary tree structure of the depth l to discretize the time into 2l segments. The
lattice trapdoor generation algorithm is used to obtain a matrix A0 as the public
key and the lattice basis T0 as the initial secret key of the receiver, which is also
used to represent the root node of the binary tree. Then we choose 2l randomly
(b )
uniform matrices Ai i of the size as A0 for i ∈ {1, 2, . . . , l} and bi ∈ {0, 1}.
For each node Θ = (θ1 , . . . , θi ) with θi ∈ {0, 1} and i ∈ {1, 2, . . . , l}, we set
(i)
(θ ) (θ )
the corresponding matrix FΘ(i) = [A0 ||A1 1 || . . . ||Ai i ]. Then we can employ the
lattice basis extension algorithm to compute the trapdoor of any node, inputting
the corresponding matrix and the trapdoor of the root node (or the trapdoor of
its ancestor node). According to the property of the basis extension algorithm,
the computation of lattice trapdoors can not be operated inversely, which realizes
a one-way key evolution. After arranging the trapdoor of each node, we apply the
minimal cover set to guarantee the secret key skt in time period t includes the
ancestor trapdoor for time periods t (t ≥ t) and does not include any trapdoor
for time periods t (t < t).
1.2 Organization
The rest of this paper is organized as follows. Section 2 shows preliminaries on
lattice, hardness assumptions and related algorithms. Then we introduce the syn-
tax of PEKS with forward security as Sect. 3. In Sect. 4, the specific construction
in lattices is given. Finally, we give a conclusion in Sect. 5.
2 Preliminaries
2.1 Notations
A is the norm of a matrix A, which can be computed as the maximum l2
norm of the column vectors of A. Without special description, bold lower-case
letters denote column vectors. A function negl(n) is negligible if for any c > 0
An Efficient Lattice-Based Encrypted Search Scheme with Forward Security 715
2.2 Lattice
From the above definition, the set {b1 , b2 , . . . , bn } is a lattice basis. We say m
is the dimension and n is the rank. A lattice is full-rank if its dimension equals
to rank, namely, m = n.
Λ⊥ m
q (A) := {e∈ Z |Ae = 0 mod q}.
Λq (A) := {e∈ Zm |∃s ∈ Znq , AT s = e mod q}.
Λuq (A) := {e∈ Zm |Ae= u mod q}.
$
– LWE distribution: choose uniformly a matrix A ← Zn×m
q , and sample e ←
m T n×m m
Ψα , output (A, A s+ e) ∈ Zq ×Zq ;
716 X. Yu et al.
$
– Uniform distribution: choose uniformly a matrix A ← Zn×m
q and a vector
$
x ← Zm n×m
q , output (A, x ) ∈ Zq ×Zm
q .
– Setup: The challenger C generates the public parameter pp and outputs the
receiver’s public-secret key pair (pk, sk0 ) by running setup algorithm of the
proposal. Then C sends pp and pk to the adversary A , and keeps the initial
key sk0 secret.
– Query 1: The adversary A can perform some oracle queries, the details of
challenger’s responses are give below.
• Key Update query: When the time period t < T − 1, the challenger
updates the secret key skt to skt+1 and updates the time period t to t + 1.
If t = T − 1, C will return an empty string as skT .
• Token query: The adversary queries token for any keyword in the time
periods t he chooses. The query requires that the time period t > t∗ ,
where t∗ is the target time period.
– Challenge: A chooses two keywords w0∗ , w1∗ as the challenged keywords in
time period t∗ which have not been queried for token oracle. Then A submits
them to C . C chooses a single bit b ∈ {0, 1} at random, and computes the
ciphertext C ∗ ← Enc(wb∗ , pk, t∗ ) to return to A .
– Query 2: A is allowed to issue the above queries for any keywords except
w0∗ , w1∗ .
– Guess: From the above queries, A outputs a guess b ∈ {0, 1} about b. If
b = b, we say A wins this game.
The advantage of A wins the above game is defined by Adv ExpA (λ) =
1
|P r[b = b] − |.
2
Definition 6. We say a PEKS scheme satisfies forward secure ciphertext indis-
tinguishability under chosen keywords attack, if the advantage AdvExpA (λ) on
the security parameter λ is negligible.
– We assign the time periods t ∈ {0, 1, . . . , 2l −1} to the leaf nodes of the binary
tree with depth l from leaf to right. Here we show an example as Fig. 1, where
the depth of the tree is l = 3 and the number of time intervals is 8.
An Efficient Lattice-Based Encrypted Search Scheme with Forward Security 719
– On each time period t, there is an unique path from the root node to leaf
node t = (t1 , . . . , tl ), where for the ith level, ti = 0 if the node in this path
is left node and ti = 1 if the node in this path is right node. Similarly, for
the ith level node (i = l, namely, the none-leaf node), its path from the root
node to this node is denoted uniquely by Θ(i) = (θ1 , . . . , θi ), where θi ∈ {0, 1}
is defined as same as ti .
– We run T rapGen algorithm and obtain a random matrix A0 ∈ Zn×m q and the
⊥
lattice basis TA0 for lattice Λ (A0 ). Then we set that A0 is the corresponding
matrix for root node and TA0 is the lattice trapdoor for root node.
(θ ) (θ )
– We define the corresponding matrix FΘ(i) = [A0 ||A1 1 || . . . ||Ai i ] for Θ(i) ,
(t1 ) (tl )
and the matrix Ft = [A0 ||A1 || . . . ||Al ] for the time period t, respectively.
(b)
Ai are random matrices for i ∈ {1, 2, . . . , l} and b ∈ {0, 1}.
– There is a corresponding lattice trapdoor TΘ(i) for each node Θ(i) of the binary
tree. We employs lattice basis extension technique ExtBasis to achieve the
lattice trapdoor update.
• Given the original lattice trapdoor TA0 , the trapdoor TΘ(i) can be com-
puted as follows.
– Setup(λ, l): Given security parameter λ and the depth of a binary tree l,
set T = 2l is the number of time periods, system parameters n, m, q, σ, α,
where q is prime, σ is the parameter of preimage sample algorithm, α is
the parameter of Gaussian distribution, the setup algorithm performs the
following operations:
• Set a hash function H : {0, 1}∗ → Znq .
• Choose random matrices A1 , A1 , . . . , Al , Al ∈ Zn×m
(0) (1) (0) (1)
q .
• Run T rapGen(n, m, q) algorithm to obtain a random matrix A0 and a
basis TA0 of lattice Λ⊥ (A0 ) as the receiver’s public key and the initial
secret key, respectively.
720 X. Yu et al.
Fig. 1. Binary tree of depth l = 3, here each node is denoted by a binary representation.
time t consists of the secret keys of all of the nodes in the set N ode(t).
• Based on the above rules on secret keys, we have sk0 = {TA0 }, sk1 =
{T001 , T01 , T1 }, where T001 , T01 , T1 are the corresponding trapdoor (basis)
(0) (0) (1) (0) (1) (1)
for F001 = [A0 ||A1 ||A2 ||A3 ], F01 = [A0 ||A1 ||A2 ], F1 = [A0 ||A1 ],
respectively.
• To realize the key update from skt to skt+1 , the receiver need to deter-
mine the minimal cover N ode(t + 1) firstly, then compute all trapdoors of
nodes which are in N ode(t+1)\N ode(t) by using the methods introduced
in Sect. 4.1, and delete the trapdoors of nodes in N ode(t)\N ode(t + 1).
Finally, the receiver can determine the secret key skt+1 . Here we show
an example, given sk1 = {T001 , T01 , T1 }, then sk2 = {T01 , T1 }, where
N ode(2)\N ode(1) = {01, 1} and N ode(1)\N ode(2) = {001}.
– Enc(w, pk, t): Given keyword w, the receiver’s public key pk = A0 , and the
time t as the input,
An Efficient Lattice-Based Encrypted Search Scheme with Forward Security 721
r = c1 − eT · c2
= H(w)T s + x − eT · (FtT s + y)
= H(w)T s + x − eT · FtT s − eT · y
= x − eT · y,
Proof. Assume that there exists an adversary A who can break the cipher-
text indistinguishability under chosen keywords attack of our scheme with non-
negligible probability . According to the adversary, we construct a challenger
C to solve the LWE problem with a probability of at least and in polynomial
time for a target time period t∗ = (t∗1 , t∗2 , . . . , t∗l ).
C firstly obtains some samples (ui , vi ) ∈ Znq ×Zq from the LWE oracles, where
i = 1, . . . , m and m = (l +1)m. All of ui are chosen randomly, and either all of vi
are randomly selected or equal to uTi s + yi , where s is a uniform secret, and yi is
the independent Gaussian noise distributed from Ψα . Let v = (v1 , v2 , . . . , vm )T .
Setup: C sets the public key pk and public parameters pp according to the
following steps:
(t )
Ttk ← ExtBasis(E||Ak k , TA(tk ) ),
k
(t ) (t )
where E = [A0 ||A1 1 || . . . ||Ak−1
k−1
] from which C computes all keys in skt as
in the real key update algorithm.
– Token Query: A makes token queries for keyword w at time period t. If
H(w) = 0, the game aborts and returns a random bit b ∈ {0, 1}. Otherwise,
C replies as follows:
• C checks if skt does not contain the lattice basis TΘ(t) , run ExtBasis
(FΘ(t) , TΘ(k) ) to output TΘ(t) , where TΘ(k) is an ancestor basis of TΘ(t) in
the secret key skt .
• C computes H(w) and runs SampleP re(TΘ(t) , H(w), σ) to get a sample
(l+1)m
e ∈ Zq .
• C returns e to the adversary A .
An Efficient Lattice-Based Encrypted Search Scheme with Forward Security 723
Challenge: A chooses two keywords w0∗ , w1∗ and sends them to C . C checks
firstly if H(w∗ ) = 0, C aborts the game and outputs a random bit b ∈ {0, 1}.
Otherwise, C generates the ciphertext for the target time period t∗ as follows:
Query 2: The adversary A can continue the queries as in the Query phase 1
with the restriction that A cannot query for the challenge keywords w0∗ , w1∗ .
Guess: Based on the above queries, the adversary outputs a guess b of b by
executing the following steps:
If the LWE oracle is pseudorandom, for Ft∗ = (u1 , u2 , . . . , um ) and the ran-
distributed as Ψα . Then we have c∗2 = FtT∗ s + y =
(l+1)m
dom noise vector y ∈ Zq
T
(u1 , u2 , . . . , um ) s + y is a valid part of the challenged ciphertext. Moreover,
c∗1 = H(w∗ )T s + x is also a valid part of the challenged ciphertext which is
statistically close to the uniform in Zq , since s is a uniform secret and x is the
independent Gaussian noise distributed from Ψα . If LWE oracle is random, v is
(l+1)m (l+1)m
uniform in Zq . Then, the challenged ciphertext is uniform in Zq × Zq .
We assume a case that A guesses successfully the keyword w1∗ is used in the
part of challenged ciphertext and the time period t∗ , then this case occurs with
probability 1/qt T , where qt is the number of token queries. Thus, if A can break
the ciphertext indistinguishability under chosen keywords attack of our scheme
with non negligible probability , then C has the advantage = /qt T to solve
the LWE problem. The proof is completed.
Here we compare with the other PEKS scheme [26] on the performance of the
computational cost, the ciphertext size and token size. There are some notations
in Table 1, H: hash operation, M : modular multiplication, I: matrix inversion
operation; m: the dimension of matrix, τ : security level of testing in the scheme
of [26]; lq : the size of element in Zq ; TBD : BasisDel operation; TSL : SampleLef t
operation which is a sample algorithm found in [26], TSP : SampleP re operation;
TEB : ExtBasis algorithm.
We can note that the sizes of ciphertext and token in our scheme are more
longer than that in the scheme of [26], especially for the size of token. On the
other hand, our scheme is more efficient than the scheme of [26]. Moreover, in our
scheme, the public key is fixed, which can save the unnecessary storage overhead.
724 X. Yu et al.
5 Conclusion
In this paper, we show a forward secure searchable encryption scheme. This
scheme is designed based on the integer lattice which can realize the post-
quantum security. Combining with the binary tree encryption and lattice basis
extension algorithm, we achieve the update of secret keys with the change of time
periods. The research on the related constructions from some special lattices,
such as ideal lattice, module lattice will be an interesting point for improving
the efficiency and setting of parameters.
Acknowledgment. The authors would like to thank the support from Fundamen-
tal Research Program of Shanxi Province (No. 20210302124273, No. 20210302123130),
Scientific and Technological Innovation Programs of Higher Education Institutions in
Shanxi (No. 2021L038), Shanxi Scholarship Council of China 2021-038, National Natu-
ral Science Foundation of China (No. 62072240, No. 62202228), Natural Science Foun-
dation of Jiangsu Province under Grant (BK20210330), China. The authors also grate-
fully acknowledge the helpful comments and suggestions of other researchers, which
has improved the presentation.
References
1. Agrawal, S., Boneh, D., Boyen, X.: Lattice basis delegation in fixed dimension and
shorter-ciphertext hierarchical IBE. In: Rabin, T. (ed.) CRYPTO 2010. LNCS, vol.
6223, pp. 98–115. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-
14623-7 6
2. Ajtai, M.: Generating hard instances of the short basis problem. In: Wiedermann,
J., van Emde Boas, P., Nielsen, M. (eds.) ICALP 1999. LNCS, vol. 1644, pp. 1–9.
Springer, Heidelberg (1999). https://doi.org/10.1007/3-540-48523-6 1
3. Alwen, J., Peikert, C.: Generating shorter bases for hard random lattices. In: 26th
International Symposium on Theoretical Aspects of Computer Science, STACS,
Freiburg, Germany, vol. 3, pp. 75–86 (2009)
4. Anderson, R.: Two remarks on public key cryptology. Technical report, Computer
Laboratory, University of Cambridge (2002)
5. Baek, J., Vu, Q.H., Shoufan, A., Jones, A., Wong, D.S.: Stateful public-key encryp-
tion schemes forward-secure against state exposure. Comput. J. 56(4), 497–507
(2013)
An Efficient Lattice-Based Encrypted Search Scheme with Forward Security 725
6. Behnia, R., Ozmen, M.O., Yavuz, A.A.: Lattice-based public key searchable encryp-
tion from experimental perspectives. IEEE Trans. Depend. Secur. Comput. 17(6),
1269–1282 (2020)
7. Boneh, D., Di Crescenzo, G., Ostrovsky, R., Persiano, G.: Public key encryption
with keyword search. In: Cachin, C., Camenisch, J.L. (eds.) EUROCRYPT 2004.
LNCS, vol. 3027, pp. 506–522. Springer, Heidelberg (2004). https://doi.org/10.
1007/978-3-540-24676-3
30
8. Bost, R.: oϕoς: forward secure searchable encryption. In: Proceedings of the
ACM SIGSAC Conference on Computer and Communications Security, Vienna,
Austria, pp. 1143–1154 (2016)
9. Canetti, R., Halevi, S., Katz, J.: A forward-secure public-key encryption scheme.
In: Biham, E. (ed.) EUROCRYPT 2003. LNCS, vol. 2656, pp. 255–271. Springer,
Heidelberg (2003). https://doi.org/10.1007/3-540-39200-9 16
10. Cash, D., Hofheinz, D., Kiltz, E., Peikert, C.: Bonsai trees, or how to delegate a
lattice basis. In: Gilbert, H. (ed.) EUROCRYPT 2010. LNCS, vol. 6110, pp. 523–
552. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-13190-5 27
11. Dodis, Y., Katz, J., Xu, S., Yung, M.: Key-insulated public key cryptosystems. In:
Knudsen, L.R. (ed.) EUROCRYPT 2002. LNCS, vol. 2332, pp. 65–82. Springer,
Heidelberg (2002). https://doi.org/10.1007/3-540-46035-7 5
12. Gentry, C., Peikert, C., Vaikuntanathan, V.: Trapdoors for hard lattices and new
cryptographic constructions. In: Proceedings of the 40th Annual ACM Symposium
on Theory of Computing, Victoria, British Columbia, Canada, pp. 197–206 (2008)
13. Gu, C., Zheng, Y., Kang, F., Xin, D.: Keyword search over encrypted data in
cloud computing from lattices in the standard model. In: Qiang, W., Zheng, X.,
Hsu, C.-H. (eds.) CloudCom-Asia 2015. LNCS, vol. 9106, pp. 335–343. Springer,
Cham (2015). https://doi.org/10.1007/978-3-319-28430-9 25
14. Kuchta, V., Markowitch, O.: Multi-authority distributed attribute-based encryp-
tion with application to searchable encryption on lattices. In: Phan, R.C.-W., Yung,
M. (eds.) Mycrypt 2016. LNCS, vol. 10311, pp. 409–435. Springer, Cham (2017).
https://doi.org/10.1007/978-3-319-61273-7 20
15. Le, H.Q., et al.: Lattice blind signatures with forward security. In: Liu, J.K., Cui, H.
(eds.) ACISP 2020. LNCS, vol. 12248, pp. 3–22. Springer, Cham (2020). https://
doi.org/10.1007/978-3-030-55304-3 1
16. Ling, S., Nguyen, K., Wang, H., Xu, Y.: Forward-secure group signatures from
lattices. In: Ding, J., Steinwandt, R. (eds.) PQCrypto 2019. LNCS, vol. 11505, pp.
44–64. Springer, Cham (2019). https://doi.org/10.1007/978-3-030-25510-7 3
17. Liu, J.K., Yuen, T.H., Zhou, J.: Forward secure ring signature without random
oracles. In: Qing, S., Susilo, W., Wang, G., Liu, D. (eds.) ICICS 2011. LNCS, vol.
7043, pp. 1–14. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-
25243-3 1
18. Mao, Y., Fu, X., Guo, C., Wu, G.: Public key encryption with conjunctive key-
word search secure against keyword guessing attack from lattices. Trans. Emerg.
Telecommun. Technol. 30, 1–14 (2018)
19. Regev, O.: On lattices, learning with errors, random linear codes, and cryptogra-
phy. J. ACM 56(6), 34:1–34:40 (2009)
20. Xu, L., Yuan, X., Steinfeld, R., Wang, C., Xu, C.: Multi-writer searchable encryp-
tion: an LWE-based realization and implementation. In: Asia Conference on Com-
puter and Communications Security, AsiaCCS, Auckland, New Zealand, pp. 122–
133 (2019)
726 X. Yu et al.
21. Xu, L., Yuan, X., Zhou, Z., Wang, C., Xu, C.: Towards efficient cryptographic
data validation service in edge computing. In: IEEE World Congress on Services,
SERVICES, Barcelona, Spain, 10–16 July 2022, p. 14 (2022)
22. Yang, Y., Zheng, X., Chang, V., Ye, S., Tang, C.: Lattice assumption based fuzzy
information retrieval scheme support multi-user for secure multimedia cloud. Mul-
timedia Tools Appl. 77, 9927–9941 (2018). https://doi.org/10.1007/s11042-017-
4560-x
23. Zeng, M., Qian, H., Chen, J., Zhang, K.: Forward secure public key encryption
with keyword search for outsourced cloud storage. IEEE Trans. Cloud Comput.
10(1), 426–438 (2022)
24. Zhang, X., Tang, Y., Wang, H., Xu, C., Miao, Y., Cheng, H.: Lattice-based proxy-
oriented identity-based encryption with keyword search for cloud storage. Inf. Sci.
494, 193–207 (2019)
25. Zhang, X., Xu, C.: Trapdoor security lattice-based public-key searchable encryp-
tion with a designated cloud server. Wirel. Pers. Commun. 100(3), 907–921 (2018)
26. Zhang, X., Xu, C., Wang, H., Zhang, Y., Wang, S.: FS-PEKS: lattice-based for-
ward secure public-key encryption with keyword search for cloud-assisted industrial
internet of things. IEEE Trans. Depend. Secur. Comput. 18(3), 1019–1032 (2021)
Strengthening the Security of AES
Against Differential Fault Attack
Abstract. AES, the NIST standard block cipher, is most widely used for
cryptographic applications. Till date, AES is secured against all types of
cryptographic attacks like algebraic or statistical attacks. Unfortunately,
AES is vulnerable against side channel attacks. Differential Fault Attack
is a powerful cryptanalytic technique against AES. The most successful
fault attacks on AES form linear equations with a number of faulty and
fault free ciphertexts to find out the key. Our proposal to protect AES from
Differential Fault Attack is to add a new diffusion layer in each round to
enlarge the exhaustive key-search space by generating a minimum number
of equations. The existing result on AES key recovery using this kind of
fault attack is 232 , which is further improved to 28 . With our approach,
the security is enhanced by increasing key-search space to 284 .
1 Introduction
Block ciphers are the modern workhorse of cryptography. Advanced Encryption
Standard (AES) [4] is the current standard block cipher which is known to be
secured till date against cryptanalytic attacks that exploit the algebraic analysis
or algorithmic properties. Unfortunately, AES is vulnerable against side channel
attacks or implementation attacks. Fault attack is the most devastating imple-
mentation attack against block cipher. The first use of fault attack has been
conceived by Boneh et al. [2], where the idea is to intentionally inject a fault in
an intermediate state of the algorithm and then study the disturbed execution,
i.e., faulty output and fault free output. One of the most popular targets of fault
attacks has been the Advanced Encryption Standard (AES). In literature, sev-
eral approaches of Differential Fault Analysis (DFA) attacks on AES have been
reported so far [2,4–6,8–10]. Optical fault induction [5] is one of the techniques
in the fault-based side channel cryptanalysis of AES and has gained consider-
able attention. The most successful fault analysis attack on AES is presented in
[10]. Here, a fault is induced in the 9th round of AES that requires 250 faulty
ciphertexts to recover the key. The same idea has been extended in [8] and an
attacker can retrieve the whole AES-128 key using 128 faulty ciphertexts. Fur-
ther improvement is proposed in [9] and it is shown that fault induced between
c The Author(s), under exclusive license to Springer Nature Switzerland AG 2022
X. Yuan et al. (Eds.): NSS 2022, LNCS 13787, pp. 727–744, 2022.
https://doi.org/10.1007/978-3-031-23020-2_41
728 A. K. Ghosal and D. Roychowdhury
Our Contribution. In this work, an additional diffusion layer to the AES block
cipher, MixColumn-Plus, is proposed to make the cipher less susceptible against
differential fault attacks. Here, the main idea is to enlarge the exhaustive key-
search space by reducing the number of linear equations so that the differential
fault attacks become much more costlier to the attacker. The end complexity is
around 284 compared to only 28 , for original AES. Introduction of the proposed
layer at each round reduces DFA vulnerabilities in the practical implementation
(i.e., hardware or sof tware) of AES. Further, the proposed MixColumn-Plus
(or InvMixColumn-Plus) matrix can be broken into a binary matrix followed
by InvMixColumns (or MixColumns) matrix which is efficient for the practical
implementation.
Organization. The paper is organized as follows. Section 2 describes the back-
ground of AES and the existing attack strategy whereas Sect. 3 illustrates the
operation of MixColumn-Plus layer. Detailed analysis, results and applications
are given in Sect. 4, while Sect. 5 focuses on security analysis. Finally, we con-
clude the paper in Sect. 6.
2 Background
– SubBytes. SubBytes is the only non-linear step of the block cipher. Each
input byte x is transformed by affine transformation to the output byte as y
= Ax−1 + B, where A and B both are constant matrices.
– ShiftRows. Every row of the state matrix is cyclically rotated by a certain
number of byte positions.
– MixColumns. Each column of the state matrix is linearly transformed.
Every column is considered as a 4-dimensional vector where each element
belongs to F(28 ). A 4×4 matrix M whose elements are also in F(28 ) is used
to map this column into a new vector. This operation is applied on all the
4 columns of the state matrix. Here, M and its inverse M −1 are defined as
follows: ⎛ ⎞ ⎛ ⎞
02 03 01 01 0e 0b 0d 09
⎜01 02 03 01⎟ −1 ⎜09 0e 0b 0d⎟
M =⎜ ⎟ ⎜
⎝01 01 02 03⎠ M = ⎝0d 09 0e 0b ⎠ .
⎟
03 01 01 02 0b 0d 09 0e
– AddRoundKey. The subkey generated from the KeySchedule algorithm is
a bitwise XOR operation with the state matrix.
730 A. K. Ghosal and D. Roychowdhury
Fig. 1. Fault propagation process induced in the input of 8th round [16]
Differential Fault Analysis (DFA) [1] is a type of side channel attack where an
attacker disturbs cryptographic computations by injecting faults in the interme-
diate state of cipher. The ultimate goal of the attacker is to recover the secret key
by exploiting the erroneous results. Differential Fault Attack on AES shows that
using a single byte fault [16] secret key can be retrieved with an exhaustive search
of 232 . We are restricting ourselves to AES-128 only. Let P be the 128 bit plaintext
matrix, K be the 128 bit key matrix which produces fault free ciphertext CT and
faulty ciphertext CT . All matrices are arranged in the following fashion:
Strengthening the Security of AES Against Differential Fault Attack 731
⎛ ⎞ ⎛ ⎞
p1 p5 p9 p13 k1 k5 k9 k13
⎜ p2 p6 p10 p14 ⎟ ⎜k2 k6 k10 k14 ⎟
P =⎜
⎝ p3
⎟K = ⎜ ⎟
p7 p11 p15 ⎠ ⎝k3 k7 k11 k15 ⎠
p4 p8 p12 p16 k4 k8 k12 k16
⎛ ⎞ ⎛ ⎞
x1 x5 x9 x13 x1 x5 x9 x13
⎜x2 x6 x10 x14 ⎟ ⎜x2
x6
x10 x14 ⎟
CT = ⎜ ⎟ CT = ⎜ ⎟,
The attacker obtains a pair of ciphertext CT and CT . These ciphertexts
are used to form a set of linear equations [16,17]. Considering the byte inter-
relationship after 9th round using Inverse SubBytes (ISB) with key matrix val-
ues (k1 , k14 ), fault value at (0, 0)th position (F1 ) can be equated with fault value
732 A. K. Ghosal and D. Roychowdhury
01 00 01 01 03 01 01 02 00 04 00 05
⎛ ⎞ ⎛ ⎞
01 01 00 01 0e 0b 0d 09
⎜01 01 01 00⎟ ⎜09 0e 0b 0d⎟
=⇒ Xenc = ⎜ ⎟ ⎜
⎝00 01 01 01⎠ × ⎝0d 09 0e 0b ⎠ .
⎟
01 00 01 01 0b 0d 09 0e
In similar way, the Xdec matrix can be broken as follows:
⎛ ⎞ ⎛ ⎞
01 01 00 01 02 03 01 01
⎜01 01 01 00⎟ ⎜01 02 03 01⎟
=⇒ Xdec = ⎜ ⎟ ⎜
⎝00 01 01 01⎠ × ⎝01 01 02 03⎠ .
⎟
01 00 01 01 03 01 01 02
⎜ ⎟ ⎜ ⎟=⎜ ⎟.
⎝01 01 02 03⎠ × ⎝x3 x7 x11 x15 ⎠ ⎝ F3
x7
x11 x ⎠
15
03 01 01 02 x4 x8 x12 x16 3 × F4 x8 x12 x16
734 A. K. Ghosal and D. Roychowdhury
⎠ = 2 × F1 + 3 × x2 + x3 + x4 = 2 × F1 + x1 .
x3
x4
As expression (2×F1 +x1 ) contains a faulty byte with some value x1 , we denote
the whole thing as faulty byte 2 × F1 . Similar convention is used for the other
faulty bytes.
The MixColumn-Plus matrix Xenc is multiplied with the state matrix Y
which nullifies the fault in the (i, j)th byte (where i = 2 and j = 0), i.e., x3 . So,
th
i column of the state matrix (where i = 0) contains only three faults:
MixColumn-Plus →
⎛ ⎞ ⎛ ⎞ ⎛ ⎞
0c 08 0f 0a 2 × F1 x5 x9 x13 F1 x5 x9 x13
⎜ 0a 0c 08 0f ⎟ ⎜ F2
x6 x 10 x14 ⎟
⎜F2
x6
x10 x14 ⎟
⎜ ⎟ ⎜ ⎟=⎜ ⎟.
⎝0f 0a 0c 08 ⎠ × ⎝ F3
x7
x11 x15 ⎠ ⎝x3
x7
x11 x15 ⎠
08 0f 0a 0c 3 × F4 x8 x12 x16 F4 x8 x12 x16
Let us assume that F1 denotes the fault in (0, 0)th position of resultant state
matrix, F2 denotes the fault in (1, 0)th position of resultant state matrix and F4
denotes the fault in (3, 0)th position of resultant state matrix and N F denotes
no fault, i.e., fault is not present into that cell. Now, after AddRoundKey, Sub-
Bytes, and ShiftRows of the 9th round, the resultant state matrix contains fault
F1 , F2 , and F4 at (0, 0)th , (1, 3)th and (3, 2)th locations respectively. The next
MixColumns along with MixColumn-Plus operation spreads the fault into six
bytes instead of remaining twelve bytes in the earlier case. Byte inter-relationship
of the state matrix is defined below:
⎛ ⎞ ⎛ ⎞
F1 x5 x9 x13 F1 F4 N F F 2
⎜ x6 x10 x14 F2 ⎟ ⎜ F1 N F N F F 2 ⎟
⎜ ⎟ ⎜ ⎟
⎝x x x x ⎠ =⇒ ⎝N F F4 N F F2 ⎠ .
11 15 3 7
x16 F4 x8 x12
F1 F1 N F N F
Here, 1st , 2nd and 4th columns of the state matrix contain the fault only.
So, combining the MixColumns and MixColumn-Plus layer, faults are confined
to present in three columns only. Internal working strategy of the 8th round
MixColumns and MixColumn-Plus operations are described below:
⎛ ⎞ ⎛ ⎞ ⎛ ⎞ ⎛ ⎞
0c 08 0f 0a 02 03 01 01 F x5 x9 x13 F1 x5 x9 x13
⎜ 0a 0c 08 0f ⎟ ⎜01 02 03 01⎟ ⎜x2 x6 x10 x14 ⎟ ⎜F2 x6 x10 x14 ⎟
⎜ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎟
⎝0f 0a 0c 08 ⎠ × ⎝01 01 02 03⎠ × ⎝x3 x7 x11 x15 ⎠ = ⎝ x x x x ⎠ .
3 7 11 15
08 0f 0a 0c 03 01 01 02 x4 x8 x12 x16 F4 x8 x12 x16
⎛ ⎞ ⎛ ⎞ ⎛ ⎞
01 01 00 01 F x5 x9 x13 F1 x5 x9 x13
⎜01 01 01 00⎟ ⎜x2 x6 x10 x14 ⎟ ⎜F2 x6 x10 x14 ⎟
=⇒ ⎜ ⎟ ⎜ ⎟ ⎜
⎝00 01 01 01⎠ × ⎝x3 x7 x11 x15 ⎠ = ⎝ x x x x ⎠ .
⎟
3 7 11 15
01 00 01 01 x4 x8 x12 x16 F4 x8 x12 x16
Strengthening the Security of AES Against Differential Fault Attack 735
In the below matrix, 01 implies 0x01, i.e., 1 in binary, 00 implies 0x00, i.e.,
0 in binary. It is assumed that
⎛ ⎞
01 01 00 01
⎜01 01 01 00⎟
M3 = ⎜⎝00 01 01 01⎠ .
⎟
01 00 01 01
It is evident from the above analysis that combination of the MixColumns
and MixColumn-Plus can be treated as same operation if it would be operated
by M 3. So, instead of introducing MixColumn-Plus, replacing the MixColumns
transformation of AES and multiplying state matrix with M 3 can also strengthen
against single byte fault attack. Presence of 0 in each column of M 3 prevents
fault propagation in one byte out of four in a column. Here, M 3 is a circulant,
involutive binary matrix with branch number 4. Such binary involutive matrix
helps to achieve InvMixColumn-Plus lightweight.
4.2 Results
As an attacker is able to form less number of equations, some candidate keys
are impossible to generate. In that case, brute-force technique has to use with
no other option. Let us consider the keys (k9 , k6 , k3 , k16 ). In the above analysis,
N F is present in their coefficient. Hence, 32 bits of the AES key has to be found
with 232 possible ways. Now, for the keys (k1 , k14 , k11 , k8 ), (k5 , k2 , k15 , k12 ) and
(k13 , k10 , k7 , k4 ) six equations are possible in total compared to nine as described
in the original work. Since, one equation is absent from each of the three key
sets, brute-force search is required for the 8 bits out 32 keybits. The remain-
ing 24 bits of (k1 , k14 , k11 , k8 ) can be found out from the above two equations
with an exhaustive search of 28 . Thus, 216 candidate keys are generated for
(k1 , k14 , k11 , k8 ) in total and such three key sets are present. Combining three dif-
ferent key sets (k1 , k14 , k11 , k8 ), (k5 , k2 , k15 , k12 ) and (k13 , k10 , k7 , k4 ), an attacker
has to search 216 × 216 × 216 ≈ 248 candidate keys exhaustively. For 128 bit AES
key, the attacker has to perform exhaustive search of 248 × 232 ≈ 280 if fault
location is known earlier. When the exact fault location is not known to the
attacker, all 16 possible positions of the state matrix has to be explored. In this
scenario, an attacker has to search 16 × 280 ≈ 284 candidate keys exhaustively.
Security Against other DFA Attacks. With MixColumn-Plus layer, an
attacker has to search 282 candidate keys compared to 234 in earlier case [17]. Sim-
ilarly, complexity of the attack [21] is increased to 284 from 28 as no inter-key rela-
tions are formed between 8th and 9th round of the MixColumns. Piret et al. [6]
show that with an exhaustive search of 240 candidate keys, AES-128 cryptosystem
can be broken easily by inducing a single fault. Their attack is strengthened to 272
after applying MixColumn-Plus. The first DFA attack on AES is shown by Giraud
et al. [10] by which the secret key can be retrieved with less than 250 ciphertexts.
Now, with MixColumn-Plus layer, an attacker needs more than 250 ciphertexts to
carry out the previous attack [10]. Our approach is also applicable in case of AES-
192 and AES-256. Such layer helps to increase the exhaustive search space to 272
or more to find the desired key. In Table 1a, we give a comparison of the various
DFA attacks on AES with MixColumn-Plus layer.
Avalanche Effect. In Table 1b and Table 1c, we give the results of avalanche
effect in original AES and AES with MixColumn-Plus layer. For a single bit
change in the plaintext, almost 53 to 72 bits are changed in the ciphertext in
case of AES with MixColumn-Plus whereas in the original AES 60 or more bits
are changed for the same input and key (Table 1b and Table 1c). Three different
plaintexts are taken and a single bit is changed at a time of these plaintexts.
Corresponding ciphertexts are given in the next column for a fixed key K= {0f
15 71 c9 47 d9 e8 59 0c b7 ad d6 af 7f 67 98}.
Applications in Practical Scenario. Unfortunately, security does not come
for free and even considering state-of-the-art various AES countermeasures incur
additional expenses. The proposed MixColumn-Plus layer can be broken into
a binary matrix followed by AES InvMixColumns matrix. Since the hardware
implementation of AES InvMixColumns is already available in the market, we
738 A. K. Ghosal and D. Roychowdhury
need to estimate the extra cost of adding the binary matrix with that. Similarly,
InvMixColumn-Plus matrix can be broken into a binary matrix followed by AES
MixColumns matrix. With this extra cost of adding a binary matrix with AES,
the effort of an adversary to perform DFA attack increases 276 times, i.e., 28 to
284 . By deploying such diffusion layer in Internet of things (IoT) and embedded
system, the security of the system against DFA is increased. In software platforms
like OpenSSL crypto library (libcrypto), Libgcrypt, Crypto++, cryptlib etc., such
additional layer can be incorporated to make the cipher less susceptible against
DFA attacks. Our further research work is to analyze the energy costs, delays in
hardware platform due to additional overhead of an extra diffusion layer.
5 Security Analysis
To analyze the security of our method, we refer to the classical IN D-CP A game.
First, we compare ciphertext produced by our algorithm (with MixColumn-Plus
layer) with respect to pseudorandom permutation (PRP) and secondly, referring
to the classical IN D-CP A security, we introduce a term called IN Dsf -CP A
security to take into account that an adversary can inject a single byte fault.
The idea behind IN Dsf -CP A security is to restrict fault propagation by some
randomized function.
Let P erm(D) denotes the set of all permutations on D. Let F : K × D → R
be a family of functions from D to R indexed by key K. We use F (K, D) as
a family of functions, i.e., block cipher. If D = R then Fk (.) is a permutation
on D for each k ∈ K. Suppose E : K × D → D is a family of functions. If A
is a computationally bounded adversary with oracle access, we denote the PRP
advantage of A in attacking Ek (.) as follows:
prp $ $
AdvEk
(A) = P r[k ←
− K : AEk (.) = 1] − P r[g ←
− P erm(D) : Ag(.) = 1].
$ sf $
Adv lwprp
sf (A) = P r[k ←
− K : AEk (.,.)
= 1] − P r[g ←
− P erm(D) : Ag(.) = 1].
Ek
Strengthening the Security of AES Against Differential Fault Attack 739
Table 1. Comparison of AES with MixColumn-Plus and traditional AES against DFA
and Avalanche Effect.
Fault AES Fault Fault Traditional AES with
Attack version Model Injection AES MixColumn-Plus
Type Round Candidate keys Candidate keys
Single byte AES-128 1 byte fault Before 8th 280 2101
without or 9th MixColumns
improvement [16]
Single byte AES-128 1 byte fault Before 8th 236 284
with or 9th MixColumns
improvement [16]
Diagonal attack [17] AES-128 1 random Before 8th SubBytes 234 282
faulty diagonal
DFA Against SPN AES-128 Byte fault Before 8th SubBytes 240 272
as application or 9th SubBytes or more
to AES [6]
DFA on AES using AES-128 1 byte fault Before 8th 28 284
a single fault [21] or 9th MixColumns
DFA against AES-192 Byte fault Before 8th 232 , 28 272 , 272
AES-192 and AES-256 or 9th MixColumns or more
with minimal faults [19]
DFA against AES-256 Byte fault Before 8th 232 272
AES-192 and AES-256 or 9th MixColumns or more
with minimal faults [19]
(a) Comparison of AES with MixColumn-Plus and traditional AES against DFA
The above advantage is same as PRP except that our encryption scheme
Eksf (., .) is a little weak due to the reduction of branch number. If an adversary
A makes query at most q number of times to its encryption oracle with maximum
time t then
Adv lwprp
sf (q, t) = max{Adv lwprp
sf (A)}.
Ek A Ek
procedure Initialization()
$
k←−K ⇒ chosen by encryption oracle
$
{p , p } ←
0 1
−P ⇒ chosen by an adversary
$
b←− {0, 1} ⇒ chosen by encryption oracle
x = Ek (pb )
success = 0
end procedure
procedure Finalize()
if b = b then
success = 1
endif
return success
end procedure
Strengthening the Security of AES Against Differential Fault Attack 741
With respect to IN Dsf -CP A game, an adversary wins the game if he cor-
rectly guesses the value of b. Let A be the computationally bounded adversary
who can query at most q number of times with maximum time t.
IN Dsf −CP A 0
),Eksf (.,.) 1
),Eksf (.,.)
AdvΠ (A) = [P r[AEk (p = 1] − P r[AEk (p = 1]].
6 Conclusion
In this work, we enhance the security of AES against single byte fault attack
by adding an extra diffusion layer. It increases the effort of an attacker that has
to spend to retrieve a key by leveraging on single byte differential fault attack.
Exhaustive key-search space is increased to 284 compared to the earlier case of
28 . Keeping original AES subfunctions intact in each round, an additional Mix-
Columns transformation layer is added, namely the MixColumn-Plus, with the
aim of reducing the number of equations an adversary can write observing a
faulty plaintext and its correct counterpart. Such layer makes fault attack too
expensive to carry out in hardware or software platforms. Many other block
ciphers are not secured against fault attacks based on algebraic equation forma-
tion. Further research can be pursued on the applicability of our approach to
enhance the security of those ciphers.
References
1. Biham, E., Shamir, A.: Differential fault analysis of secret key cryptosystems. In:
Kaliski, B.S. (ed.) CRYPTO 1997. LNCS, vol. 1294, pp. 513–525. Springer, Hei-
delberg (1997). https://doi.org/10.1007/BFb0052259
2. Boneh, D., DeMillo, R.A., Lipton, R.J.: On the importance of checking cryp-
tographic protocols for faults. In: Fumy, W. (ed.) EUROCRYPT 1997. LNCS,
vol. 1233, pp. 37–51. Springer, Heidelberg (1997). https://doi.org/10.1007/3-540-
69053-0 4
3. Barreto, P.S.L.M., Rijmen, V.: The Khazad legacy-level block cipher. Primitive
submitted to NESSIE, September 2000
4. Joan, D., Vincent, R.: The Design of Rijndael. Springer, Heidelberg (2002). https://
doi.org/10.1007/978-3-662-04722-4
5. Skorobogatov, S.P., Anderson, R.J.: Optical fault induction attacks. In: Kaliski,
B.S., Koç, K., Paar, C. (eds.) CHES 2002. LNCS, vol. 2523, pp. 2–12. Springer,
Heidelberg (2003). https://doi.org/10.1007/3-540-36400-5 2
6. Piret, G., Quisquater, J.-J.: A differential fault attack technique against SPN struc-
tures, with application to the AES and Khazad. In: Walter, C.D., Koç, Ç.K., Paar,
C. (eds.) CHES 2003. LNCS, vol. 2779, pp. 77–88. Springer, Heidelberg (2003).
https://doi.org/10.1007/978-3-540-45238-6 7
7. Golić, J.D., Tymen, C.: Multiplicative masking and power analysis of AES. In:
Kaliski, B.S., Koç, K., Paar, C. (eds.) CHES 2002. LNCS, vol. 2523, pp. 198–212.
Springer, Heidelberg (2003). https://doi.org/10.1007/3-540-36400-5 16
8. Blömer, J., Seifert, J.-P.: Fault based cryptanalysis of the advanced encryption
standard (AES). In: Wright, R.N. (ed.) FC 2003. LNCS, vol. 2742, pp. 162–181.
Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-45126-6 12
9. Dusart, P., Letourneux, G., Vivolo, O.: Differential fault analysis on A.E.S. In:
Zhou, J., Yung, M., Han, Y. (eds.) ACNS 2003. LNCS, vol. 2846, pp. 293–306.
Springer, Heidelberg (2003). https://doi.org/10.1007/978-3-540-45203-4 23
10. Giraud, C.: DFA on AES. In: Dobbertin, H., Rijmen, V., Sowa, A. (eds.) AES
2004. LNCS, vol. 3373, pp. 27–41. Springer, Heidelberg (2005). https://doi.org/10.
1007/11506447 4
Strengthening the Security of AES Against Differential Fault Attack 743
11. Moradi, A., Shalmani, M.T.M., Salmasizadeh, M.: A generalized method of differ-
ential fault attack against AES cryptosystem. In: Goubin, L., Matsui, M. (eds.)
CHES 2006. LNCS, vol. 4249, pp. 91–100. Springer, Heidelberg (2006). https://
doi.org/10.1007/11894063 8
12. Herbst, C., Oswald, E., Mangard, S.: An AES smart card implementation resistant
to power analysis attacks. In: Zhou, J., Yung, M., Bao, F. (eds.) ACNS 2006.
LNCS, vol. 3989, pp. 239–252. Springer, Heidelberg (2006). https://doi.org/10.
1007/11767480 16
13. Bar-El, H., Choukri, H., Naccache, D., Tunstall, M., Whelan, C.: The sorcerer’s
apprentice guide to fault attacks. Proc. IEEE 94(2), 370–382 (2006)
14. Schramm, K., Paar, C.: Higher order masking of the AES. In: Pointcheval, D. (ed.)
CT-RSA 2006. LNCS, vol. 3860, pp. 208–225. Springer, Heidelberg (2006). https://
doi.org/10.1007/11605805 14
15. Bogdanov, A., et al.: PRESENT: an ultra-lightweight block cipher. In: Paillier,
P., Verbauwhede, I. (eds.) CHES 2007. LNCS, vol. 4727, pp. 450–466. Springer,
Heidelberg (2007). https://doi.org/10.1007/978-3-540-74735-2 31
16. Mukhopadhyay, D.: An improved fault based attack of the advanced encryption
standard. In: Preneel, B. (ed.) AFRICACRYPT 2009. LNCS, vol. 5580, pp. 421–
434. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-02384-2 26
17. Saha, D., Mukhopadhyay, D., RoyChowdhury, D.: A diagonal fault attack on the
advanced encryption standard. Cryptology ePrint Archive, Report 2009/581 (2009)
18. Medwed, M., Standaert, F.-X., Großschädl, J., Regazzoni, F.: Fresh re-keying: secu-
rity against side-channel and fault attacks for low-cost devices. In: Bernstein, D.J.,
Lange, T. (eds.) AFRICACRYPT 2010. LNCS, vol. 6055, pp. 279–296. Springer,
Heidelberg (2010). https://doi.org/10.1007/978-3-642-12678-9 17
19. Kim, C.H.: Differential fault analysis against AES-192 and AES-256 with mini-
mal faults. In: 2010 Workshop on Fault Diagnosis and Tolerance in Cryptography
(FDTC), pp. 3–9. IEEE (2010)
20. Rivain, M., Prouff, E.: Provably secure higher-order masking of AES. In: Mangard,
S., Standaert, F.-X. (eds.) CHES 2010. LNCS, vol. 6225, pp. 413–427. Springer,
Heidelberg (2010). https://doi.org/10.1007/978-3-642-15031-9 28
21. Tunstall, M., Mukhopadhyay, D., Ali, S.: Differential fault analysis of the advanced
encryption standard using a single fault. In: Ardagna, C.A., Zhou, J. (eds.) WISTP
2011. LNCS, vol. 6633, pp. 224–233. Springer, Heidelberg (2011). https://doi.org/
10.1007/978-3-642-21040-2 15
22. Van Woudenberg, J., Witteman, M., Menarini, F.: Practical optical fault injection
on secure microcontrollers. In: 2011 Workshop on Fault Diagnosis and Tolerance
in Cryptography (FDTC), pp. 91–99, September 2011
23. Gierlichs, B., Schmidt, J.-M., Tunstall, M.: Infective computation and dummy
rounds: fault protection for block ciphers without check-before-output. In: Hevia,
A., Neven, G. (eds.) LATINCRYPT 2012. LNCS, vol. 7533, pp. 305–321. Springer,
Heidelberg (2012). https://doi.org/10.1007/978-3-642-33481-8 17
24. Lomné, V., Roche, T., Thillard, A.: On the need of randomness in fault attack
countermeasures - application to AES. In: Bertoni, G., Gierlichs, B. (eds.) Fault
Diagnosis and Tolerance in Cryptography, FDTC 2012, pp. 85–94. IEEE Computer
Society (2012)
25. Battistello, A., Giraud, C.: Fault analysis of infective AES computations. In: 2013
Workshop on Fault Diagnosis and Tolerance in Cryptography (FDTC), pp. 101–
107, August 2013
744 A. K. Ghosal and D. Roychowdhury
26. Moro, N., Heydemann, K., Encrenaz, E., Robisson, B.: Formal verification of a
software countermeasure against instruction skip attacks. J. Cryptogr. Eng. 4(3),
145–156 (2014). https://doi.org/10.1007/s13389-014-0077-7
27. Tupsamudre, H., Bisht, S., Mukhopadhyay, D.: Destroying fault invariant with ran-
domization. In: Batina, L., Robshaw, M. (eds.) CHES 2014. LNCS, vol. 8731, pp.
93–111. Springer, Heidelberg (2014). https://doi.org/10.1007/978-3-662-44709-3 6
28. Banik, S., et al.: Midori: a block cipher for low energy. In: Iwata, T., Cheon, J.H.
(eds.) ASIACRYPT 2015. LNCS, vol. 9453, pp. 411–436. Springer, Heidelberg
(2015). https://doi.org/10.1007/978-3-662-48800-3 17
29. Breier, J., Jap, D. Bhasin, S.: The other side of the coin: analyzing software encod-
ing schemes against fault injection attacks. In: 2016 IEEE International Symposium
on Hardware Oriented Security and Trust, HOST 2016, McLean, VA, USA, 3–5
May 2016, pp. 209–216 (2016)
30. Goudarzi, D., Rivain, M.: How fast can higher-order masking be in software? In:
Coron, J.-S., Nielsen, J.B. (eds.) EUROCRYPT 2017. LNCS, vol. 10210, pp. 567–
597. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-56620-7 20
31. Patranabis, S., Chakraborty, A., Mukhopadhyay, D.: Fault tolerant infective coun-
termeasure for AES. J. Hardw. Syst. Secur. 1(1), 3–17 (2017)
32. Zhang, J., Wu, N., Zhou, F., Ge, F., Zhang, X.: Securing the AES cryptographic
circuit against both power and fault attacks. J. Electr. Eng. Technol. 14(5), 2171–
2180 (2019). https://doi.org/10.1007/s42835-019-00226-6
33. Murdock, K., Oswald, D., Garcia, F.D., Van Bulck, J., Gruss, D., Piessens, F.:
Plundervolt: software-based fault injection attacks against Intel SGX. In: 41st
IEEE Symposium on Security and Privacy (2020)
34. Gruber, M., et al.: DOMREP-an orthogonal countermeasure for arbitrary order
side-channel and fault attack protection. IEEE Trans. Inf. Forensics Secur. 16,
4321–4335 (2021)
Author Index