Anonymous Energy Trading Scheme for Virtual Power Plant Based on Blockchain

This paper delves into the critical challenge of establishing a secure, private, and efficient energy trading system for virtual power plants. This paper introduces a comprehensive system model and formally defines security requirements. This paper provides an anonymous energy trading scheme employing cryptographic techniques, such as accountable ring signatures, multi-signatures and blockchain technology. Users gain the ability to confidentially negotiate energy prices, fostering a secure and private environment for the intricate process of energy trading. Subsequently, this paper conducts a rigorous security analysis and performance evaluation, aligning with the stringent security and privacy requirements. The findings affirm the effectiveness of the proposed scheme.


INTRODUCTION
To handle the growing proliferation of distributed energy resources researchers have introduced the innovative concept of virtual power plant (VPP) [1].

Virtual Power Plant
A Virtual Power Plant is an innovative energy management system which is specifically designed to perform various tasks, including energy trading, load control, and peak management.VPPs participate in energy markets, contribute to grid stability, and provide ancillary services.Their flexibility, scalability, and focus on environmental sustainability make them play a key role in promoting efficient energy utilization and reducing environmental impact.

Overview of Energy Trading in VPP
Energy trading within a virtual power plant is a dynamic and innovative approach to managing and optimizing distributed energy resources.VPP can execute market clearing results on behalf of internal energy resources researchers and realize energy trading.This form of energy trading within virtual power plant holds the potential to lower energy consumption costs and enhance the resilience of the smart grid.A centralized system can be used to manage this energy trading, but it increases the overall cost of the system and faces several issues.Energy trading for virtual power plant efforts migrates towards blockchain since the decentralizing nature of the blockchain is consistent with decentralized energy trading.Users in virtual power plant are free to determine the amount and price they want to trade within the trading phase.

Related Work
Energy trading is a relatively recent development with some research focuses on the application of blockchain to facilitate secure and transparent energy trading within virtual power plant.Aitzhan et al. [2] proposed an energy trading system that utilizes anonymous encrypted messaging streams, multi-signatures and blockchain technology to enable secure and anonymous transactions.Khalid et al. [3] designed a decentralized energy trading market, allowing users to trade with each other without the need for intermediaries.A novel peer-to-peer energy trading scheme for virtual power plant was presented using smart contracts on the public blockchain [4].Kang et al. [5] proposed a localized peer to peer power trading system with consortium blockchain.In their study, trading in smart grid is realized with an iterative double auction mechanism.Huang et al. [6] focus the security model for trading between electric vehicles and charging pile management on the blockchain that leverages the lightning network and smart contract technologies.Khorasany et al. [7] devised a decentralized peer-to-peer electricity trading scheme.Li et al. [8] focused on secure and verifiable energy trading with blockchain, which is emphasized that the blockchain should provide transparency, immutability, and auditability to the energy trading.

Problem Setting
The safe and reliable energy trading scheme for VPP is of great concern.Traditional energy trading systems often involve the disclosure of sensitive information about energy consumers and producers.Anonymity is crucial in energy trading to protect the identities and transaction details of participants.
To summarize, it is urgent to design an anonymous energy trading scheme for VPP that not only guarantees transaction security but also preserves identity privacy, all without the reliance on trusted third parties.Developing an anonymous energy trading scheme for VPP based on blockchain involves a multidisciplinary approach, combining expertise in blockchain, cryptography and energy systems.Addressing these issues can contribute to establish a secure, private, and efficient platform for decentralized energy trading.

Our Contribution
In this paper, the central focus is on addressing the challenge of achieving anonymous energy trading for VPP.The approach taken involves several key steps and contributions: 1) The paper begins by presenting a systematic model for anonymous energy trading for VPP.It formalizes the security requirements for ensuring the integrity of energy transactions and protecting user privacy.
2) A novel energy trading scheme is proposed, leveraging advanced cryptographic techniques such as accountable ring signatures, multi-signatures, and blockchain technology.The developed system aims to empower users within the VPP, allowing them to actively participate in energy trading while maintaining the anonymity of their identities.
3) A thorough security analysis is conducted to evaluate the robustness of the proposed scheme against potential threats and attacks.Additionally, a performance assessment is carried out to measure the efficiency and scalability of the system.The findings affirm the effectiveness of the proposed scheme.
This paper combines theoretical modeling, scheme design, and empirical validation to present a comprehensive solution for anonymous energy trading in VPPs.In the following sections, this paper promise a explore in detail and depth the unique contributions outlined in this introductory statement.
The rest of this paper is organized as follows.The section II introduces the cryptographic tools and the core components the proposed scheme relies on.The section III delve into the core components of the system including system model, network model and security model.The proposed solution for energy trading within a virtual power plant is proposed in Section IV.Security analysis and numerical results are shown in Section V before the paper is concluded in Section VI.

PRELIMINARY
This section introduces the cryptographic tools and the core components our scheme relies on.

Accountable Ring Signature
Two widely studied anonymous signatures scheme are group signatures [9] and ring signatures [10].On one hand, the advantage of group signature is the anonymity can be revoked by a group manager.On the other hand, the advantage of ring signature is that no centralized group manager is required, and rings may be formed in an ad-hoc manner.Accountable ring signature (ARS) [11,12] bridges the gap between the above two notions, which provides flexibility in selecting a group when generating a valid signature and enforces accountability by allowing an opener to open a signature and reveal the signer's identity.
An ARS scheme consists of the following five algorithms: 1) ARS.UKeyGen(1 ): On input a security parameter , the algorithm UKeyGen produces a signing/verification key pair ( , ) for a user.
3) ARS.Sign( , , , ): On input a message , a ring (which is a set of verification keys), an opener's public key ek, and a signer's signing key , algorithm .produces a signature .4) ARS.Verify( , , , ): On input a message , a ring , a signature and an opener's public key , the algorithm ARS.Verify returns 1/0.5) ARS.Open( , , , ): On input a message , a ring , a signature , and an opener's secret key , the algorithm ARS.Open produces a verification key , which means the owner of generated the signature .
An ARS scheme must be fully unforgeable, anonymous, and traceable.An ARS is fully unforgeable if no adversary, who may control the opener, can forge accountable ring signatures on behalf of an honest ring.An ARS is anonymous if no adversary can reveal the identity of the signer unless the opener wants to open the signature.An ARS is traceable if the opener is always able to reveal the identity of the signer in the ring.

Multi-Signature
A multi-signature (MS) scheme [13,14] is a protocol that enables a group of signers to generate a short signature on a message.A 2) MS.Sign( , , ): On input a message , a set of public keys of the signers , and the signer's individual secret key , signers collectively output a signature by each calling the interactive algorithm MS.Sign.
3) MS.Verify( , , ): On input a message , a signature , and a set of public keys of the signers , the algorithm MS.Verify returns 0 or 1.
An multi-signature scheme should satisfy unforgeability, meaning that no adversary, who makes polynomial queries in any polynomial time, can forge a valid signature.

Blockchain Basics
Blockchain is a decentralized and distributed digital ledger technology that enables secure, transparent and tamper-resistant recordkeeping of transactions across a network of computers.
A blockchain is a chronologically ordered chain of blocks that constitute a vast immutable digital ledger.The integrity and consistency of transactions are protected by cryptographic tools such as public key cryptography and hash function.A smart contract is a set of computer-assisted rules that provide protocols for a group of users.The deployed smart contracts are automatically triggered on the blockchain when a specific data or command occurs.So, the whole transaction is done transparently without needing a trusted central authority.
Blockchain finds applications in various domains, including cryptocurrencies, smart contracts, healthcare, and supply chain management.The technology continues to evolve, addressing challenges such as scalability, interoperability, and regulatory concerns, while expanding its reach and impact across diverse industries.

SYSTEM MODEL
This paper provides a distributed energy anonymous trading system for VPP.This section delve into the core components of the system.

System Players
As shown in Figure 1, the anonymous energy trading system includes two types of entities, namely, users and a platform administrator.
1) Users: the users in virtual power plant system assume different roles, acting as both producers and consumers.Each user dynamically selects his role according to the current energy state.The user is equipped with a built-in smart meter that can detect and broadcast the amount of energy in real-time, thus aiding in the confirmation of the transaction.Registered users can actively participate in energy transactions anonymously and maintain the blockchain as nodes.
2) The administrator is the manager and maintainer of the energy transaction center, which encompasses responsibilities such as user identity management, matching users' transaction requests, and overseeing the storage of transaction information and confirmation information.The transaction platform (also a transaction center) serves as the cneter hub for user transaction management.Users submit their transaction information to the transaction center.The transaction center collates and matches all transaction information.
The blockchain is mainly used to securely store the transaction data and ensure its immutability.Furthermore, each participating entity can also obtain the transaction data from the blockchain.

Network Model
This paper operates under the assumption of a specific network configuration: the communication channel between users and the transaction center is stable but susceptible to potential eavesdropping.Similarly, the channel between one user and another user faces the same stability conditions.As for the channel between the blockchain terminal and the blockchain network, it is generally stable, although intermittent failures may occur, particularly when subjected to attacks.

Security Model
In designing an anonymous energy trading scheme for a virtual power plant, a security model is established to delineate various components and mechanisms that safeguard the system.The security model includes two key perspectives: security goals and attacker resources.
The following security objectives are crucial for ensuring the privacy and integrity of the system.
1) User Anonymity: the system ensure that the identities of participating users in energy transactions remain confidential, protecting their privacy from external entities.
2) Guard Against Identity Forgery: the system ensure that users cannot impersonate others or manipulate transaction data to gain unauthorized advantages.
3) Transparent Auditing: the system achieve accountability and traceability, which is essential for ensuring the legitimacy and fairness of energy trading activities.
The attacker resources refer to the capabilities and resources that attackers possess to compromise the security and integrity of the system.Key attacker resources include: 1) Eavesdropping Capabilities: attackers have the ability to eavesdrop on communication channels between users and the transaction center, attempting to gain unauthorized access to sensitive transaction information.

THE PROPOSED SCHEME
The transaction flowchart is depicted in Figure 2. Prior to presenting the detailed scheme, this section provides a concise overview of the rationale behind its construction.
In order to strike a balance between user anonymity and transaction auditability, the proposed scheme employs an accountable ring signature.Following the generation of a transaction message, a user independently selects a group of members, including himself, and signs on behalf of this group.The verifier can only confirm that the message originates from a member within the set, but cannot confirm the specific identity of the signer, thus ensuring the privacy of the user's identity.At the same time, the transaction center retains the capability to recover the identity of the signer, thus avoiding the problems caused by anonymity.
To further mitigate on-chain storage overhead, the proposed scheme uses multi-signatures.After a transaction is reached between two parties, a multi-signature is generated for the transaction contract, and other users on the chain can verify the multi-signature with the public keys of both parties to the transaction.
The scheme leverages blockchain technology in conjunction with accountable ring signature and multi-signature schemes to effectively tackle performance, security, and privacy protection concerns inherent in distributed power transactions within virtual power plants.

System Initialization
Messages exchanged between the substation and the cloud, whether originating from the substation to the cloud or vice versa, undergo preprocessing and are transmitted through both the traditional communication channel and the blockchain channel.Any messages transmitted within the cloud or within the substation are conveyed through the actual link, namely, unnecessary to be transformed and sent multiple times.For simplicity, this paper does not delve into discussions regarding the latter case.
The proposed scheme utilizes both a multi-signature scheme and an accountable ring signature scheme during system initialization.A administrator calls the MS.KeyGen algorithm to create a key pair ( , ) and calls the .OKeyGen algorithm to create a key pair ( , ) for himself.

User Registration
Upon joining the system, a user with actual identity submit registration information to the transaction center.If the information is approved, the user obtains his accountable ring signature signing/verify key pair ( , ), multi-signature public/secret key pair ( , ), and a certificate .The certificate, , serves the purpose of uniquely identifying the user through binding registration information associated with the user.

Submit Transaction Information
At time 1 , the transaction center initiates the transcation process by sending a formal request to all users.This inviation includes predefined response termination 2 and response time 3 , where 1 < 2 < 3 .
Upon receiving the invitation, the user generates his own transaction information and invokes the ARS.Sign algorithm to generate a signature .The transaction information include the expected transaction power, the expected transaction unit price and the explicit transaction type, where represents a power sale or a power purchase.The user transmits both transaction information and corresponding accountable ring signature to the transaction center.

Transaction matching
Upon receiving the message and the signature from the user, the transaction center invokes the ARS.Verify algorithm to verify the validity of the transaction information.
At time t 3 , the transaction center summarizes all the valid transaction information.and match all transactions according to the following rules.
1) Consumers are prioritized based on the purchase price, arranged from the highest to the lowest.Meanwhile, producers are organized according to the selling price, ranked from the lowest to the highest.
2) The transaction center establishes matching pairs in sequence, starting from the producer with the lowest expected transaction price and progressing to the consumer with the highest expected transaction price.
3) Each pairing consider the minimum expected transaction power between both parties.The transaction price is determined as the arithmetic average of the expected transaction prices from both parties.
Subsequently, the transaction center calls the algorithm ARS.Open to reveal the identity of the signer and return the matching results to the user.

Transaction completed
Upon receiving the matching result, the user checks whether the transaction has been succeddfully matched and submits the confirmation outcome to the transaction center.
If both parties confirm the transaction, the transaction center generates an electronic contract for both parties.The two parties to the transaction and the transaction center call the algorithm MS.Sign to generate the signature.The transaction center uploads the transaction contract and the signature to the blockchain and Users query the transactions related to themselves and execute the transactions that have generated electronic contracts under the supervision of all nodes of the blockchain to complete transaction payments or physical operations.

ANALYSIS AND PERFORMANCES
This section conducts a comprehensive security analysis and performance evaluation, aligning with the stringent security and privacy requirements.

Security Analysis
This section briefly discuss why our scheme aligns with user anonymity, guard against identity forgery and transparent auditing.
In terms of user anonymity, the inherent anonymity of the accountable ring signature ensures that no adversary can obtain the identity of the sender of the transaction information until the identity information is recovered by the transaction center and published.
In terms of guard against identity forgery, the decentralized nature of the blockchain, combined with signed transactions, guarantees that no adversary can pose as the user.Any attempt to do so would involve forging an accountable ring signature, which is considered almost impossible to achieve.
In terms of transparent auditing, the accountability of the accountable ring signature ensures that the system can achieve accountability and traceability.
In summary, the above discussion serves as confirmation that the proposed scheme effectively fulfills the requirements for both transaction security and privacy protection.

Performance Evaluation
This paper further proves the practicality of the proposed scheme through its implementation in simulated networks and communications.The experimentation is tested on a computer equipped with an Intel Core i5 processor running at 2.3GHz, 8GB RAM and MacOS 10.The chosen ring size of the proposed scheme is 32, and the corresponding running times are detailed in Table 1.
The simulation results clearly indicate that the proposed scheme incurs only marginal costs to the system.Based on this observation, it can be confidently concluded that the proposed scheme is not only effective but also highly useful in practical applications.

CONCLUSION
This research delves into the intricate realm of distributed anonymous transactions within virtual power plants.This paper presents a formal model including the network assumptions and security requirements.The scheme integrates accountable ring signatures, multi-signatures and blockchain technology to craft a scheme adept at harmonizing transaction security and identity anonymity for VPP.The culmination involves both theoretical and experimental analyses, affirming the effectiveness of the proposed scheme.

Table 1 :
Overhead caused by the scheme