On 4/21/07, Jon Smirl <jonsmirl@xxxxxxxxx> wrote:
You have to store the full SHAs at least once since they are the signature against data corruption.
This is interesting. So until know I learnt 3 uses of sha: - Reference an object - Check against object data corruption - Prevent any possible collision among objects Karl says that we need 160 bits to prevent collisions:
prevent any possible collision created by a malicious adversary, too, so that it's possible to e.g. sign just a commit and be able to trust everything it points to. The SHA1 designers felt that 160 bits was a good compromise between size and robustness, and we just trust that their (and the cryptographic community's) guess is good enough.
Probably we don't need 160bits to reference an object. I really don't know how many bit we need to be robust against data corruption. Someone more versed then me in SHA1 could tell the probablity to find a corrupted object calculating his hash and checking against his stored 160bits known good signature and *FAIL* to find as corrupt *the same object* calculating his hash and checking against a truncated sha to say 20bits. I would say this probability is veery veery low in random case (not a malicious attack of course, but I think this is not the case with git repository as it was with SHA1 designers). Marco - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html