Peer-to-Peer (P2P) Electricity Trading with Anonymity

With the integration of distributed energy systems (DESs) such as rooftop solar panels, and electric vehicles, peer-to-peer (P2P) energy trading become popular among users. However, there are privacy concerns related to P2P energy trading systems such as identifying the electricity consumption pattern of the users. This might reveal the sensitive data of the users. This paper proposes an efficient and anonymous privacy-preserving access control protocol for such systems. The proposed protocol is capable of preserving the privacy of the users by providing access to the system without revealing their identities.


INTRODUCTION
In the past few years, the electricity grid has been in the transition towards a more intelligent system with the integration of smart metering (SM), and distributed energy systems (DESs) such as wind energy, solar energy, communication techniques, optimization techniques, and automation.Moreover, the proposal of "Energy Internet" [6] enables flexible energy sharing and allows plug-in DESs to connect to the grid.However, the electricity generated using DESs is unpredictable and intermittent which causes voltage and power variations in the grid.Furthermore, introducing energy storage systems (ESSs) and electric vehicles (EVs) to the power grid along with DESs may lead to power outages due to an unbalanced grid [10,11].
The users who can perform both electricity production and energy consumption are called prosumers.Currently, electricity purchase is performed between prosumers and utilities through fixed-price or time-of-use (TOU) prices, and the prosumers sell excess electricity back to the utility via power purchase agreements (PPA) which provide long-term fixed feed-in-tariff [19].Residential consumers need to consider the installation capacity of DESs by calculating the recovery cost of installation while reducing their electricity bills.However, due to low feed-in-tariffs, most users are reluctant to expand the installation of DESs and sell surplus energy back to the utility which does not make profits [1,22].
Traditionally, the power distribution systems deliver power from central generation plants to consumers embedding long-distance power delivery which causes huge power loss.In order to overcome this, peer-to-peer (P2P) energy trading is proposed [1,11].Geographically closed prosumers are able to create a domestic electrical P2P network which avoids the need for lengthy delivery.Also, it is helpful for both users and the utility when dealing with inefficiencies and vulnerabilities in emergency situations [9].Creating a P2P network allows users to trade electricity with each other for a reasonable price.Hence, the users can reduce their electricity bills while maximizing their profits by trading electricity directly with neighbors.
During the P2P energy trading process, the sharing of data between users might lead to privacy violations [7,15].For example, it might be possible for an attacker to learn information such as user electricity consumption profile as well as location via linking access sessions to individual users [5].Thus, in this paper, we propose an anonymous, privacy-preserving access control scheme for P2P energy trading to eliminate the linkability of user access sessions to their consumption profiles.
The rest of the paper is organized as follows.In Section 2, we present the related work while in Section 3 we provide a description of the system overview.The proposed anonymous access control mechanism is presented in Section 4 while we provide evidence on computational efficiency of the proposed protocol along with how the proposed scheme guarantees user anonymity in Section 5 before the paper is concluded in Section 6.

RELATED WORK
In recent years, there have been several studies conducted related to P2P energy trading as well as the privacy of energy trading.In this section, we have summarised the existing works based on the above-stated two areas, first, we focus on P2P energy trading and then the privacy concerns of P2P energy trading systems.
Recently, P2P energy trading has drawn huge attention among researchers.Various P2P energy trading methods have been proposed in this context in [2,[12][13][14]20].A game theory approach for P2P energy trading is proposed in [12][13][14].The authors in [12] proposed a game theory approach that is used for the trading process for individual users.They have used Shapley value for trading purposes such as bill sharing.In [13], the authors proposed a decentralized trading scheme based on game theory by examining the effects and benefits of the users in the system while in [14], the authors have proposed a cooperative game theory framework for a stable trading algorithm for individual users in the system.However, the above-mentioned proposed methods considered only P2P energy trading between the users and the P2P trading system but not in between the users.
One of the main privacy concerns of P2P energy trading systems is that the attackers can analyze the electricity usage patterns and the prices they are willing to buy/sell electricity, and they can interfere with the electricity trading process [5].Therefore, it is important to have a mechanism to protect the privacy of the users in the system.To address this issue, several studies have been carried out [4,5,17].An anonymization method to hide the user's identity in energy trading has been considered in several studies [4,8,17,23].However, most of the anonymous methods focus on electrical vehicle (EV) charging.An anonymous smart parking method is proposed in [23].They have used a short randomized signature scheme based on bilinear maps to provide anonymity.Moreover, they have proposed an anonymous coupon method for payments.These coupons are issued by a third-party server linked to the system.In [8], authors have proposed an anonymity-based authentication mechanism for vehicle-to-grid (V2G) communication using group signatures.The proposed method uses anonymous pseudonyms which are linked to the identity of the vehicle for communication with charging stations.Even though the above methods provide anonymity, they use trusted third-party which is a single point of failure.As a solution, an anonymous payment system using blind signatures is proposed to hide the user identity in the EV charging users [17] while the authors in [4] proposed an anonymous tasking and trading energy in smart grids.They have used the K-anonymity method to aggregate the smart meter user data to increase the privacy of the system.Moreover, they have proposed an anonymous energy token scheme for energy trading.The method proposed in [21] is used to create a one-time address for a buyer and use that address to send only one message.This message includes an energy quantity and a price.
As evident from the above analysis, most of the existing mechanisms deal with establishing pseudo-anonymity.Thus, as a solution, in this paper, we propose a P2P energy trading system integrated with an unlikable access control mechanism influenced by the method proposed in [16] to realize full anonymity.

SYSTEM OVERVIEW
For this study, we are focusing on two types of users, prosumers and consumers located in a limited geographical area.The prosumers are the users who produce more energy than they require and are willing to sell the excess energy to make a profit.The consumers are the users who want to buy energy from energy producers.Every prosumer in the system is connected to a commercial ESS with a smart interface (SI) and prosumers can use ESS to store the excess energy.Moreover, we assume that every user in the network has access to the ESS.The overview of the proposed system is shown in Figure 1 and the entities related to the system are stated below.
• Users: Users consist of prosumers and consumers located in the considered geographical area.• ESS: ESS is a commercial battery storage system.The SI is interfaced to the ESS.• Utility: The utility is the power distribution entity.
Let us assume that all the users are registered in the system as either prosumers or consumers.Furthermore, we assume that the ESS maintains a blockchain and publishes the amount of energy available and, the expected unit price.Moreover, we assume that each user connected to the ESS has access to the blockchain maintained by the ESS. Figure 2 represents the flow diagram of the energy trading process.
Suppose a prosumer   has surplus energy and he is willing to sell the energy.First,   sends an access request to ESS to store the surplus energy.If the access is granted (i.e.details of the access control mechanism is presented in Section 4), the ESS publishes the details of the energy availability in the blockchain.Suppose a consumer   is willing to buy energy.Before sending a request to buy energy,   checks the entries in the blockchain and matches them with his requirement.After that   sends a request to ESS to purchase energy stating the amount of energy, the maximum price he is willing to pay for a unit, and a reference for the blockchain entry.Then ESS checks the validity and sends an energy token to   to purchase the energy.Also, ESS sends the payment to the   which is received from   .Finally, ESS updates the blockchain.

PROPOSED ANONYMOUS ACCESS CONTROL MECHANISM
We explain the access control mechanism by dividing it into three parts -ESS initialization, user registration with credential issuance, and user credential verification.

ESS Initialization
ESS defines two cyclic groups G 0 , G 1 of prime order  where

User Registration with Credential Issuance
Suppose, the user   wants to register with the ESS as a valid user to be involved in energy trading.Also, we assume that there exists a secure channel between   and ESS.Then,   sends a request to ESS to become part of the trading system.If the request is accepted, ESS will issue the user credential as stated below.
• ESS generates the value  such that, and forwards it to   along with   .• Then, the user   generates a random exponent,   where   ∈ Z *  .By using  and   , the user   computes the credential parameter   such that, as well as the credential secret key   =  −1  , and passes the parameter   along with    to ESS.

User Credential Verification
Here, we present how to use the user credential and provide evidence that the user is a valid entity in the trading system anonymously.Let us assume that   wants to authenticate anonymously with ESS using the credential {  ,  ,1 ,  ,2 }.
• First,   selects a random exponent,  such that  ∈ Z *  .With the help of ,   computes the randomized credential components {  ,  ′ ,1 ,  ′ ,2 } such that, After that,   sends   ,  ′ ,1 , and  ′ ,2 to ESS.Then, ESS computes  ( ′ ,1 ,   ),  ( ′ ,2 , ) and checks whether the condition, is met or not.• If the above validation is successful, then ESS requests   to provide a proof of knowledge of   using a nonce  and also disclose the parameters  1 ,  2 embedded in the credential.Thus,   generates a random exponent x and computes, Thereafter   computes, Afterwards,   computes  ( ′ ,  ) where  is the nonce issued by ESS to confirm the freshness and forwards  ( ′ ,  ) along with  ′ ,  1 ,  2 , x .• After receiving the above components, ESS verifies the validity of the credential via computing,   We can state the correctness as follows.

PERFORMANCE EVALUATION AND USER ANONYMITY
In this section, we present the simulation results that provide evidence on the efficiency of the adopted anonymous access control mechanism followed by the security analysis of the proposed solution.

Performance Evaluation
To evaluate the computational efficiency of the proposed anonymous access control scheme for P2P energy trading, we have simulated the protocol using a Core i5, 2.5GHz, 8GB of RAM computer while the cyclic groups were created using the elliptic curve  2 =  3 +  over a 512-bit finite field.
In Figure 3, we have illustrated the variation of the computational cost associated with user credential issuance with the group order of the finite field.Furthermore, Figure 4 represents the associated enduser computational cost during credential verification while varying the group order of the finite field.According to the current NIST Figure 4: Average end-user computational cost for credential verification with group order key management guideline [18], it is deemed that a group order of 224 bits that leads to a security strength of 112 bits is sufficient for elliptic curve cryptography.Note that, at this parameter setting, the average end-user computational cost for credential issuance is 163 ms and the average end-user computational cost during credential verification is 106 ms.

User Anonymity
In this subsection, we provide evidence for the fact that we can enforce privacy preservation during the energy trading process through the user unlinkability of the utilized credential scheme.To provide evidence for the property of user unlinkability, we show that it is not possible to distinguish whether two credential disclosure executions are associated with the same user credential or not.
Let us consider the user credential of a user   is given by   .Then, according to (1) -( 4), is maintained or not.Note that the two computation results in ( 5) and ( 6), appear to be two random elements in   .Therefore ESS will not be able to link the two disclosure sessions to the same user.

CONCLUSION
In this paper, we propose an anonymous access control scheme for a P2P energy trading system to preserve the privacy of the end-users via not allowing the possibility of linking access sessions to respective users.Thereby, we ensure that the ESS or the central entity that handles the trading system cannot profile end-user trading behaviors.In contrast to the existing electricity trading schemes which built upon the notion of pseudo-anonymity, our approach can enforce full anonymity via the property of end-user unlinkability.Furthermore, with the help of the simulation results, we have also shown that the proposed access control scheme is computationally efficient while considering the NIST key management recommendations for elliptic curve cryptography.

Figure 2 :
Figure 2: Overview of energy trading

Figure 3 :
Figure 3: Average end-user computational cost for credential issuance with group order and  2 = { 2 } =1,2,..., in which  2 ∈ Z *  .The parameter  1 is used to denote that the user is a registered entity in ESS whereas  2 defines the set of expiration values.So, each and every valid credential issued by ESS to a user should have  1 and a value from  2 to define its expiry.Furthermore, ESS generates a random secret  where  ∈ Z *  .Finally, ESS keeps   =  as the secret key and publishes the public tuple   where   = {,  0 ,  1 ,  2 ,   , ,  ,  1 ,  2 }.