logoalt Hacker News

Git 3.0's upcoming SHA-256 default will be a costly mistake

317 points • by chmaynard • yesterday at 4:57 PM • 308 comments • view on HN

Comments

PunchyHamster • yesterday at 11:46 PM

> I pull it from there because I trust that GitHub has its authentication game together enough that it's unlikely that anyone malicious pushed something there without the maintainer's knowledge.

Hahahahaha, that's some level of delusion

ltbarcly3 • yesterday at 5:25 PM

This seems like Y2K fud.

The alternative to making sha256 the default is to leave sha1 the default. Nobody changes to sha256. sha1 is broken in 10 years. Suddenly everyone has to switch all at once on the same day because it is a critical security issue, but github never implemented sha256 because they didn't have to. This would be a major problem.

This is very very easy to fix if you run into it.

1. Adopt git 3.0 if you can with sha256.

2. If you can't use sha256, set the config to put things back to sha1. Wherever you need to do this you probably already set dozens of ENV vars or settings, just add a new one.

Or write a 15 page analysis about how the above is so hard people will probably just find it catastrophic to even think about.

➕ show 6 replies
globular-toast • yesterday at 6:22 PM

Thanks for writing this. I'd only been loosely following it and I hadn't realised how bad this is going to be. I have repos with tens of submodules and it's going to be a nightmare if any of them switch to sha256 in place. Not to mention I won't be able to use any new projects unless I rebuild my repo and all the submodules therein.

I thought the master to main thing was bad enough but this is going to suck. And just like the master rename it achieves basically nothing.

What is it about these projects that attracts people who just want to change things for the sake of it? Real engineering means coming up with a solution for backwards compatibility. This is just irresponsible and, frankly, a fuck you to everyone who will be affected by this.

➕ show 1 reply
seebeen • yesterday at 5:20 PM

[dead]

mrtesthah • yesterday at 5:16 PM

…

➕ show 1 reply
quotemstr • yesterday at 5:33 PM

Would the author feel the same if git had used MD5 instead of SHA-1?

➕ show 3 replies
pasteleft • today at 3:51 AM

Didn't GitHub broke the entire CI system by switching to "main" branch :thinking_face:

Anyway, I think it'll be the same. Tools will support SHA-256 quickly and we might have a migration program that converts SHA-1 repo to SHA-256 repo.

The only problem is that git (and related tools) will get twice as big...

crispr245 • today at 3:24 AM

Claude, make the hash use SHA-256 rather than SHA-1. No errors plsss.

Besides the possible implementation/deployment issues they will or will not face with this update, I can empathize with the idea that of not wanting to have a possible vector of attack in your system. Particularly today with AI being able to find novel exploits, I could see a future where a vulnerable hashing system leads to a malicious injection attack.

The author argues that "If I wanted to get untrusted code into Android, it's so much simpler to bribe or convince the maintainer of a popular downstream project" which is a really a red herring in this matter since that is literally a completely different issue that obviously no software update could ever fix.

Nonetheless I do agree with him in regards of how complicated and messy this whole process will be. Crypto migrations have been historically difficult, expensive and overall ugly, but not impossible...

https://nvlpubs.nist.gov/nistpubs/gcr/2018/NIST.GCR.18-017.p... page 58 for instance.