2 ms·
Linus also wrote that "SHA-1, as far as Git is concerned, isn't even a security feature. It's purely a consistency check. The security parts are elsewhere, so a
by Arnt 11y ago
Linus also wrote that "SHA-1, as far as Git is concerned, isn't even a security feature. It's purely a consistency check. The security parts are elsewhere, so a lot of people assume that since Git uses SHA-1 and SHA-1 is used for cryptographically secure stuff, they think that, OK, it's a huge security feature. It has nothing at all to do with security, it's just the best hash you can get."
(It's not security because it's stored together with the data. An attacker who can corrupt a particular patch has enough access to corrupt the rest of the same file. It's not meant to defend against an attacker, merely to detect accidental corruption.)
- samuellb 11y agoThat's true, but the format of signed tags will need to change in one way or another. What we could do is to have a "shadow" tree which is built using a stronger hash algorithm (e.g. SHA256), and which is used for signing history. The shadow tree would be identical to the real tree except for the hashes and references to hashes.