Git 3.0's upcoming SHA-256 default will be a costly mistake
2 hours ago
- Git 3.0 will change its default hash algorithm from SHA-1 to SHA-256, causing breaking changes.
- SHA-1 collision attacks are theoretically possible but impractical for real-world exploits due to high cost and complexity.
- Git's trust model is based on source authentication (e.g., where you pull from) rather than hash integrity.
- Real-world attacks on codebases typically exploit social engineering or compromised maintainers, not hash collisions.
- The migration to SHA-256 will create ecosystem-wide issues: incompatible repository formats, broken tooling, and forced conversion of existing projects.
- An alternative approach is to keep SHA-1 for content addressing and add independent tree hash headers (e.g., SHA-256) for signed verification.
- This second-signature method avoids ecosystem fragmentation while providing stronger security, as demonstrated by tools like git-evtag.