Linus Torvalds On Git’s Use Of SHA-1: ‘The Sky Isn’t Falling’

Google’s researchers specifically cited Git when they announced a new SHA-1 attack vector, according to ZDNet. “The researchers highlight that Linus Torvald’s code version-control system Git ‘strongly relies on SHA-1′ for checking the integrity of file objects and commits. It is essentially possible to create two Git repositories with the same head commit hash and different contents, say, a benign source code and a backdoored one,’ they note.” Saturday morning, Linus responded:
First off – the sky isn’t falling. There’s a big difference between using a cryptographic hash for things like security signing, and using one for generating a “content identifier” for a content-addressable system like git. Secondly, the nature of this particular SHA1 attack means that it’s actually pretty easy to mitigate against, and there’s already been two sets of patches posted for that mitigation. And finally, there’s actually a reasonably straightforward transition to some other hash that won’t break the world – or even old git repositories…

The reason for using a cryptographic hash in a project like git is because it pretty much guarantees that there is no accidental clashes, and it’s also a really really good error detection thing. Think of it like “parity on steroids”: it’s not able to correct for errors, but it’s really really good at detecting corrupt data… if you use git for source control like in the kernel, the stuff you really care about is source code, which is very much a transparent medium. If somebody inserts random odd generated crud in the middle of your source code, you will absolutely notice… It’s not silently switching your data under from you… And finally, the “yes, git will eventually transition away from SHA1”. There’s a plan, it doesn’t look all that nasty, and you don’t even have to convert your repository. There’s a lot of details to this, and it will take time, but because of the issues above, it’s not like this is a critical “it has to happen now thing”.
In addition, ZDNet reports, “Torvalds said on a mailing list yesterday that he’s not concerned since ‘Git doesn’t actually just hash the data, it does prepend a type/length field to it’, making it harder to attack than a PDF… Do we want to migrate to another hash? Yes. Is it game over for SHA-1 like people want to say? Probably not.”


Share on Google+

Read more of this story at Slashdot.

Clip to Evernote

Leave a Reply

Your email address will not be published. Required fields are marked *