Re: Other Problems
> Git doesn't use SHA-1 for a defence against attackers, it uses it as a database key for each file.
This is incorrect. Git uses the SHA-1 hash to confirm the integrity of each commit blob which also serves as an identifier for that blob. Thus if a commit is modified, you know because it gets a unique hash. Thus GIT does use SHA-1 to defend against an attacker as it is the way you know a file has been tampered with. If it worked properly a miscreant modifying a file WOULD NOT be able to have that modified file masquerade as a previous, valid commit.
So if you stay with SHA-1 in GIT you basically let those who do manage to get in via your "other problems" to go around as the invisible man modifying the target code with nothing but the kluge collision detection code that currently is used. Well why not also find a way to turn that code off as part of the attack? Then what do you have as your defense?
Once someone is in your GIT repository and have disabled your collision detect kluge and they can generate the collision they want to insert their version of a commit, the only defense you have left is the fact they must distribute that to all other repositories.
That's your only defense, a bit of difficult to do stuff. Which if they have got this far, getting inside, generating a collision, other stuff, then whats one one item to tackle?
Personally I would like them getting in the front door to be tough, then walking down the corridor to be scary and bloody with attack dogs running at them, way way before they manage to get to the door they need to enter to insert their collision only to find its made of plywood because someone thought the dogs would be enough. I want that door made of good solid english oak with Arnie standing in font of it, then beyond that door is a fire pit 50 metres deep...
There is no reason to continue using SHA-1. I use SHA-256 for file hashes and have done so for years. I also took a look at if there was a speed difference when computing a hash. I found none that was significant, although it was just my desktop and my personal files, not thousands of files being modified every day but with current server and even desktops with 64 cores there really shouldn't be a problem.
But a plywood door would be cheaper, as long as its hard to distribute the change to all other repositories. Till it becomes easy. Then who will answer for the plywood door?