Re:NIST Retires SHA-1 Cryptographic Algorithm
by est31 on Thursday December 15, 2022 @01:22PM
(#34003503)
That's the general anti-agility argument wielded against git, but note that git's use cases require it to process historic data.
E.g. you will want to be able to read some sha-1-only repo from disk that was last touched a decade ago. That's a different thing than some protocol which requires both parties to be on-line, say wireguard, in which instance it's easier to switch both to a new version that uses a different cryptographic algorithm.
Git has such protocols as well, and maybe it can deprecate sha-1 support there eventually, but even there it has to support both sha-1 and sha-2 for a while because not everyone is using the latest and greatest version of git, and no sysadmin wants the absolute horror of flag days.
Re:NIST Retires SHA-1 Cryptographic Algorithm
by miga on Thursday December 15, 2022 @02:44PM
(#34004618)
It would be safer to forbid broken hashes after certain date, and consider only those earlier hashes that have been counter-signed by new algorithms.
Re:NIST Retires SHA-1 Cryptographic Algorithm
by lazide on Thursday December 15, 2022 @09:03PM
(#34008669)
So then you can’t load an archived repo?
Re:NIST Retires SHA-1 Cryptographic Algorithm
by Dylan16807 on Thursday December 15, 2022 @03:00PM
(#34004841)
Assuming reasonable logic around hashes, like "a SHA-2 commit can't be a parent of a SHA-1 commit", there wouldn't much in the way of downgrade attacks available.
Re:NIST Retires SHA-1 Cryptographic Algorithm
by bornfreddy on Thursday December 15, 2022 @04:05PM
(#34005773)
Wow, smart! This would keep all the old history intact and at the same time force lots of people to upgrade through social pressure. I'd probably be angry as hell when that happened to me, but it would also work.
Re:NIST Retires SHA-1 Cryptographic Algorithm
by est31 on Friday December 16, 2022 @03:20AM
(#34012151)
FTR the current plan for git's migration is that commits have both SHA-1 and SHA-2 addresses, and you can reference them by both. There is thus no concept of "SHA-2 commit", or "SHA-1 commit". The issue is more around pointers that are not directly managed by git, e.g. hashes inside commit messages to reference an earlier commit (and of course signatures). Those might require a git filter-repo - like step that breaks the SHA-1 hashes (and signatures) to migrate to SHA-2, if that is desired.
Cryptographic agility makes this problem worse, not better: instead of having a "flag day" (or release) where `git`'s digest choice reflects the State of the Art, agility ensures that every future version of `git` can be downgraded to a broken digest.