Closed12

notationの追加による公開鍵のパケットの変化

ピン留めされたアイテム
zundazunda

公開鍵の交換手順

User IDパケット内の最新のsignature packetを採用するようだ。

RFC-4880

Transferable Public Keys

https://tools.ietf.org/html/rfc4880#section-11.1

  • One or more User ID packets
  • After each User ID packet, zero or more Signature packets (certifications)

:

Immediately following each User ID packet, there are zero or more Signature packets. Each Signature packet is calculated on the immediately preceding User ID packet and the initial Public-Key packet. The signature serves to certify the corresponding public key and User ID. In effect, the signer is testifying to his or her belief that this public key belongs to the user identified by this User ID.

Notes on Self-Signatures

https://tools.ietf.org/html/rfc4880#section-5.2.3.3

An implementation that encounters multiple self-signatures on the same object may resolve the ambiguity in any way it sees fit, but it is RECOMMENDED that priority be given to the most recent self-signature.

GnuPGのソースコード

g10/keyedit.cに登場するsignode->pkt->pkt.signature->flags.chosen_selfsigが有効になっているsignature packetが有効になっているパケットのようだ。このフラグに代入しているのはg10/getkey.c

/* Apply information from SIGNODE (which is the valid self-signature
 * associated with that UID) to the UIDNODE:
 * - wether the UID has been revoked
 * - assumed creation date of the UID
 * - temporary store the keyflags here
 * - temporary store the key expiration time here
 * - mark whether the primary user ID flag hat been set.
 * - store the preferences
 */
static void
fixup_uidnode (KBNODE uidnode, KBNODE signode, u32 keycreated)
{
  :
  sig->flags.chosen_selfsig = 1;/* We chose this one. */
  :
}
/* Use the self-signed data to fill in various fields in subkeys.
 *
 * KEYBLOCK is the whole keyblock.  SUBNODE is the subkey to fill in.
 *
 * Sets the following fields on the subkey:
 *
 *   main_keyid
 *   flags.valid        if the subkey has a valid self-sig binding
 *   flags.revoked
 *   flags.backsig
 *   pubkey_usage
 *   has_expired
 *   expired_date
 *
 * On this subkey's most revent valid self-signed packet, the
 * following field is set:
 *
 *   flags.chosen_selfsig
 */
static void
merge_selfsigs_subkey (ctrl_t ctrl, kbnode_t keyblock, kbnode_t subnode)
{
  :

  /* Find the latest key binding self-signature.  */
  :
  for (k = subnode->next; k && k->pkt->pkttype != PKT_PUBLIC_SUBKEY;
       k = k->next)
    {
    :
    }

  /* No valid key binding.  */
  if (!signode)
    return;

  sig = signode->pkt->pkt.signature;
  sig->flags.chosen_selfsig = 1; /* So we know which selfsig we chose later.  */

    :
}
zundazunda

公開鍵の操作

テスト用の鍵対を生成。tester <test@example.com>のものをパスフレーズ無しで生成した。

$ gpg --generate-key

パケットの記録

$ gpg --export --armor tester | gpg --list-packets > packets-1.txt

notationの追加

$ gpg --edit-key tester
  :
gpg> notation
Enter the notation: test@example.com=test1
No notations on user ID "tester <test@example.com>"
Adding notation: test@example.com=test1

sec  rsa3072/AD0C4A45B9B73A90
     created: 2021-03-03  expires: 2023-03-03  usage: SC
     trust: ultimate      validity: ultimate
ssb  rsa3072/8ED7C58299BFF379
     created: 2021-03-03  expires: 2023-03-03  usage: E
[ultimate] (1). tester <test@example.com>

gpg> save

パケットの記録

$ gpg --export --armor tester | gpg --list-packets > packets-2.txt
$ diff -u packets-?.txt
--- packets-1.txt	2021-03-02 21:34:17.000000000 -1000
+++ packets-2.txt	2021-03-02 21:34:50.000000000 -1000
@@ -6,12 +6,10 @@
 	keyid: AD0C4A45B9B73A90
 # off=400 ctb=b4 tag=13 hlen=2 plen=25
 :user ID packet: "tester <test@example.com>"
-# off=427 ctb=89 tag=2 hlen=3 plen=468
+# off=427 ctb=89 tag=2 hlen=3 plen=499
 :signature packet: algo 1, keyid AD0C4A45B9B73A90
-	version 4, created 1614756795, md5len 0, sigclass 0x13
-	digest algo 8, begin of digest 4c 85
-	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
-	hashed subpkt 2 len 4 (sig created 2021-03-03)
+	version 4, created 1614756883, md5len 0, sigclass 0x13
+	digest algo 8, begin of digest c0 f5
 	hashed subpkt 27 len 1 (key flags: 03)
 	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
 	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
@@ -19,15 +17,18 @@
 	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
 	hashed subpkt 30 len 1 (features: 01)
 	hashed subpkt 23 len 1 (keyserver preferences: 80)
+	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
+	hashed subpkt 2 len 4 (sig created 2021-03-03)
+	hashed subpkt 20 len 29 (notation: test@example.com=test1)
 	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
 	data: [3072 bits]
-# off=898 ctb=b9 tag=14 hlen=3 plen=397
+# off=929 ctb=b9 tag=14 hlen=3 plen=397
 :public sub key packet:
 	version 4, algo 1, created 1614756795, expires 0
 	pkey[0]: [3072 bits]
 	pkey[1]: [17 bits]
 	keyid: 8ED7C58299BFF379
-# off=1298 ctb=89 tag=2 hlen=3 plen=444
+# off=1329 ctb=89 tag=2 hlen=3 plen=444
 :signature packet: algo 1, keyid AD0C4A45B9B73A90
 	version 4, created 1614756795, md5len 0, sigclass 0x18
 	digest algo 8, begin of digest 7e ea

notationの削除

$ gpg --edit-key tester
  :
gpg> notation
Enter the notation: -test@example.com=test1
Current notations for user ID "tester <test@example.com>":
         test@example.com=test1
Removing notation: test@example.com=test1
Proceed? (y/N) y

sec  rsa3072/AD0C4A45B9B73A90
     created: 2021-03-03  expires: 2023-03-03  usage: SC
     trust: ultimate      validity: ultimate
ssb  rsa3072/8ED7C58299BFF379
     created: 2021-03-03  expires: 2023-03-03  usage: E
[ultimate] (1). tester <test@example.com>

gpg> save

パケットの記録

$ gpg --export --armor tester | gpg --list-packets > packets-3.txt
$ diff -u packets-2.txt packets-3.txt
--- packets-2.txt	2021-03-02 21:34:50.000000000 -1000
+++ packets-3.txt	2021-03-02 21:36:12.000000000 -1000
@@ -6,10 +6,10 @@
 	keyid: AD0C4A45B9B73A90
 # off=400 ctb=b4 tag=13 hlen=2 plen=25
 :user ID packet: "tester <test@example.com>"
-# off=427 ctb=89 tag=2 hlen=3 plen=499
+# off=427 ctb=89 tag=2 hlen=3 plen=468
 :signature packet: algo 1, keyid AD0C4A45B9B73A90
-	version 4, created 1614756883, md5len 0, sigclass 0x13
-	digest algo 8, begin of digest c0 f5
+	version 4, created 1614756967, md5len 0, sigclass 0x13
+	digest algo 8, begin of digest ed bb
 	hashed subpkt 27 len 1 (key flags: 03)
 	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
 	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
@@ -19,16 +19,15 @@
 	hashed subpkt 23 len 1 (keyserver preferences: 80)
 	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
 	hashed subpkt 2 len 4 (sig created 2021-03-03)
-	hashed subpkt 20 len 29 (notation: test@example.com=test1)
 	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
 	data: [3072 bits]
-# off=929 ctb=b9 tag=14 hlen=3 plen=397
+# off=898 ctb=b9 tag=14 hlen=3 plen=397
 :public sub key packet:
 	version 4, algo 1, created 1614756795, expires 0
 	pkey[0]: [3072 bits]
 	pkey[1]: [17 bits]
 	keyid: 8ED7C58299BFF379
-# off=1329 ctb=89 tag=2 hlen=3 plen=444
+# off=1298 ctb=89 tag=2 hlen=3 plen=444
 :signature packet: algo 1, keyid AD0C4A45B9B73A90
 	version 4, created 1614756795, md5len 0, sigclass 0x18
 	digest algo 8, begin of digest 7e ea

やっぱりsub packet 20の増減が見える

zundazunda

packets-1.txt

# off=0 ctb=99 tag=6 hlen=3 plen=397
:public key packet:
	version 4, algo 1, created 1614756795, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: AD0C4A45B9B73A90
# off=400 ctb=b4 tag=13 hlen=2 plen=25
:user ID packet: "tester <test@example.com>"
# off=427 ctb=89 tag=2 hlen=3 plen=468
:signature packet: algo 1, keyid AD0C4A45B9B73A90
	version 4, created 1614756795, md5len 0, sigclass 0x13
	digest algo 8, begin of digest 4c 85
	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
	hashed subpkt 2 len 4 (sig created 2021-03-03)
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
	data: [3072 bits]
# off=898 ctb=b9 tag=14 hlen=3 plen=397
:public sub key packet:
	version 4, algo 1, created 1614756795, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 8ED7C58299BFF379
# off=1298 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid AD0C4A45B9B73A90
	version 4, created 1614756795, md5len 0, sigclass 0x18
	digest algo 8, begin of digest 7e ea
	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
	hashed subpkt 2 len 4 (sig created 2021-03-03)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
	data: [3072 bits]
zundazunda

packets-2.txt

# off=0 ctb=99 tag=6 hlen=3 plen=397
:public key packet:
	version 4, algo 1, created 1614756795, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: AD0C4A45B9B73A90
# off=400 ctb=b4 tag=13 hlen=2 plen=25
:user ID packet: "tester <test@example.com>"
# off=427 ctb=89 tag=2 hlen=3 plen=499
:signature packet: algo 1, keyid AD0C4A45B9B73A90
	version 4, created 1614756883, md5len 0, sigclass 0x13
	digest algo 8, begin of digest c0 f5
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
	hashed subpkt 2 len 4 (sig created 2021-03-03)
	hashed subpkt 20 len 29 (notation: test@example.com=test1)
	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
	data: [3072 bits]
# off=929 ctb=b9 tag=14 hlen=3 plen=397
:public sub key packet:
	version 4, algo 1, created 1614756795, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 8ED7C58299BFF379
# off=1329 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid AD0C4A45B9B73A90
	version 4, created 1614756795, md5len 0, sigclass 0x18
	digest algo 8, begin of digest 7e ea
	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
	hashed subpkt 2 len 4 (sig created 2021-03-03)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
	data: [3072 bits]
zundazunda

packets-3.txt

# off=0 ctb=99 tag=6 hlen=3 plen=397
:public key packet:
	version 4, algo 1, created 1614756795, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: AD0C4A45B9B73A90
# off=400 ctb=b4 tag=13 hlen=2 plen=25
:user ID packet: "tester <test@example.com>"
# off=427 ctb=89 tag=2 hlen=3 plen=468
:signature packet: algo 1, keyid AD0C4A45B9B73A90
	version 4, created 1614756967, md5len 0, sigclass 0x13
	digest algo 8, begin of digest ed bb
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
	hashed subpkt 2 len 4 (sig created 2021-03-03)
	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
	data: [3072 bits]
# off=898 ctb=b9 tag=14 hlen=3 plen=397
:public sub key packet:
	version 4, algo 1, created 1614756795, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 8ED7C58299BFF379
# off=1298 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid AD0C4A45B9B73A90
	version 4, created 1614756795, md5len 0, sigclass 0x18
	digest algo 8, begin of digest 7e ea
	hashed subpkt 33 len 21 (issuer fpr v4 EB47FD5BEE0680AC9BEA095BAD0C4A45B9B73A90)
	hashed subpkt 2 len 4 (sig created 2021-03-03)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID AD0C4A45B9B73A90)
	data: [3072 bits]
zundazunda

https://zenn.dev/zunda/scraps/9138f06678d68a でおかしくなった公開鍵

$ gpg --list-packets F60960D80B224382CA8D831CB56C20316D6E8279.asc
# off=0 ctb=c6 tag=6 hlen=3 plen=397 new-ctb
:public key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: B56C20316D6E8279
# off=400 ctb=cd tag=13 hlen=2 plen=24 new-ctb
:user ID packet: "zunda <zundan@gmail.com>"
# off=426 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1614578740, md5len 0, sigclass 0x13
	digest algo 10, begin of digest b8 7f
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-03-01)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3071 bits]
# off=897 ctb=c2 tag=2 hlen=3 plen=549 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1614578392, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 25 fa
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-03-01)
	hashed subpkt 20 len 79 (notation: proof@metacode.biz=https://twitter.com/zundan/status/1366266732046770176)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=1449 ctb=c2 tag=2 hlen=3 plen=532 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1613530821, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 95 3a
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-02-17)
	hashed subpkt 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=1984 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x13
	digest algo 10, begin of digest c9 94
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=2455 ctb=ce tag=14 hlen=3 plen=397 new-ctb
:public sub key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 164F21FF001C8CD1
# off=2855 ctb=c2 tag=2 hlen=3 plen=444 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x18
	digest algo 10, begin of digest 1b 4a
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3065 bits]

showprefでは期待どおりnotationが現われない。

$ gpg --edit-key F60960D80B224382CA8D831CB56C20316D6E8279
  :
gpg> showpref
[ultimate] (1). zunda <zundan@gmail.com>
     Cipher: AES256, AES192, AES, 3DES
     Digest: SHA512, SHA384, SHA256, SHA224, SHA1
     Compression: ZLIB, BZIP2, ZIP, Uncompressed
     Features: MDC, Keyserver no-modify

gpg> quit

が、show-notationsでは現われる。

$ gpg --check-sigs --list-options show-notations F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2022-06-24]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sig!3        B56C20316D6E8279 2021-03-01  zunda <zundan@gmail.com>
sig!3    N   B56C20316D6E8279 2021-02-17  zunda <zundan@gmail.com>
   Signature notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan
sig!3        B56C20316D6E8279 2020-06-24  zunda <zundan@gmail.com>
sig!3    N   B56C20316D6E8279 2021-03-01  zunda <zundan@gmail.com>
   Signature notation: proof@metacode.biz=https://twitter.com/zundan/status/1366266732046770176
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]
sig!         B56C20316D6E8279 2020-06-24  zunda <zundan@gmail.com>

gpg: 5 good signatures

off=1984 ctb=c2 tag=2 hlen=3 plen=468 new-ctbのsignature packetでこれまでに現われたnotationをキャンセルしている気がしてきた。あるいはoff=426 ctb=c2 tag=2 hlen=3 plen=468 new-ctb

再掲して https://tools.ietf.org/html/rfc4880 よりコメントを追加。このsignature packetじたいには明示的にnotationをキャンセルするサブパケットはない

# off=1984 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x13
	digest algo 10, begin of digest c9 94
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279) #RFC4880にはsubpacket type 33は定義されていない
	hashed subpkt 2 len 4 (sig created 2020-06-24) # signature creation time
	hashed subpkt 27 len 1 (key flags: 03) # key flags: This key may be used to certify other keys || This key may be used to sign data.
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m) # key expiration time
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2) # Preferred Symmetric Algorithms
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2) # Preferred Hash Algorithms
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1) # Preferred Compression Algorithms
	hashed subpkt 30 len 1 (features: 01) # Features: Modification Detection (packets 18 and 19)
	hashed subpkt 23 len 1 (keyserver preferences: 80) # Key Server Preferences: No-modify -- the key holder requests that this key only be modified or updated by the key holder or an administrator of the key server
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279) # Issuer
	data: [3072 bits]

# off=426 ctb=c2 tag=2 hlen=3 plen=468 new-ctbと比較すると、同じsubpacketが別の順に並んでいる。

上記でkey serverに送らなかった公開鍵ではpublic key packetに続くsignature packetはひとつしかない。

やはりF60960D80B224382CA8D831CB56C20316D6E8279では2つめのsignature packetがnotationを消す役割を果しているように推測できる。

zundazunda

再度notationを追加してみる

$ gpg --edit-key F60960D80B224382CA8D831CB56C20316D6E8279
gpg (GnuPG) 2.2.19; Copyright (C) 2019 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  rsa3072/B56C20316D6E8279
     created: 2020-06-24  expires: 2022-06-24  usage: SC  
     trust: ultimate      validity: ultimate
ssb  rsa3072/164F21FF001C8CD1
     created: 2020-06-24  expires: 2022-06-24  usage: E   
[ultimate] (1). zunda <zundan@gmail.com>

gpg> notation
Enter the notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan
No notations on user ID "zunda <zundan@gmail.com>"
Adding notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan

sec  rsa3072/B56C20316D6E8279
     created: 2020-06-24  expires: 2022-06-24  usage: SC  
     trust: ultimate      validity: ultimate
ssb  rsa3072/164F21FF001C8CD1
     created: 2020-06-24  expires: 2022-06-24  usage: E   
[ultimate] (1). zunda <zundan@gmail.com>

gpg> save

ローカルでの状態の確認

showprefでは期待どおり追加したnotationのみが見える

$ gpg --edit-key F60960D80B224382CA8D831CB56C20316D6E8279
gpg (GnuPG) 2.2.19; Copyright (C) 2019 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  rsa3072/B56C20316D6E8279
     created: 2020-06-24  expires: 2022-06-24  usage: SC  
     trust: ultimate      validity: ultimate
ssb  rsa3072/164F21FF001C8CD1
     created: 2020-06-24  expires: 2022-06-24  usage: E   
[ultimate] (1). zunda <zundan@gmail.com>

gpg> showpref
[ultimate] (1). zunda <zundan@gmail.com>
     Cipher: AES256, AES192, AES, 3DES
     Digest: SHA512, SHA384, SHA256, SHA224, SHA1
     Compression: ZLIB, BZIP2, ZIP, Uncompressed
     Features: MDC, Keyserver no-modify
     Notations: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan

gpg> quit

check-sigsでは消したnotationも含めて見える

$ gpg --check-sigs --list-options show-notations F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2022-06-24]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sig!3    N   B56C20316D6E8279 2021-03-06  zunda <zundan@gmail.com>
   Signature notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan
sig!3    N   B56C20316D6E8279 2021-02-17  zunda <zundan@gmail.com>
   Signature notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan
sig!3        B56C20316D6E8279 2020-06-24  zunda <zundan@gmail.com>
sig!3    N   B56C20316D6E8279 2021-03-01  zunda <zundan@gmail.com>
   Signature notation: proof@metacode.biz=https://twitter.com/zundan/status/1366266732046770176
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]
sig!         B56C20316D6E8279 2020-06-24  zunda <zundan@gmail.com>

gpg: 5 good signatures

パケットの確認。off=426に今回追加した署名が挿入された。off=961とoff=1967に消したnotationへの署名が残っている。off=1496に公開鍵への自己署名が見える。notationの追加前にoff=1984にあった2つめの自己署名はなくなったようだ。

$ gpg --export --armor F60960D80B224382CA8D831CB56C20316D6E8279 | gpg --list-packets
# off=0 ctb=99 tag=6 hlen=3 plen=397
:public key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: B56C20316D6E8279
# off=400 ctb=b4 tag=13 hlen=2 plen=24
:user ID packet: "zunda <zundan@gmail.com>"
# off=426 ctb=89 tag=2 hlen=3 plen=532
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1615012817, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 3c 74
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-03-06)
	hashed subpkt 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=961 ctb=89 tag=2 hlen=3 plen=532
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1613530821, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 95 3a
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-02-17)
	hashed subpkt 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=1496 ctb=89 tag=2 hlen=3 plen=468
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x13
	digest algo 10, begin of digest c9 94
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=1967 ctb=89 tag=2 hlen=3 plen=549
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1614578392, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 25 fa
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-03-01)
	hashed subpkt 20 len 79 (notation: proof@metacode.biz=https://twitter.com/zundan/status/1366266732046770176)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=2519 ctb=b9 tag=14 hlen=3 plen=397
:public sub key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 164F21FF001C8CD1
# off=2919 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x18
	digest algo 10, begin of digest 1b 4a
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3065 bits]
zundazunda

追加したnotationのOpenPGP.jsでの確認

gpg --export --armor F60960D80B224382CA8D831CB56C20316D6E8279した内容を https://mitome.in/OpenPGP/keyPair.html#鍵の確認 に貼り付ける。

$ gpg --export --armor F60960D80B224382CA8D831CB56C20316D6E8279 
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBF7y5CEBDADCBGI+RhNbXWjHOhIwBX9k1kxr6t/nTcec97vMNMxLYn3qxaWc
LsLEG/djjBbh3y/4GbJHeh6oMfA+OPfBfjkHL5tqaPx/Iw3kWuz1ZTd1eeqFRWNA
OCQFbJ/cLwSwWiNYCFfYGjC7lO55zUd+7Yeb2v2qqRq25JFlos1fO/HSSarfisiE
yxDJQkvJ7stYe6rOwltQMpR3c6B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cuUNdSOH
nBA+uwBI
=fmeb
-----END PGP PUBLIC KEY BLOCK-----

4つのサブパケットに消した分も含めて3つのnotationと1つの自己署名が見える。

zundazunda

キーサーバへのアップロード

お騒がせします。

$ gpg --send-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: sending key B56C20316D6E8279 to hkps://keys.openpgp.org

keyoxide.orgで追加したnotationが見えた。

$ curl -sL 'https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0xf60960d80b224382ca8d831cb56c20316d6e8279'
-----BEGIN PGP PUBLIC KEY BLOCK-----

xsDNBF7y5CEBDADCBGI+RhNbXWjHOhIwBX9k1kxr6t/nTcec97vMNMxLYn3qxaWc
LsLEG/djjBbh3y/4GbJHeh6oMfA+OPfBfjkHL5tqaPx/Iw3kWuz1ZTd1eeqFRWNA
OCQFbJ/cLwSwWiNYCFfYGjC7lO55zUd+7Yeb2v2qqRq25JFlos1fO/HSSarfisiE
yxDJQkvJ7stYe6rOwltQMpR3c6BrE6PuITZxjoeFj26YMw+pWFO6Jn173d2V29T/
HQ+Z5Grb7YVYelczmCxvR1SyBnU6AzjQUeHOHvfFQ2ssd3HB92ulw2a9eT7LyVtP
PTxjSmGirSeFWTHEYMmCjabuMS20VqRZm36OR3b+jsEtn1efEoysPz1NXEf5FI7b
A4Y0cz/2A/Jz8Ymi+vCs3DMXGfYqjk7JK9CodmE0eWLiVl0VsmqFSALfMkw1rMfz
X/AW29Fj6i3wvsgR5Q96ZHjT5GKW/gV9YH7BEAINoiHseEyBm5482CdvIL1GsO5W
jgkwOVzPZF+OWEMAEQEAAc0YenVuZGEgPHp1bmRhbkBnbWFpbC5jb20+wsFUBBMB
CgB+AhsDBQkDwmcABQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAFiEE9glg2AsiQ4LK
jYMctWwgMW1ugnkFAmBDI9E/FIAAAAAAEgAkcHJvb2ZAbWV0YWNvZGUuYml6aHR0
cHM6Ly9tYXN0b2Rvbi56dW5kYS5uaW5qYS9AenVuZ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haic
r1uSIJnMF1+BS6gNLEksdp571vzXya+JXtwCQNWlUMOFLSZMLzHcZ2JntwGBOWcq
cYe1FmPirpyjRpjboqoOgo3EQMY+lWusWgqm8d/PndEBcuUNdSOHnBA+uwBI
=KnIR
-----END PGP PUBLIC KEY BLOCK-----

サブパケットは、追加したnotation、自己署名、消したnotation、消したnotation、サブキーの順になっている。消したnotationが消したことになっている鍵がやっぱりわからない。

$ curl -sL 'https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0xf60960d80b224382ca8d831cb56c20316d6e8279' | gpg --list-packets
# off=0 ctb=c6 tag=6 hlen=3 plen=397 new-ctb
:public key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: B56C20316D6E8279
# off=400 ctb=cd tag=13 hlen=2 plen=24 new-ctb
:user ID packet: "zunda <zundan@gmail.com>"
# off=426 ctb=c2 tag=2 hlen=3 plen=532 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1615012817, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 3c 74
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-03-06)
	hashed subpkt 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=961 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1614578740, md5len 0, sigclass 0x13
	digest algo 10, begin of digest b8 7f
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-03-01)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3071 bits]
# off=1432 ctb=c2 tag=2 hlen=3 plen=549 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1614578392, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 25 fa
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-03-01)
	hashed subpkt 20 len 79 (notation: proof@metacode.biz=https://twitter.com/zundan/status/1366266732046770176)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=1984 ctb=c2 tag=2 hlen=3 plen=532 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1613530821, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 95 3a
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2021-02-17)
	hashed subpkt 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=2519 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x13
	digest algo 10, begin of digest c9 94
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=2990 ctb=ce tag=14 hlen=3 plen=397 new-ctb
:public sub key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 164F21FF001C8CD1
# off=3390 ctb=c2 tag=2 hlen=3 plen=444 new-ctb
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x18
	digest algo 10, begin of digest 1b 4a
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3065 bits]

パケット自体には違いは見られない

--- alive.txt	2021-03-05 21:02:27.513472583 -1000
+++ dead.txt	2021-03-05 21:02:44.001090108 -1000
@@ -1,7 +1,7 @@
-# off=426 ctb=c2 tag=2 hlen=3 plen=532 new-ctb
+# off=1984 ctb=c2 tag=2 hlen=3 plen=532 new-ctb
 :signature packet: algo 1, keyid B56C20316D6E8279
-	version 4, created 1615012817, md5len 0, sigclass 0x13
-	digest algo 10, begin of digest 3c 74
+	version 4, created 1613530821, md5len 0, sigclass 0x13
+	digest algo 10, begin of digest 95 3a
 	hashed subpkt 27 len 1 (key flags: 03)
 	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
 	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
@@ -10,7 +10,7 @@
 	hashed subpkt 30 len 1 (features: 01)
 	hashed subpkt 23 len 1 (keyserver preferences: 80)
 	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
-	hashed subpkt 2 len 4 (sig created 2021-03-06)
+	hashed subpkt 2 len 4 (sig created 2021-02-17)
 	hashed subpkt 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
 	data: [3072 bits]

追加前の自己署名の1個目との比較。サブパケットの順序は違うが本質的な違いは見られないようだ。

--- without-notation-1.txt	2021-03-05 21:06:26.978442874 -1000
+++ with-notation.txt	2021-03-05 21:05:36.540133546 -1000
@@ -1,7 +1,9 @@
-# off=426 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
+# off=2519 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
 :signature packet: algo 1, keyid B56C20316D6E8279
-	version 4, created 1614578740, md5len 0, sigclass 0x13
-	digest algo 10, begin of digest b8 7f
+	version 4, created 1592976417, md5len 0, sigclass 0x13
+	digest algo 10, begin of digest c9 94
+	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
+	hashed subpkt 2 len 4 (sig created 2020-06-24)
 	hashed subpkt 27 len 1 (key flags: 03)
 	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
 	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
@@ -9,7 +11,5 @@
 	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
 	hashed subpkt 30 len 1 (features: 01)
 	hashed subpkt 23 len 1 (keyserver preferences: 80)
-	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
-	hashed subpkt 2 len 4 (sig created 2021-03-01)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
-	data: [3071 bits]
+	data: [3072 bits]

追加前の自己署名の2個目との比較。同じ。

$ diff -u without-notation-2.txt with-notation.txt 
--- without-notation-2.txt	2021-03-05 21:06:52.973541138 -1000
+++ with-notation.txt	2021-03-05 21:05:36.540133546 -1000
@@ -1,4 +1,4 @@
-# off=1984 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
+# off=2519 ctb=c2 tag=2 hlen=3 plen=468 new-ctb
 :signature packet: algo 1, keyid B56C20316D6E8279
 	version 4, created 1592976417, md5len 0, sigclass 0x13
 	digest algo 10, begin of digest c9 94

notation追加前の1個目の自己署名にnotationの削除に関して本質的な情報があるのだろうか。

zundazunda

キーサーバーからの公開鍵のダウンロード

別のマシンで試してみる。

$ gpg -vvv --recv-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: using character set 'utf-8'
gpg: keyserver receive failed: General error

あれれ?

$ gpg --refresh-keys
gpg: refreshing 5 keys from hkps://keys.openpgp.org
gpg: keyserver refresh failed: General error

おやや?

ローカルの鍵との間で解決できない矛盾があるのだろうか。

$ gpg --edit-key F60960D80B224382CA8D831CB56C20316D6E8279
gpg (GnuPG/MacGPG2) 2.2.24; Copyright (C) 2020 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Secret key is available.

sec  rsa3072/B56C20316D6E8279
     created: 2020-06-24  expires: 2022-06-24  usage: SC
     card-no: 0006 ********
     trust: ultimate      validity: ultimate
sub  rsa3072/164F21FF001C8CD1
     created: 2020-06-24  expires: 2022-06-24  usage: E
[ultimate] (1). zunda <zundan@gmail.com>

gpg> showpref
[ultimate] (1). zunda <zundan@gmail.com>
     Cipher: AES256, AES192, AES, 3DES
     AEAD:
     Digest: SHA512, SHA384, SHA256, SHA224, SHA1
     Compression: ZLIB, BZIP2, ZIP, Uncompressed
     Features: MDC, AEAD, Keyserver no-modify

gpg> quit
$ gpg --export --armor F60960D80B224382CA8D831CB56C20316D6E8279
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBF7y5CEBDADCBGI+RhNbXWjHOhIwBX9k1kxr6t/nTcec97vMNMxLYn3qxaWc
LsLEG/djjBbh3y/4GbJHeh6oMfA+OPfBfjkHL5tqaPx/Iw3kWuz1ZTd1eeqFRWNA
OCQFbJ/cLwSwWiNYCFfYGjC7lO55zUd+7Yeb2v2qqRq25JFlos1fO/HSSarfisiE
yxDJQkvJ7stYe6rOwltQMpR3c6BrE6PuITZxjoeFj26YMw+pWFO6Jn173d2V29T/
HQ+Z5Grb7YVYelczmCxvR1SyBnU6AzjQUeHOHvfFQ2ssd3HB92ulw2a9eT7LyVtP
PTxjSmGirSeFWTHEYMmCjabuMS20VqRZm36OR3b+jsEtn1efEoysPz1NXEf5FI7b
A4Y0cz/2A/Jz8Ymi+vCs3DMXGfYqjk7JK9CodmE0eWLiVl0VsmqFSALfMkw1rMfz
X/AW29Fj6i3wvsgR5Q96ZHjT5GKW/gV9YH7BEAINoiHseEyBm5482CdvIL1GsO5W
jgkwOVzPZF+OWEMAEQEAAbQYenVuZGEgPHp1bmRhbkBnbWFpbC5jb20+iQHUBBMB
Cg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TxR9SR3
d5AETNduWvOCmqw+2Pc+DeGtSMZmLn5+b7t9migFWp6evu4cNEfjd1E3vn8AEQEA
AYkBvAQYAQoAJhYhBPYJYNgLIkOCyo2DHLVsIDFtboJ5BQJe8uQhAhsMBQkDwmcA
AAoJELVsIDFtboJ5G0oL+QENb8F/UigU7ypIOvDptC3D8w+VNdtZJhute7wYfOUs
Niz/0DQ84FZmxdnA8oYSO7I+R8C4OG6ALtybVlGw+HkXy9TNSUUJBfy6RYXS8lbm
4dSzSMf8OY00tH9leRlBFsw9CKUXF2p8pv9einsyt3+eJSNueQ58wbViXmLLDWCD
hSm4Adyt5qC4SNGbMAcSUy31Nw11HcUWRrKDblaAGRIE8IIEibSYjU+03MgTyB24
8IxfcM7PWDHDUpLKdNy4zH4FtVPoRDgEOXgzMqf3rggX2clLfVgjxLxFW3NiBMYK
VlJvO50NCI/eADVP4/28gahj5PjbNTGoswvpeAEjMRGK54bQB3gAwXD83R+Yyklt
Aoyma0UoLmWQItBdVOylfh2onK9bkiCZzBdfgUuoDSxJLHaee9b818mviV7cAkDV
pVDDhS0mTC8x3GdiZ7cBgTlnKnGHtRZj4q6co0aY26KqDoKNxEDGPpVrrFoKpvHf
z53RAXLlDXUjh5wQPrsASA==
=ELpI
-----END PGP PUBLIC KEY BLOCK-----
$ gpg --export --armor F60960D80B224382CA8D831CB56C20316D6E8279 | gpg --list-packets
# off=0 ctb=99 tag=6 hlen=3 plen=397
:public key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: B56C20316D6E8279
# off=400 ctb=b4 tag=13 hlen=2 plen=24
:user ID packet: "zunda <zundan@gmail.com>"
# off=426 ctb=89 tag=2 hlen=3 plen=468
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x13
	digest algo 10, begin of digest c9 94
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (keyserver preferences: 80)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=897 ctb=b9 tag=14 hlen=3 plen=397
:public sub key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 164F21FF001C8CD1
# off=1297 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x18
	digest algo 10, begin of digest 1b 4a
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3065 bits]

YubiKeyが必要なのかもしれない…YubiKeyを挿入してもだめかあ。

デバグしながら。

$ cat .gnupg/gpg.conf
auto-key-retrieve
no-emit-version
verbose
debug ipc
log-file /tmp/gpg.log
$ gpg --recv-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: enabled debug flags: ipc
gpg: DBG: chan_3 <- # Home: /Users/zunda/.gnupg
gpg: DBG: chan_3 <- # Config: /Users/zunda/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.2.24 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.2.24
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS_GET -- 0xF60960D80B224382CA8D831CB56C20316D6E8279
gpg: DBG: chan_3 <- ERR 1 General error <Unspecified source>
gpg: keyserver receive failed: General error
gpg: DBG: chan_3 -> BYE
gpg: secmem usage: 0/32768 bytes in 0 blocks

ログファイルはみつけられなかった。Unspecifeid source?

$ gpg -vvv --recv-keys --keyserver hkps://keys.openpgp.org F60960D80B224382CA8D831CB56C20316D6E8279
gpg: using character set 'utf-8'
gpg: enabled debug flags: ipc
gpg: DBG: chan_3 <- # Home: /Users/zunda/.gnupg
gpg: DBG: chan_3 <- # Config: /Users/zunda/.gnupg/dirmngr.conf
gpg: DBG: chan_3 <- OK Dirmngr 2.2.24 at your service
gpg: DBG: connection to the dirmngr established
gpg: DBG: chan_3 -> GETINFO version
gpg: DBG: chan_3 <- D 2.2.24
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KEYSERVER --clear hkps://keys.openpgp.org
gpg: DBG: chan_3 <- OK
gpg: DBG: chan_3 -> KS
_GET -- 0xF60960D80B224382CA8D831CB56C20316D6E8279
gpg: DBG: chan_3 <- ERR 1 General error <Unspecified source>
gpg: keyserver receive failed: General error
gpg: DBG: chan_3 -> BYE
gpg: secmem usage: 0/32768 bytes in 0 blocks

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=860352

$ gpg-connect-agent --dirmngr 'keyserver --hosttable' /bye
S # hosttable (idx, ipv6, ipv4, dead, name, time):
S #   0 6 4   keys.openpgp.org ([2a00:c6c0:0:154:1::1])
OK

IPv6ではつないでないのにな。

$ killall dirmngr
$ gpg-connect-agent --dirmngr 'keyserver --hosttable' /bye
gpg-connect-agent: no running Dirmngr - starting '/usr/local/MacGPG2/bin/dirmngr'
gpg-connect-agent: waiting for the dirmngr to come up ... (5s)
gpg-connect-agent: connection to dirmngr established
S # hosttable (idx, ipv6, ipv4, dead, name, time):
OK
$ gpg --recv-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: keyserver receive failed: General error
$ gpg-connect-agent --dirmngr 'keyserver --hosttable' /bye
S # hosttable (idx, ipv6, ipv4, dead, name, time):
S #   0 6 4   keys.openpgp.org ([2a00:c6c0:0:154:1::1])
OK

ふむん。

$ dig keys.openpgp.org

; <<>> DiG 9.10.6 <<>> keys.openpgp.org
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 43315
;; flags: qr rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;keys.openpgp.org.		IN	A

;; ANSWER SECTION:
keys.openpgp.org.	3599	IN	A	37.218.245.50

;; Query time: 150 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Fri Mar 05 22:16:21 HST 2021
;; MSG SIZE  rcvd: 61

IPv6を有効にしても解決しない。

手元の鍵の問題ではないことは確認できた

$ mv .gnupg .gnupg.error
$ gpg --recv-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: directory '/Users/zunda/.gnupg' created
gpg: keybox '/Users/zunda/.gnupg/pubring.kbx' created
gpg: keyserver receive failed: General error
zundazunda

もいっちょ別のマシンンで

$ gpg2 --export --armor F60960D80B224382CA8D831CB56C20316D6E8279 | gpg2 --list-packets
# off=0 ctb=99 tag=6 hlen=3 plen=397
:public key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: B56C20316D6E8279
# off=400 ctb=b4 tag=13 hlen=2 plen=24
:user ID packet: "zunda <zundan@gmail.com>"
# off=426 ctb=89 tag=2 hlen=3 plen=468
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x13
	digest algo 10, begin of digest c9 94
	hashed subpkt 33 len 21 (?)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 03)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	hashed subpkt 11 len 4 (pref-sym-algos: 9 8 7 2)
	hashed subpkt 21 len 5 (pref-hash-algos: 10 9 8 11 2)
	hashed subpkt 22 len 3 (pref-zip-algos: 2 3 1)
	hashed subpkt 30 len 1 (features: 01)
	hashed subpkt 23 len 1 (key server preferences: 80)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3072 bits]
# off=897 ctb=b9 tag=14 hlen=3 plen=397
:public sub key packet:
	version 4, algo 1, created 1592976417, expires 0
	pkey[0]: [3072 bits]
	pkey[1]: [17 bits]
	keyid: 164F21FF001C8CD1
# off=1297 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1592976417, md5len 0, sigclass 0x18
	digest algo 10, begin of digest 1b 4a
	hashed subpkt 33 len 21 (?)
	hashed subpkt 2 len 4 (sig created 2020-06-24)
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3065 bits]
$ gpg2 --recv-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: keyserver receive failed: No keyserver available
$ gpg2 --recv-keys --keyserver hkps://keys.openpgp.org F60960D80B224382CA8D831CB56C20316D6E8279
gpg: keyserver receive failed: General error

おおっと。

$ mv .gnupg .gnupg.error
$ gpg2 --import Downloads/F60960D80B224382CA8D831CB56C20316D6E8279.asc 
gpg: /home/zunda/.gnupg/trustdb.gpg: trustdb created
gpg: key 6D6E8279: public key "zunda <zundan@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
$ gpg2 --refresh-keys
gpg: refreshing 1 key from hkp://keys.gnupg.net
gpg: keyserver refresh failed: No data
$ gpg2 --recv-keys --keyserver hkps://keys.openpgp.org F60960D80B224382CA8D831CB56C20316D6E8279
gpg: keyserver receive failed: General error
zundazunda

もう一度--recv-keysを試す

別のマシンでうまくいったのでGeneral errorで失敗するのは鍵の問題ではないだろう。

Ubuntu 18.04。

$ gpg --version
gpg (GnuPG) 2.2.4
libgcrypt 1.8.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Home: /home/zunda/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
        CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2
$ gpg --list-sigs F60960D80B224382CA8D831CB56C20316D6E8279
gpg: error reading key: No public key
$ cat t.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBF7y5CEBDADCBGI+RhNbXWjHOhIwBX9k1kxr6t/nTcec97vMNMxLYn3qxaWc
LsLEG/djjBbh3y/4GbJHeh6oMfA+OPfBfjkHL5tqaPx/Iw3kWuz1ZTd1eeqFRWNA
OCQFbJ/cLwSwWiNYCFfYGjC7lO55zUd+7Yeb2v2qqRq25JFlos1fO/HSSarfisiE
yxDJQkvJ7stYe6rOwltQMpR3c6BrE6PuITZxjoeFj26YMw+pWFO6Jn173d2V29T/
HQ+Z5Grb7YVYelczmCxvR1SyBnU6AzjQUeHOHvfFQ2ssd3HB92ulw2a9eT7LyVtP
PTxjSmGirSeFWTHEYMmCjabuMS20VqRZm36OR3b+jsEtn1efEoysPz1NXEf5FI7b
A4Y0cz/2A/Jz8Ymi+vCs3DMXGfYqjk7JK9CodmE0eWLiVl0VsmqFSALfMkw1rMfz
X/AW29Fj6i3wvsgR5Q96ZHjT5GKW/gV9YH7BEAINoiHseEyBm5482CdvIL1GsO5W
jgkwOVzPZF+OWEMAEQEAAbQYenVuZGEgPHp1bmRhbkBnbWFpbC5jb20+iQHUBBMB
CgA+FiEE9glg2AsiQ4LKjYMctWwgMW1ug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tSMZmLn5+b7t9migFWp6evu4cNEfjd1E3vn8AEQEA
AYkBvAQYAQoAJhYhBPYJYNgLIkOCyo2DHLVsIDFtboJ5BQJe8uQhAhsMBQkDwmcA
AAoJELVsIDFtboJ5G0oL+QENb8F/UigU7ypIOvDptC3D8w+VNdtZJhute7wYfOUs
Niz/0DQ84FZmxdnA8oYSO7I+R8C4OG6ALtybVlGw+HkXy9TNSUUJBfy6RYXS8lbm
4dSzSMf8OY00tH9leRlBFsw9CKUXF2p8pv9einsyt3+eJSNueQ58wbViXmLLDWCD
hSm4Adyt5qC4SNGbMAcSUy31Nw11HcUWRrKDblaAGRIE8IIEibSYjU+03MgTyB24
8IxfcM7PWDHDUpLKdNy4zH4FtVPoRDgEOXgzMqf3rggX2clLfVgjxLxFW3NiBMYK
VlJvO50NCI/eADVP4/28gahj5PjbNTGoswvpeAEjMRGK54bQB3gAwXD83R+Yyklt
Aoyma0UoLmWQItBdVOylfh2onK9bkiCZzBdfgUuoDSxJLHaee9b818mviV7cAkDV
pVDDhS0mTC8x3GdiZ7cBgTlnKnGHtRZj4q6co0aY26KqDoKNxEDGPpVrrFoKpvHf
z53RAXLlDXUjh5wQPrsASA==
=ELpI
-----END PGP PUBLIC KEY BLOCK-----
$ gpg --import t.asc
gpg: key B56C20316D6E8279: public key "zunda <zundan@gmail.com>" imported
gpg: Total number processed: 1
gpg:               imported: 1
$ gpg --recv-keys --keyserver hkps://keys.openpgp.org F60960D80B224382CA8D831CB56C20316D6E8279
gpg: key B56C20316D6E8279: "zunda <zundan@gmail.com>" 4 new signatures
gpg: Total number processed: 1
gpg:         new signatures: 4
このスクラップは2021/03/12にクローズされました