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!
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.
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.
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.