pgpdump
Kazu Yamamoto
pgpdump is a PGP packet visualizer which displays the packet format of OpenPGP (RFC 4880) and PGP version 2 (RFC 1991).
How does pgpdump work?
PGP produces binary files or files encoded with ASCII armor (which is identical to the MIME Base64 encoding). An example of ASCII armor file is as follows (say "sig.pgp"):
% cat sig.pgp -----BEGIN PGP MESSAGE----- Version: GnuPG v1.2.6 (NetBSD) Comment: For info see http://www.gnupg.org owGbwMvMwCSYq3dE6sEMJU7GNYZJLGmZOanWn4xaQzIyixWAKFEhN7W4ODE9VaEk XyEpVaE4Mz0vNUUhqVIhwD1Aj6vDnpmVAaQeZogg060chvkFjPMr2CZNmPnwyebF fJP+td+b6biAYb779N1eL3gcHUyNsjliW1ekbZk6wRwA =+jUx -----END PGP MESSAGE-----
It's very hard to understand the data structure inside this. Pgpdump visualizes this example as follows:
% pgpdump sig.pgp Old: 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 18:35:42 JST 1998 Key ID - 0xA79778E247B63037 Pub alg - DSA Digital Signature Algorithm(pub 17) Hash alg - SHA1(hash 2) Hash left 2 bytes - 27 ae DSA r(159 bits) - ... DSA s(159 bits) - ... -> hash(DSA q bits) Old: Literal Data Packet(tag 11)(45 bytes) Format - binary Filename - hoge File modified time - Sun Apr 27 04:41:04 JST 1975 Literal - ...
Availability
- The first release of pgpdump was December 1998.
- The current version is 0.36 (29 Jan 2024). Download the source.
- Git repository is available on github.
- Web interface maintained by Stefan H. Holek.
- Pgpdump ready public-key server maintained by Hironobu Suzuki.
History of PGP format
- The comprehensive book about PGP written by Simson Garfinkel (O'Reilly) says:
- "First Zimmermann wrote a paper describing standards and data structures for representing encryption keys, encrypted text, and signatures. The paper was eventually published in IEEE Computer".
- I guess the following is the one:
- Philip Zimmermann, "A Proposed Standard Format for RSA Cryptosystems", IEEE Computer 19(9), pp 21-34 (1986).
- The first description of the PGP 2 format was written in "doc/pgformat.doc".
- RFC 1991, the PGP 2 format, was published in August 1996.
- RFC 2440, the OpenPGP format was published in November 1998.
- RFC 2440 has been revised by the RFC 4880 in November 2007.