logoalt Hacker News

gandreani • yesterday at 6:05 PM • 6 replies • view on HN

One of my favorite fun facts about Fossil SCM (another source control by the devs of sqlite) is that they patched their use of SHA1 6 days after the shattered attack was published:

"Both Fossil and Git started out using only SHA1 hashes. But when the SHAttered attack against SHA1 was published on 2017-02-23, the need to migrate to a stronger hash algorithm was recognized. Fossil added the ability to use SHA3-256 as an alternative on 2017-03-01 (six days after the SHAttered attack was first published). SHA3-256 is now the default for all new repositories and check-ins in Fossil, though older check-ins that occurred prior to SHAttered can still use their original SHA1 hash. Hence, no repositories had to be rebuilt and no hyperlinks were broken."

https://fossil-scm.org/home/doc/trunk/www/hundredandone.md

To me it's so interesting watching in realtime Git is still battling with this decision and for Fossil it was just another week of development.

That whole page is fun to read. Another fun fact somewhere else in the docs is that Fossil uses a grow-only set to store commits. They came up with this scheme some years before it was formalized by CRDTs!


Replies

ncr100 • today at 6:03 AM

Feels like Leadership of Fossil SCM is better than that for git.

(Because: This very old problem is ongoing with git, and is closed with Fossil.)

bawolff • today at 2:06 AM

in fairness, git switched to sha1-DC in may 2017, so they were only a few months late in mitigating it.

schacon • yesterday at 6:18 PM

I mean, there are two things here. One is how difficult it is to have a different hashing mechanism. Brian and other heroes in the Git core group have done amazing work to make this _technically_ possible on a repo level. To test some of my theories, I trivially implemented MD5 and an insanely dumb and easily breakable hash backend. It's not _hard_ to change the mechanism now. It's about the community.

Fossil isn't difficult to change not because it's technically harder for Git but because Git has a community and ecosystem that Fossil does not. The cost is not in the individual project for Git, the cost is because there is _so much_ in Git and this bifurcates everything.

➕ show 2 replies
6thbit • yesterday at 6:12 PM

That's impressive. I suppose they had a more flexible architecture to make that change so fast.

Is there any writeup on why it was easy for them and not for git?

➕ show 2 replies
hedora • today at 3:24 AM

The saga continues with that proposed terrible github UI in the article (from a github cofounder!)

fragmede • yesterday at 6:21 PM

It's easier to make world breaking changes when the world is really small. If git could magically just get everything and everyone to cut over and use git 3.0 in a magic instant, it wouldn't be having this problem.

➕ show 2 replies