1
$\begingroup$

I am curious If every single digital file has a hash and/or a checksum. When verifying my downloaded files using hdiutil on mac os, about 90% of my files report some sort of checksum. However, when i download .iso files or ubuntu / windows, img’s or iso’s, i’ve noticed many of my image files do not report a checksum. I always assumed that if it was data, it HAS to have a checksum, or it wouldnt be data in the first place. Could someone please tell me weather or not all digital files have a checksum, and if it is possible to have files with non existent checksums? Thank you for any info!

$\endgroup$
  • 2
    $\begingroup$ The question has no sense. You can calculate millions of check sums for every file. "files with non existent checksums" - this statement has no sense. You can calculate check sum for every file you want. If you mean something different, change your question. $\endgroup$ – mentallurg Aug 31 '19 at 9:25
  • 3
    $\begingroup$ The way it is worded it can be understood as if the question is: does every file contain a checksum. In this case the answer is No. But some do. $\endgroup$ – tum_ Aug 31 '19 at 11:44
3
$\begingroup$

A hash can be computed for any input, even for an empty input.

Some tools may display the output of some hash function, other tools may not.

If the file is large, it may take some time to compute, so tools may not display the hash immediately, only on-demand.

So this is more a question about specific software than cryptography.

| improve this answer | |
$\endgroup$
1
$\begingroup$

Yes, you're right. Every file, no file inclusive, has a checksum. SHA1 of the empty string ("") is da39a3ee 5e6b4b0d 3255bfef 95601890 afd80709. If you submit a file for hashing (checksumming), it will produce a valid output. Non display of the hash output is not related to the determination of the hash.

| improve this answer | |
$\endgroup$
1
$\begingroup$

A hash/checksum can be calculated for any data.

However, it is up to the person publishing the file as to whether they will calculate and publish the hash.

If they do, you can check if you downloaded the same file they uploaded.

If they do not, then there is no point in calculating the hash yourself, because you have nothing authoritative to compare it against. As the idea of a hash is that if some malicious party changed even a single bit of the file before you download it, the hash be wildly different and it would then be obvious.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.