Comparative Analysis of Different Cryptographic Hash Functions
2024 (English)Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE credits
Student thesisAlternative title
Jämförande analys av olika kryptografiska hashfunktioner (Swedish)
Abstract [en]
Cryptographic hash functions are crucial tools used to protect information in digital devices. These functions take an input of various size consisting of characters and convert it to a digest of fixed size, known as a hash value. The functions produce the same hash value when using the same input, and are not invertible. Because of this property, cryptographic hash functions are used to verify data or files. This thesis examines the difference between the three cryptographic hash functions, MD5, SHA-256, and SHA3-256. The methodology includes implementation and testing, and comparison of speed and CPU load for different cryptographic hash functions. Both own and Java library implementation of the functions were used. The findings of this thesis showed that for our implementation, MD5 had the fastest execution and required the least CPU resources. For the Java library implementation, there was less difference between the functions, with the fastest execution time being with the SHA-256 function. As for SHA3-256, it was the slowest in execution times for both our implementation and the Java library implementation. Therefore, we conclude that it is advisable to use the Java library implementations for MD5, SHA-256, and SHA3-256 algorithms rather than developing custom implementation, to ensure efficiency and reliability.
Abstract [sv]
Kryptografiska hashfunktioner är avgörande verktyg som används för att skydda information i digitala enheter. Dessa funktioner tar en indata av olika storlekar bestående av tecken och konverterar den till en utdata av fast storlek, känt som ett hashvärde. Funktionerna producerar samma hashvärde när man använder samma indata och är inte inverterbara. På grund av denna egenskap används kryptografiska hashfunktioner för att verifiera data eller filer. Denna rapport undersöker skillnaden mellan de tre kryptografiska hashfunktionerna, MD5, SHA-256 och SHA3-256. Metodiken inkluderar implementering och testing, och jämförelse av hastighet och CPU-belastning för olika kryptografiska hashfunktioner. Både eget och Java-biblitotekimplementering av funktionerna användes. Resultaten av denna studie visade att av våra implementeringar var MD5 den med snabbaste exekvering och krävde minst CPU-resurser. Men för Java-biblioteksimplementering var det mindre skillnad mellan funktionerna, med den snabbaste exekveringstiden med SHA-256 funktionen. När det gäller SHA3-256 var den långsammast av funktionerna i exekveringstid både för vår implementering och för Java-biblioteksimplementeringen. Därför drar vi slutsatsen att det är lämpligt att använda Java-biblioteketimplementeringar för MD5, SHA-256 och SHA3-256 algoritmer snarare än utveckla anpassade implementeringar för att säkerställa effektivitet och tillförlitlighet.
Place, publisher, year, edition, pages
2024. , p. 39
Series
TRITA-EECS-EX ; 2024:281
Keywords [en]
Cryptographic Hash Functions, MD5, SHA-256, SHA3-256, Security, IT
Keywords [sv]
Kryptografiska hashfunktioner, MD5, SHA-256, SHA3-256, Säkerhet, IT
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-350825OAI: oai:DiVA.org:kth-350825DiVA, id: diva2:1885074
Supervisors
Examiners
2024-08-142024-07-212024-08-14Bibliographically approved