Skip to Content
Applied SciencesApplied Sciences
  • Article
  • Open Access

22 September 2022

Cloud-Assisted Privacy Protection Energy Trading Based on IBS and Homomorphic Encryption in IIoT

,
,
,
,
and
Yunnan Key Laboratory of Computer Technology Applications, Kunming University of Science and Technology, Kunming 650500, China
*
Author to whom correspondence should be addressed.

Abstract

The decentralized and tamper-proof features of blockchain technology can solve the problems of low compatibility, poor flexibility, and single point of failure in the traditional Industrial Internet of Things (IIoT). However, the transparency of the blockchain ledger makes the privacy disclosure of users a huge security risk. Given the privacy leakage problem exposed in the existing energy trading scheme based on the blockchain, this paper creatively proposes a privacy protection scheme for IIoT energy trading based on an identity-based signature (IBS) and homomorphic encryption. On the premise of satisfying the transaction traceability and verifiability, this scheme uses IBS technology to provide an anonymous mechanism for energy trading nodes and utilizes Paillier homomorphic encryption to prevent the disclosure of transaction amounts. To meet the high-concurrency and high-throughput energy trading requirements in IIoT, moreover, the proposed scheme combines the off-chain storage with cloud assistance and the off-chain transaction based on PCN to reduce redundant data written into the blockchain and to improve the concurrent trading efficiency, respectively. The security analysis and performance evaluation results show that the proposed scheme can realize the dual privacy protection of identities and transaction amounts in the trading process at the cost of reasonable calculation.

1. Introduction

The IIoT, which has ubiquitous interconnection, integrated perception, intelligent optimization, and security protection, is regarded as a key technology in the era of Industry 4.0 [1]. However, it is a significant issue for industrial systems to meet the rising energy demand of IIoT applications due to the expanding number of IIoT nodes and performance requirements [2]. A vast amount of energy trading data are exposed to security threats, which could result in significant economic issues, due to the dynamic and expansive character of the IIoT system.
In the traditional energy Internet, transactions are often verified, stored, and managed by a trusted center, which also records all transaction data. According to [3], this centralized operation mode has some drawbacks and can easily become the target of network attackers. In the context of the IIoT, energy trading is currently moving from a centralized to a distributed model [4]. Neither the producer nor the consumer of energy can be regarded as a trustworthy entity in the dispersed P2P trade environment [5]. Building confidence in the trading platform is therefore essential for its acceptance in the consumer sector. Decentralization, distrust, distributed sharing, and tamper-proof transaction records are all benefits of the P2P system powered by blockchain, which has been investigated and used in energy trading recently [1,4,5,6,7,8,9,10].
The IIoT energy trading combined with blockchain technology mainly faces the following problems: first, some existing research schemes send all private transactions to the blockchain for execution, which greatly limits the scalability of energy trading. Second, the block will grow bigger and take longer to construct if the transaction data is entirely recorded on the blockchain. It is recommended to write the least amount of information feasible when taking into account the throughput and transaction delay of the blockchain [11]. Finally, the existing transaction models generally ignore some important practical constraints, such as privacy disclosure caused by frequent transactions [12]. The analysis of this data over time may reveal the user’s trading habits and other private data. In the energy trading process, it is best to conceal or limit the transaction information.
Given the above problems, this paper proposes cloud-assisted privacy protection energy trading based on IBS and homomorphic encryption in IIoT. The proposed scheme uses PCN [13] to realize off-chain transactions and cloud-assisted off-chain storage—that is, not all data are saved on the blockchain, only indexes or abstracts, and the actual data are saved by the cloud service provider (CSP). In addition, the proposed scheme combines an identity-based signature with Paillier homomorphic encryption. On the one hand, it provides pseudonyms for nodes participating in blockchain network transactions. It creates a pseudonym for each node and uses that pseudonym for transactions to maintain anonymity. On the other hand, the confidentiality of the transaction amount is realized by Paillier [14] homomorphic encryption. The contributions of this paper are as follows:
  • We propose a uniform energy trading framework built on the blockchain in light of the IIoT energy trade scenarios now in use. This design reduces duplicate data transmitted to the blockchain and increases transaction efficiency by combining PCN-based off-chain transactions and cloud-assisted off-chain storage.
  • Using IBS and Paillier homomorphic encryption, we propose a privacy protection mechanism and apply it to off-chain transactions on the blockchain, allowing transactions using pseudonyms to protect node identity privacy and transaction data information security.
  • We have carried out simulation experiments, and the experimental results prove the effectiveness and feasibility of the scheme.
The rest of this paper is organized as follows. Section 2 reviews the relevant work; Section 3 introduces the relevant background knowledge required by the scheme; Section 4 describes the proposed scheme in detail; in Section 5, performance evaluation and experimental analysis will be conducted; Section 6 contains some discussion; Section 7 concludes the paper.

3. Preliminary Knowledge

3.1. Payment Channel Network

To overcome this scalability issue, the PCN proposed by Poon J et al. [13] can take most of the transactions off-chain. Users only need to enter the initial and final balances for each channel during the transaction. The typical PCN transaction is shown in Figure 1. In PCN, a set quantity of electronic money is deposited into a shared account by both parties to the transaction. Through several hops, the sender can transfer money to the recipient. The intermediary node in the payment channel path will assess the transfer fee when the payment travels through its payment channel. The blockchain is updated with the details of both parties’ balances when the transaction is completed [19].
Figure 1. An example of off-chain payment channel transaction.
Figure 2 depicts a particular payment procedure. In the hash time lock contract (HTLC), the maximum level of user tolerance for transaction time is specified. Hash lock and time lock make up HTLC. The sender creates a random number R and receives its hash value H through the hash lock from the receiver. The hash value H in the transaction contract is stored in the sender or each intermediate node. The transfer fund can only be withdrawn after the forwarder has given the secret number R, which guarantees that the payment receipt cannot be disputed. Each transaction under time locking has a deadline for completion. The sent monies will be returned to the sender if they do not obtain the random number R within the allotted time.
Figure 2. A demonstration of payment channel capacity. Alice sends 2 bitcoin to Bob through 3 nodes.

3.2. Identity-Based Signature

To solve the defects of power concentration and vulnerability caused by the certificate mechanism, Shamir [26] put forth an identity-based cryptosystem (IBC). In this system, the user’s public key can be a string containing information about the user’s identity, whereas the user’s private key is produced by the key generation center (KGC). Boneh and Franklin [27], in 2001, proposed the first identity-based encryption (IBE) method. The identity-based signature (IBS) derived from IBE is used for device authentication. In this paper, the IBS technology specified in the Chinese national standard SM9 [28] issued by the State Password Administration of China is used to ensure the identity anonymity of the node [29]. The algorithm is described as follows:
  • System master key establishment: KGC selects a random number s [ 1 , N 1 ] as the main private key and calculates the element P P u b s = [ s ] P 2 in G 2 as the main public key and KGC keeps s and discloses P P u b s ;
  • User key generation: assuming the identity identifier of the user is I D A , KGC calculates t 1 on the finite field F.
    t 1 = H 1 ( I D A | | h i d , N ) + s ,
    If t 1 is 0, it is necessary to recalculate the master private key and update all users’ private keys. If t 1 is not equal to 0, calculate t 2 :
    t 2 = [ s ] t 1 1 ,
    The user’s private key is d A = [ t 2 ] P 1 . The user’s public key p k A is
    p k A = H 1 ( I D A | | h i d ) + P P u b s ,
    So far, the key pair of the user is ( d A , p k A ) ;
  • Signature generation: assuming there is a message M, the signer calculates g = e ( P 1 , P P u b s ) , selects the random number r [ 1 , N 1 ] , calculates w = g r , then calculates h = H 2 ( m | | w ) , l = ( r h ) m o d N , and finally calculates S = [ l ] d x .
    The signer’s signature value ( h , S ) for the message can be obtained.
  • Signature verification: assuming the message received by the verifier and its signature are m and ( h , S ) , respectively, the verifier first verifies whether both h [ 1 , N 1 ] and S G 1 are correct. If one of them is not correct, the verification fails. Otherwise, P, u, and w are calculated.
    P = [ H 1 ( I D A | | h i d , N ) ] P 2 + P P u b s ,
    u = e ( S , P ) ,
    w = g h ,
    Finally, h 2 = H 2 ( m | | w , N ) is calculated and compared with h . If it is consistent, the verification passes [30].
    During the above calculation, N is the order of elliptic curve used by the SM9 digital signature algorithm. P 1 , P 2 are the generators of the N-order cyclic subgroup G 1 and G 2 . h i d is the signature private key generation function identifier. H 1 and H 2 are hash functions.

3.3. Paillier Homomorphic Encryption

Rivest et al. [31] made the initial proposal for homomorphic encryption in 1978. Semi-homomorphic encryption and fully homomorphic encryption are the two categories into which it can be separated. Complete homomorphic encryption is extremely expensive and unable to handle high transaction throughput demands. The classical probabilistic homomorphic encryption technique employed in this study, the Paillier algorithm, is more sophisticated than other methods and has been extensively used in the Internet of Things, cloud computing, and other applications. The following is a description of the Paillier homomorphic encryption algorithm:
  • Key generation: arbitrarily select large prime numbers p, q, and calculate n = p × q and λ = l c m ( p 1 , q 1 ) ; If an integer is arbitrarily selected and g c d ( L ( g λ m o d n 2 ) , n ) = 1 is satisfied, p k P = ( n , g ) and s k P = ( p , q ) are the public key and private key, respectivelythe public key is p k P = ( n , g ) and the private key is s k P = ( p , q ) .
  • Encryption: arbitrarily select r < n , and for plaintext m < n , the encrypted ciphertext c = g m r n m o d n 2 .
  • Decrypt: assuming the ciphertext is c, the decrypted ciphertext
    m = L ( c λ m o d n 2 ) L ( g λ m o d n 2 ) m o d n ,
  • Additive homomorphism: for two plaintext M s g 1 and M s g 2 , Paillier homomorphic encryption operation is expressed as: E n c ( · ) . Following Paillier homomorphic encryption, the ciphertext is, accordingly, E n c ( M s g 1 ) and E n c ( M s g 2 ) , then E n c ( M s g 1 ) and E n c ( M s g 1 ) satisfy the following requirements:
    E n c ( M s g 1 ) × E n c ( M s g 2 ) = E n c ( M s g 1 + M s g 2 )
    During the above calculation, l c m ( · , · ) is defined as the least common multiple of 2 parameters L ( u ) = ( u 1 ) n .

4. The Proposed Scheme

The processes of the energy trading scheme based on IBS and Paillier homomorphic encryption are described in detail in this section.

4.1. System Structure

For the energy trading scenario in the IIoT, this research proposes a Paillier homomorphic encryption and IBS-based energy trading scheme. The following role information is included in the scheme:
  • Energy nodes: the users can become energy nodes after registering, and the KGC then distributes the key pair. Energy nodes can engage in energy transactions to complete the blockchain’s point-to-point transaction information transfer procedure.
  • Transaction broadcast nodes (TBN): as full nodes in the blockchain, they do not directly participate in transactions and are only responsible for broadcasting transaction information to other energy nodes.
  • Energy station (ES): the energy station is accountable for powering energy nodes and has the authority to choose qualified participants in the energy trading system.
  • Cloud service provider (CSP): stores complete transaction information to reduce data writing on the blockchain.
  • Key generation center (KGC): for system nodes, the KGC serves as the authority for key generation and distribution. It also offers services for pseudonym generation, identity authentication, and transaction correctness checking.
The privacy protection of transactions in this scheme is reflected in two aspects: user anonymity and encryption of transaction amounts. The system architecture is shown in Figure 3.
Figure 3. System architecture.

4.2. Privacy-Preserved Security Energy Trading

4.2.1. Initialization

PCN is represented as the digraph G = ( V , E ) , where vertex V corresponds to the set of accounts and vertex E corresponds to the set of currently available installment channels [19]. The amount of additional bitcoin the sender can pay the receiver is determined by the load on each coordinated side. The energy node U V , where U 0 and U s address the payer and the collector separately. On either side, there is an HTLC tolerance—that is to say, the maximum hanging time for accommodating the irregular number R n u m . In order for payment to be successful, the following limitations on viability must be satisfied:
  • If, for any link in the path U 0 U 1 U 2 U t U s , the initial balance of u0 is the sum of the payment amount and the accumulation of fees charged by all intermediate nodes,
    β ( 0 , 1 ) = α + ϕ ( 1 , t ) ,
    where U i and U j ’s transfer amount is shown by β ( i , j ) . α denotes the amount of bitcoin that U s will eventually obtain. ϕ ( i , j ) denotes the total transaction fee charged by intermediate nodes from U i to U j .
  • The balance of any channel on the path should be no less than the total amount of the transfer fee and the fees charged for all subsequent links, which are expressed as a backward balance constraint:
    β ( i , i + 1 ) α + ϕ ( i + 1 , t ) .
  • At the same time, the current channel balance should also be more than the balance after the total expenditure charged by all the intermediate nodes on the previous link, which is expressed as a forward balance constraint:
    β ( i , i + 1 ) β ( 0 , 1 ) ϕ ( 1 , i 1 ) .
  • The transfer fee on any path must be less than the available capacity λ of the current channel—that is, it needs to satisfy the following condition:
    λ ( i , i + 1 ) β ( i , i + 1 ) .
  • The transfer needs to be completed within the HTLC tolerance ξ on each channel in the path. ξ i is the HTLC tolerance, which means the maximum tolerance time of using the current channel.
    ξ i 1 = ξ i + Δ ,
KGC generates the signature master key pair ( s , P P u b S ) , and the Paillier encryption key ( s P , P P u b P ) . Alice and Bob join the blockchain with the real identities I D A l i c e and I D B o b , and KGC generates public–private key pairs for them based on their real identities.

4.2.2. Pseudonym Generation

Alice sends a pseudonym application P A A l i c e to KGC and attaches the signature of the application with Alice’s private key:
M s g 1 = P A A l i c e | | S i g A l i c e ( P A A l i c e ) ,
The SM9 digital signature algorithm is shown in Algorithm 1. After receiving M s g 1 , KGC first verifies it. If the verification passes, KGC connects Alice’s real identity with the current timestamp and takes a hash value, which will be used as Alice’s pseudonym:
P i d A l i c e = H ( I D A l i c e | | T i m e s t a m p ) .
The SM9 signature algorithm is shown in Algorithm 2. Similarly, Bob sends a pseudonym application message M s g 2 to KGC and obtains a pseudonym P i d B o b :
M s g 2 = P A B o b | | S i g B o b ( P A B o b ) ,
P i d B o b = H ( I D B o b | | T i m e s t a m p ) .
Algorithm 1 Digital signature.
1:
Input: P P u b S , System Paramater, M s g
2:
Output: ( h , S )
3:
g = e ( P 1 , P P u b s ) G T ;
4:
l = 0 ;
5:
while  l = = 0  do
6:
      select r [ 1 , N 1 ] ;
7:
       w = g r G T ;
8:
      Transform w’s data type into a bit string;
9:
       h = H 2 ( m | | w ) ;
10:
     l = ( r h ) m o d N ;
11:
end while
12:
return  ( h , S )
Algorithm 2 Signature verification.
1:
Input: P P u b S , System Parameter, M s g , ( h , S )
2:
Output: T r u e or F a l s e
3:
Transform h to integer type;
4:
Transform S ’s data type to an elliptic curve point;
5:
if  h [ 1 , N 1 ]  then
6:
      if  S G 1  then
7:
              g = e ( P 1 , P P u b s ) G T ;
8:
              t = g h G T ;
9:
              h 1 = H 1 ( I D x | | h i d , N ) ;
10:
            P = [ h 1 ] P 2 + P P u b s G 2 ;
11:
            w = u t G T ;
12:
           Transform w ’s data type into a bit string;
13:
            h 2 = H 2 ( m | | w , N ) ;
14:
           if  h 2 = = h  then return true;
15:
           end if
16:
     end if
17:
end if

4.2.3. Open Channel

In this phase, Alice will choose t strings χ i at random, after which she will lock the x bitcoin on HTLC. Algorithm 3 allows for the calculation of the ( χ i , ω i ) forwarded to other nodes in a subsequent transaction procedure.
Before Alice makes payment to Bob, both parties need to create a third-party common account. Alice and Bob use the Paillier homomorphic encryption public key P P u b P to encrypt the amount deposited in the common account to obtain the ciphertext M 1 = E n c ( β 0 A l i c e ) and M 2 = E n c ( β 0 B o b ) , where E n c ( m ) means that m is encrypted with the Paillier encryption public key P P u b P .
Alice and Bob send M 1 and M 2 to KGC, respectively, and then KGC obtains the public account balance through calculation:
β = M 1 × M 2 = E n c ( β 0 A l i c e ) × E n c ( β 0 B o b ) = E n c ( β 0 A l i c e + β 0 B o b ) .
Common account A C C is expressed as:
A C C = ( A d d r e s s A l i c e , A d d r e s s B o b , P i d A l i c e , P i d B o b , β , ξ , λ ) .
β represents the common account balance and λ represents the capacity available on the path. A d d r e s s A l i c e and A d d r e s s B o b represent the account addresses of Alice and Bob, respectively. KGC calculates the balance of the common account β according to the Paillier homomorphic property.
Algorithm 3 HTLC.
1:
Input:  χ ξ i
2:
Output:  ( χ i , ω i )
3:
for  i = 1 t   do
4:
      if  i [ t ]  then
5:
             χ i 0 , 1 *
6:
             ω i = H ( j = 1 t χ j ) , j i
7:
      end if
8:
return  ( ( χ 1 , ω 1 ) ( χ t , ω t ) )
9:
end for
Before the first off-chain transaction, Alice encrypts the transfer amount α and the account balance β A after the transfer to obtain the ciphertext M 3 = E n c ( α ) , M 4 = E n c ( β A ) . Alice sends M 3 and M 4 to KGC to verify the validity of its initial transfer—that is, to verify the formula
M 1 = E n c ( α ) × E n c ( β A ) = E n c ( α + β A ) .
If the equation holds, it means that Alice meets the balance requirements for the initial account. KGC outputs a channel identifier σ ( U 0 , U t ) after passing the verification.

4.2.4. Transaction

It is assumed that a channel exists between Alice and Bob that satisfies the criteria. Alice initially determines the entire cost ζ in the payment path before sending the payment:
ζ = i = 0 , j = 1 i = t 1 , j = t ζ ( i , j ) .
If Alice does not have enough bitcoin, she will give up the payment, or send the contract to each transferor in σ ( U 0 , U t ) . According to Algorithm 4, each node in the channel σ ( U 0 , U t ) must confirm the ensuing channel capacity. If the verification is unsuccessful, the transaction is put on hold; if it is successful, contracts will be issued for more nodes.
Algorithm 4 Transactions for intermediate nodes.
1:
Input:  σ ( U i , U i + 1 )
2:
Output: Decision
3:
if Decision = Forward then
4:
     if  β ( i , i + 1 ) λ ( i , i + 1 )  then
5:
            ξ i + 1 = ξ i Δ
6:
            λ ( i , i + 1 ) = λ ( i , i + 1 ) β ( i , i + 1 )
7:
           HTLC ( U i , U i + 1 , ω i + 1 , ξ i + 1 , β ( i , i + 1 ) )
8:
     else
9:
           Send  ( U i 1 , ( ω i , σ ( U i 1 , U i ) , β ( i 1 , i ) ) )
10:
    end if
11:
else if Decision = Abort then
12:
     λ ( i , i + 1 ) = λ ( i , i + 1 ) + β ( i , i + 1 )
13:
    Send  ( U i 1 , ( ω i , σ ( U i 1 , U i ) , β ( i 1 , i ) ) , A b o r t )
14:
else if Decision = Accept then
15:
    Send  ( U i 1 , ( χ i + 1 χ i , ω i , σ ( U i 1 , U i ) , β ( i 1 , i ) ) , A c c e p t )
16:
end if
If every node in the channel σ ( U 0 , U t ) has timely completed the contract, Bob can release x t to collect the locked α bitcoins from the contract. Following Bob’s publication of x t , other nodes in the channel σ ( U 0 , U t ) can calculate the corresponding random number to determine their channel transmission fees. The specific procedure is shown in Algorithm 5. The core process of the PCN-based trading scheme is shown in Figure 4.
Algorithm 5 Process of contract completion.
1:
Input:  σ ( U i 1 , U i )
2:
Output: Decision
3:
if  H ( χ i ) = ω i   a n d   ξ i = ξ n o w + Δ   then
4:
      Send  ( U i 1 ( χ i , ω i , σ ( U i 1 , U i ) , β ( i 1 , i ) ) , A c c e p t )
5:
else
6:
      Send  ( U i 1 ( ω i , σ ( U i 1 , U i ) , β ( i 1 , i ) ) , A b o r t )
7:
end if
Figure 4. Core process of PCN-based trading scheme.

4.2.5. Close Channel

At the completion stage, the current account balances of Alice and Bob are β A and β B , respectively. Alice encrypts the value of β A + ζ with homomorphic encryption public key P P u b P to obtain M 5 and sends it to KGC. Similarly, Bob encrypts β B to obtain M 6 and sends it to KGC. KGC verifies the formula:
M 5 × M 6 = E n c ( β A + ζ ) × E n c ( β B ) = β .
If the equation is true, KGC returns the identification of the successful transaction to Alice and Bob, and then forwards the encrypted transaction data to the TNB for broadcasting in the blockchain.
The encrypted transaction data are then uploaded to the CSP with a signature from TBN. The data format stored in the CSP is:
D a t a C S P = E n c ( D a t a T X ) | | P i d A l i c e | | P i d B o b | | S i g T B N ( E n c ( D a t a T X ) | | P i d A l i c e | | P i d B o b ) .
After being signed by TBN, the transaction data summary is published to the blockchain. The summary information contains a uniform resource locator ( U R L ), and the corresponding file hosted on the cloud service can be obtained through the U R L . Figure 5 depicts the connection between the encrypted data kept in CSP and the data digest on the blockchain. By contrasting the summary data with the cloud data’s hash value, the integrity and validity of the transaction information may be confirmed. The overall flow of transactions is shown in Figure 6. The format of the transaction information finally written into the blockchain is:
D a t a b l o c k = H ( D a t a C S P ) | | U R L | | S i g T B N ( H ( D a t a C S P ) | | U R L ) .
Figure 5. Relationship between chain data and cloud data.
Figure 6. Overall flow of transactions.

5. Performance Analysis

5.1. Safety Analysis

The scheme put forward in this study is designed based on IBS and Paillier homomorphic encryption. Among them, Paillier homomorphic encryption is based on the complex residual problem. During the whole transaction process, both parties first encrypt the amount deposited in the common account and send it to KGC. KGC calculates the balance β = M 1 × M 2 of the common account. Next, Alice encrypts the current balance and the current transfer amount and sends them to KGC. Similarly, KGC verifies the feasibility of the initial transaction by calculating whether M 1 = M 3 × M 4 is established. Finally, both parties encrypt the account balance and send it to KGC. After passing the verification β = M 5 × M 6 , KGC forwards the encrypted transaction data to the transaction broadcasting node, and the transaction is completed. The above process does not require the private keys of both parties to decrypt any encrypted data. When the homomorphic decryption key is unknown, the transaction amount and account balance cannot be decrypted

5.2. Anonymity Analysis

After registering with the energy station, all users can become legitimate energy nodes, and all energy nodes can request a pseudonym from KGC before engaging in trading. The node utilizes the pseudonym that KGC creates for it to carry out energy transactions. The method put forward in this study makes use of IBS technology specified in the Chinese national standard SM9 [28] issued by the China National Cryptology Administration to generate pseudonyms for nodes. The identity password security of bilinear pairs serves as the foundation for the algorithm’s security, including the problem of solving discrete logarithms on elliptic curves. The calculation process of anonymous identities includes a one-way algorithm of hash functions. Therefore, it is not feasible to crack the password. The anonymity of the proposed scheme is guaranteed.

5.3. Traceability of Pseudonyms

In the process of pseudonym application, the KGC stores the agreement between the node’s true identity and its pseudonym in the local list. If any dispute occurs in the transaction process, the disputing party can send an arbitration application to the KGC. The KGC can query the local list to resolve the real identity of the node and gradually trace the transaction process.

5.4. Scheme Comparison

The comparison between the plan put forward in this study and previous works is shown in Table 1. Li et al. [1] and Yahaya et al. [10] have built their own transaction frameworks through the alliance blockchain. These two systems make the guarantee that the data are safe, but saving all the trading data on the chain will lead to large storage overhead. The confidentiality and transparency of energy trading are guaranteed by the blockchain-based energy trading privacy protection method developed by Baza et al. [8], but the system’s overall computation and storage overhead are high. In the scheme of [20], the blockchain-based cross-domain Industrial Internet of Things device authentication scheme proposed, they use IBS technology to provide anonymous identitied for entities, but it does not take into account the privacy leakage problem that may be caused in the process of entity interaction. In the scheme of [21], through the system’s integration of blockchain and multi-signature technologies, peers can securely conduct transactions while negotiating energy rates in an anonymous manner. However, due to the redundancy of communication messages and insufficient routing, the system has scalability problems. In the scheme of [22], the nodes in the blockchain transaction have their identities protected using an upgraded identity-based group signature technique; however, the privacy disclosure of transaction data is also not taken into account. Ref. [23] proposes a framework to hide the amount by encrypting and decrypting using a homomorphic encryption cryptosystem, which can realize the encryption of the transaction amount, but cannot meet the needs of users for identity privacy. In this study, users’ identity privacy and transaction information privacy are protected using a transaction mechanism based on IBS and Paillier homomorphic encryption. Both the node identity and transaction amount privacy are safeguarded during the transaction procedure. Additionally, with the help of the cloud, the amount of redundant data written to the blockchain is decreased.
Table 1. Scheme comparison.

5.5. Computation Overhead

The scheme suggested in this study makes use of the SM9 digital signature technique to create an anonymous identity for nodes and an anonymous identity signature private key for nodes, guaranteeing the confidentiality of the identities of both parties to the transaction. Based on the node’s genuine identification, the KGC creates a special ID for it, and it stores the link between the pseudonym and the real identity of the node in the local list. The proposed scheme also leverages the Paillier additive homomorphic encryption algorithm to safeguard the nodes taking part in the transaction from unauthorized users reading sensitive data by encrypting the transaction amount. Additionally, the blockchain’s distributed storage system and consensus algorithm guarantee the data’s integrity, stop unauthorized users from secretly altering the data on the chain, and successfully fend off DDoS attacks.
The SM9 digital signature algorithm and the Paillier encryption scheme’s encryption and decryption of plaintext and ciphertext processes account for the majority of the computation overhead in the approach suggested in this work. Therefore, the simulation in this paper is mainly aimed at the running time of the SM9 digital signature algorithm and the Paillier encryption algorithm involved in the trading process. We use Java language and jPBC library to complete the simulation. The simulation environment is a Windows 10 system with AMD Ryzen 7 4800H CPU and 8.00 GB memory. In order to be closer to the IIoT environment, we use VMware Workstation 15 Pro to deploy virtual machines. The virtual machine environment is Ubuntu 20.04 with 2 GB of memory. Table 2 gives a description of the symbols.
Table 2. Symbol description.
Table 3 displays the operating hours of each party in the suggested scheme. It is worth noting that the generation process of the system master key pair and the real identity key pair of each node is regarded as pre-calculation and is not discussed in the performance analysis.
Table 3. Main operations of the proposed scheme.
The computation overhead of the pseudonym mechanism based on IBS is shown in Table 4.
Table 4. Computation overhead of pseudonym mechanism based on IBS.
The key size is connected to the relevant procedures in the Paillier homomorphic encryption technique. Figure 7 and Table 5 shows the relationship between relevant operations and key size in the Paillier homomorphic encryption algorithm.
Figure 7. The effect of key size on the computation overhead of Paillier homomorphic encryption algorithm.
Table 5. The effect of key size on the computation overhead of Paillier homomorphic encryption algorithm.
As can be seen from Figure 7 and Table 5, when the key size is greater than 1024 bits, the computation overhead of E n c ( a ) , D e c ( E n c ( a ) ) , and D e c ( E n c ( a ) × E n c ( b ) ) rises sharply. E n c ( a ) × E n c ( b ) is hardly affected by the key size. In the proposed scheme, the k e y s i z e = 512 bit is selected. The total computation overhead of each part is shown in Figure 8. Figure 9 displays the comparison between the overall computation overhead of the approach suggested in this research and that of [8]. Figure 9 illustrates the advantages of the scheme described in this paper in terms of computing overhead.
Figure 8. Computation overhead of each entity.
Figure 9. Computation overhead comparison with CS2V [8].

5.6. Communication Overhead and Storage Overhead

At the stage of applying for a pseudonym, Alice and Bob send the pseudonym request information and signature to KGC: | P A A l i c e | + | S i g A l i c e ( P A A l i c e ) | = 0.195 KB, | P A B o b | + | S i g B o b ( P A B o b ) | = 0.195 KB. KGC returns the pseudonym to Alice and Bob: | P i d A l i c e | + | P i d B o b | = 0.125 KB. In the transaction stage, Alice conducted four homomorphic encrypted information transmissions: | M 1 | + | M 3 | + | M 4 | + | M 5 | = 1.199 KB. Meanwhile, Bob conducted two homomorphic encrypted transmissions: | M 2 | + | M 6 | = 0.599 KB. Then, KGC calculated the ciphertext product three times: | E n c ( β 0 A l i c e ) × E n c ( β 0 B o b ) | + | E n c ( α ) × E n c ( β A ) | + | E n c ( β A + ζ ) × E n c ( β B ) | = 0.902 KB. At the transaction completion stage, TBN uploads and broadcasts D a t a C S P and D a t a b l o c k : | D a t a C S P | + | D a t a b l o c k | = 1.037 KB. It should be noted that the number of times the HTLC contract is sent depends on the number of nodes in the payment channel, so it is not discussed here. The communication overhead of each entity is shown in Table 6.
Table 6. Communication overhead of each entity.
We evaluated the storage overhead of the on-chain storage and the off-chain storage to assess the impact of the off-chain storage technique suggested in this paper. Figure 10 depicts the outcomes of our comparison between the storage overhead in [8] and that in this system. Figure 10 shows that the strategy suggested in this research has benefits in terms of storage overhead.
Figure 10. Storage overhead comparison with CS2V [8].

6. Discussion

The scheme presented in this study introduces the SM9 digital signature algorithm and Paillier homomorphic encryption algorithm in order to effectively protect the nodes’ privacy and information security in energy trading. Additionally, cloud-assisted PCN-based off-chain transactions offer a more effective and practical method for transactions. The scheme is feasible, according to the simulation findings.
The method outlined in this paper has some limitations. The computation overhead will rise as a result of the frequent data interchange between KGC and nodes, as explained in Section 3. However, the transaction cost is lowered as a result of the off-chain transaction method, which is acceptable. Future studies must find ways to lessen KGC’s computational requirements as much as possible. In addition, the security and performance of the SM9 algorithm have been proven in [28], so this article does not repeat it. Finally, the scheme outlined in this study has the potential to theoretically address the security issue associated with blockchain-based energy trading. Blockchain technology is now made up of a significant number of heterogeneous blockchains due to its ongoing development. In the future, our scheme needs to be tested on a variety of blockchains, and its latency and throughput should be improved according to specific energy trading scenarios.

7. Conclusions

In this study, we present a privacy protection solution for IIoT energy trading that is based on IBS and Paillier homomorphic encryption. In order to protect the confidentiality and security of the nodes’ identification information during the trading process, IBS is especially utilized to offer anonymous IDs for energy trading nodes. The transaction value is encrypted using the Paillier homomorphic encryption technique, ensuring the privacy of both parties’ transaction data. Additionally, PCN’s off-chain transaction mechanism and cloud-assisted off-chain storage mechanism minimize the resource restrictions caused by protracted confirmation periods and high transaction costs on the blockchain network.
The security analysis and simulation results demonstrate that the proposed method in this study offers benefits over [8] in terms of computation overhead and storage overhead and that the proposed scheme’s communication cost is tolerable. In addition, this scheme realizes the dual privacy protection of user identity and transaction information that is not realized in most current energy trading schemes. In future research work, the scheme needs to be further tested on a variety of blockchains, and the computation overhead of each entity needs to be reduced.

Author Contributions

Conceptualization, Y.F., Y.L. and X.F.; methodology, Y.F., X.F., H.W. and Y.X.; software, Y.X. and H.W.; validation, H.W. and Q.Q.; formal analysis, H.W. and Y.X.; investigation, Y.X. and Q.Q.; writing—original draft preparation, H.W. and Y.X.; writing—review and editing, Y.F., Y.L., Q.Q. and H.W.; visualization, H.W. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the Yunnan Key Laboratory of Blockchain Application Technology under Grant 202105AG070005 (YNB202111) and by the National Natural Science Foundation of China under Grant 62062047 and Grant 61662042.

Institutional Review Board Statement

Not applicable.

Data Availability Statement

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Li, M.; Hu, D.; Lal, C.; Conti, M.; Zhang, Z. Blockchain-Enabled Secure Energy Trading with Verifiable Fairness in Industrial Internet of Things. IEEE Trans. Ind. Inform. 2020, 16, 6564–6574. [Google Scholar] [CrossRef]
  2. Li, Z.; Kang, J.; Yu, R.; Ye, D.; Deng, Q.; Zhang, Y. Consortium Blockchain for Secure Energy Trading in Industrial Internet of Things. IEEE Trans. Ind. Inform. 2017, 14, 3690–3700. [Google Scholar] [CrossRef]
  3. Dong, Z.; Luo, F.; Liang, G. Blockchain: A secure, decentralized, trusted cyber infrastructure solution for future energy systems. J. Mod. Power Syst. Clean Energy 2018, 6, 958–967. [Google Scholar] [CrossRef]
  4. Guan, Z.; Lu, X.; Wang, N.; Wu, J.; Du, X.; Guizani, M. Towards secure and efficient energy trading in IIoT-enabled energy internet: A blockchain approach. Future Gener. Comput. Syst. 2020, 110, 686–695. [Google Scholar] [CrossRef]
  5. Chowdhury, M.J.M.; Usman, M.; Ferdous, M.S.; Chowdhury, N.; Harun, A.I.; Jannat, U.S.; Biswas, K. A cross-layer trust-based consensus protocol for peer-to-peer energy trading using fuzzy logic. IEEE Internet Things J. 2021, 9, 14779–14789. [Google Scholar] [CrossRef]
  6. Kim, M.; Lee, J.; Oh, J.; Park, K.; Park, Y. Blockchain based energy trading scheme for vehicle-to-vehicle using decentralized identifiers. Appl. Energy 2022, 9, 119445. [Google Scholar] [CrossRef]
  7. Huang, X.; Zhang, Y.; Li, D.; Han, L. A Solution for Bilayer Energy-Trading Management in Microgrids Using Multiblockchain. IEEE Internet Things J. 2022, 9, 13886–13900. [Google Scholar] [CrossRef]
  8. Baza, M.; Sherif, A.; Mahmoud, M.M.E.A.; Bakiras, S.; Alasmary, W.; Abdallah, M.; Lin, X. Privacy-Preserving Blockchain-Based Energy Trading Schemes for Electric Vehicles. IEEE Trans. Veh. Technol. 2021, 70, 9369–9384. [Google Scholar] [CrossRef]
  9. Gai, K.; Wu, Y.; Zhu, L.; Qiu, M.; Shen, M. Privacy-Preserving Energy Trading Using Consortium Blockchain in Smart Grid. IEEE Trans. Ind. Inform. 2019, 15, 3548–3558. [Google Scholar] [CrossRef]
  10. Yahaya, A.S.; Javaid, N.; Almogren, A.; Ahmed, A.; Gulfam, S.M.; Radwan, A. A Two-Stage Privacy Preservation and Secure Peer-to-Peer Energy Trading Model Using Blockchain and Cloud-Based Aggregator. IEEE Access 2021, 9, 143121–143137. [Google Scholar] [CrossRef]
  11. Zhang, Y.; Yang, D.; Xue, G. CheaPay: An Optimal Algorithm for Fee Minimization in Blockchain-Based Payment Channel Networks. In Proceedings of the 2019 IEEE International Conference on Communications (ICC), Shanghai, China, 20–24 May 2019; pp. 1–6. [Google Scholar]
  12. Cavoukian, A.; Polonetsky, J.; Wolf, C. Smartprivacy for the smart grid: Embedding privacy into the design of electricity conservation. Identity Inf. Soc. 2010, 3, 275–294. [Google Scholar]
  13. Poon, J.; Dryja, T. The Bitcoin Lightning Network: Scalable Off-Chain Instant Payments. 2016. Available online: https://www.bitcoinlightning.com/wp-content/uploads/2018/03/lightning-network-paper.pdf (accessed on 10 August 2022).
  14. Paillier, P. Public-key cryptosystems based on composite degree residuosity classes. In Proceedings of the 1999 International Conference on the Theory and Applications of Cryptographic Techniques, Prague, Czech Republic, 2–6 May 1999; pp. 223–238. [Google Scholar]
  15. Abdella, J.; Shuaib, K. Peer to peer distributed energy trading in smart grids: A survey. Energies 2018, 11, 1560. [Google Scholar] [CrossRef]
  16. Chen, S.; Zhang, L.; Yan, Z.; Shen, Z. A Distributed and Robust Security-Constrained Economic Dispatch Algorithm Based on Blockchain. IEEE Trans. Power Syst. 2021, 37, 691–700. [Google Scholar]
  17. Lu, X.; Guan, Z.; Zhou, X.; Wu, L.; Du, X.; Guizani, M. An Efficient and Privacy-Preserving Energy Trading Scheme Based on Blockchain. In Proceedings of the 2019 IEEE Global Communications Conference (GLOBECOM), Waikoloa, HI, USA, 9–13 December 2019; pp. 1–6. [Google Scholar]
  18. Pop, C.D.; Antal, M.; Cioara, T.; Anghel, I.; Salomie, I. Blockchain and Demand Response: Zero-Knowledge Proofs for Energy Transactions Privacy. Sensors 2020, 20, 5678. [Google Scholar] [CrossRef] [PubMed]
  19. Feng, Y.; Xiao, Y.; Li, D.; Fu, X. PCN-based Secure Energy Trading in Industrial Internet of Things. In Proceedings of the 2020 International Conference on Blockchain and Trustworthy Systems, Dali, China, 6–7 August 2020; pp. 305–318. [Google Scholar]
  20. Shen, M.; Liu, H.; Zhu, L.; Xu, K.; Yu, H.; Du, X.; Mohsen, G. Blockchain-assisted secure device authentication for cross-domain industrial IoT. IEEE J. Sel. Areas Commun. 2020, 38, 942–954. [Google Scholar]
  21. Aitzhan, N.Z.; Svetinovic, D. Security and privacy in decentralized energy trading through multi-signatures, blockchain and anonymous messaging streams. IEEE Trans. Dependable Secur. Comput. 2016, 15, 840–852. [Google Scholar]
  22. Yang, Y.; Cai, J.; Zhang, X.; Yuan, Z. Privacy preserving scheme in block chain with provably secure based on SM9 algorithm. J. Softw. 2019, 30, 1692–1704. [Google Scholar]
  23. Wang, Q.; Qin, B.; Hu, J.; Xiao, F. Preserving transaction privacy in bitcoin. Future Gener. Comput. Syst. 2020, 107, 793–804. [Google Scholar]
  24. Subramaniyaswamy, V.; Jagadeeswari, J.; Indragandhi, V.; Jhaveri, R.H.; Vijayakumar, V.; Kotecha, K.; Ravi, L. Learning with Error Algorithm for Faster Encryption of IoT Sensor Signal-Based Edge Devices. Secur. Commun. Netw. 2020, 107, 793–804. [Google Scholar]
  25. Sasikumar, A.; Ravi, L.; Kotecha, K.; Saini, R.J.; Varadarajan, V.; Subramaniyaswamy, V. Sustainable Smart Industry: A Secure and Energy Efficient Consensus Mechanism for Artificial Intelligence Enabled Industrial Internet of Things. Comput. Intell. Neurosci. 2022, 2022, 1419360. [Google Scholar]
  26. Shamir, A. Identity-based cryptosystems and signature schemes. In Proceedings of the Workshop on the Theory and Application of Cryptographic Techniques, Paris, France, 9–11 April 1984; pp. 47–53. [Google Scholar]
  27. Boneh, D.; Franklin, M. Identity-based encryption from the Weil pairing. In Proceedings of the Annual International Cryptology Conference, Santa Barbara, CA, USA, 19–23 August 2001; pp. 213–229. [Google Scholar]
  28. Cheng, Z. The sm9 Cryptographic Schemes. Cryptology ePrint Archive. 2017. Available online: https://eprint.iacr.org/2017/117 (accessed on 10 August 2022).
  29. Liu, S.G.; Liu, R.; Rao, S.Y. Secure and efficient two-party collaborative SM9 signature scheme suitable for smart home. J. King Saud-Univ.-Comput. Inf. Sci. 2022, 34, 4022–4030. [Google Scholar] [CrossRef]
  30. Yang, X.; Yuan, S.; Zhou, H.; Ding, B. A proxy-protected proxy signature based on SM9. In Proceedings of the 2021 IEEE Sixth International Conference on Data Science in Cyberspace (DSC), Shenzhen, China, 9–11 October 2021; pp. 166–170. [Google Scholar]
  31. Rivest, R.L.; Adleman, L.; Dertouzos, M.L. On data banks and privacy homomorphisms. Found. Secur. Comput. 1978, 4, 169–180. [Google Scholar]
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.