{'fraction_non_alphanumeric': 0.0234208658623137, 'fraction_numerical': 0.0127750177430802, 'mean_word_length': 5.211453744493392, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Decentralized Privacy-Preserving Fair Exchange Scheme for V2G Based on Blockchain

With the fast development of the electric vehicle (EV) technology, EVs are expected to be the mainstream in future. The large number of EVs facilitate development of the emerging vehicle-to-grid (V2G) technology, which realizes two-way electricity flows between EVs and the power grid. How to achieve fairness and privacy for EVs during electricity/service exchanges remains a challenging problem for V2G. In this article, we propose a privacy-preserving fair exchange scheme V2GEx for V2G based on the blockchain. V2GEx is composed of an extended blockchain that supports zero-knowledge funds, a fair exchange smart contract based on the hashchain micropayment mechanism, and a privacy-preserving protocol for V2G. We further propose a simpler and more efficient scheme called Uni-V2GEx, which preserves privacy for only one party. We also provide a rigorous security proof under the universal composability (UC) model to prove V2GEx's security. To evaluate its efficiency, we implement V2GEx and conduct comprehensive experiments to test its performance in terms of computation cost and processing delay. The experiment results show that V2GEx is highly efficient in that verification of V2GEx transactions costs only 20 ms and the average transaction processing latency is around 6 seconds in a 200-node blockchain network.