Comparative Analysis of SHA-256 and BLAKE2 Algorithms: A Case Study of Processing Time Efficiency, CPU Usage, and RAM in Data Integrity Sistems on Windows and Linux
Abstract
Data security is a fundamental aspect of modern information sistems, particularly in ensuring the integrity of transmitted and stored data. Cryptographic hash functions serve as a key technology to meet this need, with SHA-256 as the widely adopted industry standard and BLAKE2 as an alternative designed to offer higher speed on modern processor architectures. However, most previous studies compared both algorithms on a single platform and were limited to processing time parameters, without considering the influence of the operating sistem or overall resource consumption. This study aims to conduct a comprehensive comparative analysis of SHA-256 and BLAKE2 performance on two operating sistem environments, namely Windows 11 and Linux, by measuring four main parameters: execution time (ms), throughput (MB/s), CPU usage (%), and RAM consumption (MB). Testing was conducted using Python 3.13 with the hashlib, timeit, psutil, and tracemalloc libraries, on AMD Ryzen 5 5500 hardware with 16 GB DDR4 RAM. Test data was generated randomly via os.urandom() in four size variations — 1 MB, 10 MB, 50 MB, and 100 MB — each repeated 100 iterations to obtain stable average values. The results show that no algorithm is universally superior under all conditions. On Linux, BLAKE2 is faster for data sizes of 1–50 MB, while SHA-256 outperforms on 100 MB data. Conversely, on Windows, SHA-256 is faster for 1–10 MB data, while BLAKE2 significantly outperforms on 100 MB data with an execution time of 5.10 ms compared to SHA-256's 18.82 ms. The most significant finding is that Windows consumes an average CPU of 2.84–3.12%, which is three times lower than Linux at 9.68–9.84%, indicating a fundamental difference in cryptographic resource management between the two operating sistems






