A key feature of the smart grid is the introduction of two-way data communications into the power grid. This brings many security challenges, because of the large-scale, difficult-to-secure environment, complexity of smart grid systems, and resource limitations of the smart grid deployments. In this paper, we focus on security and privacy concerns in the context of the smart grid. Existing security mechanisms developed for traditional information technology systems can be used as a basis for designing security measures for the smart grid. However, new methods that meet the special requirements and characteristics of the smart grid are also required. In spite of the obstacles against developing detailed security solutions for the future smart grid, such as uncertainty of the architecture and lack of practical experiences with security attacks, some research has been performed in this area over the last few years. We survey the existing literature on different security aspects of the smart grid and provide directions for further research. Copyright © 2012 John Wiley & Sons, Ltd.