A_New_Identity_Authentication_and_Key_Agreement_Protocol_Based_on_Multi-Layer_Blockchain_in_Edge_Computing
A_New_Identity_Authentication_and_Key_Agreement_Protocol_Based_on_Multi-Layer_Blockchain_in_Edge_Computing
ABSTRACT In today’s interconnected world, identity authentication and key agreement are important links
in the secure communication process of IoT terminal devices. In the edge computing environment, with
the frequent cross-domain authentication and data sharing of IoT devices in different security domains,
identity authentication faces a series of challenges and security issues. Most of the traditional identity
authentication methods are based on public key infrastructure, which is prone to single point of failure
and is not applicable to the distributed architecture of edge computing. In this article, we apply blockchain
technology to the identity authentication and key agreement process of IoT terminal devices. In order to
meet cross-domain requests from terminal devices in different security domains, a multi-layer blockchain
authentication architecture is designed. The hash value of the digital certificate is stored on the blockchain
and combined with dynamic accumulator technology to enhance the reliability and authentication efficiency
of the digital certificate. Security analysis and experimental results demonstrate that our scheme can achieve
efficient and secure authentication and key agreement.
INDEX TERMS Edge computing, identity authentication, key agreement, multi-layer blockchain.
2023 The Authors. This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 License.
3274 For more information, see https://creativecommons.org/licenses/by-nc-nd/4.0/ VOLUME 12, 2024
Y. Chen et al.: New Identity Authentication and Key Agreement Protocol
Local blockchain is responsible for data security of nodes Algorithm 1 Create Accumulator
within the same security domain and identity authentication Input: security parameter 1λ
of the same security domain. Due to the limited comput- Output: accumulator administrator keys (skacc , pkacc )
ing performance of IoT devices, identity authentication and Choose Large prime number p, q
queries are allowed, but they do not participate in the main- Compute N = p ∗ q
tenance of blockchain ledgers. The local blockchain stores Compute Euler function ϕ (n) = (p − 1) ∗ (q − 1)
the certificate hash value of terminal devices within the Select integer g
local domain. Compared to the public blockchain, there are g satisfies gϕ(n) mod n = 1 and g ̸= 1
fewer users and fewer certificates within the local blockchain, acc0 = g ∈ ZN
so lookups are more efficient. When cross domain authen- (skacc , pkacc ) = ((p, q), N ) ← 1λ
tication occurs, local devices cannot access blockchains Return (skacc , pkacc )
from other domains. For this reason, we introduce public
blockchain. The hashes of digital certificates in all secure
domains are stored in the public blockchain, which can satisfy Algorithm 2 Add Element
the verification of digital certificates during cross-domain
Input: cumulative value accx , add element x,element
authentication.
collection X , pkacc
Unlike CA in traditional PKI, each security domain has a
Output: accx ′ , X ′
CA. CA, the certificate issuing authority, is both a node in the
/ X then
if x ∈
local blockchain and a member node of the public blockchain. accx ′ = accX ∪{x} = accxX mod N
CA performs identity verification and certificate issuance for X ′ = X ∪ {x}
IoT devices joining the blockchain in the local blockchain end
network, and it issues cross-domain certificates for cross- returnaccx ′ , X ′
domain authenticated IoT devices in the public blockchain.
CA calculates the certificate hash and cumulative value for
each certificate issued. The dynamic accumulator verifies the Algorithm 3 Del Element
hash of the packaged certificate on the chain, ensuring the Input: cumulative value accx , delete element x,
safe and efficient identity authentication process. element collection X , (skacc , pkacc )
The edge server not only participates in the maintenance of Output: accx ′ , X ′
the local blockchain network, but also assists in completing if Verelement() then
cross-domain authentication of terminal devices in differ- x −1 mod ϕ(n)
accx ′ = accX \{x} = accX mod N
ent security domains. The edge server within each security
X ′ = X \{x}
domain is involved in maintaining the local blockchain. At the end
time of cross-domain access request from terminal devices, return accx ′ , X ′
the edge server and CA are jointly responsible for the infor-
mation interaction for cross-domain authentication.
A chose is exactly the one that the we imbed the ECDH tuple
is 1/(qe + qs ) and the probability that the matching session
of these two session is also the same is 1/(qe + qs ), then we
have:
B. IMPLEMENTATION PLAN
In this paper, the platform used to build the blockchain
based on Ubuntu 22.04.1 version of the system is fiscob- 2) IMPORTING SMART CONTRACTS
cos version 2.0. Two blockchains are built on the platform, After successful configuration, you can directly enter the
group1 and group2, where group1 is the public blockchain wecross command console. Enter login to log in to the con-
and group2 is the local blockchain. The consensus algorithm sole for contract deployment operations. Firstly, place the
uses the PBFT algorithm that comes with the platform. written smart contract in the contract file of the console
At the same time, we use the wecross v1.3.0 cross-chain in the directory of/wecross-demo/WeCross-Console/conf/
platform to realize the deployment of smart contracts on contracts/policy.
the blockchain and the interaction between the blockchain
chains. 3) DEPLOYING CONTRACTS ON THE BLOCKCHAIN
Group1, as the public blockchain, is responsible for stor- In the console, first deploy the contract in blockchain 1, and
ing and querying the certificate hash values transmitted the contract deployment command is bcosDeploy. Firstly,
by all local blockchains. Group 2, as a local blockchain, deploy the SetDataInterchain contract, and upon successful
can store and query the hash value locally and upload the deployment, the address of the contract will be returned. Use
local hash value to the public blockchain. At the same the bcosRegister command to register the SetDataInterchain
time, it realizes the querying of other hash values on the contract as a cross chain resource. This way, we can perform
public blockchain through smart contracts (the blockchain cross chain operations through this contract. The contract
1 and blockchain 2 in the following are group1 and address that needs to be filled in when calling the bcosReg-
group2). ister command is the address obtained from the previous
deployment of the contract. If the result returns success,
C. DEPLOYMENT PROCESS it indicates successful registration. Continue deploying the
1) INSTALL AND CONFIGURE THE ENVIROMENT WeCrossHub contract. After the contract deployment is com-
Install wecross and configure the relevant runtime environ- pleted, you need to use the sendTransaction command to call
ment. In this article, we have configured javaJDK version the init function in the SetDataInterchain contract to associate
1.8.0_362, openssl version 3.0.2 and mysql version 8.0.33. the addresses of the WeCrossHub contract. Displaying Block-
You can also sudo apt-get install -y openssl curl expect tree Num indicates that the association was successful, enabling
fontconfig command to configure the environment. After the SetDataInterchain contract to call the cross-chain function
configuring the environment, download the demo from the in the WeCrossHub contract. Next, MDAC, VFS, and TC
wecross website. After the download is complete, run the contracts can be deployed in blockchain 1 using the same
command cd ∼/wecross-demo to enter the download direc- method. Deploy DAC, TCA, WeCrossHub, and SetDataIn-
tory of the demo, and execute bash clear.sh to clean up the old terchain contracts in blockchain 2, and the smart contracts on
installation environment. Run bash build_cross_groups.sh to both blockchains and blockchains are successfully deployed.
deploy the scripts. When all the script files are successfully Fig.12 shows a successful smart contract deployment on the
deployed, a 4-node blockchain with two groups will be built blockchain.
directly from the official configuration file. The consensus
mechanism between the nodes uses the officially config- D. INTRODUCTION TO SMART CONTRACT
ured PBFT (Practical Byzantine Fault Tolerance) consensus FUNCTIONALITIES
algorithm. Fig.11 shows successful environment configura- The relevant smart contracts deployed on the blockchain1
tion and successful login. are MDAC, VFS, TC, WeCrossHub and SetDataInterchain.
Among them, WeCrossHub and SetDataInterchain are con- by registerCertificateFromTC function and verifyCertificate
tracts shared by the public blockchain and local blockchains, function respectively. In registerCertificate-FromTC func-
which are responsible for cross-chain interactions between tion, it will directly receive the hash value from the TC
the public blockchain and local blockchains. contract as a parameter, and there will be a require to deposit
The SetDataInterchain contract is responsible for the inter- the hash value to determine whether the hash value is in the
action between the child chain and the public blockchain. chain. If the hash value already exists, there will be a corre-
There is a setDataInterchainInvoke function in the contract sponding message. If the hash value is stored successfully, the
which is responsible for inputting information. Five parame- hash value will be stored in the accumulator and added to the
ters need to be filled in, which are the name of the contract on chain. Use verifyCertificate function to query the hash value
the target chain, the name of the function on the contract, the can be directly in the accumulator to query the hash value.
parameters of the function, the contract on the chain where If the certificate exists then return ‘‘certificate in the chain’’,
the callback function is located, and the method name of the otherwise return ‘‘certificate is not in the chain’’. The MDAC
callback function. Then WeCrossHub is called to make the contract part of the code is shown in Algorithm 6.
cross-chain call.
The SetDataInterchain contract part of the code is shown
in Algorithm 5. This function is used to make interchain calls Algorithm 6 RegisterCertificateFromTC
on the blockchain and pass data and callback information. Input: publicKeyHash
Output: whether or not it is stored on the chain
// Get the hash value created by the set function in the
Algorithm 5 SetDataInterchainInvoke
TC
Input: path,method,data, callbackPath, contract
callbackMethod bytes32 publicKeyHash = tcContract.get();
Output: require (publicKeyHash!=bytes32(0), ‘‘No certificate
// This function is used to make cross-chain calls on hash
the found in TC contract’’);
blockchain and pass data and callback information. require(certificates[publicKeyHash].publicKeyHash==
string memory _path, bytes32(0), ‘‘Certificate already registered’’);
string memory _method, // The certificate hash is associated to the certificate
string memory _data, certificates[publicKeyHash]=Certificate(publicKeyHash);
string memory _callbackPath, addToAccumulator(publicKeyHash);
string memory _callbackMethod // Certificate Enrollment event is triggered
// Create a string array ‘args’ with one element to emit CertificateRegistered(publicKeyHash);
store the
parameter data passed to the target smart contract.
public returns (string memory) The relevant smart contracts deployed on the local
string[] memory args = new string[](1); blockchain are DAC, TCA, WeCrossHub and SetDataInter-
args[0] = _data; chain. The DAC contract is responsible for entering and
return hub.interchainInvoke( querying certificates on the local chain. The registerCertifi-
_path, cate function stores the name and hash value of the certificate
_method, into the accumulator. The accumulator is called with verifyC-
args, ertificate function to query the certificate. If the certificate
_callbackPath, exists, it returns ‘‘certificate is in the chain’’, otherwise it
_callbackMethod returns ‘‘certificate is not in the chain’’. The DAC contract
); part of the code is shown in Algorithm 7.
[5] Y. Lu, X. Huang, K. Zhang, S. Maharjan, and Y. Zhang, ‘‘Blockchain [26] X. Jia, N. Hu, S. Su, S. Yin, Y. Zhao, X. Cheng, and C. Zhang, ‘‘IRBA:
empowered asynchronous federated learning for secure data sharing An identity-based cross-domain authentication scheme for the Internet of
in Internet of Vehicles,’’ IEEE Trans. Veh. Technol., vol. 69, no. 4, Things,’’ Electronics, vol. 9, no. 4, p. 634, Apr. 2020.
pp. 4298–4311, Apr. 2020. [27] S. Guo, F. Wang, N. Zhang, F. Qi, and X. Qiu, ‘‘Master-slave chain based
[6] X. Xiang, M. Wang, and W. Fan, ‘‘A permissioned blockchain-based iden- trusted cross-domain authentication mechanism in IoT,’’ J. Netw. Comput.
tity management and user authentication scheme for E-health systems,’’ Appl., vol. 172, Dec. 2020, Art. no. 102812.
IEEE Access, vol. 8, pp. 171771–171783, 2020. [28] G. Cheng, Y. Chen, S. Deng, H. Gao, and J. Yin, ‘‘A blockchain-
[7] S. He, Z. Li, J. Wang, and N. N. Xiong, ‘‘Intelligent detection for key based mutual authentication scheme for collaborative edge comput-
performance indicators in industrial-based cyber-physical systems,’’ IEEE ing,’’ IEEE Trans. Computat. Social Syst., vol. 9, no. 1, pp. 146–158,
Trans. Ind. Informat., vol. 17, no. 8, pp. 5799–5809, Aug. 2021. Feb. 2022.
[8] W. Shi, J. Cao, Q. Zhang, Y. Li, and L. Xu, ‘‘Edge computing: Vision and [29] S. Showkat Moni and D. Manivannan, ‘‘A lightweight privacy-preserving
challenges,’’ IEEE Internet Things J., vol. 3, no. 5, pp. 637–646, Oct. 2016. V2I mutual authentication scheme using cuckoo filter in VANETs,’’ in
[9] J. B. Xue and Z. M. Bai, ‘‘Security and efficient authentication scheme Proc. IEEE 19th Annu. Consum. Commun. Netw. Conf. (CCNC), Las
for mobile edge computing,’’ J. Beijing Univ. Posts Telecommun., vol. 44, Vegas, NV, USA, Jan. 2022, pp. 815–820.
no. 1, pp. 110–116, Jan. 2021. [30] J. Qi, ‘‘Research on the application of accumulator in blockchain,’’
[10] O. Salman, S. Abdallah, I. H. Elhajj, A. Chehab, and A. Kayssi, M.S. thesis, Nanjing Univ. Inf. Eng., Nanjing, China, 2020.
‘‘Identity-based authentication scheme for the Internet of Things,’’ in [31] M. X. Miao, P. R. Wu, and Y. L. Wang, ‘‘Research progress and application
Proc. IEEE Symp. Comput. Commun. (ISCC), Messina, Italy, Jun. 2016, of password accumulator,’’ J. Xidian Univ., vol. 49, no. 1, pp. 79–91,
pp. 1109–1111. Sep. 2022.
[11] K. Xue, P. He, X. Zhang, Q. Xia, D. S. L. Wei, H. Yue, and F. Wu, [32] J. Lin, W. Yu, N. Zhang, X. Yang, H. Zhang, and W. Zhao, ‘‘A sur-
‘‘A secure, efficient, and accountable edge-based access control framework vey on Internet of Things: Architecture, enabling technologies, security
for information centric networks,’’ IEEE/ACM Trans. Netw., vol. 27, no. 3, and privacy, and applications,’’ IEEE Internet Things J., vol. 4, no. 5,
pp. 1220–1233, Jun. 2019. pp. 1125–1142, Oct. 2017.
[12] P. Black and R. Layton, ‘‘Be careful who you trust: Issues with the public [33] V. Hassija, V. Chamola, V. Saxena, D. Jain, P. Goyal, and B. Sik-
key infrastructure,’’ in Proc. 5th Cybercrime Trustworthy Comput. Conf., dar, ‘‘A survey on IoT security: Application areas, security threats,
Auckland, New Zealand, Nov. 2014, pp. 12–21. and solution architectures,’’ IEEE Access, vol. 7, pp. 82721–82743,
[13] J. Ni, K. Zhang, X. Lin, and X. Shen, ‘‘Securing fog computing for Internet 2019.
of Things applications: Challenges and solutions,’’ IEEE Commun. Surveys [34] Z. Liao, X. Pang, J. Zhang, B. Xiong, and J. Wang, ‘‘Blockchain on
Tuts., vol. 20, no. 1, pp. 601–628, 1st Quart., 2018. security and forensics management in edge computing for IoT: A com-
[14] T. Salman, M. Zolanvari, A. Erbad, R. Jain, and M. Samaka, ‘‘Security prehensive survey,’’ IEEE Trans. Netw. Service Manage., vol. 19, no. 2,
services using blockchains: A state of the art survey,’’ IEEE Commun. pp. 1159–1175, Jun. 2022.
Surveys Tuts., vol. 21, no. 1, pp. 858–880, 1st Quart., 2019. [35] H. K. Jiang et al., ‘‘Improved certificateless proxy blind signature scheme
[15] B. Cao, Y. Li, L. Zhang, L. Zhang, S. Mumtaz, Z. Zhou, and M. Peng, with forward security,’’ Comput. Sci., vol. 48, no. 6A, pp. 529–532,
‘‘When Internet of Things meets blockchain: Challenges in distributed Jun. 2021.
consensus,’’ IEEE Netw., vol. 33, no. 6, pp. 133–139, Nov. 2019. [36] N. Kahya, N. Ghoualmi, and P. Lafourcade, ‘‘Formal analysis of PKM
[16] S. Matsumoto and R. M. Reischuk, ‘‘IKP: Turning a PKI around with using scyther tool,’’ in Proc. Int. Conf. Inf. Technol. e-Services, Sousse,
decentralized automated incentives,’’ in Proc. IEEE Symp. Secur. Privacy Tunisia, Mar. 2012, pp. 1–6.
(SP), San Jose, CA, USA, May 2017, pp. 410–426. [37] G. Thakur, P. Kumar, Deepika, S. Jangirala, A. K. Das, and Y. Park,
[17] A. Garba, Q. Hu, Z. Chen, and M. R. Asghar, ‘‘BB-PKI: Blockchain-based ‘‘An effective privacy-preserving blockchain-assisted security proto-
public key infrastructure certificate management,’’ in Proc. IEEE 22nd Int. col for cloud-based digital twin environment,’’ IEEE Access, vol. 11,
Conf. High Perform. Comput. Commun.; IEEE 18th Int. Conf. Smart City; pp. 26877–26892, 2023.
IEEE 6th Int. Conf. Data Sci. Syst. (HPCC/SmartCity/DSS), Yanuca Island, [38] J. Ryu, S. Son, J. Lee, Y. Park, and Y. Park, ‘‘Design of secure mutual
Fiji, Dec. 2020, pp. 824–829. authentication scheme for metaverse environments using blockchain,’’
[18] A. Garba, Z. Chen, Z. Guan, and G. Srivastava, ‘‘LightLedger: A novel IEEE Access, vol. 10, pp. 98944–98958, 2022.
blockchain-based domain certificate authentication and validation [39] M. Bellare, R. Canetti and H. Krawczyk, ‘‘A modular approach to the
scheme,’’ IEEE Trans. Netw. Sci. Eng., vol. 8, no. 2, pp. 1698–1710, design and analysis of authentication and key-exchange protocols,’’ in
Apr. 2021. Proc. 30th Annu. ACM Symp. Theory Comput. (STOC), May 1998,
[19] P. Gu and L. Chen, ‘‘An efficient blockchain-based cross-domain authen- pp. 419–428.
tication and secure certificate revocation scheme,’’ in Proc. IEEE 6th [40] FISCO-BCOS. Accessed: Oct. 2020. [Online]. Available: http://wwwfisco-
Int. Conf. Comput. Commun. (ICCC), Chengdu, China, Dec. 2020, bcos.org
pp. 1776–1782.
[20] W. Wang, N. Hu, and X. Liu, ‘‘BlockCAM: A blockchain-based cross-
domain authentication model,’’ in Proc. IEEE 3rd Int. Conf. Data Sci.
Cyberspace (DSC), Guangzhou, China, Jun. 2018, pp. 896–901.
[21] C. Yuan, W. Zhang, and X. Wang, ‘‘EIMAKP: Heterogeneous cross-
domain authenticated key agreement protocols in the EIM system,’’
Arabian J. Sci. Eng., vol. 42, no. 8, pp. 3275–3287, Aug. 2017.
[22] D. He, S. Chan, and M. Guizani, ‘‘An accountable, privacy-preserving, and
efficient authentication framework for wireless access networks,’’ IEEE
Trans. Veh. Technol., vol. 65, no. 3, pp. 1605–1614, Mar. 2016.
[23] D. He, J. Bu, S. Chan, C. Chen, and M. Yin, ‘‘Privacy-preserving universal YAO CHEN received the B.S. degree from the
authentication protocol for wireless communications,’’ IEEE Trans. Wire- School of Electronic and Information Engineering,
less Commun., vol. 10, no. 2, pp. 431–436, Feb. 2011. Weifang Institute of Technology, in 2015. She is
[24] L. Wang, Y. Tian, and D. Zhang, ‘‘Toward cross-domain dynamic accu- currently pursuing the M.S. degree with the School
mulator authentication based on blockchain in Internet of Things,’’ IEEE of Mathematics and Computer Science, Dali Uni-
Trans. Ind. Informat., vol. 18, no. 4, pp. 2858–2867, Apr. 2022. versity. Her research interests include blockchain
[25] M. Wang, L. Rui, Y. Yang, Z. Gao, and X. Chen, ‘‘A blockchain- technology and the IoT security.
based multi-CA cross-domain authentication scheme in decentralized
autonomous network,’’ IEEE Trans. Netw. Service Manage., vol. 19, no. 3,
pp. 2664–2676, Sep. 2022.
QINGQING YANG received the M.S. degree from DENGQI YANG received the B.S. and M.S.
the School of Mathematics and Computer Science, degrees in computational mathematics from Yun-
Dali University, in 2022. Her research interests nan University, Kunming, China, in 2003 and
include blockchain security and cloud computing 2006, respectively, and the Ph.D. degree in com-
security. puter science from Sichuan University, Chengdu,
China, in 2012. He is currently a Professor of
computer science with the College of Math-
ematics and Computer, Dali University, Dali,
China. His main research interests include digital
signatures, identity authentication, and artificial
intelligence.
XIN ZENG received the M.S. degree from the XIAOWEI LI received the B.S. degree in math-
School of Information Science, Yunnan Univer- ematics and applied mathematics and the Ph.D.
sity, in 2013. He is currently a Lecturer with degree in information security from Xidian Uni-
the School of Mathematics and Computer Sci- versity, China, in 2008 and 2013, respectively.
ence, Dali University. His main research interests He is currently an Associate Professor with
include spatial juxtaposition, pattern mining, and the School of Mathematics and Computer Sci-
association rule mining. ence, Dali University. His main research interests
include cybersecurity protocols, cloud computing
security, and blockchain technology.