summaryrefslogtreecommitdiffstats
path: root/src/tests/data/test_list_packets
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:32:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 03:32:49 +0000
commit8053187731ae8e3eb368d8360989cf5fd6eed9f7 (patch)
tree32bada84ff5d7460cdf3934fcbdbe770d6afe4cd /src/tests/data/test_list_packets
parentInitial commit. (diff)
downloadrnp-8053187731ae8e3eb368d8360989cf5fd6eed9f7.tar.xz
rnp-8053187731ae8e3eb368d8360989cf5fd6eed9f7.zip
Adding upstream version 0.17.0.upstream/0.17.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tests/data/test_list_packets')
-rw-r--r--src/tests/data/test_list_packets/ecc-p256-pub.asc14
-rw-r--r--src/tests/data/test_list_packets/list_all.txt152
-rw-r--r--src/tests/data/test_list_packets/list_grips.txt81
-rw-r--r--src/tests/data/test_list_packets/list_json.txt270
-rw-r--r--src/tests/data/test_list_packets/list_json_all.txt299
-rw-r--r--src/tests/data/test_list_packets/list_json_grips.txt274
-rw-r--r--src/tests/data/test_list_packets/list_json_mpi.txt276
-rw-r--r--src/tests/data/test_list_packets/list_json_raw.txt289
-rw-r--r--src/tests/data/test_list_packets/list_mpi.txt77
-rw-r--r--src/tests/data/test_list_packets/list_raw.txt148
-rw-r--r--src/tests/data/test_list_packets/list_standard.txt77
11 files changed, 1957 insertions, 0 deletions
diff --git a/src/tests/data/test_list_packets/ecc-p256-pub.asc b/src/tests/data/test_list_packets/ecc-p256-pub.asc
new file mode 100644
index 0000000..fd1509e
--- /dev/null
+++ b/src/tests/data/test_list_packets/ecc-p256-pub.asc
@@ -0,0 +1,14 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+
+mFIEWsOCNRMIKoZIzj0DAQcCAwQS5G6mn5dhamZ6678SXE1azavqf8BItWO9Qv8V
+dS1vEEoD14urr5OQKTLuHhDRjvSQdaxRtkf0sI51T7230sT3tAhlY2MtcDI1NoiU
+BBMTCAA8AhsDBQsJCAcCAyICAQYVCgkICwIEFgIDAQIeAwIXgBYhBLVP3ru2c0I6
+XQqlRCNnTyGyRBUnBQJcVa/nAAoJECNnTyGyRBUn1ycA+wVg9sEfHDBaGtLqlUSB
+WdGKURrHN7CJe2UTz1/7oQCBAQDDi4RQyLHs+TfOrBNSbLEswCu1oEh8VmHt/SN7
++mqNLbhWBFrDgjUSCCqGSM49AwEHAgMELDOArLIG85ABQu1IwgQMpiIuUwj+N7ib
+gGenTRck5dkBpX48eK3lbjovXn4YkBneA7z14iez3+Sdg6UFAMFV2QMBCAeIeAQY
+EwgAIAIbDBYhBLVP3ru2c0I6XQqlRCNnTyGyRBUnBQJcVa/vAAoJECNnTyGyRBUn
+ZKoBAJ64gv3w27nFBERvIsRqufvR6xcimqS7Gif+WehBU+P5AQC5bqoISh0oSQid
+adI84f60RuOaozpjvR3B1bPZiR6u7w==
+=H2xn
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/src/tests/data/test_list_packets/list_all.txt b/src/tests/data/test_list_packets/list_all.txt
new file mode 100644
index 0000000..c9bfe26
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_all.txt
@@ -0,0 +1,152 @@
+:armored input
+:off 0: packet header 0x9852 (tag 6, len 82)
+:off 2: packet contents (82 bytes)
+ 00000 | 04 5a c3 82 35 13 08 2a 86 48 ce 3d 03 01 07 02 | .Z..5..*.H.=....
+ 00016 | 03 04 12 e4 6e a6 9f 97 61 6a 66 7a eb bf 12 5c | ....n...ajfz...\
+ 00032 | 4d 5a cd ab ea 7f c0 48 b5 63 bd 42 ff 15 75 2d | MZ.....H.c.B..u-
+ 00048 | 6f 10 4a 03 d7 8b ab af 93 90 29 32 ee 1e 10 d1 | o.J.......)2....
+ 00064 | 8e f4 90 75 ac 51 b6 47 f4 b0 8e 75 4f bd b7 d2 | ...u.Q.G...uO...
+ 00080 | c4 f7 | ..
+
+Public key packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 19 (ECDSA)
+ public key material:
+ ecc p: 515 bits, 0412e46ea69f97616a667aebbf125c4d5acdabea7fc048b563bd42ff15752d6f104a03d78babaf93902932ee1e10d18ef49075ac51b647f4b08e754fbdb7d2c4f7
+ ecc curve: NIST P-256
+ keyid: 0x23674f21b2441527
+ fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527
+ grip: 0xfc81aece90bce6e54d0d637d266109783ac8dac0
+:off 84: packet header 0xb408 (tag 13, len 8)
+:off 86: packet contents (8 bytes)
+ 00000 | 65 63 63 2d 70 32 35 36 | ecc-p256
+
+UserID packet
+ id: ecc-p256
+:off 94: packet header 0x8894 (tag 2, len 148)
+:off 96: packet contents (148 bytes)
+ 00000 | 04 13 13 08 00 3c 02 1b 03 05 0b 09 08 07 02 03 | .....<..........
+ 00016 | 22 02 01 06 15 0a 09 08 0b 02 04 16 02 03 01 02 | "...............
+ 00032 | 1e 03 02 17 80 16 21 04 b5 4f de bb b6 73 42 3a | ......!..O...sB:
+ 00048 | 5d 0a a5 44 23 67 4f 21 b2 44 15 27 05 02 5c 55 | ]..D#gO!.D.'..\U
+ 00064 | af e7 00 0a 09 10 23 67 4f 21 b2 44 15 27 d7 27 | ......#gO!.D.'.'
+ 00080 | 00 fb 05 60 f6 c1 1f 1c 30 5a 1a d2 ea 95 44 81 | ...`....0Z....D.
+ 00096 | 59 d1 8a 51 1a c7 37 b0 89 7b 65 13 cf 5f fb a1 | Y..Q..7..{e.._..
+ 00112 | 00 81 01 00 c3 8b 84 50 c8 b1 ec f9 37 ce ac 13 | .......P....7...
+ 00128 | 52 6c b1 2c c0 2b b5 a0 48 7c 56 61 ed fd 23 7b | Rl.,.+..H|Va..#{
+ 00144 | fa 6a 8d 2d | .j.-
+
+Signature packet
+ version: 4
+ type: 19 (Positive User ID certification)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ :subpacket contents:
+ 00000 | 03 | .
+ key flags: 0x03 ( certify sign )
+ :type 11, len 4
+ :subpacket contents:
+ 00000 | 09 08 07 02 | ....
+ preferred symmetric algorithms: AES-256, AES-192, AES-128, TripleDES (9, 8, 7, 2)
+ :type 34, len 2
+ :subpacket contents:
+ 00000 | 02 01 | ..
+ preferred aead algorithms: OCB, EAX (2, 1)
+ :type 21, len 5
+ :subpacket contents:
+ 00000 | 0a 09 08 0b 02 | .....
+ preferred hash algorithms: SHA512, SHA384, SHA256, SHA224, SHA1 (10, 9, 8, 11, 2)
+ :type 22, len 3
+ :subpacket contents:
+ 00000 | 02 03 01 | ...
+ preferred compression algorithms: ZLib, BZip2, ZIP (2, 3, 1)
+ :type 30, len 1
+ :subpacket contents:
+ 00000 | 03 | .
+ features: 0x03 ( mdc aead )
+ :type 23, len 1
+ :subpacket contents:
+ 00000 | 80 | .
+ key server preferences
+ no-modify: 1
+ :type 33, len 21
+ :subpacket contents:
+ 00000 | 04 b5 4f de bb b6 73 42 3a 5d 0a a5 44 23 67 4f | ..O...sB:]..D#gO
+ 00016 | 21 b2 44 15 27 | !.D.'
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ :subpacket contents:
+ 00000 | 5c 55 af e7 | \U..
+ signature creation time: 1549119463 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ :subpacket contents:
+ 00000 | 23 67 4f 21 b2 44 15 27 | #gO!.D.'
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0xd727
+ signature material:
+ ecc r: 251 bits, 0560f6c11f1c305a1ad2ea95448159d18a511ac737b0897b6513cf5ffba10081
+ ecc s: 256 bits, c38b8450c8b1ecf937ceac13526cb12cc02bb5a0487c5661edfd237bfa6a8d2d
+:off 244: packet header 0xb856 (tag 14, len 86)
+:off 246: packet contents (86 bytes)
+ 00000 | 04 5a c3 82 35 12 08 2a 86 48 ce 3d 03 01 07 02 | .Z..5..*.H.=....
+ 00016 | 03 04 2c 33 80 ac b2 06 f3 90 01 42 ed 48 c2 04 | ..,3.......B.H..
+ 00032 | 0c a6 22 2e 53 08 fe 37 b8 9b 80 67 a7 4d 17 24 | ..".S..7...g.M.$
+ 00048 | e5 d9 01 a5 7e 3c 78 ad e5 6e 3a 2f 5e 7e 18 90 | ....~<x..n:/^~..
+ 00064 | 19 de 03 bc f5 e2 27 b3 df e4 9d 83 a5 05 00 c1 | ......'.........
+ 00080 | 55 d9 03 01 08 07 | U.....
+
+Public subkey packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 18 (ECDH)
+ public key material:
+ ecdh p: 515 bits, 042c3380acb206f3900142ed48c2040ca6222e5308fe37b89b8067a74d1724e5d901a57e3c78ade56e3a2f5e7e189019de03bcf5e227b3dfe49d83a50500c155d9
+ ecdh curve: NIST P-256
+ ecdh hash algorithm: 8 (SHA256)
+ ecdh key wrap algorithm: 7
+ keyid: 0x37e285e9e9851491
+ fingerprint: 0x40e608afbc8d62cdcc08904f37e285e9e9851491
+ grip: 0xa56dc8db8355747a809037459b4258b8a743eab5
+:off 332: packet header 0x8878 (tag 2, len 120)
+:off 334: packet contents (120 bytes)
+ 00000 | 04 18 13 08 00 20 02 1b 0c 16 21 04 b5 4f de bb | ..... ....!..O..
+ 00016 | b6 73 42 3a 5d 0a a5 44 23 67 4f 21 b2 44 15 27 | .sB:]..D#gO!.D.'
+ 00032 | 05 02 5c 55 af ef 00 0a 09 10 23 67 4f 21 b2 44 | ..\U......#gO!.D
+ 00048 | 15 27 64 aa 01 00 9e b8 82 fd f0 db b9 c5 04 44 | .'d............D
+ 00064 | 6f 22 c4 6a b9 fb d1 eb 17 22 9a a4 bb 1a 27 fe | o".j....."....'.
+ 00080 | 59 e8 41 53 e3 f9 01 00 b9 6e aa 08 4a 1d 28 49 | Y.AS.....n..J.(I
+ 00096 | 08 9d 69 d2 3c e1 fe b4 46 e3 9a a3 3a 63 bd 1d | ..i.<...F...:c..
+ 00112 | c1 d5 b3 d9 89 1e ae ef | ........
+
+Signature packet
+ version: 4
+ type: 24 (Subkey Binding Signature)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ :subpacket contents:
+ 00000 | 0c | .
+ key flags: 0x0c ( encrypt_comm encrypt_storage )
+ :type 33, len 21
+ :subpacket contents:
+ 00000 | 04 b5 4f de bb b6 73 42 3a 5d 0a a5 44 23 67 4f | ..O...sB:]..D#gO
+ 00016 | 21 b2 44 15 27 | !.D.'
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ :subpacket contents:
+ 00000 | 5c 55 af ef | \U..
+ signature creation time: 1549119471 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ :subpacket contents:
+ 00000 | 23 67 4f 21 b2 44 15 27 | #gO!.D.'
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0x64aa
+ signature material:
+ ecc r: 256 bits, 9eb882fdf0dbb9c504446f22c46ab9fbd1eb17229aa4bb1a27fe59e84153e3f9
+ ecc s: 256 bits, b96eaa084a1d2849089d69d23ce1feb446e39aa33a63bd1dc1d5b3d9891eaeef
diff --git a/src/tests/data/test_list_packets/list_grips.txt b/src/tests/data/test_list_packets/list_grips.txt
new file mode 100644
index 0000000..3cdf995
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_grips.txt
@@ -0,0 +1,81 @@
+:armored input
+:off 0: packet header 0x9852 (tag 6, len 82)
+Public key packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 19 (ECDSA)
+ public key material:
+ ecc p: 515 bits
+ ecc curve: NIST P-256
+ keyid: 0x23674f21b2441527
+ fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527
+ grip: 0xfc81aece90bce6e54d0d637d266109783ac8dac0
+:off 84: packet header 0xb408 (tag 13, len 8)
+UserID packet
+ id: ecc-p256
+:off 94: packet header 0x8894 (tag 2, len 148)
+Signature packet
+ version: 4
+ type: 19 (Positive User ID certification)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ key flags: 0x03 ( certify sign )
+ :type 11, len 4
+ preferred symmetric algorithms: AES-256, AES-192, AES-128, TripleDES (9, 8, 7, 2)
+ :type 34, len 2
+ preferred aead algorithms: OCB, EAX (2, 1)
+ :type 21, len 5
+ preferred hash algorithms: SHA512, SHA384, SHA256, SHA224, SHA1 (10, 9, 8, 11, 2)
+ :type 22, len 3
+ preferred compression algorithms: ZLib, BZip2, ZIP (2, 3, 1)
+ :type 30, len 1
+ features: 0x03 ( mdc aead )
+ :type 23, len 1
+ key server preferences
+ no-modify: 1
+ :type 33, len 21
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ signature creation time: 1549119463 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0xd727
+ signature material:
+ ecc r: 251 bits
+ ecc s: 256 bits
+:off 244: packet header 0xb856 (tag 14, len 86)
+Public subkey packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 18 (ECDH)
+ public key material:
+ ecdh p: 515 bits
+ ecdh curve: NIST P-256
+ ecdh hash algorithm: 8 (SHA256)
+ ecdh key wrap algorithm: 7
+ keyid: 0x37e285e9e9851491
+ fingerprint: 0x40e608afbc8d62cdcc08904f37e285e9e9851491
+ grip: 0xa56dc8db8355747a809037459b4258b8a743eab5
+:off 332: packet header 0x8878 (tag 2, len 120)
+Signature packet
+ version: 4
+ type: 24 (Subkey Binding Signature)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ key flags: 0x0c ( encrypt_comm encrypt_storage )
+ :type 33, len 21
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ signature creation time: 1549119471 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0x64aa
+ signature material:
+ ecc r: 256 bits
+ ecc s: 256 bits
diff --git a/src/tests/data/test_list_packets/list_json.txt b/src/tests/data/test_list_packets/list_json.txt
new file mode 100644
index 0000000..f03ae61
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_json.txt
@@ -0,0 +1,270 @@
+[
+ {
+ "header":{
+ "offset":0,
+ "tag":6,
+ "tag.str":"Public Key",
+ "raw":"9852",
+ "length":82,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "material":{
+ "p.bits":515,
+ "curve":"NIST P-256"
+ },
+ "keyid":"23674f21b2441527"
+ },
+ {
+ "header":{
+ "offset":84,
+ "tag":13,
+ "tag.str":"User ID",
+ "raw":"b408",
+ "length":8,
+ "partial":false,
+ "indeterminate":false
+ },
+ "userid":"ecc-p256"
+ },
+ {
+ "header":{
+ "offset":94,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8894",
+ "length":148,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "type":19,
+ "type.str":"Positive User ID certification",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "flags":3,
+ "flags.str":[
+ "certify",
+ "sign"
+ ]
+ },
+ {
+ "type":11,
+ "type.str":"preferred symmetric algorithms",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 9,
+ 8,
+ 7,
+ 2
+ ],
+ "algorithms.str":[
+ "AES-256",
+ "AES-192",
+ "AES-128",
+ "TripleDES"
+ ]
+ },
+ {
+ "type":34,
+ "type.str":"preferred AEAD algorithms",
+ "length":2,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 2,
+ 1
+ ],
+ "algorithms.str":[
+ "OCB",
+ "EAX"
+ ]
+ },
+ {
+ "type":21,
+ "type.str":"preferred hash algorithms",
+ "length":5,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 10,
+ 9,
+ 8,
+ 11,
+ 2
+ ],
+ "algorithms.str":[
+ "SHA512",
+ "SHA384",
+ "SHA256",
+ "SHA224",
+ "SHA1"
+ ]
+ },
+ {
+ "type":22,
+ "type.str":"preferred compression algorithms",
+ "length":3,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 2,
+ 3,
+ 1
+ ],
+ "algorithms.str":[
+ "ZLib",
+ "BZip2",
+ "ZIP"
+ ]
+ },
+ {
+ "type":30,
+ "type.str":"features",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "mdc":true,
+ "aead":true,
+ "v5 keys":false
+ },
+ {
+ "type":23,
+ "type.str":"key server preferences",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "no-modify":true
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "creation time":1549119463
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"d727",
+ "material":{
+ "r.bits":251,
+ "s.bits":256
+ }
+ },
+ {
+ "header":{
+ "offset":244,
+ "tag":14,
+ "tag.str":"Public Subkey",
+ "raw":"b856",
+ "length":86,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":18,
+ "algorithm.str":"ECDH",
+ "material":{
+ "p.bits":515,
+ "curve":"NIST P-256",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "key wrap algorithm":7,
+ "key wrap algorithm.str":"AES-128"
+ },
+ "keyid":"37e285e9e9851491"
+ },
+ {
+ "header":{
+ "offset":332,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8878",
+ "length":120,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "type":24,
+ "type.str":"Subkey Binding Signature",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "flags":12,
+ "flags.str":[
+ "encrypt_comm",
+ "encrypt_storage"
+ ]
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "creation time":1549119471
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"64aa",
+ "material":{
+ "r.bits":256,
+ "s.bits":256
+ }
+ }
+]
diff --git a/src/tests/data/test_list_packets/list_json_all.txt b/src/tests/data/test_list_packets/list_json_all.txt
new file mode 100644
index 0000000..f5c0dc4
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_json_all.txt
@@ -0,0 +1,299 @@
+[
+ {
+ "header":{
+ "offset":0,
+ "tag":6,
+ "tag.str":"Public Key",
+ "raw":"9852",
+ "length":82,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"045ac3823513082a8648ce3d03010702030412e46ea69f97616a667aebbf125c4d5acdabea7fc048b563bd42ff15752d6f104a03d78babaf93902932ee1e10d18ef49075ac51b647f4b08e754fbdb7d2c4f7",
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "material":{
+ "p.bits":515,
+ "p.raw":"0412e46ea69f97616a667aebbf125c4d5acdabea7fc048b563bd42ff15752d6f104a03d78babaf93902932ee1e10d18ef49075ac51b647f4b08e754fbdb7d2c4f7",
+ "curve":"NIST P-256"
+ },
+ "keyid":"23674f21b2441527",
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527",
+ "grip":"fc81aece90bce6e54d0d637d266109783ac8dac0"
+ },
+ {
+ "header":{
+ "offset":84,
+ "tag":13,
+ "tag.str":"User ID",
+ "raw":"b408",
+ "length":8,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"6563632d70323536",
+ "userid":"ecc-p256"
+ },
+ {
+ "header":{
+ "offset":94,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8894",
+ "length":148,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"04131308003c021b03050b090807020322020106150a09080b020416020301021e03021780162104b54fdebbb673423a5d0aa54423674f21b244152705025c55afe7000a091023674f21b2441527d72700fb0560f6c11f1c305a1ad2ea95448159d18a511ac737b0897b6513cf5ffba100810100c38b8450c8b1ecf937ceac13526cb12cc02bb5a0487c5661edfd237bfa6a8d2d",
+ "version":4,
+ "type":19,
+ "type.str":"Positive User ID certification",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"03",
+ "flags":3,
+ "flags.str":[
+ "certify",
+ "sign"
+ ]
+ },
+ {
+ "type":11,
+ "type.str":"preferred symmetric algorithms",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "raw":"09080702",
+ "algorithms":[
+ 9,
+ 8,
+ 7,
+ 2
+ ],
+ "algorithms.str":[
+ "AES-256",
+ "AES-192",
+ "AES-128",
+ "TripleDES"
+ ]
+ },
+ {
+ "type":34,
+ "type.str":"preferred AEAD algorithms",
+ "length":2,
+ "hashed":true,
+ "critical":false,
+ "raw":"0201",
+ "algorithms":[
+ 2,
+ 1
+ ],
+ "algorithms.str":[
+ "OCB",
+ "EAX"
+ ]
+ },
+ {
+ "type":21,
+ "type.str":"preferred hash algorithms",
+ "length":5,
+ "hashed":true,
+ "critical":false,
+ "raw":"0a09080b02",
+ "algorithms":[
+ 10,
+ 9,
+ 8,
+ 11,
+ 2
+ ],
+ "algorithms.str":[
+ "SHA512",
+ "SHA384",
+ "SHA256",
+ "SHA224",
+ "SHA1"
+ ]
+ },
+ {
+ "type":22,
+ "type.str":"preferred compression algorithms",
+ "length":3,
+ "hashed":true,
+ "critical":false,
+ "raw":"020301",
+ "algorithms":[
+ 2,
+ 3,
+ 1
+ ],
+ "algorithms.str":[
+ "ZLib",
+ "BZip2",
+ "ZIP"
+ ]
+ },
+ {
+ "type":30,
+ "type.str":"features",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"03",
+ "mdc":true,
+ "aead":true,
+ "v5 keys":false
+ },
+ {
+ "type":23,
+ "type.str":"key server preferences",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"80",
+ "no-modify":true
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "raw":"04b54fdebbb673423a5d0aa54423674f21b2441527",
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "raw":"5c55afe7",
+ "creation time":1549119463
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "raw":"23674f21b2441527",
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"d727",
+ "material":{
+ "r.bits":251,
+ "r.raw":"0560f6c11f1c305a1ad2ea95448159d18a511ac737b0897b6513cf5ffba10081",
+ "s.bits":256,
+ "s.raw":"c38b8450c8b1ecf937ceac13526cb12cc02bb5a0487c5661edfd237bfa6a8d2d"
+ }
+ },
+ {
+ "header":{
+ "offset":244,
+ "tag":14,
+ "tag.str":"Public Subkey",
+ "raw":"b856",
+ "length":86,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"045ac3823512082a8648ce3d0301070203042c3380acb206f3900142ed48c2040ca6222e5308fe37b89b8067a74d1724e5d901a57e3c78ade56e3a2f5e7e189019de03bcf5e227b3dfe49d83a50500c155d903010807",
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":18,
+ "algorithm.str":"ECDH",
+ "material":{
+ "p.bits":515,
+ "p.raw":"042c3380acb206f3900142ed48c2040ca6222e5308fe37b89b8067a74d1724e5d901a57e3c78ade56e3a2f5e7e189019de03bcf5e227b3dfe49d83a50500c155d9",
+ "curve":"NIST P-256",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "key wrap algorithm":7,
+ "key wrap algorithm.str":"AES-128"
+ },
+ "keyid":"37e285e9e9851491",
+ "fingerprint":"40e608afbc8d62cdcc08904f37e285e9e9851491",
+ "grip":"a56dc8db8355747a809037459b4258b8a743eab5"
+ },
+ {
+ "header":{
+ "offset":332,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8878",
+ "length":120,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"041813080020021b0c162104b54fdebbb673423a5d0aa54423674f21b244152705025c55afef000a091023674f21b244152764aa01009eb882fdf0dbb9c504446f22c46ab9fbd1eb17229aa4bb1a27fe59e84153e3f90100b96eaa084a1d2849089d69d23ce1feb446e39aa33a63bd1dc1d5b3d9891eaeef",
+ "version":4,
+ "type":24,
+ "type.str":"Subkey Binding Signature",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"0c",
+ "flags":12,
+ "flags.str":[
+ "encrypt_comm",
+ "encrypt_storage"
+ ]
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "raw":"04b54fdebbb673423a5d0aa54423674f21b2441527",
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "raw":"5c55afef",
+ "creation time":1549119471
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "raw":"23674f21b2441527",
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"64aa",
+ "material":{
+ "r.bits":256,
+ "r.raw":"9eb882fdf0dbb9c504446f22c46ab9fbd1eb17229aa4bb1a27fe59e84153e3f9",
+ "s.bits":256,
+ "s.raw":"b96eaa084a1d2849089d69d23ce1feb446e39aa33a63bd1dc1d5b3d9891eaeef"
+ }
+ }
+]
diff --git a/src/tests/data/test_list_packets/list_json_grips.txt b/src/tests/data/test_list_packets/list_json_grips.txt
new file mode 100644
index 0000000..63e6b42
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_json_grips.txt
@@ -0,0 +1,274 @@
+[
+ {
+ "header":{
+ "offset":0,
+ "tag":6,
+ "tag.str":"Public Key",
+ "raw":"9852",
+ "length":82,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "material":{
+ "p.bits":515,
+ "curve":"NIST P-256"
+ },
+ "keyid":"23674f21b2441527",
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527",
+ "grip":"fc81aece90bce6e54d0d637d266109783ac8dac0"
+ },
+ {
+ "header":{
+ "offset":84,
+ "tag":13,
+ "tag.str":"User ID",
+ "raw":"b408",
+ "length":8,
+ "partial":false,
+ "indeterminate":false
+ },
+ "userid":"ecc-p256"
+ },
+ {
+ "header":{
+ "offset":94,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8894",
+ "length":148,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "type":19,
+ "type.str":"Positive User ID certification",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "flags":3,
+ "flags.str":[
+ "certify",
+ "sign"
+ ]
+ },
+ {
+ "type":11,
+ "type.str":"preferred symmetric algorithms",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 9,
+ 8,
+ 7,
+ 2
+ ],
+ "algorithms.str":[
+ "AES-256",
+ "AES-192",
+ "AES-128",
+ "TripleDES"
+ ]
+ },
+ {
+ "type":34,
+ "type.str":"preferred AEAD algorithms",
+ "length":2,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 2,
+ 1
+ ],
+ "algorithms.str":[
+ "OCB",
+ "EAX"
+ ]
+ },
+ {
+ "type":21,
+ "type.str":"preferred hash algorithms",
+ "length":5,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 10,
+ 9,
+ 8,
+ 11,
+ 2
+ ],
+ "algorithms.str":[
+ "SHA512",
+ "SHA384",
+ "SHA256",
+ "SHA224",
+ "SHA1"
+ ]
+ },
+ {
+ "type":22,
+ "type.str":"preferred compression algorithms",
+ "length":3,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 2,
+ 3,
+ 1
+ ],
+ "algorithms.str":[
+ "ZLib",
+ "BZip2",
+ "ZIP"
+ ]
+ },
+ {
+ "type":30,
+ "type.str":"features",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "mdc":true,
+ "aead":true,
+ "v5 keys":false
+ },
+ {
+ "type":23,
+ "type.str":"key server preferences",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "no-modify":true
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "creation time":1549119463
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"d727",
+ "material":{
+ "r.bits":251,
+ "s.bits":256
+ }
+ },
+ {
+ "header":{
+ "offset":244,
+ "tag":14,
+ "tag.str":"Public Subkey",
+ "raw":"b856",
+ "length":86,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":18,
+ "algorithm.str":"ECDH",
+ "material":{
+ "p.bits":515,
+ "curve":"NIST P-256",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "key wrap algorithm":7,
+ "key wrap algorithm.str":"AES-128"
+ },
+ "keyid":"37e285e9e9851491",
+ "fingerprint":"40e608afbc8d62cdcc08904f37e285e9e9851491",
+ "grip":"a56dc8db8355747a809037459b4258b8a743eab5"
+ },
+ {
+ "header":{
+ "offset":332,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8878",
+ "length":120,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "type":24,
+ "type.str":"Subkey Binding Signature",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "flags":12,
+ "flags.str":[
+ "encrypt_comm",
+ "encrypt_storage"
+ ]
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "creation time":1549119471
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"64aa",
+ "material":{
+ "r.bits":256,
+ "s.bits":256
+ }
+ }
+]
diff --git a/src/tests/data/test_list_packets/list_json_mpi.txt b/src/tests/data/test_list_packets/list_json_mpi.txt
new file mode 100644
index 0000000..e204f2c
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_json_mpi.txt
@@ -0,0 +1,276 @@
+[
+ {
+ "header":{
+ "offset":0,
+ "tag":6,
+ "tag.str":"Public Key",
+ "raw":"9852",
+ "length":82,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "material":{
+ "p.bits":515,
+ "p.raw":"0412e46ea69f97616a667aebbf125c4d5acdabea7fc048b563bd42ff15752d6f104a03d78babaf93902932ee1e10d18ef49075ac51b647f4b08e754fbdb7d2c4f7",
+ "curve":"NIST P-256"
+ },
+ "keyid":"23674f21b2441527"
+ },
+ {
+ "header":{
+ "offset":84,
+ "tag":13,
+ "tag.str":"User ID",
+ "raw":"b408",
+ "length":8,
+ "partial":false,
+ "indeterminate":false
+ },
+ "userid":"ecc-p256"
+ },
+ {
+ "header":{
+ "offset":94,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8894",
+ "length":148,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "type":19,
+ "type.str":"Positive User ID certification",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "flags":3,
+ "flags.str":[
+ "certify",
+ "sign"
+ ]
+ },
+ {
+ "type":11,
+ "type.str":"preferred symmetric algorithms",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 9,
+ 8,
+ 7,
+ 2
+ ],
+ "algorithms.str":[
+ "AES-256",
+ "AES-192",
+ "AES-128",
+ "TripleDES"
+ ]
+ },
+ {
+ "type":34,
+ "type.str":"preferred AEAD algorithms",
+ "length":2,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 2,
+ 1
+ ],
+ "algorithms.str":[
+ "OCB",
+ "EAX"
+ ]
+ },
+ {
+ "type":21,
+ "type.str":"preferred hash algorithms",
+ "length":5,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 10,
+ 9,
+ 8,
+ 11,
+ 2
+ ],
+ "algorithms.str":[
+ "SHA512",
+ "SHA384",
+ "SHA256",
+ "SHA224",
+ "SHA1"
+ ]
+ },
+ {
+ "type":22,
+ "type.str":"preferred compression algorithms",
+ "length":3,
+ "hashed":true,
+ "critical":false,
+ "algorithms":[
+ 2,
+ 3,
+ 1
+ ],
+ "algorithms.str":[
+ "ZLib",
+ "BZip2",
+ "ZIP"
+ ]
+ },
+ {
+ "type":30,
+ "type.str":"features",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "mdc":true,
+ "aead":true,
+ "v5 keys":false
+ },
+ {
+ "type":23,
+ "type.str":"key server preferences",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "no-modify":true
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "creation time":1549119463
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"d727",
+ "material":{
+ "r.bits":251,
+ "r.raw":"0560f6c11f1c305a1ad2ea95448159d18a511ac737b0897b6513cf5ffba10081",
+ "s.bits":256,
+ "s.raw":"c38b8450c8b1ecf937ceac13526cb12cc02bb5a0487c5661edfd237bfa6a8d2d"
+ }
+ },
+ {
+ "header":{
+ "offset":244,
+ "tag":14,
+ "tag.str":"Public Subkey",
+ "raw":"b856",
+ "length":86,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":18,
+ "algorithm.str":"ECDH",
+ "material":{
+ "p.bits":515,
+ "p.raw":"042c3380acb206f3900142ed48c2040ca6222e5308fe37b89b8067a74d1724e5d901a57e3c78ade56e3a2f5e7e189019de03bcf5e227b3dfe49d83a50500c155d9",
+ "curve":"NIST P-256",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "key wrap algorithm":7,
+ "key wrap algorithm.str":"AES-128"
+ },
+ "keyid":"37e285e9e9851491"
+ },
+ {
+ "header":{
+ "offset":332,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8878",
+ "length":120,
+ "partial":false,
+ "indeterminate":false
+ },
+ "version":4,
+ "type":24,
+ "type.str":"Subkey Binding Signature",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "flags":12,
+ "flags.str":[
+ "encrypt_comm",
+ "encrypt_storage"
+ ]
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "creation time":1549119471
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"64aa",
+ "material":{
+ "r.bits":256,
+ "r.raw":"9eb882fdf0dbb9c504446f22c46ab9fbd1eb17229aa4bb1a27fe59e84153e3f9",
+ "s.bits":256,
+ "s.raw":"b96eaa084a1d2849089d69d23ce1feb446e39aa33a63bd1dc1d5b3d9891eaeef"
+ }
+ }
+]
diff --git a/src/tests/data/test_list_packets/list_json_raw.txt b/src/tests/data/test_list_packets/list_json_raw.txt
new file mode 100644
index 0000000..c70138a
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_json_raw.txt
@@ -0,0 +1,289 @@
+[
+ {
+ "header":{
+ "offset":0,
+ "tag":6,
+ "tag.str":"Public Key",
+ "raw":"9852",
+ "length":82,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"045ac3823513082a8648ce3d03010702030412e46ea69f97616a667aebbf125c4d5acdabea7fc048b563bd42ff15752d6f104a03d78babaf93902932ee1e10d18ef49075ac51b647f4b08e754fbdb7d2c4f7",
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "material":{
+ "p.bits":515,
+ "curve":"NIST P-256"
+ },
+ "keyid":"23674f21b2441527"
+ },
+ {
+ "header":{
+ "offset":84,
+ "tag":13,
+ "tag.str":"User ID",
+ "raw":"b408",
+ "length":8,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"6563632d70323536",
+ "userid":"ecc-p256"
+ },
+ {
+ "header":{
+ "offset":94,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8894",
+ "length":148,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"04131308003c021b03050b090807020322020106150a09080b020416020301021e03021780162104b54fdebbb673423a5d0aa54423674f21b244152705025c55afe7000a091023674f21b2441527d72700fb0560f6c11f1c305a1ad2ea95448159d18a511ac737b0897b6513cf5ffba100810100c38b8450c8b1ecf937ceac13526cb12cc02bb5a0487c5661edfd237bfa6a8d2d",
+ "version":4,
+ "type":19,
+ "type.str":"Positive User ID certification",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"03",
+ "flags":3,
+ "flags.str":[
+ "certify",
+ "sign"
+ ]
+ },
+ {
+ "type":11,
+ "type.str":"preferred symmetric algorithms",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "raw":"09080702",
+ "algorithms":[
+ 9,
+ 8,
+ 7,
+ 2
+ ],
+ "algorithms.str":[
+ "AES-256",
+ "AES-192",
+ "AES-128",
+ "TripleDES"
+ ]
+ },
+ {
+ "type":34,
+ "type.str":"preferred AEAD algorithms",
+ "length":2,
+ "hashed":true,
+ "critical":false,
+ "raw":"0201",
+ "algorithms":[
+ 2,
+ 1
+ ],
+ "algorithms.str":[
+ "OCB",
+ "EAX"
+ ]
+ },
+ {
+ "type":21,
+ "type.str":"preferred hash algorithms",
+ "length":5,
+ "hashed":true,
+ "critical":false,
+ "raw":"0a09080b02",
+ "algorithms":[
+ 10,
+ 9,
+ 8,
+ 11,
+ 2
+ ],
+ "algorithms.str":[
+ "SHA512",
+ "SHA384",
+ "SHA256",
+ "SHA224",
+ "SHA1"
+ ]
+ },
+ {
+ "type":22,
+ "type.str":"preferred compression algorithms",
+ "length":3,
+ "hashed":true,
+ "critical":false,
+ "raw":"020301",
+ "algorithms":[
+ 2,
+ 3,
+ 1
+ ],
+ "algorithms.str":[
+ "ZLib",
+ "BZip2",
+ "ZIP"
+ ]
+ },
+ {
+ "type":30,
+ "type.str":"features",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"03",
+ "mdc":true,
+ "aead":true,
+ "v5 keys":false
+ },
+ {
+ "type":23,
+ "type.str":"key server preferences",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"80",
+ "no-modify":true
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "raw":"04b54fdebbb673423a5d0aa54423674f21b2441527",
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "raw":"5c55afe7",
+ "creation time":1549119463
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "raw":"23674f21b2441527",
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"d727",
+ "material":{
+ "r.bits":251,
+ "s.bits":256
+ }
+ },
+ {
+ "header":{
+ "offset":244,
+ "tag":14,
+ "tag.str":"Public Subkey",
+ "raw":"b856",
+ "length":86,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"045ac3823512082a8648ce3d0301070203042c3380acb206f3900142ed48c2040ca6222e5308fe37b89b8067a74d1724e5d901a57e3c78ade56e3a2f5e7e189019de03bcf5e227b3dfe49d83a50500c155d903010807",
+ "version":4,
+ "creation time":1522762293,
+ "algorithm":18,
+ "algorithm.str":"ECDH",
+ "material":{
+ "p.bits":515,
+ "curve":"NIST P-256",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "key wrap algorithm":7,
+ "key wrap algorithm.str":"AES-128"
+ },
+ "keyid":"37e285e9e9851491"
+ },
+ {
+ "header":{
+ "offset":332,
+ "tag":2,
+ "tag.str":"Signature",
+ "raw":"8878",
+ "length":120,
+ "partial":false,
+ "indeterminate":false
+ },
+ "raw":"041813080020021b0c162104b54fdebbb673423a5d0aa54423674f21b244152705025c55afef000a091023674f21b244152764aa01009eb882fdf0dbb9c504446f22c46ab9fbd1eb17229aa4bb1a27fe59e84153e3f90100b96eaa084a1d2849089d69d23ce1feb446e39aa33a63bd1dc1d5b3d9891eaeef",
+ "version":4,
+ "type":24,
+ "type.str":"Subkey Binding Signature",
+ "algorithm":19,
+ "algorithm.str":"ECDSA",
+ "hash algorithm":8,
+ "hash algorithm.str":"SHA256",
+ "subpackets":[
+ {
+ "type":27,
+ "type.str":"key flags",
+ "length":1,
+ "hashed":true,
+ "critical":false,
+ "raw":"0c",
+ "flags":12,
+ "flags.str":[
+ "encrypt_comm",
+ "encrypt_storage"
+ ]
+ },
+ {
+ "type":33,
+ "type.str":"issuer fingerprint",
+ "length":21,
+ "hashed":true,
+ "critical":false,
+ "raw":"04b54fdebbb673423a5d0aa54423674f21b2441527",
+ "fingerprint":"b54fdebbb673423a5d0aa54423674f21b2441527"
+ },
+ {
+ "type":2,
+ "type.str":"signature creation time",
+ "length":4,
+ "hashed":true,
+ "critical":false,
+ "raw":"5c55afef",
+ "creation time":1549119471
+ },
+ {
+ "type":16,
+ "type.str":"issuer key ID",
+ "length":8,
+ "hashed":false,
+ "critical":false,
+ "raw":"23674f21b2441527",
+ "issuer keyid":"23674f21b2441527"
+ }
+ ],
+ "lbits":"64aa",
+ "material":{
+ "r.bits":256,
+ "s.bits":256
+ }
+ }
+]
diff --git a/src/tests/data/test_list_packets/list_mpi.txt b/src/tests/data/test_list_packets/list_mpi.txt
new file mode 100644
index 0000000..0e119e5
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_mpi.txt
@@ -0,0 +1,77 @@
+:armored input
+:off 0: packet header 0x9852 (tag 6, len 82)
+Public key packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 19 (ECDSA)
+ public key material:
+ ecc p: 515 bits, 0412e46ea69f97616a667aebbf125c4d5acdabea7fc048b563bd42ff15752d6f104a03d78babaf93902932ee1e10d18ef49075ac51b647f4b08e754fbdb7d2c4f7
+ ecc curve: NIST P-256
+ keyid: 0x23674f21b2441527
+:off 84: packet header 0xb408 (tag 13, len 8)
+UserID packet
+ id: ecc-p256
+:off 94: packet header 0x8894 (tag 2, len 148)
+Signature packet
+ version: 4
+ type: 19 (Positive User ID certification)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ key flags: 0x03 ( certify sign )
+ :type 11, len 4
+ preferred symmetric algorithms: AES-256, AES-192, AES-128, TripleDES (9, 8, 7, 2)
+ :type 34, len 2
+ preferred aead algorithms: OCB, EAX (2, 1)
+ :type 21, len 5
+ preferred hash algorithms: SHA512, SHA384, SHA256, SHA224, SHA1 (10, 9, 8, 11, 2)
+ :type 22, len 3
+ preferred compression algorithms: ZLib, BZip2, ZIP (2, 3, 1)
+ :type 30, len 1
+ features: 0x03 ( mdc aead )
+ :type 23, len 1
+ key server preferences
+ no-modify: 1
+ :type 33, len 21
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ signature creation time: 1549119463 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0xd727
+ signature material:
+ ecc r: 251 bits, 0560f6c11f1c305a1ad2ea95448159d18a511ac737b0897b6513cf5ffba10081
+ ecc s: 256 bits, c38b8450c8b1ecf937ceac13526cb12cc02bb5a0487c5661edfd237bfa6a8d2d
+:off 244: packet header 0xb856 (tag 14, len 86)
+Public subkey packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 18 (ECDH)
+ public key material:
+ ecdh p: 515 bits, 042c3380acb206f3900142ed48c2040ca6222e5308fe37b89b8067a74d1724e5d901a57e3c78ade56e3a2f5e7e189019de03bcf5e227b3dfe49d83a50500c155d9
+ ecdh curve: NIST P-256
+ ecdh hash algorithm: 8 (SHA256)
+ ecdh key wrap algorithm: 7
+ keyid: 0x37e285e9e9851491
+:off 332: packet header 0x8878 (tag 2, len 120)
+Signature packet
+ version: 4
+ type: 24 (Subkey Binding Signature)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ key flags: 0x0c ( encrypt_comm encrypt_storage )
+ :type 33, len 21
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ signature creation time: 1549119471 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0x64aa
+ signature material:
+ ecc r: 256 bits, 9eb882fdf0dbb9c504446f22c46ab9fbd1eb17229aa4bb1a27fe59e84153e3f9
+ ecc s: 256 bits, b96eaa084a1d2849089d69d23ce1feb446e39aa33a63bd1dc1d5b3d9891eaeef
diff --git a/src/tests/data/test_list_packets/list_raw.txt b/src/tests/data/test_list_packets/list_raw.txt
new file mode 100644
index 0000000..7c6cd12
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_raw.txt
@@ -0,0 +1,148 @@
+:armored input
+:off 0: packet header 0x9852 (tag 6, len 82)
+:off 2: packet contents (82 bytes)
+ 00000 | 04 5a c3 82 35 13 08 2a 86 48 ce 3d 03 01 07 02 | .Z..5..*.H.=....
+ 00016 | 03 04 12 e4 6e a6 9f 97 61 6a 66 7a eb bf 12 5c | ....n...ajfz...\
+ 00032 | 4d 5a cd ab ea 7f c0 48 b5 63 bd 42 ff 15 75 2d | MZ.....H.c.B..u-
+ 00048 | 6f 10 4a 03 d7 8b ab af 93 90 29 32 ee 1e 10 d1 | o.J.......)2....
+ 00064 | 8e f4 90 75 ac 51 b6 47 f4 b0 8e 75 4f bd b7 d2 | ...u.Q.G...uO...
+ 00080 | c4 f7 | ..
+
+Public key packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 19 (ECDSA)
+ public key material:
+ ecc p: 515 bits
+ ecc curve: NIST P-256
+ keyid: 0x23674f21b2441527
+:off 84: packet header 0xb408 (tag 13, len 8)
+:off 86: packet contents (8 bytes)
+ 00000 | 65 63 63 2d 70 32 35 36 | ecc-p256
+
+UserID packet
+ id: ecc-p256
+:off 94: packet header 0x8894 (tag 2, len 148)
+:off 96: packet contents (148 bytes)
+ 00000 | 04 13 13 08 00 3c 02 1b 03 05 0b 09 08 07 02 03 | .....<..........
+ 00016 | 22 02 01 06 15 0a 09 08 0b 02 04 16 02 03 01 02 | "...............
+ 00032 | 1e 03 02 17 80 16 21 04 b5 4f de bb b6 73 42 3a | ......!..O...sB:
+ 00048 | 5d 0a a5 44 23 67 4f 21 b2 44 15 27 05 02 5c 55 | ]..D#gO!.D.'..\U
+ 00064 | af e7 00 0a 09 10 23 67 4f 21 b2 44 15 27 d7 27 | ......#gO!.D.'.'
+ 00080 | 00 fb 05 60 f6 c1 1f 1c 30 5a 1a d2 ea 95 44 81 | ...`....0Z....D.
+ 00096 | 59 d1 8a 51 1a c7 37 b0 89 7b 65 13 cf 5f fb a1 | Y..Q..7..{e.._..
+ 00112 | 00 81 01 00 c3 8b 84 50 c8 b1 ec f9 37 ce ac 13 | .......P....7...
+ 00128 | 52 6c b1 2c c0 2b b5 a0 48 7c 56 61 ed fd 23 7b | Rl.,.+..H|Va..#{
+ 00144 | fa 6a 8d 2d | .j.-
+
+Signature packet
+ version: 4
+ type: 19 (Positive User ID certification)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ :subpacket contents:
+ 00000 | 03 | .
+ key flags: 0x03 ( certify sign )
+ :type 11, len 4
+ :subpacket contents:
+ 00000 | 09 08 07 02 | ....
+ preferred symmetric algorithms: AES-256, AES-192, AES-128, TripleDES (9, 8, 7, 2)
+ :type 34, len 2
+ :subpacket contents:
+ 00000 | 02 01 | ..
+ preferred aead algorithms: OCB, EAX (2, 1)
+ :type 21, len 5
+ :subpacket contents:
+ 00000 | 0a 09 08 0b 02 | .....
+ preferred hash algorithms: SHA512, SHA384, SHA256, SHA224, SHA1 (10, 9, 8, 11, 2)
+ :type 22, len 3
+ :subpacket contents:
+ 00000 | 02 03 01 | ...
+ preferred compression algorithms: ZLib, BZip2, ZIP (2, 3, 1)
+ :type 30, len 1
+ :subpacket contents:
+ 00000 | 03 | .
+ features: 0x03 ( mdc aead )
+ :type 23, len 1
+ :subpacket contents:
+ 00000 | 80 | .
+ key server preferences
+ no-modify: 1
+ :type 33, len 21
+ :subpacket contents:
+ 00000 | 04 b5 4f de bb b6 73 42 3a 5d 0a a5 44 23 67 4f | ..O...sB:]..D#gO
+ 00016 | 21 b2 44 15 27 | !.D.'
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ :subpacket contents:
+ 00000 | 5c 55 af e7 | \U..
+ signature creation time: 1549119463 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ :subpacket contents:
+ 00000 | 23 67 4f 21 b2 44 15 27 | #gO!.D.'
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0xd727
+ signature material:
+ ecc r: 251 bits
+ ecc s: 256 bits
+:off 244: packet header 0xb856 (tag 14, len 86)
+:off 246: packet contents (86 bytes)
+ 00000 | 04 5a c3 82 35 12 08 2a 86 48 ce 3d 03 01 07 02 | .Z..5..*.H.=....
+ 00016 | 03 04 2c 33 80 ac b2 06 f3 90 01 42 ed 48 c2 04 | ..,3.......B.H..
+ 00032 | 0c a6 22 2e 53 08 fe 37 b8 9b 80 67 a7 4d 17 24 | ..".S..7...g.M.$
+ 00048 | e5 d9 01 a5 7e 3c 78 ad e5 6e 3a 2f 5e 7e 18 90 | ....~<x..n:/^~..
+ 00064 | 19 de 03 bc f5 e2 27 b3 df e4 9d 83 a5 05 00 c1 | ......'.........
+ 00080 | 55 d9 03 01 08 07 | U.....
+
+Public subkey packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 18 (ECDH)
+ public key material:
+ ecdh p: 515 bits
+ ecdh curve: NIST P-256
+ ecdh hash algorithm: 8 (SHA256)
+ ecdh key wrap algorithm: 7
+ keyid: 0x37e285e9e9851491
+:off 332: packet header 0x8878 (tag 2, len 120)
+:off 334: packet contents (120 bytes)
+ 00000 | 04 18 13 08 00 20 02 1b 0c 16 21 04 b5 4f de bb | ..... ....!..O..
+ 00016 | b6 73 42 3a 5d 0a a5 44 23 67 4f 21 b2 44 15 27 | .sB:]..D#gO!.D.'
+ 00032 | 05 02 5c 55 af ef 00 0a 09 10 23 67 4f 21 b2 44 | ..\U......#gO!.D
+ 00048 | 15 27 64 aa 01 00 9e b8 82 fd f0 db b9 c5 04 44 | .'d............D
+ 00064 | 6f 22 c4 6a b9 fb d1 eb 17 22 9a a4 bb 1a 27 fe | o".j....."....'.
+ 00080 | 59 e8 41 53 e3 f9 01 00 b9 6e aa 08 4a 1d 28 49 | Y.AS.....n..J.(I
+ 00096 | 08 9d 69 d2 3c e1 fe b4 46 e3 9a a3 3a 63 bd 1d | ..i.<...F...:c..
+ 00112 | c1 d5 b3 d9 89 1e ae ef | ........
+
+Signature packet
+ version: 4
+ type: 24 (Subkey Binding Signature)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ :subpacket contents:
+ 00000 | 0c | .
+ key flags: 0x0c ( encrypt_comm encrypt_storage )
+ :type 33, len 21
+ :subpacket contents:
+ 00000 | 04 b5 4f de bb b6 73 42 3a 5d 0a a5 44 23 67 4f | ..O...sB:]..D#gO
+ 00016 | 21 b2 44 15 27 | !.D.'
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ :subpacket contents:
+ 00000 | 5c 55 af ef | \U..
+ signature creation time: 1549119471 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ :subpacket contents:
+ 00000 | 23 67 4f 21 b2 44 15 27 | #gO!.D.'
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0x64aa
+ signature material:
+ ecc r: 256 bits
+ ecc s: 256 bits
diff --git a/src/tests/data/test_list_packets/list_standard.txt b/src/tests/data/test_list_packets/list_standard.txt
new file mode 100644
index 0000000..b3c5001
--- /dev/null
+++ b/src/tests/data/test_list_packets/list_standard.txt
@@ -0,0 +1,77 @@
+:armored input
+:off 0: packet header 0x9852 (tag 6, len 82)
+Public key packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 19 (ECDSA)
+ public key material:
+ ecc p: 515 bits
+ ecc curve: NIST P-256
+ keyid: 0x23674f21b2441527
+:off 84: packet header 0xb408 (tag 13, len 8)
+UserID packet
+ id: ecc-p256
+:off 94: packet header 0x8894 (tag 2, len 148)
+Signature packet
+ version: 4
+ type: 19 (Positive User ID certification)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ key flags: 0x03 ( certify sign )
+ :type 11, len 4
+ preferred symmetric algorithms: AES-256, AES-192, AES-128, TripleDES (9, 8, 7, 2)
+ :type 34, len 2
+ preferred aead algorithms: OCB, EAX (2, 1)
+ :type 21, len 5
+ preferred hash algorithms: SHA512, SHA384, SHA256, SHA224, SHA1 (10, 9, 8, 11, 2)
+ :type 22, len 3
+ preferred compression algorithms: ZLib, BZip2, ZIP (2, 3, 1)
+ :type 30, len 1
+ features: 0x03 ( mdc aead )
+ :type 23, len 1
+ key server preferences
+ no-modify: 1
+ :type 33, len 21
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ signature creation time: 1549119463 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0xd727
+ signature material:
+ ecc r: 251 bits
+ ecc s: 256 bits
+:off 244: packet header 0xb856 (tag 14, len 86)
+Public subkey packet
+ version: 4
+ creation time: 1522762293 (??? ??? ?? ??:??:?? 2018)
+ public key algorithm: 18 (ECDH)
+ public key material:
+ ecdh p: 515 bits
+ ecdh curve: NIST P-256
+ ecdh hash algorithm: 8 (SHA256)
+ ecdh key wrap algorithm: 7
+ keyid: 0x37e285e9e9851491
+:off 332: packet header 0x8878 (tag 2, len 120)
+Signature packet
+ version: 4
+ type: 24 (Subkey Binding Signature)
+ public key algorithm: 19 (ECDSA)
+ hash algorithm: 8 (SHA256)
+ hashed subpackets:
+ :type 27, len 1
+ key flags: 0x0c ( encrypt_comm encrypt_storage )
+ :type 33, len 21
+ issuer fingerprint: 0xb54fdebbb673423a5d0aa54423674f21b2441527 (20 bytes)
+ :type 2, len 4
+ signature creation time: 1549119471 (??? ??? ?? ??:??:?? 2019)
+ unhashed subpackets:
+ :type 16, len 8
+ issuer key ID: 0x23674f21b2441527
+ lbits: 0x64aa
+ signature material:
+ ecc r: 256 bits
+ ecc s: 256 bits