Codebase list pgpdump / upstream/0.34
New upstream version 0.34 Daniel Kahn Gillmor 2 years ago
32 changed file(s) with 859 addition(s) and 11 deletion(s). Raw diff Collapse all Expand all
00 Change Log
1
2 0.34 2021/12/07
3
4 * Uploading modifications to support GnuPG-2.3.3 ECC curves, additional hash and algorithm names.
5 https://github.com/kazu-yamamoto/pgpdump/pull/32
6 * Improved labels for Literal Data Packet fields.
7 https://github.com/kazu-yamamoto/pgpdump/pull/29
8 * Indicate unknown sigtype value is displayed in hex.
9 https://github.com/kazu-yamamoto/pgpdump/pull/27
10 * Fixing cross-building and avoiding infinite loop when invoking BZ2_bzDecompress.
11 https://github.com/kazu-yamamoto/pgpdump/pull/25
112
213 0.33 2018/05/07
314
44 LIBS = @LIBS@
55 CFLAGS = @CFLAGS@ -O -Wall
66 LDFLAGS = @LDFLAGS@
7 CC = @CC@
78 VERSION = `git tag | tail -1 | sed -e 's/v//'`
89
910 RM = rm -f
275275 while (bz.avail_out != 0) {
276276 if (bz.avail_in == 0) {
277277 size = (*d_func2)(d_buf2, sizeof(d_buf2));
278 if (size == 0)
279 warn_exit("bzip2 no data for BZ2_bzDecompress");
278280 bz.next_in = (cast_t)d_buf2;
279281 bz.avail_in = size;
280282 }
0 Old: Public Key Packet(tag 6)(397 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:04:17 UTC 2021
3 Pub alg - RSA Encrypt or Sign(pub 1)
4 RSA n(3072 bits) - ...
5 RSA e(17 bits) - ...
6 Old: User ID Packet(tag 13)(29 bytes)
7 User ID - (gpg-2.3.3_rsa_dsa_test_key)
8 Old: Signature Packet(tag 2)(465 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - RSA Encrypt or Sign(pub 1)
12 Hash alg - SHA256(hash 8)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - fb 8a 1b 1a e9 5b 82 66 63 8f f7 5b 0b 4b 30 cd 79 26 1d 66
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:04:17 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0x0B4B30CD79261D66
43 Hash left 2 bytes - ca 51
44 RSA m^d mod n(3071 bits) - ...
45 -> PKCS-1
46 Old: Public Subkey Packet(tag 14)(397 bytes)
47 Ver 4 - new
48 Public key creation time - Mon Nov 29 09:04:17 UTC 2021
49 Pub alg - RSA Encrypt or Sign(pub 1)
50 RSA n(3072 bits) - ...
51 RSA e(17 bits) - ...
52 Old: Signature Packet(tag 2)(438 bytes)
53 Ver 4 - new
54 Sig type - Subkey Binding Signature(0x18).
55 Pub alg - RSA Encrypt or Sign(pub 1)
56 Hash alg - SHA256(hash 8)
57 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
58 v4 - Fingerprint - fb 8a 1b 1a e9 5b 82 66 63 8f f7 5b 0b 4b 30 cd 79 26 1d 66
59 Hashed Sub: signature creation time(sub 2)(4 bytes)
60 Time - Mon Nov 29 09:04:17 UTC 2021
61 Hashed Sub: key flags(sub 27)(1 bytes)
62 Flag - This key may be used to encrypt communications
63 Flag - This key may be used to encrypt storage
64 Sub: issuer key ID(sub 16)(8 bytes)
65 Key ID - 0x0B4B30CD79261D66
66 Hash left 2 bytes - 19 3c
67 RSA m^d mod n(3071 bits) - ...
68 -> PKCS-1
55 Key ID - 0xFD90DA9732D8EBD2
66 Next packet - other than one pass signature
77 Old: Literal Data Packet(tag 11)(45 bytes)
8 Format - binary
8 Packet data format - binary
99 Filename - hoge
10 File modified time - Fri Nov 27 16:11:39 UTC 1998
10 Creation time - Fri Nov 27 16:11:39 UTC 1998
1111 Literal - ...
1212 Old: Signature Packet(tag 2)(70 bytes)
1313 Ver 4 - new
0 Old: Public Key Packet(tag 6)(814 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:10:26 UTC 2021
3 Pub alg - DSA Digital Signature Algorithm(pub 17)
4 DSA p(2048 bits) - ...
5 DSA q(256 bits) - ...
6 DSA g(2045 bits) - ...
7 DSA y(2047 bits) - ...
8 Old: User ID Packet(tag 13)(30 bytes)
9 User ID - (gpg233_dsa_elgamal_test_key)
10 Old: Signature Packet(tag 2)(147 bytes)
11 Ver 4 - new
12 Sig type - Positive certification of a User ID and Public Key packet(0x13).
13 Pub alg - DSA Digital Signature Algorithm(pub 17)
14 Hash alg - SHA256(hash 8)
15 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
16 v4 - Fingerprint - 5c 21 fd a0 cc e0 a3 7f c9 54 44 bf 76 ad b4 fa 9b 29 56 0f
17 Hashed Sub: signature creation time(sub 2)(4 bytes)
18 Time - Mon Nov 29 09:10:26 UTC 2021
19 Hashed Sub: key flags(sub 27)(1 bytes)
20 Flag - This key may be used to certify other keys
21 Flag - This key may be used to sign data
22 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
23 Sym alg - AES with 256-bit key(sym 9)
24 Sym alg - AES with 192-bit key(sym 8)
25 Sym alg - AES with 128-bit key(sym 7)
26 Sym alg - Triple-DES(sym 2)
27 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
28 AEAD alg - OCB(aead 2)
29 AEAD alg - EAX(aead 1)
30 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
31 Hash alg - SHA512(hash 10)
32 Hash alg - SHA384(hash 9)
33 Hash alg - SHA256(hash 8)
34 Hash alg - SHA224(hash 11)
35 Hash alg - SHA1(hash 2)
36 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
37 Comp alg - ZLIB <RFC1950>(comp 2)
38 Comp alg - ZIP <RFC1951>(comp 1)
39 Hashed Sub: features(sub 30)(1 bytes)
40 Flag - Modification detection (packets 18 and 19)
41 Hashed Sub: key server preferences(sub 23)(1 bytes)
42 Flag - No-modify
43 Sub: issuer key ID(sub 16)(8 bytes)
44 Key ID - 0x76ADB4FA9B29560F
45 Hash left 2 bytes - f3 5d
46 DSA r(255 bits) - ...
47 DSA s(252 bits) - ...
48 -> hash(DSA q bits)
49 Old: Public Subkey Packet(tag 14)(525 bytes)
50 Ver 4 - new
51 Public key creation time - Mon Nov 29 09:10:26 UTC 2021
52 Pub alg - ElGamal Encrypt-Only(pub 16)
53 ElGamal p(2048 bits) - ...
54 ElGamal g(3 bits) - ...
55 ElGamal y(2047 bits) - ...
56 Old: Signature Packet(tag 2)(120 bytes)
57 Ver 4 - new
58 Sig type - Subkey Binding Signature(0x18).
59 Pub alg - DSA Digital Signature Algorithm(pub 17)
60 Hash alg - SHA256(hash 8)
61 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
62 v4 - Fingerprint - 5c 21 fd a0 cc e0 a3 7f c9 54 44 bf 76 ad b4 fa 9b 29 56 0f
63 Hashed Sub: signature creation time(sub 2)(4 bytes)
64 Time - Mon Nov 29 09:10:26 UTC 2021
65 Hashed Sub: key flags(sub 27)(1 bytes)
66 Flag - This key may be used to encrypt communications
67 Flag - This key may be used to encrypt storage
68 Sub: issuer key ID(sub 16)(8 bytes)
69 Key ID - 0x76ADB4FA9B29560F
70 Hash left 2 bytes - d2 27
71 DSA r(255 bits) - ...
72 DSA s(254 bits) - ...
73 -> hash(DSA q bits)
0 Old: Public Key Packet(tag 6)(83 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:27:41 UTC 2021
3 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
4 Elliptic Curve - brainpoolP256r1 (0x2B 24 03 03 02 08 01 01 07)
5 ECDSA Q(515 bits) - ...
6 Old: User ID Packet(tag 13)(51 bytes)
7 User ID - (gpg233_ecc_sign_encrypt_Brainpool_P-256_test-key)
8 Old: Signature Packet(tag 2)(147 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
12 Hash alg - SHA256(hash 8)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - de 7d e3 95 a3 c2 23 6b ec 46 50 e6 e0 47 66 c3 f7 19 d1 cb
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:27:41 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0xE04766C3F719D1CB
43 Hash left 2 bytes - 6c 63
44 ECDSA r(255 bits) - ...
45 ECDSA s(253 bits) - ...
46 Old: Public Subkey Packet(tag 14)(87 bytes)
47 Ver 4 - new
48 Public key creation time - Mon Nov 29 09:27:41 UTC 2021
49 Pub alg - ECDH Elliptic Curve Diffie-Hellman Algorithm(pub 18)
50 Elliptic Curve - brainpoolP256r1 (0x2B 24 03 03 02 08 01 01 07)
51 ECDH Q(515 bits) - ...
52 ECDH KDF params(32 bits) - ...
53 KDFhashID: Hash alg - SHA256(hash 8)
54 KDFsymAlgoID: Sym alg - AES with 128-bit key(sym 7)
55 Old: Signature Packet(tag 2)(120 bytes)
56 Ver 4 - new
57 Sig type - Subkey Binding Signature(0x18).
58 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
59 Hash alg - SHA256(hash 8)
60 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
61 v4 - Fingerprint - de 7d e3 95 a3 c2 23 6b ec 46 50 e6 e0 47 66 c3 f7 19 d1 cb
62 Hashed Sub: signature creation time(sub 2)(4 bytes)
63 Time - Mon Nov 29 09:27:41 UTC 2021
64 Hashed Sub: key flags(sub 27)(1 bytes)
65 Flag - This key may be used to encrypt communications
66 Flag - This key may be used to encrypt storage
67 Sub: issuer key ID(sub 16)(8 bytes)
68 Key ID - 0xE04766C3F719D1CB
69 Hash left 2 bytes - 44 93
70 ECDSA r(256 bits) - ...
71 ECDSA s(255 bits) - ...
0 Old: Public Key Packet(tag 6)(51 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:20:17 UTC 2021
3 Pub alg - EdDSA Edwards-curve Digital Signature Algorithm(pub 22)
4 Elliptic Curve - Ed25519 (0x2B 06 01 04 01 DA 47 0F 01)
5 EdDSA Q(263 bits) - ...
6 Old: User ID Packet(tag 13)(46 bytes)
7 User ID - (gpg233_ecc_sign_encrypt_Curve25519_test_key)
8 Old: Signature Packet(tag 2)(147 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - EdDSA Edwards-curve Digital Signature Algorithm(pub 22)
12 Hash alg - SHA512(hash 10)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - ab c4 6a 75 a9 04 9b 4e 44 06 36 8c 4b d0 54 0d 9b b6 bd 4d
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:20:17 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0x4BD0540D9BB6BD4D
43 Hash left 2 bytes - da 44
44 EdDSA R(256 bits) - ...
45 EdDSA s(256 bits) - ...
46 Old: Public Subkey Packet(tag 14)(56 bytes)
47 Ver 4 - new
48 Public key creation time - Mon Nov 29 09:20:17 UTC 2021
49 Pub alg - ECDH Elliptic Curve Diffie-Hellman Algorithm(pub 18)
50 Elliptic Curve - Curve25519 (0x2B 06 01 04 01 97 55 01 05 01)
51 ECDH Q(263 bits) - ...
52 ECDH KDF params(32 bits) - ...
53 KDFhashID: Hash alg - SHA256(hash 8)
54 KDFsymAlgoID: Sym alg - AES with 128-bit key(sym 7)
55 Old: Signature Packet(tag 2)(120 bytes)
56 Ver 4 - new
57 Sig type - Subkey Binding Signature(0x18).
58 Pub alg - EdDSA Edwards-curve Digital Signature Algorithm(pub 22)
59 Hash alg - SHA512(hash 10)
60 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
61 v4 - Fingerprint - ab c4 6a 75 a9 04 9b 4e 44 06 36 8c 4b d0 54 0d 9b b6 bd 4d
62 Hashed Sub: signature creation time(sub 2)(4 bytes)
63 Time - Mon Nov 29 09:20:17 UTC 2021
64 Hashed Sub: key flags(sub 27)(1 bytes)
65 Flag - This key may be used to encrypt communications
66 Flag - This key may be used to encrypt storage
67 Sub: issuer key ID(sub 16)(8 bytes)
68 Key ID - 0x4BD0540D9BB6BD4D
69 Hash left 2 bytes - 01 76
70 EdDSA R(256 bits) - ...
71 EdDSA s(256 bits) - ...
0 Old: Public Key Packet(tag 6)(111 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:23:52 UTC 2021
3 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
4 Elliptic Curve - NIST P-384 (0x2B 81 04 00 22)
5 ECDSA Q(771 bits) - ...
6 Old: User ID Packet(tag 13)(46 bytes)
7 User ID - (gpg233_ecc_sign_encrypt_NIST_P_384_test_key)
8 Old: Signature Packet(tag 2)(179 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
12 Hash alg - SHA384(hash 9)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - 11 89 9c 98 38 06 90 de bd 09 1b 38 14 53 30 a9 f3 18 b7 d9
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:23:52 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0x145330A9F318B7D9
43 Hash left 2 bytes - f5 98
44 ECDSA r(384 bits) - ...
45 ECDSA s(384 bits) - ...
46 Old: Public Subkey Packet(tag 14)(115 bytes)
47 Ver 4 - new
48 Public key creation time - Mon Nov 29 09:23:52 UTC 2021
49 Pub alg - ECDH Elliptic Curve Diffie-Hellman Algorithm(pub 18)
50 Elliptic Curve - NIST P-384 (0x2B 81 04 00 22)
51 ECDH Q(771 bits) - ...
52 ECDH KDF params(32 bits) - ...
53 KDFhashID: Hash alg - SHA384(hash 9)
54 KDFsymAlgoID: Sym alg - AES with 256-bit key(sym 9)
55 Old: Signature Packet(tag 2)(152 bytes)
56 Ver 4 - new
57 Sig type - Subkey Binding Signature(0x18).
58 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
59 Hash alg - SHA384(hash 9)
60 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
61 v4 - Fingerprint - 11 89 9c 98 38 06 90 de bd 09 1b 38 14 53 30 a9 f3 18 b7 d9
62 Hashed Sub: signature creation time(sub 2)(4 bytes)
63 Time - Mon Nov 29 09:23:52 UTC 2021
64 Hashed Sub: key flags(sub 27)(1 bytes)
65 Flag - This key may be used to encrypt communications
66 Flag - This key may be used to encrypt storage
67 Sub: issuer key ID(sub 16)(8 bytes)
68 Key ID - 0x145330A9F318B7D9
69 Hash left 2 bytes - 74 b8
70 ECDSA r(383 bits) - ...
71 ECDSA s(383 bits) - ...
0 Old: Public Key Packet(tag 6)(83 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:38:45 UTC 2021
3 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
4 Elliptic Curve - brainpoolP256r1 (0x2B 24 03 03 02 08 01 01 07)
5 ECDSA Q(515 bits) - ...
6 Old: User ID Packet(tag 13)(48 bytes)
7 User ID - (gpg233_ecc_sign_only_Brainpool_P-256_test_key)
8 Old: Signature Packet(tag 2)(147 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
12 Hash alg - SHA256(hash 8)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - 6e 88 4a 32 79 67 a2 60 2f 1f 88 36 71 ad 13 33 5f af ca ff
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:38:45 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0x71AD13335FAFCAFF
43 Hash left 2 bytes - 82 19
44 ECDSA r(255 bits) - ...
45 ECDSA s(256 bits) - ...
0 Old: Public Key Packet(tag 6)(51 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:31:28 UTC 2021
3 Pub alg - EdDSA Edwards-curve Digital Signature Algorithm(pub 22)
4 Elliptic Curve - Ed25519 (0x2B 06 01 04 01 DA 47 0F 01)
5 EdDSA Q(263 bits) - ...
6 Old: User ID Packet(tag 13)(44 bytes)
7 User ID - (gpg233_ecc_sign_only_Curve_25519_test_key)
8 Old: Signature Packet(tag 2)(147 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - EdDSA Edwards-curve Digital Signature Algorithm(pub 22)
12 Hash alg - SHA512(hash 10)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - 4c 52 54 fc 6b 8f 1a 9f 6d aa fb 58 2d 36 0a 5c 0c 5f fe df
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:31:28 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0x2D360A5C0C5FFEDF
43 Hash left 2 bytes - bb 32
44 EdDSA R(255 bits) - ...
45 EdDSA s(253 bits) - ...
0 Old: Public Key Packet(tag 6)(111 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:34:56 UTC 2021
3 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
4 Elliptic Curve - NIST P-384 (0x2B 81 04 00 22)
5 ECDSA Q(771 bits) - ...
6 Old: User ID Packet(tag 13)(43 bytes)
7 User ID - (gpg233_ecc_sign_only_NIST_P-384_test_key)
8 Old: Signature Packet(tag 2)(179 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)
12 Hash alg - SHA384(hash 9)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - ab fb 32 25 34 ec ec ba d5 cc 9c 6f 80 f5 db 39 7d d1 d0 bb
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:34:56 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0x80F5DB397DD1D0BB
43 Hash left 2 bytes - 2a fe
44 ECDSA r(384 bits) - ...
45 ECDSA s(384 bits) - ...
0 Old: Public Key Packet(tag 6)(397 bytes)
1 Ver 4 - new
2 Public key creation time - Mon Nov 29 09:15:37 UTC 2021
3 Pub alg - RSA Encrypt or Sign(pub 1)
4 RSA n(3072 bits) - ...
5 RSA e(17 bits) - ...
6 Old: User ID Packet(tag 13)(32 bytes)
7 User ID - (gpg233_rsa_sign_only_test_key)
8 Old: Signature Packet(tag 2)(465 bytes)
9 Ver 4 - new
10 Sig type - Positive certification of a User ID and Public Key packet(0x13).
11 Pub alg - RSA Encrypt or Sign(pub 1)
12 Hash alg - SHA256(hash 8)
13 Hashed Sub: issuer fingerprint(sub 33)(21 bytes)
14 v4 - Fingerprint - 15 16 1e 0a 76 1e 5b 67 1f d3 23 93 bb db 73 68 49 f1 11 dd
15 Hashed Sub: signature creation time(sub 2)(4 bytes)
16 Time - Mon Nov 29 09:15:37 UTC 2021
17 Hashed Sub: key flags(sub 27)(1 bytes)
18 Flag - This key may be used to certify other keys
19 Flag - This key may be used to sign data
20 Hashed Sub: preferred symmetric algorithms(sub 11)(4 bytes)
21 Sym alg - AES with 256-bit key(sym 9)
22 Sym alg - AES with 192-bit key(sym 8)
23 Sym alg - AES with 128-bit key(sym 7)
24 Sym alg - Triple-DES(sym 2)
25 Hashed Sub: preferred_aead_algorithms(sub 34)(2 bytes)
26 AEAD alg - OCB(aead 2)
27 AEAD alg - EAX(aead 1)
28 Hashed Sub: preferred hash algorithms(sub 21)(5 bytes)
29 Hash alg - SHA512(hash 10)
30 Hash alg - SHA384(hash 9)
31 Hash alg - SHA256(hash 8)
32 Hash alg - SHA224(hash 11)
33 Hash alg - SHA1(hash 2)
34 Hashed Sub: preferred compression algorithms(sub 22)(2 bytes)
35 Comp alg - ZLIB <RFC1950>(comp 2)
36 Comp alg - ZIP <RFC1951>(comp 1)
37 Hashed Sub: features(sub 30)(1 bytes)
38 Flag - Modification detection (packets 18 and 19)
39 Hashed Sub: key server preferences(sub 23)(1 bytes)
40 Flag - No-modify
41 Sub: issuer key ID(sub 16)(8 bytes)
42 Key ID - 0xBBDB736849F111DD
43 Hash left 2 bytes - 2d d0
44 RSA m^d mod n(3072 bits) - ...
45 -> PKCS-1
1010 DSA s(159 bits) - ...
1111 -> hash(DSA q bits)
1212 Old: Literal Data Packet(tag 11)(45 bytes)
13 Format - binary
13 Packet data format - binary
1414 Filename - hoge
15 File modified time - Sat Apr 26 19:41:04 UTC 1975
15 Creation time - Sat Apr 26 19:41:04 UTC 1975
1616 Literal - ...
99 RSA m^d mod n(1024 bits) - ...
1010 -> PKCS-1
1111 Old: Literal Data Packet(tag 11)(45 bytes)
12 Format - binary
12 Packet data format - binary
1313 Filename - hoge
14 File modified time - Sat Apr 26 19:41:04 UTC 1975
14 Creation time - Sat Apr 26 19:41:04 UTC 1975
1515 Literal - ...
5353 multi_precision_integer("RSA e");
5454 }
5555
56 /* added: 2021-11-11
57 * Reference: draft-ietf-openpgp-crypto-refresh-04 (10/2021);section 9.2 ECC Curves for OpenPGP
58 * https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-04.html
59 * Note (2021-11-25): actual ECC curve hex OID padded to 10 to match incoming oid array length
60 * so that memcmp will work properly (compare two values of the same size)
61 */
62 private unsigned char BrainPool256r1_OID[10]={0x2B,0x24,0x3,0x3,0x2,0x8,0x1,0x1,0x7,0};
63 private unsigned char NIST_P256_OID[10]={0x2A,0x86,0x48,0xCE,0x3D,0x3,0x1,0x7,0,0};
64 private unsigned char NIST_P384_OID[10]={0x2B,0x81,0x04,0x00,0x22,0,0,0,0,0};
65 private unsigned char NIST_P521_OID[10]={0x2B,0x81,0x04,0x00,0x23,0,0,0,0,0};
66 private unsigned char Ed25519_OID[10]={0x2B,0x06,0x01,0x04,0x01,0xDA,0x47,0x0F,0x01,0};
67 private unsigned char Ed448_OID[10]={0x2B,0x65,0x71,0,0,0,0,0,0,0};
68 private unsigned char Curve25519_OID[10]={0x2B,0x06,0x01,0x04,0x01,0x97,0x55,0x01,0x05,0x01};
69 private unsigned char X448_OID[10]={0x2B,0x65,0x6F,0,0,0,0,0,0,0};
70
71 private unsigned char oid_input_HEX[10]={0,0,0,0,0,0,0,0,0,0};
72 #define oid_input_HEX_size sizeof(oid_input_HEX)
73 private size_t oidLEN;
74 private int FoundECC=NO;
75 private int jj;
76
77 private struct {
78 const unsigned char *oidhex;
79 const char *name;
80 const char *oidstring;
81 const int expectedBits;
82 } ELLIP_CURVES[] = {
83 {NIST_P256_OID,"NIST P-256","0x2A 86 48 CE 3D 03 01 07",515},
84 {NIST_P384_OID,"NIST P-384","0x2B 81 04 00 22",771},
85 {NIST_P521_OID,"NIST P-521","0x2B 81 04 00 23",1059},
86 {Ed25519_OID,"Ed25519","0x2B 06 01 04 01 DA 47 0F 01",263},
87 {Ed448_OID,"Ed448","0x2B 65 71",463},
88 {Curve25519_OID,"Curve25519","0x2B 06 01 04 01 97 55 01 05 01",263},
89 {X448_OID,"X448","0x2B 65 6F",445},
90 {BrainPool256r1_OID,"brainpoolP256r1","0x2B 24 03 03 02 08 01 01 07",515}
91 };
92 #define ELLIP_CURVES_NUM 8
93
94 /* end 2021-11-11 */
95
96
5697 private void
5798 new_Public_Key_Packet(int len)
5899 {
78119 multi_precision_integer("DSA g");
79120 multi_precision_integer("DSA y");
80121 break;
122 case 18:/*ECDH*/
123 oidLEN = Getc();
124 for(jj=0;jj<oidLEN;jj++){oid_input_HEX[jj]=Getc();}
125 for(jj=0;jj<ELLIP_CURVES_NUM;jj++){
126 if(memcmp(ELLIP_CURVES[jj].oidhex,oid_input_HEX,oid_input_HEX_size) == 0){
127 FoundECC=YES;
128 break;
129 }
130 }
131 if(FoundECC){
132 printf("\tElliptic Curve - ");
133 printf("%s (%s)\n",ELLIP_CURVES[jj].name,ELLIP_CURVES[jj].oidstring);
134 }
135 else{
136 printf("\tunknown(elliptic curve - ");
137 for(jj=0;jj<oidLEN;jj++){
138 printf("%02hhu,%02x ",oid_input_HEX[jj],oid_input_HEX[jj]);
139 }
140 puts(")");
141 }
142 multi_precision_integer("ECDH Q");
143 /* note - what follows is most of what the "draft-ietf-openpgp-crypto-refresh-04"
144 * specifies for "13.5 EC DH Algorithm (ECDH)" minus the following:
145 * a) 'one-octet public key algorithm ID defined in Section 9.1'
146 * b) '20 octets representing the UTF-8 encoding of the string "Anonymous Sender"'
147 * c) '20 octets representing a recipient encryption subkey or a primary key fingerprint'
148 * The end result is consonant with GnuPG-2.3.3 "list-packets" output in fields/bytes,
149 * though gpg-2.3.3 displays "pkey[2]" [32 bits]" where the supposed KDF parameters exist.
150 */
151 unsigned int KDFparmsSize,KDFbits,KDFhashID,KDFsymAlgoID;
152 KDFparmsSize=Getc();/*don't display*/
153 KDFbits=(KDFparmsSize + 1)*8;
154 Getc();/*bypass supposed KDF constant */
155 KDFhashID=Getc();
156 KDFsymAlgoID=Getc();
157 printf("\tECDH KDF params(%d bits) - ...\n",KDFbits);
158 printf("\t\t%s ","KDFhashID: ");
159 hash_algs(KDFhashID);
160 printf("\t\t%s ","KDFsymAlgoID: ");
161 sym_algs(KDFsymAlgoID);
162 break;
163 case 19:/*ECDSA*/
164 oidLEN = Getc();
165 for(jj=0;jj<oidLEN;jj++){oid_input_HEX[jj]=Getc();}
166 for(jj=0;jj<ELLIP_CURVES_NUM;jj++){
167 if(memcmp(ELLIP_CURVES[jj].oidhex,oid_input_HEX,oid_input_HEX_size) == 0){
168 FoundECC=YES;
169 break;
170 }
171 }
172 if(FoundECC){
173 printf("\tElliptic Curve - ");
174 printf("%s (%s)\n",ELLIP_CURVES[jj].name,ELLIP_CURVES[jj].oidstring);
175 }
176 else{
177 printf("\tunknown(elliptic curve - ");
178 for(jj=0;jj<oidLEN;jj++){
179 printf("%02hhu,%02x ",oid_input_HEX[jj],oid_input_HEX[jj]);
180 }
181 puts(")");
182 }
183 multi_precision_integer("ECDSA Q");
184 break;
185 case 22:/*EdDSA*/
186 oidLEN = Getc();
187 for(jj=0;jj<oidLEN;jj++){oid_input_HEX[jj]=Getc();}
188 for(jj=0;jj<ELLIP_CURVES_NUM;jj++){
189 if(memcmp(ELLIP_CURVES[jj].oidhex,oid_input_HEX,oid_input_HEX_size) == 0){
190 FoundECC=YES;
191 break;
192 }
193 }
194 if(FoundECC){
195 printf("\tElliptic Curve - ");
196 printf("%s (%s)\n",ELLIP_CURVES[jj].name,ELLIP_CURVES[jj].oidstring);
197 }
198 else{
199 printf("\tunknown(elliptic curve - ");
200 for(jj=0;jj<oidLEN;jj++){
201 printf("%02hhu,%02x ",oid_input_HEX[jj],oid_input_HEX[jj]);
202 }
203 puts(")");
204 }
205 multi_precision_integer("EdDSA Q");
206 break;
81207 default:
82208 printf("\tUnknown public key(pub %d)\n", PUBLIC);
83209 skip(len - 5);
134260 break;
135261 }
136262 }
263
264 /*
265 * 2021-11-29: added cases 18,19,22 (copied from Public key)
266 */
137267
138268 private void
139269 plain_Secret_Key(int len)
168298 case 17:
169299 multi_precision_integer("DSA x");
170300 break;
301 case 18:/*ECDH*/
302 oidLEN = Getc();
303 for(jj=0;jj<oidLEN;jj++){oid_input_HEX[jj]=Getc();}
304 for(jj=0;jj<ELLIP_CURVES_NUM;jj++){
305 if(memcmp(ELLIP_CURVES[jj].oidhex,oid_input_HEX,oid_input_HEX_size) == 0){
306 FoundECC=YES;
307 break;
308 }
309 }
310 if(FoundECC){
311 printf("\tElliptic Curve - ");
312 printf("%s (%s)\n",ELLIP_CURVES[jj].name,ELLIP_CURVES[jj].oidstring);
313 }
314 else{
315 printf("\tunknown(elliptic curve - ");
316 for(jj=0;jj<oidLEN;jj++){
317 printf("%02hhu,%02x ",oid_input_HEX[jj],oid_input_HEX[jj]);
318 }
319 puts(")");
320 }
321 multi_precision_integer("ECDH Q");
322 /* note - what follows is most of what the "draft-ietf-openpgp-crypto-refresh-04"
323 * specifies for "13.5 EC DH Algorithm (ECDH)" minus the following:
324 * a) 'one-octet public key algorithm ID defined in Section 9.1'
325 * b) '20 octets representing the UTF-8 encoding of the string "Anonymous Sender"'
326 * c) '20 octets representing a recipient encryption subkey or a primary key fingerprint'
327 * The end result is consonant with GnuPG-2.3.3 "list-packets" output in fields/bytes,
328 * though gpg-2.3.3 displays "pkey[2]" [32 bits]" where the supposed KDF parameters exist.
329 */
330 unsigned int KDFparmsSize,KDFbits,KDFhashID,KDFsymAlgoID;
331 KDFparmsSize=Getc();/*don't display*/
332 KDFbits=(KDFparmsSize + 1)*8;
333 Getc();/*bypass supposed KDF constant */
334 KDFhashID=Getc();
335 KDFsymAlgoID=Getc();
336 printf("\tECDH KDF params(%d bits) - ...\n",KDFbits);
337 printf("\t\t%s ","KDFhashID: ");
338 hash_algs(KDFhashID);
339 printf("\t\t%s ","KDFsymAlgoID: ");
340 sym_algs(KDFsymAlgoID);
341 break;
342 case 19:/*ECDSA*/
343 oidLEN = Getc();
344 for(jj=0;jj<oidLEN;jj++){oid_input_HEX[jj]=Getc();}
345 for(jj=0;jj<ELLIP_CURVES_NUM;jj++){
346 if(memcmp(ELLIP_CURVES[jj].oidhex,oid_input_HEX,oid_input_HEX_size) == 0){
347 FoundECC=YES;
348 break;
349 }
350 }
351 if(FoundECC){
352 printf("\tElliptic Curve - ");
353 printf("%s (%s)\n",ELLIP_CURVES[jj].name,ELLIP_CURVES[jj].oidstring);
354 }
355 else{
356 printf("\tunknown(elliptic curve - ");
357 for(jj=0;jj<oidLEN;jj++){
358 printf("%02hhu,%02x ",oid_input_HEX[jj],oid_input_HEX[jj]);
359 }
360 puts(")");
361 }
362 multi_precision_integer("ECDSA Q");
363 break;
364 case 22:/*EdDSA*/
365 oidLEN = Getc();
366 for(jj=0;jj<oidLEN;jj++){oid_input_HEX[jj]=Getc();}
367 for(jj=0;jj<ELLIP_CURVES_NUM;jj++){
368 if(memcmp(ELLIP_CURVES[jj].oidhex,oid_input_HEX,oid_input_HEX_size) == 0){
369 FoundECC=YES;
370 break;
371 }
372 }
373 if(FoundECC){
374 printf("\tElliptic Curve - ");
375 printf("%s (%s)\n",ELLIP_CURVES[jj].name,ELLIP_CURVES[jj].oidstring);
376 }
377 else{
378 printf("\tunknown(elliptic curve - ");
379 for(jj=0;jj<oidLEN;jj++){
380 printf("%02hhu,%02x ",oid_input_HEX[jj],oid_input_HEX[jj]);
381 }
382 puts(")");
383 }
384 multi_precision_integer("EdDSA Q");
385 break;
386
171387 default:
172388 printf("\tUnknown secret key(pub %d)\n", PUBLIC);
173389 skip(len - 2);
184400 }
185401 }
186402
403 /*
404 * 2021-11-29: Added cases 18,19,20
405 */
187406 private void
188407 encrypted_Secret_Key(int len, int sha1)
189408 {
220439 case 17:
221440 printf("\tEncrypted DSA x\n");
222441 break;
442 case 18:
443 printf("\tEncrypted ECDH x\n");
444 break;
445 case 19:
446 printf("\tEncrypted ECDSA x\n");
447 break;
448 case 22:
449 printf("\tEncrypted EdDSA x\n");
450 break;
223451 default:
224452 printf("\tUnknown encrypted key(pub %d)\n", PUBLIC);
225453 break;
194194 "signature target(sub 31)",
195195 "embedded signature(sub 32)",
196196 "issuer fingerprint(sub 33)",
197 "preferred_aead_algorithms(sub 34)",
197198 };
198199 #define SIGSUB_NUM (sizeof(SIGSUB) / sizeof(string))
199200
233234 signature_target,
234235 embedded_signature,
235236 issuer_fingerprint,
237 preferred_aead_algorithms,
236238 };
237239
238240 private string
1313 int pflag;
1414 int uflag;
1515
16 private string pgpdump_version = "0.33, Copyright (C) 1998-2017 Kazu Yamamoto";
16 private string pgpdump_version = "0.34, Copyright (C) 1998-2021 Kazu Yamamoto";
1717 private string prog;
1818
1919 private string getprog(void);
8181 public int iv_len(unsigned int);
8282 public void comp_algs(unsigned int);
8383 public void hash_algs(unsigned int);
84 public void aead_algs(unsigned int);
8485 public void key_id(void);
8586 public void fingerprint(void);
8687 public void time4(string);
137138 public void key_expiration_time(int);
138139 public void additional_decryption_key(int);
139140 public void preferred_symmetric_algorithms(int);
141 public void preferred_aead_algorithms(int);
140142 public void revocation_key(int);
141143 public void issuer_key_ID(int);
142144 public void notation_data(int);
1616 dump(2);
1717 printf("\n");
1818 }
19
19 /*
20 * (2021-11-25) Added code for signatures #18, #19, and #22
21 * Reference: https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-04.html
22 */
2023 private void
2124 signature_multi_precision_integer(int pub, int len)
2225 {
3740 multi_precision_integer("DSA s");
3841 printf("\t\t-> hash(DSA q bits)\n");
3942 break;
43 case 18:
44 multi_precision_integer("ECDH G");
45 break;
46 case 19:
47 multi_precision_integer("ECDSA r");
48 multi_precision_integer("ECDSA s");
49 break;
50 case 22:
51 multi_precision_integer("EdDSA R");
52 multi_precision_integer("EdDSA s");
53 break;
4054 default:
4155 printf("\tUnknown signature(pub %d)\n", pub);
4256 skip(len);
9595 for (i = 0; i < len; i++) {
9696 printf("\t");
9797 sym_algs(Getc());
98 }
99 }
100
101
102 public void
103 preferred_aead_algorithms(int len)
104 {
105 int i;
106 for (i = 0; i < len; i++) {
107 printf("\t");
108 aead_algs(Getc());
98109 }
99110 }
100111
124124 int format, flen, blen;
125125
126126 format = Getc();
127 printf("\tFormat - ");
127 printf("\tPacket data format - ");
128128 switch (format) {
129129 case 'b':
130130 printf("binary");
147147 printf("\tFilename - ");
148148 pdump(flen);
149149 printf("\n");
150 time4("File modified time");
150 /* RFC 4880: modification date of a file or time the packet itself was created */
151 time4("Creation time");
151152 blen = len - 6 - flen;
152153 printf("\tLiteral - ");
153154 if (lflag) {
3131 private time_t key_creation_time = 0;
3232 private time_t sig_creation_time = 0;
3333
34 /*
35 * 2021-11-02, "pub 18" description updated
36 * Reference: RFC 6637 (June 2012)
37 */
3438 private string
3539 PUB_ALGS[] = {
3640 "unknown(pub 0)",
5155 "unknown(pub 15)",
5256 "ElGamal Encrypt-Only(pub 16)",
5357 "DSA Digital Signature Algorithm(pub 17)",
54 "Reserved for Elliptic Curve(pub 18)",
58 "ECDH Elliptic Curve Diffie-Hellman Algorithm(pub 18)",
5559 "ECDSA Elliptic Curve Digital Signature Algorithm(pub 19)",
5660 "Reserved formerly ElGamal Encrypt or Sign(pub 20)",
5761 "Reserved for Diffie-Hellman (pub 21)",
5862 "EdDSA Edwards-curve Digital Signature Algorithm(pub 22)",
63 "Reserved - AEDH",
64 "Reserved - AEDSA",
5965 };
6066 #define PUB_ALGS_NUM (sizeof(PUB_ALGS) / sizeof(string))
6167
153159 printf("\n");
154160 }
155161
162 /*
163 * Added: 2021-11-28
164 * Reference: https://datatracker.ietf.org/doc/html/draft-ietf-openpgp-rfc4880bis-10#section-9.6
165 * Section "9.6. AEAD Algorithms"
166 */
167 private string
168 AEAD_ALGS[] = {
169 "unknown(aead 0)",
170 "EAX(aead 1)",
171 "OCB(aead 2)",
172 };
173 #define AEAD_ALGS_NUM (sizeof(AEAD_ALGS) / sizeof(string))
174
175 public void
176 aead_algs(unsigned int type)
177 {
178 printf("\tAEAD alg - ");
179 if (type < AEAD_ALGS_NUM)
180 printf("%s", AEAD_ALGS[type]);
181 else
182 printf("unknown(aead %d)", type);
183 printf("\n");
184 }
185
156186 private string
157187 HASH_ALGS[] = {
158188 "unknown(hash 0)",
167197 "SHA384(hash 9)",
168198 "SHA512(hash 10)",
169199 "SHA224(hash 11)",
200 "SHA3-256(hash 12)",
201 "Reserved(hash 13)",
202 "SHA3-512(hash 14)",
170203 };
171204 #define HASH_ALGS_NUM (sizeof(HASH_ALGS) / sizeof(string))
172205