SHA256: Comparing the Energy Consumption of Different Implementations
摘要
Adapting energy-efficient approaches is essential in order to save resources, ensuring the highest throughput. In addition, combining security-enabled approaches has also been a concern to protect data, as it has now been at the most risk by the introduction of cloud-based approaches. Thus, it is important to create a bridge between these concerns and ensure more research on security techniques that are also energy efficient. For that purpose, in this chapter, one of the data security techniques, such as a hashing algorithm, has been chosen, specifically the SHA256 algorithm in order to analyze the power consumption of the implementations. SHA256 hashing algorithm has been implemented in the Visual Studio IDE in Python using four libraries named Hashlib, CryptoHash, cryptography, and PyNaCl, and the power consumption has been calculated using the Intel Power Gadget software. After analyzing the collected data and applying descriptive analysis, a t-test and an ANOVA test, a detailed discussion has been formed which states that the PyNaCl library consumes the least amount of power per second and also emits the least amount of CO2. Therefore, the chapter recommends using the PyNaCl library to implement the SHA256 algorithm in order to ensure least energy consumption, and also indicates that it is possible to find better approaches while implementing an algorithm when the concern is energy efficiency.