Modern power grid is the most complex human-made system, which is monitored by wide-area monitoring system (WAMS). Providing time-synchronized data of power system operating states, WAMS will play a crucial role in next generation smart grid protection and control. WAMS helps secure efficient energy transmission as well as reliable and optimal grid management. As the key enabler of a smart grid, numerous sensors such as PMU and current sensors transmit real-time dynamic data, which is usually protected by encryption algorithm from malicious attacks, over wide-area-network (WAN) to power system control centers so that monitoring and control of the whole system is possible. Security algorithms for power grid need to consider both performance and energy efficiency through code optimization techniques on encryption and decryption. In this paper, we take power nodes (sites) as platforms to experimentally study ways of energy consumptions in different security algorithms. First, we measure energy consumptions of various security algorithms on CrossBow and Ember sensor nodes. Second, we propose an array of novel code optimization methods to increase energy consumption efficiency of different security algorithms. Finally, based on careful analysis of measurement results, we propose a set of principles on using security algorithms in WAMS nodes, such as cryptography selections, parameter configuration, and the like. Such principles can be used widely in other computing systems with energy constraints.