Skip to content

Commit

Permalink
Key ID hack.
Browse files Browse the repository at this point in the history
        Jason Harris <jharris>
  • Loading branch information
kazu-yamamoto committed Feb 19, 2010
1 parent ae0239e commit c5db791
Show file tree
Hide file tree
Showing 17 changed files with 36 additions and 24 deletions.
6 changes: 6 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ bindir = @bindir@
mandir = @mandir@/man1
LIBS = @LIBS@

CFLAGS = -O -Wall
CFLAGS = -O
RM = rm -f
INSTALL = install -c -m

Expand Down
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pgpdump: a PGP packet visualizer

Kazu Yamamoto <kazu@iijlab.net>
Nov 12, 2001
Dec 6, 2001


<Overview>
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data/enc.res
Original file line number Diff line number Diff line change
Expand Up @@ -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) - ...
Expand Down
2 changes: 1 addition & 1 deletion data/enc2.res
Original file line number Diff line number Diff line change
Expand Up @@ -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) - ...
Expand Down
4 changes: 2 additions & 2 deletions data/enc3.res
Original file line number Diff line number Diff line change
@@ -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) - ...
Expand Down
2 changes: 1 addition & 1 deletion data/gpg1.res
Original file line number Diff line number Diff line change
Expand Up @@ -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) - ...
Expand Down
4 changes: 2 additions & 2 deletions data/gpg2.res
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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) - ...
Expand Down
6 changes: 3 additions & 3 deletions data/pub.res
Original file line number Diff line number Diff line change
Expand Up @@ -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) - ...
Expand All @@ -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) - ...
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions data/pub1.res
Original file line number Diff line number Diff line change
Expand Up @@ -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) - ...
Expand All @@ -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) - ...
Expand Down
2 changes: 1 addition & 1 deletion data/sig.res
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions data/sig1.res
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion data/sig2.res
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions data/sig3.res
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion pgpdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions pgpdump.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion types.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ public void
key_id(void)
{
printf("\tKey ID - ");
dump(8);
kdump(8);
printf("\n");
}

Expand Down

0 comments on commit c5db791

Please sign in to comment.