Surprising they didn't go with Blake3 instead since it has much higher performance and Git's performance-oriented ethos.
A new hash algorithm for Git
21–30 of 240 posts
Re: A new hash algorithm for Git
#22Surprising they didn't go with Blake3 instead since it has much higher performance and Git's performance-oriented ethos.
SHA-256 is fine. The biggest problem is switching to it...
Re: A new hash algorithm for Git
#23Surprising they didn't go with Blake3 instead since it has much higher performance and Git's performance-oriented ethos.
Re: A new hash algorithm for Git
#24Re: A new hash algorithm for Git
#25I wonder if it would make sense to use `concat(sha1, sha256)` hash algorithm. This wouldn't change the prefixes while improving strength of an algorithm (by including SHA256 in a hash).
Re: A new hash algorithm for Git
#26I wonder if it would make sense to use `concat(sha1, sha256)` hash algorithm. This wouldn't change the prefixes while improving strength of an algorithm (by including SHA256 in a hash).
Something to remember about the security of concatenated hashes: https://crypto.stackexchange.com/a/63543/291
Re: A new hash algorithm for Git
#27I can't find documentation for the command in the article: git convert-repo --to-hash=sha-256 --frobnicate-blobs --climb-subtrees \ --liability-waiver=none --use-shovels --carbon-offsets Surely some of those options aren't real...
Re: A new hash algorithm for Git
#28I don't understand the practical attack vector for breaking SHA1s in Git. Not only are objects checksummed by SHA1, they also encode the length . Finding a SHA1 collision is plausible, but finding a SHA1 collision that both lets you do something Nefarious, and is the length you need, seems really really unlikely
Re: A new hash algorithm for Git
#29I don't understand the practical attack vector for breaking SHA1s in Git. Not only are objects checksummed by SHA1, they also encode the length . Finding a SHA1 collision is plausible, but finding a SHA1 collision that both lets you do something Nefarious, and is the length you need, seems really really unlikely
Reusing the precise collision from the shattered attack is made impossible by initializing the state with anything other than the prefix from the shattered attack. But the cost for mounting such an attack yourself is only 11k USD. However, as git uses the sha1collisiondetection library, such an attack would be detected by current git. Thus, this library is a much better protection than the length encoding.
Re: A new hash algorithm for Git
#30Surprising they didn't go with Blake3 instead since it has much higher performance and Git's performance-oriented ethos.
Than sha256 will likely be preferable in the long run: It's faster with SHA-NI than blake3.
If you're not developing on a system with sha-ni, get with the program. Zen2 is freeking awesome. :)