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

2022 International Conference on Blockchain Technology and Information Security (ICBCTIS)

An Edge Computing Data Privacy-Preserving Scheme Based on Blockchain and


Homomorphic Encryption
1st Guangxia Xu* 2nd Jiajun Zhang
School of Software Engineering School of Software Engineering
Chongqing University of Posts and Telecommunications Chongqing University of Posts and Telecommunications
Chongqing, China Chongqing, China
xugx@cqupt.edu.cn S191201009@stu.cqupt.edu.cn
2022 International Conference on Blockchain Technology and Information Security (ICBCTIS) | 978-1-6654-9691-9/22/$31.00 ©2022 IEEE | DOI: 10.1109/ICBCTIS55569.2022.00044

3rd Ling Wang


School of Software Engineering
Chongqing University of Posts and Telecommunications
Chongqing, China
S201201004@stu.cqupt.edu.cn

Abstract—The rapid increase in the number of mobile smart However, edge devices have direct access to users'
devices has led to an exponential growth in user data. With private data, which will lead to a series of security risks,
the access of a large number of heterogeneous edge devices such as leakage of user data, if the edge device is attacked.
and the in-depth development of edge computing technology Furthermore, in the edge computing scenario, there are a
in various fields, it has brought huge challenges to the large number of heterogeneous access devices and the trust
security management and data privacy protection in the edge situation of the devices is more complicated. These features
computing architecture. Therefore, this paper proposes a lead to malicious attackers may pretend to be a legitimate
lightweight edge computing data privacy-preserving scheme
edge node and illegally obtain user data through malicious
based on blockchain and homomorphic encryption. Above all,
requests and other operations [3]. Therefore, some studies
set edge computing servers as distributed nodes of the
blockchain network and utilize the decentralization of
and scholars have proposed the convergence of blockchain
blockchain and the non-tamperable characteristics of and edge computing. At present, the data and privacy
information to ensure the distributed storage of data and security protection based on blockchain technology for
information recording. Then, designing a blockchain data edge computing mainly includes the following three
encryption transmission scheme based on homomorphic aspects: privacy protection based on encryption
encryption which could guarantee data transmission between mechanisms [4], architecture or system models [5], and
edge nodes in the form of homomorphic ciphertext. data access protection based on policies or protocols [6].
Meanwhile, supporting the verification of the legality and Moreover, it is precisely because of the transparency and
correctness of the transaction in the form of ciphertext. open transaction characteristics of blockchain technology
Simulation experiments show that the method proposed in that malicious attackers may even trace the transfer path of
this paper can carry out effective data encryption a transaction and the real identity of the user through a large
transmission and has certain application potential. amount of analysis of blockchain transactions [7].
Therefore, the privacy protection of data for edge
Keywords-edge computing, blockchain, homomorphic computing and blockchain needs further research.
encryption, privacy-preserving To solve the problem of ensuring data security under the
I. INTRODUCTION edge computing architecture, this paper proposes a data
privacy protection scheme based on blockchain and
As a distributed technology that integrates Internet homomorphic encryption for edge computing. Utility the
technologies such as P2P, cryptography, and consensus features of the blockchain such as decentralization and
algorithms, blockchain has become one of the most tamper-proof to propose a distributed edge computing
promising technologies to meet the security needs of the architecture based on blockchain which ensures distributed
Internet of Things (IoT). With the continuous in-depth data storage and data recording of edge devices. Moreover,
development of blockchain technology research, it has this paper proposes a blockchain data transmission method
penetrated into various application fields such as edge based on homomorphic encryption which transformed the
computing, financial industry and supply chain [1]. Edge plaintext data transmission of the traditional blockchain
computing reduces network operation and service delivery into the homomorphic ciphertext form of data transmission,
delays by concentrating resources such as computing, and support the completion of data transmission or
storage, bandwidth, and applications at the edge of the transaction legality verification in the ciphertext state.
network [2]. In this way, a high-performance, low-latency
and high-bandwidth service environment can be created to II. SYSTEM ARCHITECTURE AND
speed up the rapid download of various content, services METHODOLOGY
and applications on the network, thus also allowing edge To solve the problem that low-end heterogeneous edge
computing technologies to be innovated and developed in devices are difficult to perform node security verification
various fields. services and difficult to achieve lightweight and reliable

978-1-6654-9691-9/22/$31.00 ©2022 IEEE 156


DOI 10.1109/ICBCTIS55569.2022.00044
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SURATHKAL. Downloaded on November 08,2023 at 17:16:43 UTC from IEEE Xplore. Restrictions apply.
data transmission [8]. A data privacy protection scheme for B. Data encryption transmission mechanism
edge computing is proposed, which mainly includes the We take digital asset trading as an example for design,
following contents. but the practical application can be any form of data
A. Multi-Layer Security Management Architecture transmission, such as medical data protection. The
implementation process is shown in figure 2.
The multi-layer management architecture based on
1) key generation: The proposed method first uses
blockchain and edge computing is shown in figure 1, which
mainly includes IoT device layer, edge service layer and public key encryption based on the underlying blockchain
blockchain network layer. technology for local account balance updates. Secondly,
BLOCK 1 BLOCK 2 BLOCK n the Paillier homomorphic algorithm is introduced to
Header Header Header
濕 濕 Version Version
PrevBlockHash
Version
PrevBlockHash
encrypt the transfer amount for encrypted data
PrevBlockHash

濕 濕 濕 MerkleRoot MerkleRoot
……
MerkleRoot
……
transmission and verification. The update and encrypted
……

濕 濕 Transaction 1 Transaction 1 Transaction 1


transmission of account amounts is achieved by the above
Transaction 2
……
Transaction n
Transaction 2
…… Transaction 2
…… two methods.
Transaction n Transaction n
Blockchain network layer a) Homomorphic Key Generation: The generation of
The data is uploaded to the blockchain Paillier homomorphic keys in this stage is performed by
the established key management center. The key
generation process starts with the selection of two large
prime numbers and , and the calculation is carried out
according to equation (1).
=
Edge service device layer ( )= ( − 1, − 1) (1)
IoT devices access edge servers
Then, the parameters of the multiplicative group
modulo are chosen randomly, where =
∈ ∗ and there exists equation (2) holds.
: Smart grid : Smart home : Wisdom park gcd , =1 (2)
: Communication : Intelligent sensor : User Equipment
equipment
Through the above calculation, we can obtain the public
IoT device layer key = ( , ) and the private key =( , ),
Figure 1. Multi-layer security architecture which is ( ) . Homomorphic encryption of data by
public-private key pair ( , ).
Start End b) Public-Private Key Generation: Suppose a transfer
is made from account to account . Account first
Key generation Transaction failed,
withdraw the transaction
chooses the elliptic curve ( , ) and selects a point on
processing
N the elliptic curve as the base point . Next, it chooses the
Private-public key pairs Homomorphic key generation:
largest integer such that ∈ [1, ] , takes as the
k and = ( , )
private key, computes = and discloses it as the
public key. Account sends ( , ), and to
(
(

account .
)=
)=

Perform data 2) Transaction Initiation And Data Encryption: For


Verify that

encryption operations
is true

Y
the plaintext ( < ) to be encrypted, a random

number is randomly selected and the plaintext is
+ (

Use = , Use ( , ) to encrypt


+ (

, to encrypt , , and
respectively
encrypted by the homomorphic public key to
generate a homomorphic ciphertext.
)
)

= ( , )= ∗ (3)
Carry out transaction and
account amount update By homomorphic encryption, the total account, balance
and transfer amount of and are homomorphically
Paillier algorithm is used to
encrypt the account amount
Use private key decryption to
update the local amount of
Transaction encrypted separately. In addition, the transfer amount
and store it in the blockchain both accounts
Verification Process needs to be encrypted using the public key. After
account receives the information, it encodes the transfer
Figure 2. Scheme implementation process amount value to a point on ( , ) , generates a
random integer , and the ciphertext is generated by
The IoT device layer mainly integrates various IoT evaluating:
application scenarios and devices in the real world. Edge ={ , + } (4)
service device layer is composed of various edge service
3) Perform Transactions And Update Account
devices, and each edge server is deployed as node in the
blockchain. Blockchain network layer is composed of Information: Respectively updating the account balances
blocks generated by data interaction between nodes in the of and is a necessary part of the transaction. The first
edge service device layer. The data privacy-preserving step is to update the local amount of both parties, which is
scheme based on homomorphic encryption proposed in this decrypted by the generated public and private keys, so that
paper is developed in the blockchain network layer for users can access and update their account amount
detailed design. information. To be specific, Account adds the account

157

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SURATHKAL. Downloaded on November 08,2023 at 17:16:43 UTC from IEEE Xplore. Restrictions apply.
total before the transaction to the of the 4) Transaction Verification: Verify the validity of a
transaction amount obtained by decrypting it with the transaction after it has been completed. Check if the
private key, and the decryption calculation is shown in account balance is sufficient to support the transaction or if
equation (5). Then account decodes to get the the transaction was executed correctly. According to the
plaintext , which is the transfer amount . principle of the Paillier homomorphic encryption algorithm,
+ − ( )= + ( )− ( )= 澳 (5) there exists equation (6).
Secondly, the Paillier algorithm is used to encrypt the ( )∗ ( ) = ( ∗( ∗
account balance and publishes it in the network waiting for ) )= + (6)
verification. The amounts of accounts are shown in table 1. That is, the algorithm has additive homomorphism, and
the multiplication operation of the ciphertext is equivalent
to the addition operation of the ciphertext. Therefore, we
can judge whether the transaction is correct by verifying the
validity of equation (7).
TABLE I. LOCAL AND BLOCKCHAIN ACCOUNT AMOUNT.
Before the transaction Transfer After the transaction
Account
Local Blockchain Transfer amount Local Blockchain
Account ( ) = − ( )
Account ( ) = + ( )

+ = ( )∗ ( )
(7) III. EXPERIMENT AND ANALYSIS
+ = ( )∗ ( )
If the data transaction user itself or the authoritative To verify the effectiveness and efficiency of our
regulator wants to check the real data, they can decrypt the proposed scheme, we first test the performance of the
transaction amount or transmitted data by the private key adopted Paillier homomorphic encryption algorithm. The
. The calculation to obtain the plaintext m is shown in tested metrics mainly include encryption, decryption, key
equation (8). generation and homomorphic time of the algorithm at
different key bits. The experimental results are shown in
= (8) figure 3 and figure 4.

Figure 3. Algorithm performance test results Figure 4. Algorithm homomorphism performance test results

Figure 5. Throughput test results Figure 6. Latency test results

158

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SURATHKAL. Downloaded on November 08,2023 at 17:16:43 UTC from IEEE Xplore. Restrictions apply.
As can be seen from figure 3 and figure 4, the proposed scheme has application potential in the field of
computation time consuming of each operation of this edge computing and blockchain security.
algorithm increases with the increasing number of key bits,
and users can choose different key bits according to their ACKNOWLEDGEMENTS
security needs. In our practical application, the decryption This work was supported by the National Natural
operation is only performed when the user or the key Science Foundation (Grant No. 61772099, Grant No.
management center needs to verify the transaction, while 61772098, Grant No. 61802039); the Science and
the encryption operation is required for each data Technology Innovation Leadership Support Program of
transmission, and it can be seen from the test that all Chongqing (Grant No. CSTCCXLJRC201917); the
operations are millisecond level, which can meet the Innovation and Entrepreneurship Demonstration Team
practical application requirements. Cultivation Plan of Chongqing (Grant No. CSTC2017kjrc-
In order to verify the effectiveness and practical cxcytd0063); Chongqing Research Program of Basic
feasibility of the proposed scheme, this paper designs smart Research and Frontier Technology (Grant No.
contracts and key implementation modules on the cstc2018jcyjAX0617); the Science and Technology
Hyperledger Fabric platform, and conducts performance Planning Project of Guangzhou (Grant No.202102080382);
tests on the prototype blockchain system of the scheme, the Scientific Research Project of the Open University of
mainly including throughput and latency tests of Guangdong(Grant No. RC2001).
initialization, information query and transaction operations
under different numbers of concurrency. The Open REFERENCES
operation refers to the initialization of various workload [1] G Xu, Y Liu and P W Khan, Improvement of the DPoS consensus
modules, and the Query operation refers to the query of mechanism in Blockchain based on vague sets IEEE Trans. Ind.
account information. The Transfer operation corresponds to Inform., 16(6) pp. 4252-4259, 2019.
the transfer operation between accounts [9], and it can be [2] X Xu, X Zhang and H Gao, BeCome: blockchain-enabled
seen from figure 5 that the proposed method is feasible in computation offloading for IoT in mobile edge computing IEEE
Trans. Ind. Inform., 16(6) pp. 4187-4195, 2019.
application and can maintain excellent performance.
[3] R Yang, F Yu and P Si, Integrated Blockchain and Edge Computing
In addition, this paper tests the latency of the above Systems: A Survey, Some Research Issues and Challenges IEEE
three operations, and it can be seen from figure 6 that the Commun. Surv. Tutor., 21(2) pp. 1508-1532, 2019.
time of each operation fluctuates at different numbers of [4] Y Gao, Y Chen and X Hu, Blockchain Based IIoT Data Sharing
concurrency, and the difference between the maximum and Framework for SDN-Enabled Pervasive Edge Computing IEEE
minimum latency is not large, and the error range is in the Trans. Ind. Inform., 17(7) pp. 5041-5049, 2020.
order of seconds, so the prototype system has a stable [5] Z Xiong, Y Zhang and N Dusit, When Mobile Blockchain Meets
performance. Edge Computing IEEE Commun. Mag. 56(8) pp. 33-39, 2017.
[6] J Wang, L Wu and K Choo, Blockchain-Based Anonymous
CONCLUSIONS Authentication with Key Management for Smart Grid Edge
Computing Infrastructure, IEEE Trans. Ind. Inform., 16(3) 1984-
For the risk of data leakage in edge computing and the 1992, 2019.
trust problem brought by heterogeneous end devices, this [7] G Xu, J Dong and C Ma, 2021 A certificateless encryption scheme
paper proposes a data privacy protection scheme based on based on blockchain Peer Peer Netw. Appl., 3-4 pp. 1-9, 2021.
blockchain and homomorphic encryption. Firstly, a multi- [8] X Jia, D He and N Kumar, A provably secure and efficient identity-
layer security management structure based on blockchain is based anonymous authentication scheme for mobile edge
established. Secondly, this paper proposes a lightweight computing IEEE Syst. J., 14(1) pp. 560-571, 2019.
data transmission privacy protection method to achieve [9] H Huang, J Cai and S Xie, Proc. Int. Conf. Cyber-Enabled Distrib.
Comput. Knowl. Discov., CyberC (Guilin) (Institute of Electrical
encrypted data transmission based on homomorphic and Electronics Engineers Inc) pp. 219-226, 2019.
encryption. Through experiments and analysis, our

159

Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY SURATHKAL. Downloaded on November 08,2023 at 17:16:43 UTC from IEEE Xplore. Restrictions apply.

You might also like