SHA-256 Git repositories are now in public preview blog.github.com · 12 points ·...
HN Best 200 @best
SHA-256 Git repositories are now in public preview blog.github.com · 12 points · 2 comments · HN thread
TL;DR GitHub has put SHA-256 Git repositories into public preview on github.com and GitHub Enterprise Cloud with data residium, letting users pick SHA-256 instead of SHA-1 when creating a new repository. The post notes that Git has supported SHA-256 repositories since version 2.30 and that they will become the default for new repositories in Git 3.0; existing repositories stay on SHA-1 and the hash algorithm cannot be changed after creation.
- Users can choose SHA-1 or SHA-256 as the hash algorithm for new repositories in the web interface or via the GitHub API.
- Git 2.30 (December 2020) introduced SHA-256 repository support, motivated by weaknesses exposed by attacks such as SHAttered.
- Object IDs in SHA-256 repositories are 64 hex characters instead of 40, so tooling must handle both lengths.
- Cloning automatically uses the repository's hash algorithm, so users need not check it beforehand.
- The hash algorithm of an existing repository cannot be changed, and existing repositories remain on SHA-1.
- Users whose environments are not ready can keep creating SHA-1 repositories.
Discussion The thread is very small, with only two top-level comments, and the mood is mostly skeptical or off-topic. One commenter links the SHA-256 move to a recent NSA recommendation to use longer SHA-2/SHA-3 digests and suggests Git 3.0 should either adopt larger hashes or drop cryptographic hashing for object IDs. A second comment unrelatedly complains about GitHub still lacking IPv6 support.
- Longer hashes or a non-cryptographic ID would suit Git 3.0 better (some): One commenter argues that the NSA's recent advice to move to 384- or 512-bit SHA variants makes this announcement look behind the curve. They suggest Git 3.0 either adopt a larger digest or use a non-cryptographic hash for object identifiers, and call SHA-1 an insecure but oddly slow digest.
- Off-topic complaint about missing IPv6 support (a few): A second commenter raises GitHub's lack of IPv6 without addressing the SHA-256 feature. It is a brief, unelaborated remark rather than a view on the change.