  The rapid adoption of smart grids demands robust security and efficiency
measures due to their critical role in delivering electricity and their
potential for customer-oriented benefits. This paper presents an innovative
framework, named RETINA, which provides a resilient and secure energy trading
mechanism within smart grid systems. RETINA tackles the inherent security and
infrastructure challenges in smart grids by establishing a trust-based security
layer and facilitating energy transactions through blockchain technology. Our
proposed solution integrates Public Key Infrastructure (PKI) and the Web of
Trust (WoT) concepts, promoting decentralized communication channels and robust
key management. We further introduce a smart contract-based energy trading
mechanism that factors in trust, distance, and energy type (green or non-green)
in cost calculation. The utility and robustness of RETINA have been validated
in a virtualized testbed environment with 500 nodes, demonstrating superior
performance in terms of scalability and resilience compared to the existing WoT
scheme. Furthermore, RETINA successfully enables a secure and efficient energy
trading scheme, promoting the use of renewable energy sources. Future
enhancements will include application to a realistic smart grid deployment and
the integration of additional functionalities. This groundbreaking solution has
the potential to revolutionize the smart grid ecosystem, addressing its current
limitations and propelling the industry towards a future of advanced and secure
energy exchange.
