Enhancing Electric Vehicle Charging Security Through Blockchain Smart Contracts: Mathematical Security Analysis and Reproducible Experimental Evaluation
Electric vehicle (EV) charging infrastructure faces security challenges involving unauthorized access, replay attacks, metering-data manipulation, and transaction integrity. This study presents a blockchain-based smart contract framework for charging session management, energy meter authentication, and charging cost computation. The proposed ChargingSessionManager architecture was enhanced with digital signature validation, nonce-based replay prevention, authorized metering updates, and session state transition control. A mathematical security assessment of the system examines authentication, data integrity, replay prevention, and resilience to replay attacks under clearly defined cryptographic and implementation assumptions. It uses a stochastic model to simulate charging load for 200 EVs and 30 charging stations over 60 days, along with behavioral testing of smart contracts in a local Ethereum-compatible environment, providing a strong basis for evaluating the system’s security. The extended evaluation included 102 behavioral tests across three contract deployments, 36 of which were submissions with randomized altered energy inputs. All tests yielded the expected results. The recorded mean gas usage was 177,804.5 gas for initiating the session, 103,065 gas for meter updates, and 79,893 gas for session finalization. These results provide implementation-level proof of the selected security controls in the tested environment, but they do not constitute a comprehensive formal proof, production-level network performance, or defense against all attacks. Compared with those broader benchmarks, the research provides a reproducible basis for further investigation of secure, auditable EV charging management using blockchain-based smart contracts.
Authors
- Gonesh Chandra Saha (ORCID: https://orcid.org/0000-0001-7912-5153)
- Ahmed Afif Monrat (ORCID: https://orcid.org/0000-0001-9801-7625)
- Karl Andersson (ORCID: https://orcid.org/0000-0003-0244-3561)
Institutions
- Luleå University of Technology (SE)
- Gazipur Agricultural University (BD)
Publication Details
- Journal
- Journal of Cybersecurity and Privacy
- Published
- 2026-11-12
- DOI
- https://doi.org/10.3390/jcp6060202
- Primary Topic
- Blockchain Technology Applications and Security
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Kempe Foundation