0

Edited question for posterity: The reason my resulting hash values were the same is that the I'm computing checksums of two .iso files which contain "empty strings."

I attempted to verify two different ISO files and didn't notice they had not completed downloading. Both files generated the same checksum, sha256sum: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 This the same checksum you would get for any empty string.

I had amended my original question to ask "What thing am testing to get the results I got?" The answer is, "an empty string."

I'm editing this because my original question and subsequent edits left a confusing question. It's answered.

9
  • 2
    It is extremely unlikely, that two different files have the same sha256sum. I suspect that your two iso files have been overwritten by some other file. You can check the file sizes with ls -l
    – sudodus
    Sep 3, 2018 at 16:46
  • 7
    ... you will likely find that both files are empty. See for example SHA-256 hash of null input? Sep 3, 2018 at 16:56
  • 1
    We ought to keep in mind that it is unlikely but not impossible to have two different files with the same hash value. If that were not the case, then any file (regardless of size) could be reduced to 64 bytes. Clearly...that's impossible. So the mapping cannot be 1-to-1. Many files must map to a single hash value. It's just unlikely.
    – Ray
    Sep 3, 2018 at 17:12
  • If you're comparing two files, calculating and comparing their hash values is one thing you can do. But don't forget the obvious...for example, comparing their file sizes. Or, comparing the first X bytes. These two comparisons will be quicker than calculating a hash value since this has to completely read the file. cmp has the advantage of stopping once you find a difference, but you are also reading two files from disk at the same time...
    – Ray
    Sep 3, 2018 at 17:12
  • @steeldriver - You're right, that's the value of an empty string. Expanded question in OP.
    – JWNWSA
    Sep 3, 2018 at 17:19

1 Answer 1

1

Do the files really differ? Use this command to know:

cmp path/ubuntu-18.04.1-desktop-amd64.iso path/linuxmint-19-cinnamon-64bit-v2.iso

If there are no differences, you should check their hash values from where you downloaded those files. They exist with a guide on the Linux Mint's site.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .