Mitrea Dan, Toderean Liana, Cioara Tudor, Anghel Ionut, Antal Marcel
Computer Science Department, Technical University of Cluj-Napoca, Memorandumului 28, 400114 Cluj-Napoca, Romania.
Heliyon. 2023 Nov 17;9(11):e22357. doi: 10.1016/j.heliyon.2023.e22357. eCollection 2023 Nov.
Blockchain technology offers great value in terms of decentralization, data integrity, transparency, and traceability, however the transactional data is public, and accessible raising concerns about violating privacy regulations. For example, in the peer-to-peer energy trading and demand response use cases, the data stored in blockchain may allow a third party to infer the load profiles or even identify the behind the meter assets. In this paper, we employ homomorphic techniques to encrypt the energy transactional data stored on the blockchain allowing the smart contracts functions responsible for implementing the business logic of the energy flexibility trading and settlement to perform computations on encrypted data. As computations on smart contracts and public blockchains can be expensive, we have used the lighter version of the Partial Homomorphic Encryption scheme to obfuscate the energy data. To ensure the validity of the smart contracts' functions executed on encrypted data, we leverage on the consensus mechanism of the blockchain network, thus ensuring computation correctness. The solution was validated considering a micro-grid with 12 prosumers that trade their flexibility peer-to-peer (P2P). The results demonstrate the feasibility of maintaining encrypted energy data on the blockchain, executing smart contract functions on encrypted data, and preserving the privacy of computations. As anticipated, the trade-off for better privacy is the gas consumption overhead of the smart contracts' functions which is higher compared to the non-encrypted case, depending on the length of the public-private keys pair. Nonetheless, our solution exhibits consistent execution times for smart contracts, making it suitable for private networks where gas costs are of minimal concern.
区块链技术在去中心化、数据完整性、透明度和可追溯性方面具有巨大价值,然而交易数据是公开的且可访问,这引发了对违反隐私法规的担忧。例如,在对等能源交易和需求响应用例中,存储在区块链中的数据可能会使第三方推断出负荷曲线,甚至识别电表后的资产。在本文中,我们采用同态技术对存储在区块链上的能源交易数据进行加密,使负责实现能源灵活性交易和结算业务逻辑的智能合约功能能够对加密数据进行计算。由于智能合约和公共区块链上的计算成本可能很高,我们使用了部分同态加密方案的简化版本来混淆能源数据。为确保在加密数据上执行的智能合约功能的有效性,我们利用区块链网络的共识机制,从而确保计算的正确性。考虑到一个由12个产消者组成的微电网,他们进行对等(P2P)灵活性交易,对该解决方案进行了验证。结果表明,在区块链上维护加密能源数据、在加密数据上执行智能合约功能以及保护计算隐私是可行的。正如预期的那样,为了更好的隐私而付出的代价是智能合约功能的燃气消耗开销,与未加密的情况相比更高,这取决于公私钥对的长度。尽管如此,我们的解决方案在智能合约方面表现出一致的执行时间,使其适用于对燃气成本不太关注的专用网络。