2 ms·
Because in the end it doesn't matter much, other than that the probability of accidental collisions is low? Speed doesn't matter, because it's primarily used to
by rbehrends 11y ago
Because in the end it doesn't matter much, other than that the probability of accidental collisions is low? Speed doesn't matter, because it's primarily used to look up a file, and I/O will dominate that. SHA-1 is known to work (Git, Mercurial), so what's the point in overengineering this particular implementation detail?
The integrity of deltas doesn't matter much because if you have a process for maliciously inserting a falsified patch, you can generally also simply insert a genuine patch (where it's trivial to get even the most complicated cryptographic checksum right) that will be combined with the rest (because the state of the repository is the combination of the patches in it, and whether you replace one or add a different one is largely irrelevant in this context).