5 ms·
Git allows one to sign commits. It would be quite pointless if it was signing mere MD5 hashes.
by _flux 4y ago
Git allows one to sign commits. It would be quite pointless if it was signing mere MD5 hashes.
- ilyt 4y ago...as opposed to signing SHA1 hashes ? Git signs commits, not the whole tree AFAIK
- CorrectHorseBat 4y agoGit signs commit hashes
- seba_dos1 4y agoFor the record, a commit is the whole tree. Git does not store patches, they are generated on the fly by the UI. Trees still rely on hashes to address the actual content though.
- shp0ngle 4y agoIt’s exactly same pointless now. You sign the hash, which is what’s colliding.
- alerighi 4y agoFinding a collision is very hard, not something you will do in minutes, it requires a tremendous amount of resources. For any practical use (like git) that doesn't require an extreme level of security SHA-1 is still fine, and it will be for a lot of years to come.
- eru 4y agoI'm not sure why git would require less security than almost any other application? Control over what software runs is really important. If an attacker can get you to run different source code, especially if it looks like it's still signed by the people you trust to produce or review sources, would be a big deal.
- pornel 4y agoMD5 is not vulnerable to second preimage attack, so signing a repo that doesn’t already have attacker-controlled data specially crafted ahead of time, is perfectly safe. Collision attack is not “hash is useless you can make up anything”, but a specific condition that breaks only some uses, not all. You can generate a pair of files that hash to same value that you can’t control. You can’t make a new file that hashes to an existing hash.