···2233A tool to sign arbitrary objects in a git repository.
4455+## Brief overview of how it works
66+77+This tool writes a tree object to some git repository containing the
88+following blobs:
99+1010+```
1111+100644 blob aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa object
1212+100644 blob bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb signature
1313+```
1414+1515+Where `object` stores the raw (20 byte) object id of some git object
1616+to be signed, and `signature` stores the signature over `object`. The
1717+tree's hash is returned by `git signify sign`.
1818+1919+## Generating keys
2020+2121+Signing keys can be generated with [`signify`](https://man.openbsd.org/signify.1),
2222+from the OpenBSD project.
2323+2424+```
2525+$ signify -G -p newkey.pub -s newkey.sec
2626+```
2727+2828+If you do not wish to encrypt your keys, pass the `-n` flag to the
2929+command line of `signify`.
3030+531## Usage
3232+3333+The flags supported by this program and their respective documentation can
3434+be checked by running the following commands:
635736```
837$ git signify -h
3838+$ git signify sign -h
3939+$ git signify verify -h
940```
10411111-Keys can be generated with [`signify`](https://man.openbsd.org/signify.1).
4242+To push signatures to a remote, the suggested approach is the following:
4343+4444+```
4545+$ SIGNATURE_TREE=$(git signify sign -k $SECRET_KEY $OBJECT_TO_SIGN)
4646+$ SIGNATURE_COMMIT=$(git commit-tree $SIGNATURE_TREE -m Signature)
4747+$ git tag signature-$OBJECT_TO_SIGN $SIGNATURE_COMMIT
4848+$ git push --tags
4949+```
5050+5151+Verification can then be done with:
5252+5353+```
5454+$ git signify verify -p -k $PUBLIC_KEY $SIGNATURE_COMMIT^{tree}
5555+```