Zombse

The Zombie Stack Exchanges That Just Won't Die

View the Project on GitHub anjackson/zombse

Fixity calculation resources

When preparing a submission information package with fixity information, which hash takes more server resources to calculate, MD5 or SHA-1?

user173

Comments

Answer by Michael Kjörling

SHA-1 is a much more complex hashing algorithm than is MD5, but neither of them is computationally "cheap".

That said, when running off spinning-platter hard drives and reasonably modern hardware, neither hashing algorithm is going to be the limiting factor. The limiting factor in almost any realistic case will rather be disk read throughput during the calculations.

You should rather be concerned with the risk of changes (intentional or unintentional) in data resulting in an unchanged hash value. For that, you need a long (providing enough space to minimize the risk of collisions), good (to increase the likelihood that any change results in a different hash) hashing algorithm. MD5 is cryptographically broken, and there are serious doubts about the long-term cryptographic security of SHA-1. The combination of the two, however, may very well be viable from an archive ingestion point of view (to ensure that the data received matches what was sent).

Comments