auth-tarball-from-git
Authenticate a tarball through a signed tag in a git repository (with reproducible builds).
The signed git tag contains a hash of a commit object:
object a631953b1241368b5f6bc471f9d89948f985fcb3
type commit
tag openpgp/v1.9.0
tagger Justus Winter <justus@sequoia-pgp.org> 1653320477 +0200
openpgp: Release 1.9.0.
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEJWpOVeSnLZetJGjniNx+MzhfeR0FAmKLqx0ACgkQiNx+Mzhf
eR1w7gf+MSS1Su+kclHSKpVCg03TTyVdg+zx95FTlQjBtGaSRMbOAoWvCX53hZm9
/w2YZJdHTGAR50hFj78xnQjPg8bSEYrQD6HaMc/TYlFkrQcPQULCV8aNiiTlKPUC
GC0L8OecqG1tILejLtWkJpoSAh+oAK0QKjgyy3bYZU+KzCinV2+TC8LaAvcBSngt
R/Xu9g8X6CYf88mfO+IAyGeaDD+JMyQFp6q1fgzlFx/lA31iIg49vf1b9yQo2fxA
y8hnYu+dztZNMRcEL7Cl5UgFnT4tDv/rDlNpM136KHyvrXaqYC0GhNEoAsXX975L
9o0OzzRPOAxJj9/4Wigvu/fhOWRXSA==
=8qk5
-----END PGP SIGNATURE-----
If we don't have a signed tarball but we do have a signed git tag we can use
this signature to prove authenticity of the tarball. To do this we verify the
signature, then attempt to generate an identical tarball from the commit
specified in the tag. This is possible because the output of git archive is
deterministic as long as the parameters are identical.
Using the source code from the tarball is preferable because it can be pinned with modern cryptographic hash functions while git can only offer sha1.
Signature verification is done with sequoia-pgp instead of gpg.
⚠️ Security Considerations ⚠️
The hash in the signed tag is a SHA1 hash, which is known to be problematic (2005, 2017, 2020). Regardless of the quality of the pgp signature, verifying a tarball with git can only provide sha1-tier cryptographic properties.
Usage
# Sequoia
# Monero
Dependencies
Needs sqv from the sequoia-pgp project to be installed to verify pgp
signatures.
Funding
This project was funded by myself with github sponsors.
License
GPLv3+