|
|
|
|
|
by glandium
3384 days ago
|
|
GPG signatures actually sign the hash digest of the text they're given. Fun fact, which I think (hope) changed in recent versions of GPG: the hash, by default, is (was?) SHA-1. One can check what is used with e.g. $ git cat-file -p $some_tag | gpg --list-packets | grep "digest algo"
The output is of the form digest algo n, begin of digest xx yy
Where n can be: 1: MD5
2: SHA1
8: SHA256
10: SHA512
(See RFC 4880, 9.4 for all values) |
|
I don't think it changes anything though, because of git's integrity. Stop me if I'm getting this wrong but, if you wanted to attack a signed git commit through the gpg signature's hash, you would have to modify the commit object itself... which yields a different commit hash in order to be valid. You'd have to get absurdly lucky to have a signature collision that contains a (valid) commit hash collision.