{"thread":{"id":"42636","subject":"[PATCH 0/5] Documentation/technical: describe signature formats","startedAt":"2016-06-17T07:46:22Z","lastAt":"2016-06-17T19:14:59Z","messageCount":9,"participants":["Michael J Gruber","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":5},"messages":[{"id":"289423","messageId":"cover.1466148698.git.git@drmicha.warpmail.net","threadId":"42636","inReplyTo":null,"subject":"[PATCH 0/5] Documentation/technical: describe signature formats","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-06-17T07:46:07Z","receivedAt":"2016-06-17T07:46:22Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"As promised a while ago, here is a little series that describes the signature\nformats that we use in Git. The series sets up the the basic structure first\nand then describes each format in one patch.\n\nThe series grew out of my own efforts to get an overview and structure my\nunderstanding before I can set about refactoring what we have. Things\nthat became apparent immediately:\n\n- We don't support verifying push certificates, although they fit in with\n  git verify-tag. Patch has been submitted, and this series documents the\n  result already (git verify-tag --blob).\n\n- We don' support verifying signed merge tags other than by using log/show,\n  which is not quite fit for scripting.\n\n- We have signature parsing code all over the place, including places that\n  should probably abstract more, such as tag.c and log-tree.c.\n\n- We may want to give more support for deciding about the trustworthiness\n  of signatures, the same way we export information to receive hooks\n  in the presence of push certificates. (Give information, don't decide.)\n\nMichael J Gruber (5):\n  Documentation/technical: describe signature formats\n  Documentation/technical: signed tag format\n  Documentation/technical: signed commit format\n  Documentation/technical: signed merge tag format\n  Documentation/technical: push certificate format\n\n Documentation/Makefile                       |   1 +\n Documentation/technical/signature-format.txt | 242 +++++++++++++++++++++++++++\n 2 files changed, 243 insertions(+)\n create mode 100644 Documentation/technical/signature-format.txt\n\n-- \n2.9.0.382.g87fd384\n\n"},{"id":"289424","messageId":"e1291ccb031f5da1935d7d0b8db57fe6ea951b2b.1466148698.git.git@drmicha.warpmail.net","threadId":"42636","inReplyTo":"cover.1466148698.git.git@drmicha.warpmail.net","subject":"[PATCH 1/5] Documentation/technical: describe signature formats","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-06-17T07:46:08Z","receivedAt":"2016-06-17T07:46:28Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"We use different types of signature formats in different places.\nSet up the infrastructure and overview to describe them systematically\nin our technical documentation.\n\nSigned-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/Makefile                       |  1 +\n Documentation/technical/signature-format.txt | 17 +++++++++++++++++\n 2 files changed, 18 insertions(+)\n create mode 100644 Documentation/technical/signature-format.txt\n\ndiff --git a/Documentation/Makefile b/Documentation/Makefile\nindex 35c1385..b43d66e 100644\n--- a/Documentation/Makefile\n+++ b/Documentation/Makefile\n@@ -76,6 +76,7 @@ TECH_DOCS += technical/protocol-common\n TECH_DOCS += technical/racy-git\n TECH_DOCS += technical/send-pack-pipeline\n TECH_DOCS += technical/shallow\n+TECH_DOCS += technical/signature-format\n TECH_DOCS += technical/trivial-merge\n SP_ARTICLES += $(TECH_DOCS)\n SP_ARTICLES += technical/api-index\ndiff --git a/Documentation/technical/signature-format.txt b/Documentation/technical/signature-format.txt\nnew file mode 100644\nindex 0000000..fda4fb8\n--- /dev/null\n+++ b/Documentation/technical/signature-format.txt\n@@ -0,0 +1,17 @@\n+Git signature format\n+====================\n+\n+== Overview\n+\n+Git uses cryptographic signatures in various places, currently objects (tags,\n+commits, mergetags) and transactions (pushes). In every case, the command which\n+is about to create an object or transaction determines a payload from that,\n+calls gpg to obtain a detached signature for the payload (`gpg -bsa`) and\n+embeds the signature into the object or transaction.\n+\n+Signatures always begin with `-----BEGIN PGP SIGNATURE-----`\n+and end with `-----END PGP SIGNATURE-----`, unless gpg is told to\n+produce RFC1991 signatures which use `MESSAGE` instead of `SIGNATURE`.\n+\n+The signed payload and the way the signature is embedded depends\n+on the type of the object resp. transaction.\n-- \n2.9.0.382.g87fd384\n\n"},{"id":"289425","messageId":"70e8fcb0e9cb73976b643aad1f72f1f0f41c553b.1466148698.git.git@drmicha.warpmail.net","threadId":"42636","inReplyTo":"cover.1466148698.git.git@drmicha.warpmail.net","subject":"[PATCH 4/5] Documentation/technical: signed merge tag format","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-06-17T07:46:11Z","receivedAt":"2016-06-17T07:46:30Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/technical/signature-format.txt | 74 ++++++++++++++++++++++++++++\n 1 file changed, 74 insertions(+)\n\ndiff --git a/Documentation/technical/signature-format.txt b/Documentation/technical/signature-format.txt\nindex 8ae1dc3..7afd403 100644\n--- a/Documentation/technical/signature-format.txt\n+++ b/Documentation/technical/signature-format.txt\n@@ -110,3 +110,77 @@ signed commit\n \n signed commit message body\n ----\n+\n+== Mergetag signatures\n+\n+- created by: `git merge` on signed tag\n+- payload/embedding: the whole signed tag object is embedded into\n+  the (merge) commit object as header entry `mergetag`\n+- example: merge of the signed tag `signedtag` as above\n+\n+----\n+tree c7b1cff039a93f3600a1d18b82d26688668c7dea\n+parent c33429be94b5f2d3ee9b0adad223f877f174b05d\n+parent 04b871796dc0420f8e7561a895b52484b701d51a\n+author A U Thor <author@example.com> 1465982009 +0000\n+committer C O Mitter <committer@example.com> 1465982009 +0000\n+mergetag object 04b871796dc0420f8e7561a895b52484b701d51a\n+ type commit\n+ tag signedtag\n+ tagger C O Mitter <committer@example.com> 1465981006 +0000\n+ \n+ signed tag\n+ \n+ signed tag message body\n+ -----BEGIN PGP SIGNATURE-----\n+ Version: GnuPG v1\n+ \n+ iQEcBAABAgAGBQJXYRhOAAoJEGEJLoW3InGJklkIAIcnhL7RwEb/+QeX9enkXhxn\n+ rxfdqrvWd1K80sl2TOt8Bg/NYwrUBw/RWJ+sg/hhHp4WtvE1HDGHlkEz3y11Lkuh\n+ 8tSxS3qKTxXUGozyPGuE90sJfExhZlW4knIQ1wt/yWqM+33E9pN4hzPqLwyrdods\n+ q8FWEqPPUbSJXoMbRPw04S5jrLtZSsUWbRYjmJCHzlhSfFWW4eFd37uquIaLUBS0\n+ rkC3Jrx7420jkIpgFcTI2s60uhSQLzgcCwdA2ukSYIRnjg/zDkj8+3h/GaROJ72x\n+ lZyI6HWixKJkWw8lE9aAOD9TmTW9sFJwcVAzmAuFX2kUreDUKMZduGcoRYGpD7E=\n+ =jpXa\n+ -----END PGP SIGNATURE-----\n+\n+Merge tag 'signedtag' into downstream\n+\n+signed tag\n+\n+signed tag message body\n+\n+# gpg: Signature made Wed Jun 15 08:56:46 2016 UTC using RSA key ID B7227189\n+# gpg: Good signature from \"Eris Discordia <discord@example.net>\"\n+# gpg: WARNING: This key is not certified with a trusted signature!\n+# gpg:          There is no indication that the signature belongs to the owner.\n+# Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n+----\n+\n+- verify with: verification is embedded in merge commit message by default,\n+  alternatively with `git show --show-signature`:\n+\n+----\n+commit 9863f0c76ff78712b6800e199a46aa56afbcbd49\n+merged tag 'signedtag'\n+gpg: Signature made Wed Jun 15 10:56:46 2016 CEST using RSA key ID B7227189\n+gpg: Good signature from \"Eris Discordia <discord@example.net>\"\n+gpg: WARNING: This key is not certified with a trusted signature!\n+gpg:          There is no indication that the signature belongs to the owner.\n+Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n+Merge: c33429b 04b8717\n+Author: A U Thor <author@example.com>\n+Date:   Wed Jun 15 09:13:29 2016 +0000\n+\n+    Merge tag 'signedtag' into downstream\n+    \n+    signed tag\n+    \n+    signed tag message body\n+    \n+    # gpg: Signature made Wed Jun 15 08:56:46 2016 UTC using RSA key ID B7227189\n+    # gpg: Good signature from \"Eris Discordia <discord@example.net>\"\n+    # gpg: WARNING: This key is not certified with a trusted signature!\n+    # gpg:          There is no indication that the signature belongs to the owner.\n+    # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n+----\n-- \n2.9.0.382.g87fd384\n\n"},{"id":"289426","messageId":"d2e095403e10e128c79cfb3421151c2e3acd79bb.1466148698.git.git@drmicha.warpmail.net","threadId":"42636","inReplyTo":"cover.1466148698.git.git@drmicha.warpmail.net","subject":"[PATCH 3/5] Documentation/technical: signed commit format","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-06-17T07:46:10Z","receivedAt":"2016-06-17T07:46:30Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/technical/signature-format.txt | 48 ++++++++++++++++++++++++++++\n 1 file changed, 48 insertions(+)\n\ndiff --git a/Documentation/technical/signature-format.txt b/Documentation/technical/signature-format.txt\nindex 833afff..8ae1dc3 100644\n--- a/Documentation/technical/signature-format.txt\n+++ b/Documentation/technical/signature-format.txt\n@@ -62,3 +62,51 @@ signed tag\n \n signed tag message body\n ----\n+\n+== Commit signatures\n+\n+- created by: `git commit -S`\n+- payload: commit object\n+- embedding: header entry `gpgsig`\n+  (content is preceded by a space)\n+- example: commit with subject `signed commit`\n+\n+----\n+tree eebfed94e75e7760540d1485c740902590a00332\n+parent 04b871796dc0420f8e7561a895b52484b701d51a\n+author A U Thor <author@example.com> 1465981137 +0000\n+committer C O Mitter <committer@example.com> 1465981137 +0000\n+gpgsig -----BEGIN PGP SIGNATURE-----\n+ Version: GnuPG v1\n+ \n+ iQEcBAABAgAGBQJXYRjRAAoJEGEJLoW3InGJ3IwIAIY4SA6GxY3BjL60YyvsJPh/\n+ HRCJwH+w7wt3Yc/9/bW2F+gF72kdHOOs2jfv+OZhq0q4OAN6fvVSczISY/82LpS7\n+ DVdMQj2/YcHDT4xrDNBnXnviDO9G7am/9OE77kEbXrp7QPxvhjkicHNwy2rEflAA\n+ zn075rtEERDHr8nRYiDh8eVrefSO7D+bdQ7gv+7GsYMsd2auJWi1dHOSfTr9HIF4\n+ HJhWXT9d2f8W+diRYXGh4X0wYiGg6na/soXc+vdtDYBzIxanRqjg8jCAeo1eOTk1\n+ EdTwhcTZlI0x5pvJ3H0+4hA2jtldVtmPM4OTB0cTrEWBad7XV6YgiyuII73Ve3I=\n+ =jKHM\n+ -----END PGP SIGNATURE-----\n+\n+signed commit\n+\n+signed commit message body\n+----\n+\n+- verify with: `git verify-commit [-v]` (or `git show --show-signature`)\n+\n+----\n+gpg: Signature made Wed Jun 15 10:58:57 2016 CEST using RSA key ID B7227189\n+gpg: Good signature from \"Eris Discordia <discord@example.net>\"\n+gpg: WARNING: This key is not certified with a trusted signature!\n+gpg:          There is no indication that the signature belongs to the owner.\n+Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n+tree eebfed94e75e7760540d1485c740902590a00332\n+parent 04b871796dc0420f8e7561a895b52484b701d51a\n+author A U Thor <author@example.com> 1465981137 +0000\n+committer C O Mitter <committer@example.com> 1465981137 +0000\n+\n+signed commit\n+\n+signed commit message body\n+----\n-- \n2.9.0.382.g87fd384\n\n"},{"id":"289427","messageId":"b2557387aeea4b34da4a5b28e87063d1f2c9ff69.1466148698.git.git@drmicha.warpmail.net","threadId":"42636","inReplyTo":"cover.1466148698.git.git@drmicha.warpmail.net","subject":"[PATCH 5/5] Documentation/technical: push certificate format","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-06-17T07:46:12Z","receivedAt":"2016-06-17T07:46:33Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/technical/signature-format.txt | 56 ++++++++++++++++++++++++++++\n 1 file changed, 56 insertions(+)\n\ndiff --git a/Documentation/technical/signature-format.txt b/Documentation/technical/signature-format.txt\nindex 7afd403..c50602f 100644\n--- a/Documentation/technical/signature-format.txt\n+++ b/Documentation/technical/signature-format.txt\n@@ -184,3 +184,59 @@ Date:   Wed Jun 15 09:13:29 2016 +0000\n     # gpg:          There is no indication that the signature belongs to the owner.\n     # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n ----\n+\n+== Push certificates\n+\n+- created by: `git push --signed`\n+- payload: a push certificate header followed by the push transcript\n+  (see pack-protocol.txt and below)\n+- embedding: append the signature to the push transcript and pass it to receive hooks\n+  via the environment (see below)\n+- example: push of commit `dd1416f` updating `master` on `.` from `d36de3d`,\n+  resulting in push certificate object `d4169b9`:\n+\n+----\n+certificate version 0.1\n+pusher C O Mitter <committer@example.com> 1465983405 +0000\n+pushee .\n+nonce 1465983405-07421dc1515c6f4d76d4\n+\n+d36de3db9b6a83076477254a3186b721a7bfaab7 dd1416f2cd1ec85957a9520a33e9053a133a775d refs/heads/master\n+-----BEGIN PGP SIGNATURE-----\n+Version: GnuPG v1\n+\n+iEYEABECAAYFAldhIa0ACgkQE7b1Hs3eQw2pGwCgmJs98xETSDZb6rooh/X7af3V\n+zWgAn08ctVNga27jRkIdhFNetJy3x8De\n+=WH0m\n+-----END PGP SIGNATURE-----\n+----\n+\n+- verify with: `git verify-tag --blob [-v]`\n+\n+----\n+gpg: Signature made Wed Jun 15 11:36:45 2016 CEST using DSA key ID CDDE430D\n+gpg: Good signature from \"C O Mitter <committer@example.com>\"\n+certificate version 0.1\n+pusher C O Mitter <committer@example.com> 1465983405 +0000\n+pushee .\n+nonce 1465983405-07421dc1515c6f4d76d4\n+\n+d36de3db9b6a83076477254a3186b721a7bfaab7 dd1416f2cd1ec85957a9520a33e9053a133a775d refs/heads/master\n+----\n+\n+- pre- and post-receive hook input:\n+\n+----\n+d36de3db9b6a83076477254a3186b721a7bfaab7 dd1416f2cd1ec85957a9520a33e9053a133a775d refs/heads/master\n+----\n+\n+- pre- and post-receive hook environment:\n+\n+----\n+GIT_PUSH_CERT_NONCE_STATUS=OK\n+GIT_PUSH_CERT_KEY=13B6F51ECDDE430D\n+GIT_PUSH_CERT=d4169b9a3c2674458f9656796132c145bbc5ba74\n+GIT_PUSH_CERT_STATUS=G\n+GIT_PUSH_CERT_SIGNER=C O Mitter <committer@example.com>\n+GIT_PUSH_CERT_NONCE=1465983405-07421dc1515c6f4d76d4\n+----\n-- \n2.9.0.382.g87fd384\n\n"},{"id":"289428","messageId":"353d5207e2e080b50a0262be8d29353c42a51097.1466148698.git.git@drmicha.warpmail.net","threadId":"42636","inReplyTo":"cover.1466148698.git.git@drmicha.warpmail.net","subject":"[PATCH 2/5] Documentation/technical: signed tag format","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-06-17T07:46:09Z","receivedAt":"2016-06-17T07:46:36Z","isPatch":true,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\n Documentation/technical/signature-format.txt | 47 ++++++++++++++++++++++++++++\n 1 file changed, 47 insertions(+)\n\ndiff --git a/Documentation/technical/signature-format.txt b/Documentation/technical/signature-format.txt\nindex fda4fb8..833afff 100644\n--- a/Documentation/technical/signature-format.txt\n+++ b/Documentation/technical/signature-format.txt\n@@ -15,3 +15,50 @@ produce RFC1991 signatures which use `MESSAGE` instead of `SIGNATURE`.\n \n The signed payload and the way the signature is embedded depends\n on the type of the object resp. transaction.\n+\n+== Tag signatures\n+\n+- created by: `git tag -s`\n+- payload: annotated tag object\n+- embedding: append the signature to the unsigned tag object\n+- example: tag `signedtag` with subject `signed tag`\n+\n+----\n+object 04b871796dc0420f8e7561a895b52484b701d51a\n+type commit\n+tag signedtag\n+tagger C O Mitter <committer@example.com> 1465981006 +0000\n+\n+signed tag\n+\n+signed tag message body\n+-----BEGIN PGP SIGNATURE-----\n+Version: GnuPG v1\n+\n+iQEcBAABAgAGBQJXYRhOAAoJEGEJLoW3InGJklkIAIcnhL7RwEb/+QeX9enkXhxn\n+rxfdqrvWd1K80sl2TOt8Bg/NYwrUBw/RWJ+sg/hhHp4WtvE1HDGHlkEz3y11Lkuh\n+8tSxS3qKTxXUGozyPGuE90sJfExhZlW4knIQ1wt/yWqM+33E9pN4hzPqLwyrdods\n+q8FWEqPPUbSJXoMbRPw04S5jrLtZSsUWbRYjmJCHzlhSfFWW4eFd37uquIaLUBS0\n+rkC3Jrx7420jkIpgFcTI2s60uhSQLzgcCwdA2ukSYIRnjg/zDkj8+3h/GaROJ72x\n+lZyI6HWixKJkWw8lE9aAOD9TmTW9sFJwcVAzmAuFX2kUreDUKMZduGcoRYGpD7E=\n+=jpXa\n+-----END PGP SIGNATURE-----\n+----\n+\n+- verify with: `git verify-tag [-v]` or `git tag -v`\n+\n+----\n+gpg: Signature made Wed Jun 15 10:56:46 2016 CEST using RSA key ID B7227189\n+gpg: Good signature from \"Eris Discordia <discord@example.net>\"\n+gpg: WARNING: This key is not certified with a trusted signature!\n+gpg:          There is no indication that the signature belongs to the owner.\n+Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n+object 04b871796dc0420f8e7561a895b52484b701d51a\n+type commit\n+tag signedtag\n+tagger C O Mitter <committer@example.com> 1465981006 +0000\n+\n+signed tag\n+\n+signed tag message body\n+----\n-- \n2.9.0.382.g87fd384\n\n"},{"id":"289430","messageId":"358c097f88671847e5003696a65d3a107aa2f59b.1466153557.git.git@drmicha.warpmail.net","threadId":"42636","inReplyTo":"b2557387aeea4b34da4a5b28e87063d1f2c9ff69.1466148698.git.git@drmicha.warpmail.net","subject":"[PATCHv2] Documentation/technical: push certificate format","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2016-06-17T08:54:59Z","receivedAt":"2016-06-17T08:55:10Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n---\nThis is the version describing the current state, not assuming any new\nverify command for blobs.\n\n Documentation/technical/signature-format.txt | 51 ++++++++++++++++++++++++++++\n 1 file changed, 51 insertions(+)\n\ndiff --git a/Documentation/technical/signature-format.txt b/Documentation/technical/signature-format.txt\nindex 7afd403..1c21379 100644\n--- a/Documentation/technical/signature-format.txt\n+++ b/Documentation/technical/signature-format.txt\n@@ -184,3 +184,54 @@ Date:   Wed Jun 15 09:13:29 2016 +0000\n     # gpg:          There is no indication that the signature belongs to the owner.\n     # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n ----\n+\n+== Push certificates\n+\n+- created by: `git push --signed`\n+- payload: a push certificate header followed by the push transcript\n+  (see pack-protocol.txt and below)\n+- embedding: append the signature to the push transcript and pass it to receive hooks\n+  via the environment (see below)\n+- example: push of commit `dd1416f` updating `master` on `.` from `d36de3d`,\n+  resulting in push certificate object `d4169b9`:\n+\n+----\n+certificate version 0.1\n+pusher C O Mitter <committer@example.com> 1465983405 +0000\n+pushee .\n+nonce 1465983405-07421dc1515c6f4d76d4\n+\n+d36de3db9b6a83076477254a3186b721a7bfaab7 dd1416f2cd1ec85957a9520a33e9053a133a775d refs/heads/master\n+-----BEGIN PGP SIGNATURE-----\n+Version: GnuPG v1\n+\n+iEYEABECAAYFAldhIa0ACgkQE7b1Hs3eQw2pGwCgmJs98xETSDZb6rooh/X7af3V\n+zWgAn08ctVNga27jRkIdhFNetJy3x8De\n+=WH0m\n+-----END PGP SIGNATURE-----\n+----\n+\n+- verify with: `gpg --verify <(git cat-file -p pushcert | sed -n '/-----BEGIN PGP/,$p') <(git cat-file -p pushcert | sed  '/-----BEGIN PGP/Q')`\n+  (assuming the push certificate is stored in the blob tagged `pushcert`)\n+\n+----\n+gpg: Signature made Wed Jun 15 11:36:45 2016 CEST using DSA key ID CDDE430D\n+gpg: Good signature from \"C O Mitter <committer@example.com>\"\n+----\n+\n+- pre- and post-receive hook input:\n+\n+----\n+d36de3db9b6a83076477254a3186b721a7bfaab7 dd1416f2cd1ec85957a9520a33e9053a133a775d refs/heads/master\n+----\n+\n+- pre- and post-receive hook environment:\n+\n+----\n+GIT_PUSH_CERT_NONCE_STATUS=OK\n+GIT_PUSH_CERT_KEY=13B6F51ECDDE430D\n+GIT_PUSH_CERT=d4169b9a3c2674458f9656796132c145bbc5ba74\n+GIT_PUSH_CERT_STATUS=G\n+GIT_PUSH_CERT_SIGNER=C O Mitter <committer@example.com>\n+GIT_PUSH_CERT_NONCE=1465983405-07421dc1515c6f4d76d4\n+----\n-- \n2.9.0.382.g87fd384\n\n"},{"id":"289463","messageId":"xmqqeg7v1zt2.fsf@gitster.mtv.corp.google.com","threadId":"42636","inReplyTo":"cover.1466148698.git.git@drmicha.warpmail.net","subject":"Re: [PATCH 0/5] Documentation/technical: describe signature formats","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-17T17:38:01Z","receivedAt":"2016-06-17T17:38:10Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> - We don't support verifying push certificates, although they fit in with\n>   git verify-tag. Patch has been submitted, and this series documents the\n>   result already (git verify-tag --blob).\n>\n> - We don' support verifying signed merge tags other than by using log/show,\n>   which is not quite fit for scripting.\n\nBoth true and are good things to tackle, I would think.\n\nIt would be ideal if we can unify the latter with verification of\nsigned commits.\n\n> - We have signature parsing code all over the place, including places that\n>   should probably abstract more, such as tag.c and log-tree.c.\n\nLooking forward to see the result of that new abstraction.\n\n> - We may want to give more support for deciding about the trustworthiness\n>   of signatures, the same way we export information to receive hooks\n>   in the presence of push certificates. (Give information, don't decide.)\n\nAgain, true.\n\nThanks for starting this.\n\n> Michael J Gruber (5):\n>   Documentation/technical: describe signature formats\n>   Documentation/technical: signed tag format\n>   Documentation/technical: signed commit format\n>   Documentation/technical: signed merge tag format\n>   Documentation/technical: push certificate format\n>\n>  Documentation/Makefile                       |   1 +\n>  Documentation/technical/signature-format.txt | 242 +++++++++++++++++++++++++++\n>  2 files changed, 243 insertions(+)\n>  create mode 100644 Documentation/technical/signature-format.txt\n"},{"id":"289469","messageId":"xmqq1t3v1vbm.fsf@gitster.mtv.corp.google.com","threadId":"42636","inReplyTo":"358c097f88671847e5003696a65d3a107aa2f59b.1466153557.git.git@drmicha.warpmail.net","subject":"Re: [PATCHv2] Documentation/technical: push certificate format","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2016-06-17T19:14:53Z","receivedAt":"2016-06-17T19:14:59Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Michael J Gruber <git@drmicha.warpmail.net> writes:\n\n> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net>\n> ---\n> This is the version describing the current state, not assuming any new\n> verify command for blobs.\n>\n>  Documentation/technical/signature-format.txt | 51 ++++++++++++++++++++++++++++\n>  1 file changed, 51 insertions(+)\n>\n> diff --git a/Documentation/technical/signature-format.txt b/Documentation/technical/signature-format.txt\n> index 7afd403..1c21379 100644\n> --- a/Documentation/technical/signature-format.txt\n> +++ b/Documentation/technical/signature-format.txt\n> @@ -184,3 +184,54 @@ Date:   Wed Jun 15 09:13:29 2016 +0000\n>      # gpg:          There is no indication that the signature belongs to the owner.\n>      # Primary key fingerprint: D4BE 2231 1AD3 131E 5EDA  29A4 6109 2E85 B722 7189\n>  ----\n> +\n> +== Push certificates\n> +\n> +- created by: `git push --signed`\n> +- payload: a push certificate header followed by the push transcript\n> +  (see pack-protocol.txt and below)\n> +- embedding: append the signature to the push transcript and pass it to receive hooks\n> +  via the environment (see below)\n> +- example: push of commit `dd1416f` updating `master` on `.` from `d36de3d`,\n> +  resulting in push certificate object `d4169b9`:\n> +\n> +----\n> +certificate version 0.1\n> +pusher C O Mitter <committer@example.com> 1465983405 +0000\n> +pushee .\n> +nonce 1465983405-07421dc1515c6f4d76d4\n> +\n> +d36de3db9b6a83076477254a3186b721a7bfaab7 dd1416f2cd1ec85957a9520a33e9053a133a775d refs/heads/master\n> +-----BEGIN PGP SIGNATURE-----\n> +Version: GnuPG v1\n> +\n> +iEYEABECAAYFAldhIa0ACgkQE7b1Hs3eQw2pGwCgmJs98xETSDZb6rooh/X7af3V\n> +zWgAn08ctVNga27jRkIdhFNetJy3x8De\n> +=WH0m\n> +-----END PGP SIGNATURE-----\n> +----\n> +\n> +- verify with: `gpg --verify <(git cat-file -p pushcert | sed -n '/-----BEGIN PGP/,$p') <(git cat-file -p pushcert | sed  '/-----BEGIN PGP/Q')`\n> +  (assuming the push certificate is stored in the blob tagged `pushcert`)\n\nAnd assuming your sed is GNU, assuming your shell is bash.\n\nLet's have a version of this without \"verify with\", finish that\n\"generalized way to verify the 'payload followed by detached\nsignature'\" patch, and add a description to use that command here\nwhen it is done.\n\n> +\n> +----\n> +gpg: Signature made Wed Jun 15 11:36:45 2016 CEST using DSA key ID CDDE430D\n> +gpg: Good signature from \"C O Mitter <committer@example.com>\"\n> +----\n> +\n> +- pre- and post-receive hook input:\n> +\n> +----\n> +d36de3db9b6a83076477254a3186b721a7bfaab7 dd1416f2cd1ec85957a9520a33e9053a133a775d refs/heads/master\n> +----\n> +\n> +- pre- and post-receive hook environment:\n> +\n> +----\n> +GIT_PUSH_CERT_NONCE_STATUS=OK\n> +GIT_PUSH_CERT_KEY=13B6F51ECDDE430D\n> +GIT_PUSH_CERT=d4169b9a3c2674458f9656796132c145bbc5ba74\n> +GIT_PUSH_CERT_STATUS=G\n> +GIT_PUSH_CERT_SIGNER=C O Mitter <committer@example.com>\n> +GIT_PUSH_CERT_NONCE=1465983405-07421dc1515c6f4d76d4\n> +----\n"}]}