Re: Gitorious should use CRC128 / 256 / 512 instead of SHA-1
- From
Hans Petter Selasky <hps@selasky.org>
- Date
- Jan 13, 2023, 16:30 UTC
- Message-ID
- <95797daa-4d5d-73d3-fec5-6b25707182fd@selasky.org>
- In-Reply-To
- <20230113162721.qwl2asjo542cxe3c@meerkat.local>
On 1/13/23 17:27, Konstantin Ryabitsev wrote:
Show 7 quoted lines
> The answer is, unhelpfully, "because that's how git works." Every commit is a > standalone object that references the previous commit, plus includes hashes of > all trees, and those include hashes of all blobs. SHA-1 was picked because of > its speed and the fact that it guarantees an extremely low potential for > collisions (even better with SHA256). As a side-effect, it's easy to calculate > the integrity of the entire tree, including its history, by verifying its > hashes (this is what git fsck does).
Same thing can be said for CRC-XXX. Just some magic CPU instructions and we're good. You don't even need a library.
--HPS