Permalink
Browse files

Key ID hack.

        Jason Harris <jharris>
  • Loading branch information...
1 parent ae0239e commit c5db791d3749b1810378919640728a1f8567f456 @kazu-yamamoto committed Feb 19, 2010
Showing with 36 additions and 24 deletions.
  1. +6 −0 CHANGES
  2. +1 −1 Makefile.in
  3. +3 −3 README
  4. +1 −1 data/enc.res
  5. +1 −1 data/enc2.res
  6. +2 −2 data/enc3.res
  7. +1 −1 data/gpg1.res
  8. +2 −2 data/gpg2.res
  9. +3 −3 data/pub.res
  10. +2 −2 data/pub1.res
  11. +1 −1 data/sig.res
  12. +2 −2 data/sig1.res
  13. +1 −1 data/sig2.res
  14. +2 −2 data/sig3.res
  15. +1 −1 pgpdump.c
  16. +6 −0 pgpdump.h
  17. +1 −1 types.c
View
@@ -1,5 +1,11 @@
Change Log
+
+0.16 2001/12/06
+
+* Key ID hack.
+ Jason Harris <jharris>
+
0.15 2001/11/13
* Old man style for pgpdump.1.
View
@@ -4,7 +4,7 @@ bindir = @bindir@
mandir = @mandir@/man1
LIBS = @LIBS@
-CFLAGS = -O -Wall
+CFLAGS = -O
RM = rm -f
INSTALL = install -c -m
View
6 README
@@ -1,7 +1,7 @@
pgpdump: a PGP packet visualizer
Kazu Yamamoto <kazu@iijlab.net>
- Nov 12, 2001
+ Dec 6, 2001
<Overview>
@@ -19,14 +19,14 @@ Here is an example:
Sig type - Signature of a binary document(0x00).
Hash alg - SHA1(hash 2)
Pub alg - DSA Digital Signature Standard(pub 17)
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Next packet - other than one pass signature
New: Signature Packet(tag 2)(63 bytes)
Ver 3 - old
Hash material(5 bytes):
Sig type - Signature of a binary document(0x00).
Creation time - Fri Nov 27 22:35:02 JST 1998
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Pub alg - DSA Digital Signature Standard(pub 17)
Hash alg - SHA1(hash 2)
Hash left 2 bytes - 8f 82
View
@@ -2,7 +2,7 @@ Old: Marker Packet(tag 10)(3 bytes)
String - ...
New: Public-Key Encrypted Session Key Packet(tag 1)(526 bytes)
New version(3)
- Key ID - f6 70 5a bf 6e d9 54 e8
+ Key ID - 0xF6705ABF6ED954E8
Pub alg - ElGamal Encrypt-Only(pub 16)
ElGamal g^k mod p(2048 bits) - ...
ElGamal m * y^k mod p(2048 bits) - ...
View
@@ -2,7 +2,7 @@ Old: Marker Packet(tag 10)(3 bytes)
String - ...
New: Public-Key Encrypted Session Key Packet(tag 1)(525 bytes)
New version(3)
- Key ID - f6 70 5a bf 6e d9 54 e8
+ Key ID - 0xF6705ABF6ED954E8
Pub alg - ElGamal Encrypt-Only(pub 16)
ElGamal g^k mod p(2037 bits) - ...
ElGamal m * y^k mod p(2048 bits) - ...
View
@@ -1,12 +1,12 @@
Old: Public-Key Encrypted Session Key Packet(tag 1)(140 bytes)
New version(3)
- Key ID - 0f 64 8a 1c 9e 4f 74 4d
+ Key ID - 0x0F648A1C9E4F744D
Pub alg - RSA Encrypt or Sign(pub 1)
RSA m^e mod n(1021 bits) - ...
-> m = sym alg(1 byte) + checksum(2 bytes) + PKCS-1 block type 02
Old: Public-Key Encrypted Session Key Packet(tag 1)(526 bytes)
New version(3)
- Key ID - f6 70 5a bf 6e d9 54 e8
+ Key ID - 0xF6705ABF6ED954E8
Pub alg - ElGamal Encrypt-Only(pub 16)
ElGamal g^k mod p(2048 bits) - ...
ElGamal m * y^k mod p(2047 bits) - ...
View
@@ -6,7 +6,7 @@ Old: Signature Packet(tag 2)(70 bytes)
Hashed Sub: signature creation time(sub 2)(4 bytes)
Time - Sat Nov 28 00:59:17 JST 1998
Sub: issuer key ID(sub 16)(8 bytes)
- Key ID - fd 90 da 97 32 d8 eb d2
+ Key ID - 0xFD90DA9732D8EBD2
Hash left 2 bytes - 84 a8
DSA r(160 bits) - ...
DSA s(160 bits) - ...
View
@@ -3,7 +3,7 @@ Old: One-Pass Signature Packet(tag 4)(13 bytes)
Sig type - Signature of a binary document(0x00).
Hash alg - SHA1(hash 2)
Pub alg - DSA Digital Signature Standard(pub 17)
- Key ID - fd 90 da 97 32 d8 eb d2
+ Key ID - 0xFD90DA9732D8EBD2
Next packet - other than one pass signature
Old: Literal Data Packet(tag 11)(45 bytes)
Format - binary
@@ -18,7 +18,7 @@ Old: Signature Packet(tag 2)(70 bytes)
Hashed Sub: signature creation time(sub 2)(4 bytes)
Time - Sat Nov 28 01:11:39 JST 1998
Sub: issuer key ID(sub 16)(8 bytes)
- Key ID - fd 90 da 97 32 d8 eb d2
+ Key ID - 0xFD90DA9732D8EBD2
Hash left 2 bytes - 0a 7d
DSA r(160 bits) - ...
DSA s(159 bits) - ...
View
@@ -20,7 +20,7 @@ Old: Signature Packet(tag 2)(75 bytes)
Sym alg - IDEA(sym 1)
Sym alg - Triple-DES(sym 2)
Sub: issuer key ID(sub 16)(8 bytes)
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Hash left 2 bytes - 7e 87
DSA r(160 bits) - ...
DSA s(154 bits) - ...
@@ -39,7 +39,7 @@ Old: Signature Packet(tag 2)(75 bytes)
Sym alg - IDEA(sym 1)
Sym alg - Triple-DES(sym 2)
Sub: issuer key ID(sub 16)(8 bytes)
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Hash left 2 bytes - ba ef
DSA r(160 bits) - ...
DSA s(160 bits) - ...
@@ -56,7 +56,7 @@ Old: Signature Packet(tag 2)(63 bytes)
Hash material(5 bytes):
Sig type - Subkey Binding Signature(0x18).
Creation time - Thu Nov 26 22:49:00 JST 1998
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Pub alg - DSA Digital Signature Standard(pub 17)
Hash alg - SHA1(hash 2)
Hash left 2 bytes - e8 41
View
@@ -29,7 +29,7 @@ Old: Signature Packet(tag 2)(87 bytes)
Hashed Sub: key server preferences(sub 23)(1 bytes)
Flag - No-modify
Sub: issuer key ID(sub 16)(8 bytes)
- Key ID - fd 90 da 97 32 d8 eb d2
+ Key ID - 0xFD90DA9732D8EBD2
Hash left 2 bytes - e2 cb
DSA r(158 bits) - ...
DSA s(158 bits) - ...
@@ -49,7 +49,7 @@ Old: Signature Packet(tag 2)(70 bytes)
Hashed Sub: signature creation time(sub 2)(4 bytes)
Time - Sun Oct 11 23:29:23 JST 1998
Sub: issuer key ID(sub 16)(8 bytes)
- Key ID - fd 90 da 97 32 d8 eb d2
+ Key ID - 0xFD90DA9732D8EBD2
Hash left 2 bytes - 42 66
DSA r(160 bits) - ...
DSA s(160 bits) - ...
View
@@ -3,7 +3,7 @@ Old: Signature Packet(tag 2)(63 bytes)
Hash material(5 bytes):
Sig type - Signature of a binary document(0x00).
Creation time - Fri Nov 27 18:35:42 JST 1998
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Pub alg - DSA Digital Signature Standard(pub 17)
Hash alg - SHA1(hash 2)
Hash left 2 bytes - 27 ae
View
@@ -5,14 +5,14 @@ New: One-Pass Signature Packet(tag 4)(13 bytes)
Sig type - Signature of a binary document(0x00).
Hash alg - SHA1(hash 2)
Pub alg - DSA Digital Signature Standard(pub 17)
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Next packet - other than one pass signature
New: Signature Packet(tag 2)(63 bytes)
Ver 3 - old
Hash material(5 bytes):
Sig type - Signature of a binary document(0x00).
Creation time - Fri Nov 27 22:35:02 JST 1998
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Pub alg - DSA Digital Signature Standard(pub 17)
Hash alg - SHA1(hash 2)
Hash left 2 bytes - 8f 82
View
@@ -3,7 +3,7 @@ Old: Signature Packet(tag 2)(149 bytes)
Hash material(5 bytes):
Sig type - Signature of a binary document(0x00).
Creation time - Fri Nov 27 23:42:12 JST 1998
- Key ID - 0f 64 8a 1c 9e 4f 74 4d
+ Key ID - 0x0F648A1C9E4F744D
Pub alg - RSA Encrypt or Sign(pub 1)
Hash alg - MD5(hash 1)
Hash left 2 bytes - 66 36
View
@@ -5,14 +5,14 @@ New: One-Pass Signature Packet(tag 4)(13 bytes)
Sig type - Signature of a binary document(0x00).
Hash alg - SHA1(hash 2)
Pub alg - DSA Digital Signature Standard(pub 17)
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Next packet - other than one pass signature
New: Signature Packet(tag 2)(63 bytes)
Ver 3 - old
Hash material(5 bytes):
Sig type - Signature of a binary document(0x00).
Creation time - Sat Nov 28 00:36:59 JST 1998
- Key ID - a7 97 78 e2 47 b6 30 37
+ Key ID - 0xA79778E247B63037
Pub alg - DSA Digital Signature Standard(pub 17)
Hash alg - SHA1(hash 2)
Hash left 2 bytes - 51 81
View
@@ -11,7 +11,7 @@ int mflag;
int pflag;
int uflag;
-private char *pgpdump_version = "0.15, Copyright (C) 1998-2001 Kazu Yamamoto";
+private char *pgpdump_version = "0.16, Copyright (C) 1998-2001 Kazu Yamamoto";
private char *prog;
private void usage(void);
View
@@ -68,6 +68,12 @@ public void Getc_resetlen(void);
int i; for (i = 0; i < (len); i++) printf("%02x ", Getc());\
} while (0)
+#define kdump(len) do {\
+ int i;\
+ printf("0x");\
+ for (i = 0; i < (len); i++) printf("%02X", Getc());\
+ } while (0)
+
/*
* packet.c
*/
View
@@ -157,7 +157,7 @@ public void
key_id(void)
{
printf("\tKey ID - ");
- dump(8);
+ kdump(8);
printf("\n");
}

0 comments on commit c5db791

Please sign in to comment.