How do large files have their integrity verified?

238 views

How does a server know whether your local files are corrupted, version mismatched, or illegitimate without you uploading to the server? If they have to check through every file for integrity, wouldn’t that effectively be the same as downloading/uploading the entire folder?

In: 19

6 Answers

Anonymous 0 Comments

No. File integrity is primarily achieved through the use of hashes. A hash is a kind of process where you can take data of any length and it very efficiently produces a fixed length string of numbers known as the hash. The math behind it is chosen such that, for all intents and purposes, the hash is unique for the given input* and any slight change in the input results in a completely different hash.

So the server just needs to know what the hash is. It can then run the hashing program against your files and see if the hash produced matches what it has on file.

^((* – given the variable length input and fixed length output, hashes are necessarily not unique, but the inputs producing identical outputs are unrelated and for the purposes of this discussion, the odds of two functioning programs having the same hash is negligible for a sufficiently designed hashing algorithm))

You are viewing 1 out of 6 answers, click here to view all answers.