# A Novel Blockchain Identity Authentication Scheme Implemented in Fog Computing

Authors: Huijuan Wang; Yong Jiang
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

In a fog computing environment, lots of devices need to be authenticated in order to keep the platform being secured. To solve this problem, we turn to blockchain techniques. Unlike the identification cryptographic scheme based on elliptic curves, the proposed 2-adic ring identity authentication scheme inherits the high verification efficiency and high key distribution of sequence ciphers of 2-adic ring theory, and this algorithm adds identity hiding function and trading node supervision function by design. The main designed application scenario of this solution is applicable to the consortium blockchain, and the master nodes are mutually trusting cooperative relations. The node transaction verification and block generation consensus algorithm designed in this solution can be implemented in a set of algorithms, which has higher verification efficiency and easier to be deployed than other solutions. This scheme can be widely used in the fog computing environment.


---

## Body

## 1. Introduction

Security is very important in each network. The fog computing, which extends the function of cloud computing, has attracted lots of attention [1]. The main idea is pushing the centralized function to decentralized function. There are many varieties, such as edge computing and cloudlet [2–4]. The decentralized network means that there needs to be an identity authentication scheme to keep the environments being secured. The blockchain has built a new trusted large-scale assistance method based on the information Internet to solve the trust problem of the development of the digital economy. As a new technology, blockchain technology has the characteristics required by various application scenarios such as transparency and credibility, tamper resistance, traceability, and decentralization. Applications have been extended from the financial field to supply chain management, government services, energy copyright storage, Internet of Things [5], fog computing, and other fields. In a narrow sense, a blockchain is a type of chained data that combines data blocks in a chronological order in a sequential manner and uses cryptography to ensure a tamper-proof and unforgeable distributed ledger. Broadly speaking, blockchain technology uses blockchain data structure blocks to verify and store data, uses distributed node consensus algorithms to generate and update data, and uses cryptography to ensure the security of data transmission and access. A smart contract composed of script code turns into and operates a new distributed infrastructure and computing paradigm for data. Unlike the traditional centralized structure, the blockchain mechanism does not rely on a specific central node to process and store data, so information leakage caused by malicious centers or other reasons can be avoided. In the actual application scenarios of blockchain, hash functions and digital signature algorithms are widely used in blockchain to verify the correctness of blocks and transactions. The traditional PKI mechanism does not conform to the “decentralized” characteristics of the blockchain because the weight of the trusted center is too large, so certificateless encryption and signature schemes are mostly used in blockchain technology.There are actually two functions in the blockchain that need to be appropriately adapted to the practical application. One is how to increase the supervision function in the decentralized architecture, and the other is how to ensure the privacy of user information under supervision. In 2012, Yu et al. [6] proposed a certificateless signature scheme that can be proved safe under the standard model. However, this scheme requires more than 5 bilinear pairing operations, and the calculation efficiency is low. In the same year, Gong and Li [7] proposed a certificateless password mechanism based on elliptic curves, but the resistance to participating node attacks was weak. In 2013, Miers and others [8] proposed an anonymous blockchain digital currency scheme based on Bitcoin. This scheme uses zero-knowledge proof cryptography technology to ensure the transaction by hiding the user address and cutting off the contact between the two parties. The nonrelevance of the system can achieve the untraceable effect, but the scheme needs to maintain the currency revocation list at the node to ensure the uniqueness of the transaction, which affects the efficiency of the transaction to a certain extent. In 2016, Shen and Adam proposed ring-based signatures. In 2016, Shen and Adam [9] proposed a ring-based signature secret transaction scheme. This scheme randomly selects irrelevant addresses and performs ring signatures together with the transaction initiator to achieve the purpose of confusing the identity of the transaction user. However, both the scheme and the zero-coin scheme have the problem of poor traceability due to the cutoff of the transaction association, which is difficult to be applied in actual scenarios, and the amount of single transaction information is too large. The anonymity of the scheme depends on the number of addresses participating in the ring signature. To reduce the amount of transaction information and reduce the number of addresses, you will also face the risk of deanonymization. The combination of blockchain and identification password can solve part of the problem of blockchain decentralization supervision. SM9 is an identification password, and there are a large number of blockchain identification password systems designed based on SM9 at home and abroad. Taking the consortium blockchain in the blockchain as the application environment, performing exponential operation and bilinear pairing operation can be the consortium blockchain. The application provides effective security and privacy protection support.In this paper, we introduce an identification cryptographic scheme suitable for consortium blockchain based on the 2-adic ring algorithm. The 2-adic ring [10] is a finite ring that can correspond to any bit string in a finite field. When designing with this theoretical basis, it can inherit the recognition and verification efficiency of binary sequence ciphers in computer communication and can solve a large number of node verification of key distribution issues. Part of the security of passwords is based on the 2-adic ring theory. For an attacker, you need to be familiar with the 2-adic ring theory to recognize the algorithm and increase the difficulty of supply.This article is mainly composed of the following parts. The second part introduces the basic preliminaries; this part introduces the blockchain and consortium blockchain and the identification password and introduces the basic knowledge of the 2-adic ring to facilitate the reader to understand the subsequent security proof; the third part describes the design of the main cryptographic scheme in this article, the blockchain identification authentication scheme based on the 2-adic ring algorithm, and introduces the node composition and transaction implementation process of the scheme in the consortium blockchain; the fourth part proves and analyzes the security of the scheme attack resistance and finally summarizes the applicable scenarios of the program and suggestions for improvement.


## 2. Preliminary Knowledge

### 2.1. Blockchain and Consortium Blockchain

Blockchain technology is built on the Internet. Using P2P, distributed storage, and distributed key ideas, a chronological sequence of data blocks is combined into a specific data structure in a chain. The chain structure of the blockchain uses cryptographic signatures to ensure that the chain connection of the data cannot be tampered with or forged. It can store a full amount of light time-series fingerprint data. The blockchain can be used as a data record database. The database is shared by network nodes. When nodes update data, they submit data records. Through the consensus mechanism, the data consistency between nodes is ensured. After the consistency is determined, the records like blockchain will never be changed or deleted.The blockchain will also have different architectures due to different deployment environment models, such as public chain/consortium chain/private chain and side chain/crosschain. The encryption scheme in this article is mainly implemented in the consortium chain. In the consortium chain, the validity of the blockchain and the validity of the transaction are determined by a predetermined group of validators. This verification group forms a consortium chain. The consortium chain has the verification nodes and data changes initiated by the group of validators. The shared participating nodes are composed together.


### 2.2. Identification Password Algorithm

The identification cryptosystem means that the signer holds an identification and a corresponding private key. The private key is generated by the Key Generation Center (KGC) through the combination of the private key and the signer’s identification. The signer uses his own private key to generate a digital signature on the data, and the verifier uses the signer’s logo to generate his public key to verify the validity/authenticity/integrity and legal identity of the signature. SM9 logo ciphers generally involve the calculation of bilinear pairs on finite fields/elliptic curves/elliptic curves. The 2-adic ring algorithm logo ciphers designed in this paper involve knowledge of finite field 2-adic rings.Identification password verification steps are as follows:(i)
Create a polynomial identification cryptographic algorithm to produce public and private keys(ii)
Set up a management node and establish an interactive protocol with the user. Executing this protocol can generate the private key and member certificate of the management node and use the private key of the group member of the group administrator(iii)
Using an identification password signature algorithm, after entering a message and a member private key, the signature of the message is output(iv)
Verify the original message/message signature/public key(v)
Confirm the legality of the signature


### 2.3. 2-Adic Integer and Arithmetic Crosscorrelation

Let binary strictly periodic sequences¯=s0,s1,s2,s3,⋯, have the least period T, st+T=st. A 2-adic integer is a formal power series ϖ=∑t=0∞st∙2t, with st∈0,1. The set Z2 of the 2-adic integers forms a ring under the operations of addition and multiplication with carry [11], the string 000⋯ as merely, and the string 100⋯ as 1, and define 1+2+22∙∙∙=−1, the infinite string 111⋯ is a base 2 expansion of a negative integer -1.Specifically, the addition ofZ2 integers is given by
(1)∑t=0∞s1t∙2t+∑t=0∞s2t∙2t=∑t=0∞s3t∙2t,s1t+s2t=s3t+2dt+1−dt.d0,d1,d2,∙∙∙, are carry integers, such that d0=0, and for all t≥0.Similarly, there are multiplications ofZ2 integers [11].Letq=1+q12+q223+∙∙∙+qr2r be an odd integer, then the negative integer −q is associated to the product
(2)−q=1+2+22+23+∙∙∙1+q12+q222+∙∙∙+qr2r.InZ2, the formal power series −q has a unique (multiplicative) inverse
(3)−q−1=1∙20+b1∙21+b2∙22+b3∙23+∙∙∙.Thus, the ringZ2 contains every rational number h/q provided q is odd.Proposition 1 (see [11]).
There is a one-to-one correspondence between rational numbersϖ=h/q (where q is an odd number) and eventually periodic binary sequences s¯, which associates to each rational number ϖ and the bit sequence s¯=s0,s1,s2∙∙∙ of its 2-adic expansion. The sequence s¯ is strictly periodic if and only if ϖ≤0 and ϖ≤1.
In this correspondence, we use the operations inZ2 to introduce the arithmetic crosscorrelation.Definition 2 (see [11]).
Lets¯1 and s¯2 be two strictly binary periodic sequences with period T, and let 0≤τ<T and s¯2τ be the τ shift of s¯2. Denote ϖ¯1 and ϖ2τ as the 2-adic integers corresponding to the sequences s¯1 and s¯2τ. Then, the corresponding sequence s¯3 of ϖ1−ϖ2τ is strictly periodic or eventually periodic, and its period divides T. The shift arithmetic crosscorrelation Cs1,s2aτ of s¯1 and s¯2 is the number of zeros minus the number of ones in one period of length T of s¯3.


## 2.1. Blockchain and Consortium Blockchain

Blockchain technology is built on the Internet. Using P2P, distributed storage, and distributed key ideas, a chronological sequence of data blocks is combined into a specific data structure in a chain. The chain structure of the blockchain uses cryptographic signatures to ensure that the chain connection of the data cannot be tampered with or forged. It can store a full amount of light time-series fingerprint data. The blockchain can be used as a data record database. The database is shared by network nodes. When nodes update data, they submit data records. Through the consensus mechanism, the data consistency between nodes is ensured. After the consistency is determined, the records like blockchain will never be changed or deleted.The blockchain will also have different architectures due to different deployment environment models, such as public chain/consortium chain/private chain and side chain/crosschain. The encryption scheme in this article is mainly implemented in the consortium chain. In the consortium chain, the validity of the blockchain and the validity of the transaction are determined by a predetermined group of validators. This verification group forms a consortium chain. The consortium chain has the verification nodes and data changes initiated by the group of validators. The shared participating nodes are composed together.


## 2.2. Identification Password Algorithm

The identification cryptosystem means that the signer holds an identification and a corresponding private key. The private key is generated by the Key Generation Center (KGC) through the combination of the private key and the signer’s identification. The signer uses his own private key to generate a digital signature on the data, and the verifier uses the signer’s logo to generate his public key to verify the validity/authenticity/integrity and legal identity of the signature. SM9 logo ciphers generally involve the calculation of bilinear pairs on finite fields/elliptic curves/elliptic curves. The 2-adic ring algorithm logo ciphers designed in this paper involve knowledge of finite field 2-adic rings.Identification password verification steps are as follows:(i)
Create a polynomial identification cryptographic algorithm to produce public and private keys(ii)
Set up a management node and establish an interactive protocol with the user. Executing this protocol can generate the private key and member certificate of the management node and use the private key of the group member of the group administrator(iii)
Using an identification password signature algorithm, after entering a message and a member private key, the signature of the message is output(iv)
Verify the original message/message signature/public key(v)
Confirm the legality of the signature


## 2.3. 2-Adic Integer and Arithmetic Crosscorrelation

Let binary strictly periodic sequences¯=s0,s1,s2,s3,⋯, have the least period T, st+T=st. A 2-adic integer is a formal power series ϖ=∑t=0∞st∙2t, with st∈0,1. The set Z2 of the 2-adic integers forms a ring under the operations of addition and multiplication with carry [11], the string 000⋯ as merely, and the string 100⋯ as 1, and define 1+2+22∙∙∙=−1, the infinite string 111⋯ is a base 2 expansion of a negative integer -1.Specifically, the addition ofZ2 integers is given by
(1)∑t=0∞s1t∙2t+∑t=0∞s2t∙2t=∑t=0∞s3t∙2t,s1t+s2t=s3t+2dt+1−dt.d0,d1,d2,∙∙∙, are carry integers, such that d0=0, and for all t≥0.Similarly, there are multiplications ofZ2 integers [11].Letq=1+q12+q223+∙∙∙+qr2r be an odd integer, then the negative integer −q is associated to the product
(2)−q=1+2+22+23+∙∙∙1+q12+q222+∙∙∙+qr2r.InZ2, the formal power series −q has a unique (multiplicative) inverse
(3)−q−1=1∙20+b1∙21+b2∙22+b3∙23+∙∙∙.Thus, the ringZ2 contains every rational number h/q provided q is odd.Proposition 1 (see [11]).
There is a one-to-one correspondence between rational numbersϖ=h/q (where q is an odd number) and eventually periodic binary sequences s¯, which associates to each rational number ϖ and the bit sequence s¯=s0,s1,s2∙∙∙ of its 2-adic expansion. The sequence s¯ is strictly periodic if and only if ϖ≤0 and ϖ≤1.
In this correspondence, we use the operations inZ2 to introduce the arithmetic crosscorrelation.Definition 2 (see [11]).
Lets¯1 and s¯2 be two strictly binary periodic sequences with period T, and let 0≤τ<T and s¯2τ be the τ shift of s¯2. Denote ϖ¯1 and ϖ2τ as the 2-adic integers corresponding to the sequences s¯1 and s¯2τ. Then, the corresponding sequence s¯3 of ϖ1−ϖ2τ is strictly periodic or eventually periodic, and its period divides T. The shift arithmetic crosscorrelation Cs1,s2aτ of s¯1 and s¯2 is the number of zeros minus the number of ones in one period of length T of s¯3.


## 3. Identity Authentication Scheme Based on 2-Adic Ring AC Algorithm

This paper proposes an information authentication scheme suitable for consortium blockchain technology. By broadcasting transaction information encrypted by user identity information in transaction information, multi-KGC signature calculation is performed to hide user identity and transaction continuity.


### 3.1. Node Composition

The nodes in this scheme are divided into a primary node and a secondary node. The primary node is responsible for initializing the parameters of the AC algorithm and KGC signature used in the blockchain, executing the consensus algorithm for generating new blocks in the blockchain, participating in the continuous generation of blocks, and managing the joining of secondary nodes and distribution of related key. There can be multiple KGCs in a system, and new KGCs can only be added after they are approved by other KGCs. Each KGC has its own specific ID number and at a fixed time interval randomly generates an ID-based ID based on an algorithmPi,Pi=HIDihid,N. In a fixed period of time, KGC generates a large prime P based on P1,P2,∙∙∙,Pi,∙∙∙,PN according to the self-energy contract code. The secondary node A and B transaction information generates random numbers kA and kB and generates FP,kA,FP,kB. Each KGC generates its own key FPi,kA,FPi,kB. Secondary node A receives FP,kA, and secondary node B receives FP,kB.Secondary nodesA and B generate eA and eB based on their ID numbers. Generate verification key pairs FP,kA,eA,SA and FP,kB,eB,SB according to contract algorithm. The secondary node holds its own signature key pair, and the secondary node is the user who signs the KGC. Conduct transactions between secondary nodes to complete the peer-to-peer transaction information transfer process. After the KGC negotiates the transaction, it will be broadcasted to the entire network, and the new block will write the transaction, which will be confirmed and effective by each KGC master node.


### 3.2. Transaction Process

The network transaction process is as follows.


#### 3.2.1. Signature Generation

The secondary nodeA has to conduct transactions with the secondary node B, and the transaction task is nAB. The secondary nodes A and B broadcast to the primary node KGC, and the secondary nodes A and B generate verification keys eA=HIDA,nAB and eB=HIDB,nAB according to their unique ID numbers IDA and IDB. Secondary node A retains eA and secondary node B retains eB. The main node KGC has its own characteristic ID number and generates an identification number identifier Pi during the time period of transaction nAB, Pi=HIDihid,N. The contract can generate a large prime number P based on the identification P1,P2,∙∙∙,Pi,∙∙∙,PN, and send FPi,kA,FPi,kB to each KGC, FP,kA to the secondary node A, and FP,kB to the secondary node B. The primary node KGC holds FPi,kA,FPi,kB,nAB, the secondary node A holds FP,kA,eA, and the secondary node B holds FP,kB,eB.


#### 3.2.2. Signature Verification

The secondary nodesA and B conduct transactions, the secondary node A generates a key sequence SA=SFP,kA,eA,nAB based on FP,kA,eA, the secondary node B generates a key sequence SB=SFP,kB,eB,nAB based on FP,kB,eB, and the secondary nodes A and B send SA and SB to each other. The secondary node verifies the legality of the other party, and the formula is CSA,SB=0 then the identity is legal. If CSA,SB≠0, it means that the secondary nodes A and B have not obtained the identification key issued by KGC and are not in the transaction, or the transaction has expired.Compared with the verification algorithm of the identification standard, considering that there can be multiple KGC functional requirements in the consortium blockchain, the main KGC functions of the multi-KGC mode in this paper are allocated to the master node. The master node jointly participates in parameter maintenance and key generation, which meets the requirements of partial decentralization of the consortium blockchain. After verifying the identity and transaction legitimacy of the secondary nodesA and B, they are sent SA,SB,nAB to KGC. Each KGC is calculated according to the competition and broadcasted to the main node KGC of the entire network. Each KGC writes a block after verification and broadcasts the secondary to the entire network. The transactions of nodes A and B are successfully included in the blockchain, and each KGC stores transaction information. Each KGC calculates eA,eB according to the competition of SA,SB,nAB and broadcasts it to the main node KGC of the whole network. Each KGC writes the block after verification and broadcasts the transactions of the secondary nodes A and B to the whole network, storing transaction information.In a blockchain transaction, when a node interacts with information, it needs to check the other party’s information. KGC can find the key to which userA belongs according to the user information IDA it holds and check whether it is revoked and changed to determine the time of the transaction and legality. When revoking the secondary node, record the “obsolete” mark in the ID number of the member information to be revoked. Second, when the system parameters need to be updated, KGC can regenerate the system parameters and update the user information while retaining the system coefficients that were used.


### 3.3. Blockchain Generation and Verification

This paper proposes an authentication scheme based on the 2-adic ring algorithm, which is mainly applicable to the design architecture of the consortium blockchain. The main node KGC is responsible for the generation of the blockchain. Since the designed scenario is a cooperative relationship of KGC for mutual trust, the consensus algorithm for block generation designed by this scheme does not have strong block generation rewards and competition. We use semicompetitive and semirandom blockchain accounting right allocation to complete block generation. Since the various KGCs do not trust and cooperate with each other, we rule out malicious forks of the blockchain.When the secondary nodesA and B initiate the transaction nAB, the number n∗AB to which the last associated transaction information belongs and the hash value Hn∗AB to which A belongs to in the last associated transaction need to be added. The master node KGC needs to publish whether transaction nAB is the last related transaction of n∗AB and confirm whether the transaction between nodes A and B is legal. The block record information HnAB=HeA,eB,nABHnAB of nAB is generated after the transaction.The new block needs to record the number and hash value of the previous block to ensure the continuity of the block. Each node needs to confirm the legality of generating the identity of the master node when receiving the heart block, and after the latest block is associated, the transaction information verification process is performed.


### 3.4. Specific Process

Based on the ID number of the secondary node in this solution, the identification authentication keye can be generated, which can protect the privacy information of the secondary node, and can be designed to add the identification information of KGC to the ID when generating e, so that KGC can be authorized under certain conditions and it can identify the identity of secondary nodes and realize the supervision of individuals and transactions. In actual scenarios, it can be used for Internet transactions based on citizen ID numbers. Each KGC can include a supervisory unit that issues citizen ID numbers. Internet applications that require identification, banks, governments, communication companies, schools, and other departments, need to confirm their identities and business handling and transactions.The specific process is as follows (Figure1):
(i)
The secondary nodesA and B initiate the creation of transaction nAB, and the secondary nodes A and B each verify the legitimacy of nAB. According to the last associated transaction n∗AB, both parties send a transaction request nAB to the primary node, KGC, after authentication by both parties(ii)
After receiving the transaction requestnAB, each KGC generates a time-stamped large prime number P at a time interval and generates a verification key FP,kA,FP,kB; each KGC generates its own key FPi,kA,FPi,kB, sends FP,kA to the secondary node A, and sends FP,kB to the secondary node B(iii)
The secondary nodesA and B generate eA and eB through the smart contract encryption algorithm according to their respective ID numbers, generate authentication keys SA and SB, and send it to each other(iv)
Secondary nodesA and B verify if each other’s identity is legal and send FFP,kA,FP,kB,eA,eB to all KGC after authentication(v)
After each KGC receivesFFP,kA,FP,kB,eA,eB, it competes to calculate eA,eB, obtain accounting power, and broadcast HnAB=HeA,eB,nAB,HnAB to the entire network, and the transaction validation process endsFigure 1
The flowchart of 2-adic ring AC algorithm.


## 3.1. Node Composition

The nodes in this scheme are divided into a primary node and a secondary node. The primary node is responsible for initializing the parameters of the AC algorithm and KGC signature used in the blockchain, executing the consensus algorithm for generating new blocks in the blockchain, participating in the continuous generation of blocks, and managing the joining of secondary nodes and distribution of related key. There can be multiple KGCs in a system, and new KGCs can only be added after they are approved by other KGCs. Each KGC has its own specific ID number and at a fixed time interval randomly generates an ID-based ID based on an algorithmPi,Pi=HIDihid,N. In a fixed period of time, KGC generates a large prime P based on P1,P2,∙∙∙,Pi,∙∙∙,PN according to the self-energy contract code. The secondary node A and B transaction information generates random numbers kA and kB and generates FP,kA,FP,kB. Each KGC generates its own key FPi,kA,FPi,kB. Secondary node A receives FP,kA, and secondary node B receives FP,kB.Secondary nodesA and B generate eA and eB based on their ID numbers. Generate verification key pairs FP,kA,eA,SA and FP,kB,eB,SB according to contract algorithm. The secondary node holds its own signature key pair, and the secondary node is the user who signs the KGC. Conduct transactions between secondary nodes to complete the peer-to-peer transaction information transfer process. After the KGC negotiates the transaction, it will be broadcasted to the entire network, and the new block will write the transaction, which will be confirmed and effective by each KGC master node.


## 3.2. Transaction Process

The network transaction process is as follows.


### 3.2.1. Signature Generation

The secondary nodeA has to conduct transactions with the secondary node B, and the transaction task is nAB. The secondary nodes A and B broadcast to the primary node KGC, and the secondary nodes A and B generate verification keys eA=HIDA,nAB and eB=HIDB,nAB according to their unique ID numbers IDA and IDB. Secondary node A retains eA and secondary node B retains eB. The main node KGC has its own characteristic ID number and generates an identification number identifier Pi during the time period of transaction nAB, Pi=HIDihid,N. The contract can generate a large prime number P based on the identification P1,P2,∙∙∙,Pi,∙∙∙,PN, and send FPi,kA,FPi,kB to each KGC, FP,kA to the secondary node A, and FP,kB to the secondary node B. The primary node KGC holds FPi,kA,FPi,kB,nAB, the secondary node A holds FP,kA,eA, and the secondary node B holds FP,kB,eB.


### 3.2.2. Signature Verification

The secondary nodesA and B conduct transactions, the secondary node A generates a key sequence SA=SFP,kA,eA,nAB based on FP,kA,eA, the secondary node B generates a key sequence SB=SFP,kB,eB,nAB based on FP,kB,eB, and the secondary nodes A and B send SA and SB to each other. The secondary node verifies the legality of the other party, and the formula is CSA,SB=0 then the identity is legal. If CSA,SB≠0, it means that the secondary nodes A and B have not obtained the identification key issued by KGC and are not in the transaction, or the transaction has expired.Compared with the verification algorithm of the identification standard, considering that there can be multiple KGC functional requirements in the consortium blockchain, the main KGC functions of the multi-KGC mode in this paper are allocated to the master node. The master node jointly participates in parameter maintenance and key generation, which meets the requirements of partial decentralization of the consortium blockchain. After verifying the identity and transaction legitimacy of the secondary nodesA and B, they are sent SA,SB,nAB to KGC. Each KGC is calculated according to the competition and broadcasted to the main node KGC of the entire network. Each KGC writes a block after verification and broadcasts the secondary to the entire network. The transactions of nodes A and B are successfully included in the blockchain, and each KGC stores transaction information. Each KGC calculates eA,eB according to the competition of SA,SB,nAB and broadcasts it to the main node KGC of the whole network. Each KGC writes the block after verification and broadcasts the transactions of the secondary nodes A and B to the whole network, storing transaction information.In a blockchain transaction, when a node interacts with information, it needs to check the other party’s information. KGC can find the key to which userA belongs according to the user information IDA it holds and check whether it is revoked and changed to determine the time of the transaction and legality. When revoking the secondary node, record the “obsolete” mark in the ID number of the member information to be revoked. Second, when the system parameters need to be updated, KGC can regenerate the system parameters and update the user information while retaining the system coefficients that were used.


## 3.2.1. Signature Generation

The secondary nodeA has to conduct transactions with the secondary node B, and the transaction task is nAB. The secondary nodes A and B broadcast to the primary node KGC, and the secondary nodes A and B generate verification keys eA=HIDA,nAB and eB=HIDB,nAB according to their unique ID numbers IDA and IDB. Secondary node A retains eA and secondary node B retains eB. The main node KGC has its own characteristic ID number and generates an identification number identifier Pi during the time period of transaction nAB, Pi=HIDihid,N. The contract can generate a large prime number P based on the identification P1,P2,∙∙∙,Pi,∙∙∙,PN, and send FPi,kA,FPi,kB to each KGC, FP,kA to the secondary node A, and FP,kB to the secondary node B. The primary node KGC holds FPi,kA,FPi,kB,nAB, the secondary node A holds FP,kA,eA, and the secondary node B holds FP,kB,eB.


## 3.2.2. Signature Verification

The secondary nodesA and B conduct transactions, the secondary node A generates a key sequence SA=SFP,kA,eA,nAB based on FP,kA,eA, the secondary node B generates a key sequence SB=SFP,kB,eB,nAB based on FP,kB,eB, and the secondary nodes A and B send SA and SB to each other. The secondary node verifies the legality of the other party, and the formula is CSA,SB=0 then the identity is legal. If CSA,SB≠0, it means that the secondary nodes A and B have not obtained the identification key issued by KGC and are not in the transaction, or the transaction has expired.Compared with the verification algorithm of the identification standard, considering that there can be multiple KGC functional requirements in the consortium blockchain, the main KGC functions of the multi-KGC mode in this paper are allocated to the master node. The master node jointly participates in parameter maintenance and key generation, which meets the requirements of partial decentralization of the consortium blockchain. After verifying the identity and transaction legitimacy of the secondary nodesA and B, they are sent SA,SB,nAB to KGC. Each KGC is calculated according to the competition and broadcasted to the main node KGC of the entire network. Each KGC writes a block after verification and broadcasts the secondary to the entire network. The transactions of nodes A and B are successfully included in the blockchain, and each KGC stores transaction information. Each KGC calculates eA,eB according to the competition of SA,SB,nAB and broadcasts it to the main node KGC of the whole network. Each KGC writes the block after verification and broadcasts the transactions of the secondary nodes A and B to the whole network, storing transaction information.In a blockchain transaction, when a node interacts with information, it needs to check the other party’s information. KGC can find the key to which userA belongs according to the user information IDA it holds and check whether it is revoked and changed to determine the time of the transaction and legality. When revoking the secondary node, record the “obsolete” mark in the ID number of the member information to be revoked. Second, when the system parameters need to be updated, KGC can regenerate the system parameters and update the user information while retaining the system coefficients that were used.


## 3.3. Blockchain Generation and Verification

This paper proposes an authentication scheme based on the 2-adic ring algorithm, which is mainly applicable to the design architecture of the consortium blockchain. The main node KGC is responsible for the generation of the blockchain. Since the designed scenario is a cooperative relationship of KGC for mutual trust, the consensus algorithm for block generation designed by this scheme does not have strong block generation rewards and competition. We use semicompetitive and semirandom blockchain accounting right allocation to complete block generation. Since the various KGCs do not trust and cooperate with each other, we rule out malicious forks of the blockchain.When the secondary nodesA and B initiate the transaction nAB, the number n∗AB to which the last associated transaction information belongs and the hash value Hn∗AB to which A belongs to in the last associated transaction need to be added. The master node KGC needs to publish whether transaction nAB is the last related transaction of n∗AB and confirm whether the transaction between nodes A and B is legal. The block record information HnAB=HeA,eB,nABHnAB of nAB is generated after the transaction.The new block needs to record the number and hash value of the previous block to ensure the continuity of the block. Each node needs to confirm the legality of generating the identity of the master node when receiving the heart block, and after the latest block is associated, the transaction information verification process is performed.


## 3.4. Specific Process

Based on the ID number of the secondary node in this solution, the identification authentication keye can be generated, which can protect the privacy information of the secondary node, and can be designed to add the identification information of KGC to the ID when generating e, so that KGC can be authorized under certain conditions and it can identify the identity of secondary nodes and realize the supervision of individuals and transactions. In actual scenarios, it can be used for Internet transactions based on citizen ID numbers. Each KGC can include a supervisory unit that issues citizen ID numbers. Internet applications that require identification, banks, governments, communication companies, schools, and other departments, need to confirm their identities and business handling and transactions.The specific process is as follows (Figure1):
(i)
The secondary nodesA and B initiate the creation of transaction nAB, and the secondary nodes A and B each verify the legitimacy of nAB. According to the last associated transaction n∗AB, both parties send a transaction request nAB to the primary node, KGC, after authentication by both parties(ii)
After receiving the transaction requestnAB, each KGC generates a time-stamped large prime number P at a time interval and generates a verification key FP,kA,FP,kB; each KGC generates its own key FPi,kA,FPi,kB, sends FP,kA to the secondary node A, and sends FP,kB to the secondary node B(iii)
The secondary nodesA and B generate eA and eB through the smart contract encryption algorithm according to their respective ID numbers, generate authentication keys SA and SB, and send it to each other(iv)
Secondary nodesA and B verify if each other’s identity is legal and send FFP,kA,FP,kB,eA,eB to all KGC after authentication(v)
After each KGC receivesFFP,kA,FP,kB,eA,eB, it competes to calculate eA,eB, obtain accounting power, and broadcast HnAB=HeA,eB,nAB,HnAB to the entire network, and the transaction validation process endsFigure 1
The flowchart of 2-adic ring AC algorithm.


## 4. Solution Security Analysis

### 4.1. Proof of Correctness

We introduce the nature of theSA sequence; for the detailed proof, please refer to the literature [12].For each integern, p is satisfied p>7,4/p−1 on the Galois ring Z/pe. There is a maximum period sequence a¯=att≥0, αtϵGRpe,n sequence a¯=att≥0 maximum period is pe−1pn−1−1. Ring Z/pe maximum sequence a¯=att≥0 composition of the sequence set is defined as Ape,n. The sequence s¯=stt≥0 generated by a¯=att≥0 is defined by the following:
(4)st=1,atϵC0∪D0,0,atϵC1∪D1,where C0=atϵZ/peatmodp=0andtmod4=0ortmod4=3; C1=atϵZ/peatmodp=0andtmod4=0ortmod4=2; D0=atϵZ/peatmodp≠0andatisquadraticresidual; D1=atϵZ/peatmodp≠0andatisnonquadraticresidual.The sequences generated by the largest periodic sequence of integersn in the Z/pe form a binary periodic sequence set. The largest periodic sequences make up the set Spe1,n and period is 2∙pe−1pn−1/p−1. Any two sequences s¯1, s¯2 in set Spe1,n1, Spe1,n2e1≠e2,n1≠n2 satisfy Cs¯1s¯2a=0 [12].The key point of the 2-adic ring AC algorithm proves is the arithmetic correlation property of sequence S, it has been proven readers may refer to [12].


### 4.2. Solution Security Analysis

#### 4.2.1. Unforgeability Analysis

Identification signatureeA of the secondary node A: because the IDA number is generated based on identity eA, if the attacker forges identity eA′ and forges the verification sequence password SA′, it is necessary to verify whether it is legal. Because the attacker cannot get FP,kA, so this scheme can resist identity forgery.Forged identity signature on KGC attack on master nodePA′: due to the overall design of the scheme, each KGC does not participate in the transaction, but only serves as transaction authentication and block generation, and the generation of block accounting rights is semirandom and does not rely too much on computing power and rights. Therefore, the attacker attacks KGC to obtain its own possibility of accounting rights. During the attack, there is no valuable information interaction between the malicious primary node and the malicious secondary node. Therefore, as long as there is any credible KGC, this scheme can resist forged malicious attacks.


#### 4.2.2. Forward and Backward Security

When the system parameters of the identification password scheme need to be updated, KGC needs to renegotiate a new random number, determine a new identification signature based on its ID number, and issue new transaction keys to participating nodes. The previous system parameters should still be retained, and the node can verify the signature before the update based on the parameters in effect at the time. As for the system parameters, since the random numbers are randomly selected, there is no connection between the two before and after the update, and the attacker cannot forge the key before the update based on the key at the current stage. If the attacker holds the key before the update, he cannot join the participating nodes to forge the signature at the current stage.


### 4.3. Solution Efficiency and Safety Analysis

This solution is based on the 2-adic arithmetic correlation algorithm design. The legality verification key between nodes is a binary sequence string, which inherits the efficiency of sequence verification in communication. And each KGC competes to generate blocks with a simple polynomial time complexity, so the overall design scheme has higher verification block efficiency. In order to illustrate the operational efficiency and safety of this solution, this article lists several typical solutions for comparison (Table1); TE represents exponential calculation time, TM represents the dot multiplication operation time of the elements in the ring, and TB represents the homomorphic mapping operation time. Performance comparison and analysis table is available.Table 1
Scheme efficiency and safety comparison.
ProgramSignature efficiencyVerification efficiencyForgery attackTransaction informationSM9TM+TETB+TM+2TESatisfy25 KBCPKC [3]4TM+7TE5TB+TM+TESatisfy15 KBCSS [13]TM+4TE3TB+TM+TESatisfy20 KB2-Adic ring arithmetic authentication scheme2TM+TE2TB+TMSatisfy5 KB-10 KB


## 4.1. Proof of Correctness

We introduce the nature of theSA sequence; for the detailed proof, please refer to the literature [12].For each integern, p is satisfied p>7,4/p−1 on the Galois ring Z/pe. There is a maximum period sequence a¯=att≥0, αtϵGRpe,n sequence a¯=att≥0 maximum period is pe−1pn−1−1. Ring Z/pe maximum sequence a¯=att≥0 composition of the sequence set is defined as Ape,n. The sequence s¯=stt≥0 generated by a¯=att≥0 is defined by the following:
(4)st=1,atϵC0∪D0,0,atϵC1∪D1,where C0=atϵZ/peatmodp=0andtmod4=0ortmod4=3; C1=atϵZ/peatmodp=0andtmod4=0ortmod4=2; D0=atϵZ/peatmodp≠0andatisquadraticresidual; D1=atϵZ/peatmodp≠0andatisnonquadraticresidual.The sequences generated by the largest periodic sequence of integersn in the Z/pe form a binary periodic sequence set. The largest periodic sequences make up the set Spe1,n and period is 2∙pe−1pn−1/p−1. Any two sequences s¯1, s¯2 in set Spe1,n1, Spe1,n2e1≠e2,n1≠n2 satisfy Cs¯1s¯2a=0 [12].The key point of the 2-adic ring AC algorithm proves is the arithmetic correlation property of sequence S, it has been proven readers may refer to [12].


## 4.2. Solution Security Analysis

### 4.2.1. Unforgeability Analysis

Identification signatureeA of the secondary node A: because the IDA number is generated based on identity eA, if the attacker forges identity eA′ and forges the verification sequence password SA′, it is necessary to verify whether it is legal. Because the attacker cannot get FP,kA, so this scheme can resist identity forgery.Forged identity signature on KGC attack on master nodePA′: due to the overall design of the scheme, each KGC does not participate in the transaction, but only serves as transaction authentication and block generation, and the generation of block accounting rights is semirandom and does not rely too much on computing power and rights. Therefore, the attacker attacks KGC to obtain its own possibility of accounting rights. During the attack, there is no valuable information interaction between the malicious primary node and the malicious secondary node. Therefore, as long as there is any credible KGC, this scheme can resist forged malicious attacks.


### 4.2.2. Forward and Backward Security

When the system parameters of the identification password scheme need to be updated, KGC needs to renegotiate a new random number, determine a new identification signature based on its ID number, and issue new transaction keys to participating nodes. The previous system parameters should still be retained, and the node can verify the signature before the update based on the parameters in effect at the time. As for the system parameters, since the random numbers are randomly selected, there is no connection between the two before and after the update, and the attacker cannot forge the key before the update based on the key at the current stage. If the attacker holds the key before the update, he cannot join the participating nodes to forge the signature at the current stage.


## 4.2.1. Unforgeability Analysis

Identification signatureeA of the secondary node A: because the IDA number is generated based on identity eA, if the attacker forges identity eA′ and forges the verification sequence password SA′, it is necessary to verify whether it is legal. Because the attacker cannot get FP,kA, so this scheme can resist identity forgery.Forged identity signature on KGC attack on master nodePA′: due to the overall design of the scheme, each KGC does not participate in the transaction, but only serves as transaction authentication and block generation, and the generation of block accounting rights is semirandom and does not rely too much on computing power and rights. Therefore, the attacker attacks KGC to obtain its own possibility of accounting rights. During the attack, there is no valuable information interaction between the malicious primary node and the malicious secondary node. Therefore, as long as there is any credible KGC, this scheme can resist forged malicious attacks.


## 4.2.2. Forward and Backward Security

When the system parameters of the identification password scheme need to be updated, KGC needs to renegotiate a new random number, determine a new identification signature based on its ID number, and issue new transaction keys to participating nodes. The previous system parameters should still be retained, and the node can verify the signature before the update based on the parameters in effect at the time. As for the system parameters, since the random numbers are randomly selected, there is no connection between the two before and after the update, and the attacker cannot forge the key before the update based on the key at the current stage. If the attacker holds the key before the update, he cannot join the participating nodes to forge the signature at the current stage.


## 4.3. Solution Efficiency and Safety Analysis

This solution is based on the 2-adic arithmetic correlation algorithm design. The legality verification key between nodes is a binary sequence string, which inherits the efficiency of sequence verification in communication. And each KGC competes to generate blocks with a simple polynomial time complexity, so the overall design scheme has higher verification block efficiency. In order to illustrate the operational efficiency and safety of this solution, this article lists several typical solutions for comparison (Table1); TE represents exponential calculation time, TM represents the dot multiplication operation time of the elements in the ring, and TB represents the homomorphic mapping operation time. Performance comparison and analysis table is available.Table 1
Scheme efficiency and safety comparison.
ProgramSignature efficiencyVerification efficiencyForgery attackTransaction informationSM9TM+TETB+TM+2TESatisfy25 KBCPKC [3]4TM+7TE5TB+TM+TESatisfy15 KBCSS [13]TM+4TE3TB+TM+TESatisfy20 KB2-Adic ring arithmetic authentication scheme2TM+TE2TB+TMSatisfy5 KB-10 KB


## 5. Conclusion

This article turns to the basic design ideas of the identification password and the functions of the main nodes of the consortium blockchain as the entry point. Using 2-adic ring theory and arithmetic related algorithms, a new identification password authentication scheme applied in consortium blockchain is designed to serve the fog computing devices. Under the premise that the master node trusts each other, the scheme designs the master node to bear the relevant functions of KGC and bear the responsibility of block generation and accounting. Through security proof and efficiency analysis, this scheme has signatures that cannot be forged, transaction node anonymity, and forward security. Because the scheme is designed to be in a trusted environment, transaction authentication and consensus protocols can be implemented with a set of algorithm schemes, so the computational efficiency is greatly improved compared to classic identification passwords such as SM9. This solution can realize the identity verification between nodes in terms of computing time and security and protect the privacy of the nodes, which meets the functional requirements of consortium blockchain multicentralization and protection of node identity information. How to generate blocks between master nodes with competitive interests will be the next step of research work.



---

*Source: 8849363-2020-08-01.xml*