Comparative Study on Hash Function Algorithms for Blockchain Technology - Pun, Kah Yien; Mohamad, Kamaruddin Malik; Ramli, Sofia Najwa (Applied Information Technology And Computer Science, 2024)
Cryptocurrency is the use of cryptography to create and distribute currency units making cryptocurrency a peer-to-peer digital exchange system. Bitcoin is a popular cryptocurrency that uses hash algorithms for its proof-of-work consensus mechanism. However, there are some specific attacks in Bitcoin regarding the hash function speed such as double spending and 51% attack. Therefore, this research paper is to make a comparison study of hash algorithms based on speed to increase the security of the Bitcoin blockchain. The comparison was made in Java programming by calculating the hashing speed to hash the test data of 1MB size in milliseconds with 100, 500, and 1000 loops repeated 10 times to get the average result using SHA256, KECCAK256, and BLAKE2b. In the 1000-loop experiment, KECCAK256 is approximately 33.29% faster than SHA256, while BLAKE2b is approximately 47.18% faster. According to the comparison analysis, BLAKE2b’s hashing speed is the fastest among the selected hash algorithms.