DOI: 10.3390/electronics15163631 ISSN: 2079-9292

Privacy-Preserving Energy Trading on Blockchain with Matrix-Based Inner Product Encryption

Min-Seok Park, Seong-Yun Jeon, Mun-Kyu Lee

Blockchain-based peer-to-peer (P2P) energy trading enables prosumers to sell surplus electricity directly to one another without a central intermediary, but its open ledger reveals each participant’s bid price to every blockchain node, including the distribution system operator (DSO) that settles the trades. Prior work has addressed this concern by using inner product encryption (IPE) to encode each bid as a vector and perform matching directly over ciphertexts, yet the resulting pairing-based comparison and heavy on-chain heap restructuring still incur substantial gas costs. To resolve this issue, this paper proposes two orthogonal optimization methods. First, we replace the pairing-based IPE of the prior baseline with a matrix-based IPE, which substitutes pairing operations with matrix multiplication and a trace evaluation. This allows compact ternary encoding of integers and enables ciphertext entries to be packed into narrower Solidity integer types. Second, we introduce two heap-management policies: (i) the index-based heap, which exchanges integer indices instead of full ciphertexts during swaps, and (ii) the root-retention heap, which eliminates redundant heap restructuring under residual rebidding. Our performance analysis shows that the proposed optimization strategies substantially reduce the total gas consumption of the energy trading system compared with the pairing-based baseline, and the heap-management policies deliver consistent savings regardless of the underlying cryptographic primitive.

More from our Archive