RetroFed Forums
Your home away from modern life.
Git 3.0's upcoming SHA-256 default will be a costly mistake
Post Reply
AuthorMessage
codeinabox programming.dev codeinabox@programming.dev
Joined: 2025-09-29
Quote

72   Original
exdor programming.dev exdor@programming.dev
Joined: 2026-08-20
#2 · Quote Reply

Why not blake3?

0
AllHailTheSheep sh.itjust.works AllHailTheSheep@sh.itjust.works
Joined: 2023-06-11
#3 · Quote Reply

great read, thanks for sharing!

6
Laser feddit.org Laser@feddit.org
Joined: 2024-06-23
#4 · Quote Reply

I don't really understand why they didn't switch to SHA-3 at this point

1
Colloidal programming.dev Colloidal@programming.dev
Joined: 2025-02-26
#5 · Quote Reply

Why not blake3?

Addressed in the article.

4
∃∀λ programming.dev eah@programming.dev
Joined: 2025-07-09
#6 · Quote Reply

The author makes the argument that we shouldn't update the hashing algorithm because an adversary has simpler, cheaper means to achieve the same goal of injecting malicious code into a project. I don't find this a convincing reason. People say the same about Wayland. As I understand it, Wayland makes it so that processes can't see inside windows in other processes or observe the keyboard when one of its windows is not in focus, something X11 apparently doesn't guarantee. They say we shouldn't switch because it would achieve nothing: an adversarial program could just as easily do similar snooping because it has access to the user's home directory. I think that just means we need to also patch the other holes. You can't improve security by doing nothing. It's like you have two insecure doors in your home and you don't bother installing a lock on one because an intruder could easily get through the other one. You have to start somewhere. You can strengthen the hashes and try to patch the other holes (social engineering, etc.) at a later point.

13
ImgurRefugee114 reddthat.com ImgurRefugee114@reddthat.com
Joined: 2025-08-26
#7 · (edited) Quote Reply

The author makes the argument that we shouldn't update the hashing algorithm because an adversary has simpler, cheaper means to achieve the same goal of injecting malicious code into a project. I don't find this a convincing reason. People say the same about Wayland. As I understand it, Wayland makes it so that processes can't see inside windows in other processes or observe the keyboard when o...

Wayland actually increases the barrier to entry by improving the security model.

Git commit hashes were never meant for security or trust, and trying to crowbar them into that role is shortsighted, as Linus argues.

Personally, I'm in favor of the migration and would already be using it (except Nix only supports sha1 atm). But, the security argument isn't a good one.

I'm in favor of a better hashing algorithm because the hash will be a better hash, not because I think it will improve the cryptographic security and trust of my repos. But honestly, that's just a nerd mental thing. I could take it or leave it. SHA1 is sufficient for the role.

7
kewjo lemmy.world kewjo@lemmy.world
Joined: 2023-07-05
#8 · Quote Reply

The author makes the argument that we shouldn't update the hashing algorithm because an adversary has simpler, cheaper means to achieve the same goal of injecting malicious code into a project. I don't find this a convincing reason. People say the same about Wayland. As I understand it, Wayland makes it so that processes can't see inside windows in other processes or observe the keyboard when o...

he gives a pretty reasonable solution at the end? basically his point is the implementation is problematic and causes churn for everyone who uses git and if the concern is really about security then they would allow swapping out the verification hash instead of hard coding it again and waiting for 256 to be broken.

8
fibojoly sh.itjust.works fibojoly@sh.itjust.works
Joined: 2023-06-15
#9 · (edited) Quote Reply

Very interesting. I taught git to students last year and was showing them the SHA256 option and the issues he's describing was pretty much what I was wondering about. If you force people to switch, with no intercompatibility, holy shit this is gonna be quite the clusterfuck!

What I'm taking away from this is that Linus was right from the get go : SHA1 isn't there for security, it's a really good algorithm for a hashtable's hash where we really want to avoid collisions. That's it.
If you're thinking it's safe because it used to be involved in security, you're a muppet.

9
Rachel Kim mentorlab.io rachel_kim@mentorlab.io
Joined: 2026-10-03
#10 · Quote Reply

Migrations like this are a good reminder to write down why a default changed. Junior devs often skip reading the design discussion, but it teaches more than the release notes.

4
FizzyOrange programming.dev FizzyOrange@programming.dev
Joined: 2023-09-24
#11 · Quote Reply

The author makes the argument that we shouldn't update the hashing algorithm because an adversary has simpler, cheaper means to achieve the same goal of injecting malicious code into a project. I don't find this a convincing reason. People say the same about Wayland. As I understand it, Wayland makes it so that processes can't see inside windows in other processes or observe the keyboard when o...

I don't think your Wayland comparison is great. There are already solutions to app isolation that make X a weak link, e.g. Android or Qubes. Whereas there's basically no future where SHA1 in Git is the weakest link.

Also security was only one reason for Wayland.

2
FizzyOrange programming.dev FizzyOrange@programming.dev
Joined: 2023-09-24
#12 · Quote Reply

Can't argue with that! The fact that you cant mix and match within a repo means this should be a complete non-starter.

0
Rachel Kim mentorlab.io rachel_kim@mentorlab.io
Joined: 2026-10-03
#13 · Quote Reply

Good thread. For mentees learning git, I would start with a clear branching habit before worrying about hash internals.

2
exdor programming.dev exdor@programming.dev
Joined: 2026-08-20
#14 · Quote Reply

Addressed in the article.

Where?

The attack is vague and unlikely, but blak3 might be faster. Of course less support than sha256

1
Colloidal programming.dev Colloidal@programming.dev
Joined: 2025-02-26
#15 · Quote Reply

Where? The attack is vague and unlikely, but blak3 might be faster. Of course less support than sha256

Grep blake3? Basically changing the algorithm is pointless, but you can tack on another algo, which can be sha-256, blake3, etc. It's a good read.

1
Post Reply
Back to top