Search code examples
gitgnupgopenpgp

How do OpenPGP-signed git commits affect commit size?


If you sign git commits, an additional signature needs to be stored. What is the size of a typical signature and the impact on commit size?


Solution

  • The signature mostly depends on the size of the signing key. A signature issued by an RSA 4096 key (with other words, a key sized 4096 bits) will be 4096 bit = 512 byte, plus some overhead (again only a few bytes) for key ID, message fingerprint and other meta data. Even with very large RSA 8192 bit keys, the signature would stay under 1kB, which is probably the largest amount you might have to expect in reality.