Closed8

OpenPGP鍵の有効期限を延長してみる

zundazunda

現状保存と確認

$ cp -pr .gnupg .gnupg-220527
$ gpg --list-keys
/home/zunda/.gnupg/pubring.kbx
------------------------------
pub   rsa3072 2020-06-24 [SC] [expires: 2022-06-24]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]
  :
$ gpg --fingerprint --fingerprint F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2022-06-24]
      F609 60D8 0B22 4382 CA8D  831C B56C 2031 6D6E 8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]
      CAE6 B476 3A84 A557 2636  25CE 164F 21FF 001C 8CD1

主鍵の証明書群

$ gpg --export 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=89 tag=2 hlen=3 plen=468
: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=2990 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=3390 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]

副鍵の証明書群。下記のコマンドの出力は上記と同一だった。--exportでは主副の公開鍵の両方が出力されるようだ。

$ gpg --export CAE6B4763A84A557263625CE164F21FF001C8CD1 | gpg --list-packets
  :

私有鍵の証明書群。下記のコマンドで、public key packetの代わりにsecret key packetが、public sub key packetの代わりにsecret sub key packetが出力された。

$ gpg --export-secret-keys F60960D80B224382CA8D831CB56C20316D6E8279 | gpg --list-packets
  :

それぞれのsecret key packetには、public key packetと比較して、

  • iter+salt
  • protect count
  • protect IV
  • skey[2]

が追加されている。

zundazunda

環境

Xubuntu 22.04


$ gpg --version
gpg (GnuPG) 2.2.27
libgcrypt 1.9.4
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-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
zundazunda

日付を指定して有効期間を延長する 1度目

鍵の有効期限を延長してみる。絶対時刻を指定できるようだ。コマンドを実行すると私有鍵のパスフレーズを聞かれる。

$ gpg --quick-set-expire F60960D80B224382CA8D831CB56C20316D6E8279 2024-06-15
$ gpg --quick-set-expire F60960D80B224382CA8D831CB56C20316D6E8279 2024-06-15 \*

延長後の証明書群

$ gpg --export 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 1653793674, md5len 0, sigclass 0x13
	digest algo 10, begin of digest ac 5e
	hashed subpkt 27 len 1 (key flags: 03)
	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 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 3y357d16h33m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3071 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=89 tag=2 hlen=3 plen=468
: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=2990 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=3390 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1653793739, md5len 0, sigclass 0x18
	digest algo 10, begin of digest f5 d0
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 3y357d16h33m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3071 bits]

延長前との差分。一部の証明書で署名が追加さ有効期限が変化している。

$ diff -u orig.txt extended.txt 
--- orig.txt	2022-05-28 17:10:30.940122463 -1000
+++ extended.txt	2022-05-28 17:10:07.895828848 -1000
@@ -8,20 +8,20 @@
 :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
+	version 4, created 1653793674, md5len 0, sigclass 0x13
+	digest algo 10, begin of digest ac 5e
 	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)
+	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
+	hashed subpkt 2 len 4 (sig created 2022-05-29)
+	hashed subpkt 9 len 4 (key expires after 3y357d16h33m)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
-	data: [3072 bits]
+	data: [3071 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
@@ -92,11 +92,11 @@
 	keyid: 164F21FF001C8CD1
 # off=3390 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)
+	version 4, created 1653793739, md5len 0, sigclass 0x18
+	digest algo 10, begin of digest f5 d0
 	hashed subpkt 27 len 1 (key flags: 0C)
-	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
+	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
+	hashed subpkt 2 len 4 (sig created 2022-05-29)
+	hashed subpkt 9 len 4 (key expires after 3y357d16h33m)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
-	data: [3065 bits]
+	data: [3071 bits]

延長後の最初のgpgコマンドの実行でWoTの更新も起きたようだ。

$ gpg --fingerprint --fingerprint F60960D80B224382CA8D831CB56C20316D6E8279
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   2  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   2  signed:   0  trust: 2-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2024-06-15
pub   rsa3072 2020-06-24 [SC] [expires: 2024-06-15]
      F609 60D8 0B22 4382 CA8D  831C B56C 2031 6D6E 8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2024-06-15]
      CAE6 B476 3A84 A557 2636  25CE 164F 21FF 001C 8CD1

二度目にはWoTの更新は見られなかった。

$ gpg --fingerprint --fingerprint F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2024-06-15]
      F609 60D8 0B22 4382 CA8D  831C B56C 2031 6D6E 8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2024-06-15]
      CAE6 B476 3A84 A557 2636  25CE 164F 21FF 001C 8CD1

notationのサブパケットには有効期限の延長は起きていないが、そもそも有効期限は設定されないのかな?

$ gpg --list-keys F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2024-06-15]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2024-06-15]
$ gpg --check-sigs --list-options show-notations F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2024-06-15]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sig!3    N   B56C20316D6E8279 2022-05-29  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
sig!3        B56C20316D6E8279 2021-03-01  zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2024-06-15]
sig!         B56C20316D6E8279 2022-05-29  zunda <zundan@gmail.com>

gpg: 6 good signatures
zundazunda

時間の長さを指定して有効期間を延長

巷の記事では相対時刻で有効期間を延長してる例が多い。コマンドの実行時からの相対時刻と思い込んでいたが、現在の有効期限からの相対時刻かもしれない。鍵束をロールバックして試してみる。- コマンド実行時からの相対時刻だった。絶対時刻で延長した方が次回の延長を同時期にできる点で楽だろう。

$ mv .gnupg .gnupg-20220528-after-abs-extend
$ cp -pr .gnupg-220527 .gnupg
$ 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
sig!3        B56C20316D6E8279 2021-03-01  zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]
sig!         B56C20316D6E8279 2020-06-24  zunda <zundan@gmail.com>

gpg: 6 good signatures

まず主鍵。有効期限は現在時刻が起点ですね。

$ gpg --quick-set-expire F60960D80B224382CA8D831CB56C20316D6E8279 2y
$ gpg --check-sigs --list-options show-notations F60960D80B224382CA8D831CB56C20316D6E8279
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   2  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   2  signed:   0  trust: 2-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2024-05-28
pub   rsa3072 2020-06-24 [SC] [expires: 2024-05-28]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sig!3    N   B56C20316D6E8279 2022-05-29  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
sig!3        B56C20316D6E8279 2021-03-01  zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]
sig!         B56C20316D6E8279 2020-06-24  zunda <zundan@gmail.com>

gpg: 6 good signatures
$ gpg --list-keys F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2024-05-28]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]

$ date
Sat May 28 05:35:53 PM HST 2022

パケットの確認

$ gpg --export 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 1653795246, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 6e 2c
	hashed subpkt 27 len 1 (key flags: 03)
	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 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 3y338d22h7m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3067 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=89 tag=2 hlen=3 plen=468
: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=2990 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=3390 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]
$ diff -u orig.txt prim-only.txt 
--- orig.txt	2022-05-28 17:10:30.940122463 -1000
+++ prim-only.txt	2022-05-28 17:37:04.573345417 -1000
@@ -8,20 +8,20 @@
 :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
+	version 4, created 1653795246, md5len 0, sigclass 0x13
+	digest algo 10, begin of digest 6e 2c
 	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)
+	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
+	hashed subpkt 2 len 4 (sig created 2022-05-29)
+	hashed subpkt 9 len 4 (key expires after 3y338d22h7m)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
-	data: [3072 bits]
+	data: [3067 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

副鍵の延長

$ gpg --quick-set-expire F60960D80B224382CA8D831CB56C20316D6E8279 2y \*
$ gpg --list-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   2  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   2  signed:   0  trust: 2-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2024-05-28
pub   rsa3072 2020-06-24 [SC] [expires: 2024-05-28]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2024-05-28]

$ gpg --export 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 1653795246, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 6e 2c
	hashed subpkt 27 len 1 (key flags: 03)
	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 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 3y338d22h7m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3067 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=89 tag=2 hlen=3 plen=468
: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=2990 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=3390 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1653795657, md5len 0, sigclass 0x18
	digest algo 10, begin of digest 55 00
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 3y338d22h14m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3068 bits]
$ diff -u orig.txt rel.txt 
--- orig.txt	2022-05-28 17:10:30.940122463 -1000
+++ rel.txt	2022-05-28 17:43:23.333903846 -1000
@@ -8,20 +8,20 @@
 :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
+	version 4, created 1653795246, md5len 0, sigclass 0x13
+	digest algo 10, begin of digest 6e 2c
 	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)
+	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
+	hashed subpkt 2 len 4 (sig created 2022-05-29)
+	hashed subpkt 9 len 4 (key expires after 3y338d22h7m)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
-	data: [3072 bits]
+	data: [3067 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
@@ -92,11 +92,11 @@
 	keyid: 164F21FF001C8CD1
 # off=3390 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)
+	version 4, created 1653795657, md5len 0, sigclass 0x18
+	digest algo 10, begin of digest 55 00
 	hashed subpkt 27 len 1 (key flags: 0C)
-	hashed subpkt 9 len 4 (key expires after 2y0d0h0m)
+	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
+	hashed subpkt 2 len 4 (sig created 2022-05-29)
+	hashed subpkt 9 len 4 (key expires after 3y338d22h14m)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
-	data: [3065 bits]
+	data: [3068 bits]
zundazunda

日付を指定して延長

ロールバックして絶対時刻で延長してみよう。

$ mv .gnupg .gnupg-20220528-after-rel-extend
$ cp -pr .gnupg-220527 .gnupg
$ gpg --list-keys F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2022-06-24]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]

$ gpg --list-secret-keys F60960D80B224382CA8D831CB56C20316D6E8279
sec   rsa3072 2020-06-24 [SC] [expires: 2022-06-24]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
ssb   rsa3072 2020-06-24 [E] [expires: 2022-06-24]

下記の最初のgpgコマンドで私有鍵のパスフレーズを聞かれる。

$ gpg --quick-set-expire F60960D80B224382CA8D831CB56C20316D6E8279 2024-06-25
$ gpg --quick-set-expire F60960D80B224382CA8D831CB56C20316D6E8279 2024-06-25 \*
$ gpg --list-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: checking the trustdb
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:   2  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:   2  signed:   0  trust: 2-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2024-06-25
pub   rsa3072 2020-06-24 [SC] [expires: 2024-06-25]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2024-06-25]

$ gpg --list-secret-keys F60960D80B224382CA8D831CB56C20316D6E8279
sec   rsa3072 2020-06-24 [SC] [expires: 2024-06-25]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ultimate] zunda <zundan@gmail.com>
ssb   rsa3072 2020-06-24 [E] [expires: 2024-06-25]

パケットの確認

$ gpg --export 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 1653796546, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 5f d3
	hashed subpkt 27 len 1 (key flags: 03)
	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 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 4y2d16h33m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3069 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=89 tag=2 hlen=3 plen=468
: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=2990 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=3390 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1653796554, md5len 0, sigclass 0x18
	digest algo 10, begin of digest aa 6e
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 4y2d16h33m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3070 bits]

sqコマンドによるダンプの方がみやすいかもしれない

$ gpg --export F60960D80B224382CA8D831CB56C20316D6E8279 | sq packet dump
Public-Key Packet, old CTB, 397 bytes
    Version: 4
    Creation time: 2020-06-24 05:26:57 UTC
    Pk algo: RSA (Encrypt or Sign)
    Pk size: 3072 bits
    Fingerprint: F60960D80B224382CA8D831CB56C20316D6E8279
    KeyID: B56C20316D6E8279
  
User ID Packet, old CTB, 24 bytes
    Value: zunda <zundan@gmail.com>
  
Signature Packet, old CTB, 532 bytes
    Version: 4
    Type: PositiveCertification
    Pk algo: RSA (Encrypt or Sign)
    Hash algo: SHA512
    Hashed area:
      Key flags: CS
      Symmetric algo preferences: AES256, AES192, AES128, TripleDES
      Hash preferences: SHA512, SHA384, SHA256, SHA224, SHA1
      Compression preferences: Zlib, BZip2, Zip
      Features: MDC
      Keyserver preferences: no modify
      Notation: proof@metacode.biz (human readable): https://mastodon.zunda.ninja/@zundan
      Issuer Fingerprint: F60960D80B224382CA8D831CB56C20316D6E8279
      Signature creation time: 2022-05-29 03:55:46 UTC
      Key expiration time: P1462DT59583S
    Unhashed area:
      Issuer: B56C20316D6E8279
    Digest prefix: 5FD3
    Level: 0 (signature over data)
  
Signature Packet, old CTB, 532 bytes
    Version: 4
    Type: PositiveCertification
    Pk algo: RSA (Encrypt or Sign)
    Hash algo: SHA512
    Hashed area:
      Key flags: CS
      Key expiration time: P730D
      Symmetric algo preferences: AES256, AES192, AES128, TripleDES
      Hash preferences: SHA512, SHA384, SHA256, SHA224, SHA1
      Compression preferences: Zlib, BZip2, Zip
      Features: MDC
      Keyserver preferences: no modify
      Issuer Fingerprint: F60960D80B224382CA8D831CB56C20316D6E8279
      Signature creation time: 2021-02-17 03:00:21 UTC
      Notation: proof@metacode.biz (human readable): https://mastodon.zunda.ninja/@zundan
    Unhashed area:
      Issuer: B56C20316D6E8279
    Digest prefix: 953A
    Level: 0 (signature over data)
  
Signature Packet, old CTB, 468 bytes
    Version: 4
    Type: PositiveCertification
    Pk algo: RSA (Encrypt or Sign)
    Hash algo: SHA512
    Hashed area:
      Issuer Fingerprint: F60960D80B224382CA8D831CB56C20316D6E8279
      Signature creation time: 2020-06-24 05:26:57 UTC
      Key flags: CS
      Key expiration time: P730D
      Symmetric algo preferences: AES256, AES192, AES128, TripleDES
      Hash preferences: SHA512, SHA384, SHA256, SHA224, SHA1
      Compression preferences: Zlib, BZip2, Zip
      Features: MDC
      Keyserver preferences: no modify
    Unhashed area:
      Issuer: B56C20316D6E8279
    Digest prefix: C994
    Level: 0 (signature over data)
  
Signature Packet, old CTB, 549 bytes
    Version: 4
    Type: PositiveCertification
    Pk algo: RSA (Encrypt or Sign)
    Hash algo: SHA512
    Hashed area:
      Key flags: CS
      Key expiration time: P730D
      Symmetric algo preferences: AES256, AES192, AES128, TripleDES
      Hash preferences: SHA512, SHA384, SHA256, SHA224, SHA1
      Compression preferences: Zlib, BZip2, Zip
      Features: MDC
      Keyserver preferences: no modify
      Issuer Fingerprint: F60960D80B224382CA8D831CB56C20316D6E8279
      Signature creation time: 2021-03-01 05:59:52 UTC
      Notation: proof@metacode.biz (human readable): https://twitter.com/zundan/status/1366266732046770176
    Unhashed area:
      Issuer: B56C20316D6E8279
    Digest prefix: 25FA
    Level: 0 (signature over data)
  
Signature Packet, old CTB, 468 bytes
    Version: 4
    Type: PositiveCertification
    Pk algo: RSA (Encrypt or Sign)
    Hash algo: SHA512
    Hashed area:
      Key flags: CS
      Key expiration time: P730D
      Symmetric algo preferences: AES256, AES192, AES128, TripleDES
      Hash preferences: SHA512, SHA384, SHA256, SHA224, SHA1
      Compression preferences: Zlib, BZip2, Zip
      Features: MDC
      Keyserver preferences: no modify
      Issuer Fingerprint: F60960D80B224382CA8D831CB56C20316D6E8279
      Signature creation time: 2021-03-01 06:05:40 UTC
    Unhashed area:
      Issuer: B56C20316D6E8279
    Digest prefix: B87F
    Level: 0 (signature over data)
  
Public-Subkey Packet, old CTB, 397 bytes
    Version: 4
    Creation time: 2020-06-24 05:26:57 UTC
    Pk algo: RSA (Encrypt or Sign)
    Pk size: 3072 bits
    Fingerprint: CAE6B4763A84A557263625CE164F21FF001C8CD1
    KeyID: 164F21FF001C8CD1
  
Signature Packet, old CTB, 444 bytes
    Version: 4
    Type: SubkeyBinding
    Pk algo: RSA (Encrypt or Sign)
    Hash algo: SHA512
    Hashed area:
      Key flags: EtEr
      Issuer Fingerprint: F60960D80B224382CA8D831CB56C20316D6E8279
      Signature creation time: 2022-05-29 03:55:54 UTC
      Key expiration time: P1462DT59583S
    Unhashed area:
      Issuer: B56C20316D6E8279
    Digest prefix: AA6E
    Level: 0 (signature over data)
  

公開

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

有効期限のタイムゾーン

RFC 4880より、signature packetのsubpacketでは、

  • 2 = Signature Creation Time
  • 9 = Key Expiration Time

が規定されている。

off=426とoff=3390のsignature packetの両方で、

  • hashed subpkt 2 len 4 (sig created 2022-05-29)
  • hashed subpkt 9 len 4 (key expires after 4y2d16h33m)

となっている。sq packet dumpによると

  • Signature creation time: 2022-05-29 03:55:46 UTC
  • Key expiration time: P1462DT59583S

となっている。

public-key packetでは、

  • A four-octet number denoting the time that the key was created

が規定されている。gpg --list-packetsによると、off=0とoff=2990の(sub) key packetで、

  • created 1592976417

これはUNIX時刻のようだ。

Time.at(1592976417).utc
#=> 2020-06-24 05:26:57 UTC

sq packet dumpによると

  • Public-Key/Public-Subkey Creation time: 2020-06-24 05:26:57 UTC

となっている。

gpg --quick-set-expireで指定するのはローカル時刻の正午のようだ。

Time.at(1592976417).utc + (1462*24*3600 + 59583)
#=> 2024-06-25 22:00:00 UTC
Time.at(1592976417) + (1462*24*3600 + 59583)
#=> 2024-06-25 12:00:00 -1000
zundazunda

別のマシンで確認しながら鍵サーバとやりとりする

$ gpg --recv-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: keyserver receive failed: Server indicated a failure

あれれ?サーバの指定が必要だった。

$ gpg --recv-keys --keyserver keys.openpgp.org F60960D80B224382CA8D831CB56C20316D6E8279
gpg: key B56C20316D6E8279: "zunda <zundan@gmail.com>" not changed
gpg: Total number processed: 1
gpg:              unchanged: 1
$ gpg --list-keys F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2022-06-24]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ unknown] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2022-06-24]

パケットの確認

$ gpg --export 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=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=1432 ctb=89 tag=2 hlen=3 plen=468
: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=1903 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=2455 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=2990 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=3390 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]

キーサーバからの更新。--refresh-keysを使うべきかな。

$ gpg --refresh-keys F60960D80B224382CA8D831CB56C20316D6E8279
gpg: refreshing 1 key from hkps://hkps.pool.sks-keyservers.net
gpg: keyserver refresh failed: Server indicated a failure
$ gpg --refresh-keys --keyserver keys.openpgp.org F60960D80B224382CA8D831CB56C20316D6E8279
gpg: refreshing 1 key from hkp://keys.openpgp.org
gpg: key B56C20316D6E8279: "zunda <zundan@gmail.com>" 2 new signatures
gpg: Total number processed: 1
gpg:         new signatures: 2

更新後の状況

$ gpg --list-keys F60960D80B224382CA8D831CB56C20316D6E8279
pub   rsa3072 2020-06-24 [SC] [expires: 2024-06-25]
      F60960D80B224382CA8D831CB56C20316D6E8279
uid           [ unknown] zunda <zundan@gmail.com>
sub   rsa3072 2020-06-24 [E] [expires: 2024-06-25]

$ gpg --edit-key F60960D80B224382CA8D831CB56C20316D6E8279
gpg (GnuPG) 2.2.4; Copyright (C) 2017 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: 2024-06-25  usage: SC  
     card-no: 0006 13460590
     trust: ultimate      validity: unknown
ssb  rsa3072/164F21FF001C8CD1
     created: 2020-06-24  expires: 2024-06-25  usage: E   
     card-no: 0006 13460590
[ unknown] (1). zunda <zundan@gmail.com>

gpg> showpref
[ unknown] (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
$ gpg --export 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=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=1432 ctb=89 tag=2 hlen=3 plen=468
: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=1903 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=2455 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=2990 ctb=89 tag=2 hlen=3 plen=532
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1653796546, md5len 0, sigclass 0x13
	digest algo 10, begin of digest 5f d3
	hashed subpkt 27 len 1 (key flags: 03)
	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 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 4y2d16h33m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3069 bits]
# off=3525 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=3925 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]
# off=4372 ctb=89 tag=2 hlen=3 plen=444
:signature packet: algo 1, keyid B56C20316D6E8279
	version 4, created 1653796554, md5len 0, sigclass 0x18
	digest algo 10, begin of digest aa 6e
	hashed subpkt 27 len 1 (key flags: 0C)
	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
	hashed subpkt 2 len 4 (sig created 2022-05-29)
	hashed subpkt 9 len 4 (key expires after 4y2d16h33m)
	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
	data: [3070 bits]
zundazunda

元のパケットと公開鍵サーバを通したパケットの差分

$ diff -u orig.txt through-server.txt 
--- orig.txt	2022-05-29 18:17:21.888642618 -1000
+++ through-server.txt	2022-05-29 18:17:58.873126161 -1000
@@ -6,26 +6,25 @@
 	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
+# off=426 ctb=89 tag=2 hlen=3 plen=468
 :signature packet: algo 1, keyid B56C20316D6E8279
-	version 4, created 1653796546, md5len 0, sigclass 0x13
-	digest algo 10, begin of digest 5f d3
+	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)
-	hashed subpkt 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
-	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
-	hashed subpkt 2 len 4 (sig created 2022-05-29)
-	hashed subpkt 9 len 4 (key expires after 4y2d16h33m)
 	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
-	data: [3069 bits]
-# off=961 ctb=89 tag=2 hlen=3 plen=532
+	data: [3072 bits]
+# off=897 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
+	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)
@@ -34,16 +33,14 @@
 	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 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=1496 ctb=89 tag=2 hlen=3 plen=468
+# off=1432 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)
+	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)
@@ -51,9 +48,11 @@
 	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: [3072 bits]
-# off=1967 ctb=89 tag=2 hlen=3 plen=549
+	data: [3071 bits]
+# off=1903 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
@@ -69,10 +68,10 @@
 	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=89 tag=2 hlen=3 plen=468
+# off=2455 ctb=89 tag=2 hlen=3 plen=532
 :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 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)
@@ -81,16 +80,43 @@
 	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 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: [3071 bits]
-# off=2990 ctb=b9 tag=14 hlen=3 plen=397
+	data: [3072 bits]
+# off=2990 ctb=89 tag=2 hlen=3 plen=532
+:signature packet: algo 1, keyid B56C20316D6E8279
+	version 4, created 1653796546, md5len 0, sigclass 0x13
+	digest algo 10, begin of digest 5f d3
+	hashed subpkt 27 len 1 (key flags: 03)
+	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 20 len 62 (notation: proof@metacode.biz=https://mastodon.zunda.ninja/@zundan)
+	hashed subpkt 33 len 21 (issuer fpr v4 F60960D80B224382CA8D831CB56C20316D6E8279)
+	hashed subpkt 2 len 4 (sig created 2022-05-29)
+	hashed subpkt 9 len 4 (key expires after 4y2d16h33m)
+	subpkt 16 len 8 (issuer key ID B56C20316D6E8279)
+	data: [3069 bits]
+# off=3525 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=3390 ctb=89 tag=2 hlen=3 plen=444
+# off=3925 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]
+# off=4372 ctb=89 tag=2 hlen=3 plen=444
 :signature packet: algo 1, keyid B56C20316D6E8279
 	version 4, created 1653796554, md5len 0, sigclass 0x18
 	digest algo 10, begin of digest aa 6e
このスクラップは2022/05/30にクローズされました