I have used GnuPG, the most well-known open-source implementation of OpenPGP standard, to create my public key in PGP ascii-armoured format (RFC2440):
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.7 (MingW32) - GPGshell v3.63
mQGiBEdJwaoRBACGOLGMcEZvvVoLILK/u8MlEttmZgriE/kh/J4KU7Vq1X2aPqYO
IL19VtHKRzQLpk9sAJK51tUbdDRQAm7A0nkkgHZYFfTLY1a9UYUamx3xgtqQ/aWf
kdeqazc2iOv1WcfaDZruLq5I6CY1BB+naUnlDw1q/4icxBaXy5cATGG/4wCghlVQ
fjutAS44UD/w9WpMWAFiUT8D/ijZI1aoyNzHt1pPgJzu63Q8mOM/5WLXtvIFhseN
Yn5jHQBbZvbz/qLN+A04TOS6ZJeiOb7u3sBinM5HxtwFsL/8R7fX9KDtv/0XeCpC
jJxrkhid3Xa6PdVku121RarbXCVjU2J/emsfM7+M5KzkAMqttCVlOQ1B10wxaKoJ
h37jA/9tY8KfDURirg0MIByMVXqeAy/pjB7y+VbTUynzGOXzjMvpFSXeq5mUQrQa
5wfD6g/bsqREQRgSgRi/5zdQJ3kTwAC/9ia1V37iRDVMcWd177t+NnkMuHh/EQRr
BRFyh6Ahw+uE+DYGzipHrTjbzIbmbx9lprK0a0qc5rp5SJhvj7Q7VmFzc2lsaXMg
TWljaGFsaXRzaXMgKEdQRyBwdWJsaWMga2V5KSA8em1lZWFnYWluQGdtYWlsLmNv
bT6IYAQTEQIAIAUCR0nBqgIbAwYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEApn
iDzXc29ZJrwAn35i7EU/sOhGyMd2qWdYLhXLn0NPAJ4s7yy2FivfsFs3zOppzF/S
mF7qybkCDQRHScGqEAgAsLjOBlN54y75Vkjkj/Gw0X6vy0nj1SZtQDTef8ZF2oYQ
FX0+KgiR+v9Jgu39GTO6adWwga8DXBHwx+72yMiKh7mnd1p2ppuaGzUos0Vj0WJt
lnPXmpmjahWc5NEO/svWEU1OaNPp70OqY3y7k72PmWZU1CGvw+CBe2herFf+1R5T
or6sq31xfuGLW6MSwj2Tf00SeezK0lVZSOfrVHjWj5VQ6cevExEexWi6idU29Hrk
MZ8JfIEE3qPcPBX30s2NrzLU24eFVczv3CRNsGHUdNAsauwpkheycnMvrdGE7yBo
hkEQ08FROsp/RkbcqbKCczoW09Qc+kVr0SDsidLRDwADBQf/folYqDxqrzmGc2vQ
FisWIWMaPp6P602vtTr6CkICEpuWs10aCQCvHWyhS9rv0/ycbPV9F/HLT9JPAwD3
G60wuzzLbqTlFVxhzSORmmN92t0Xe0tBJa7TbuCJ6j5WfdvskopCC2BGhNJnxZbD
gBjrWGOE+dOJY7B/W8NyPerfcS7RIk5YtwP3uIfPiBwSf+75ToiquXqUkFlnA+LY
6aVyr6KHDk/OuV4rKZJdu8JikZkK5H48v9UK/k5WTQPQJhOP7QdfQa70/yz+Zksb
XgyF8YIgFjUKxcHexh2+wWsbeK4A53XdtyY+JFLApZFywE7u+DZQ721PYTMKVYb+
GpxvaYhJBBgRAgAJBQJHScGqAhsMAAoJEApniDzXc29ZQJsAn0MkgLNZOocsb8KZ
0W6yyu1yP4xDAJ41P01c3jmDH/2sNN/+xbjOaF38lg==
=JM2U
You may find it in MIT’s public PGP key server and as
if that weren’t enough, it can also be found here,
here,
here,
here,
and here. To import it into your
keyring save it in a text file, say zmeeagainpk.asc
, and then type:
gpg --import zmeeagainpk.asc
gpg: key D7736F59: public key "Vassilis Michalitsis (GPG public key) <zmeeagain@gmail.com>" imported
gpg: Total number processed: 1
gpg: imported: 1
As an example let’s take the following snippet of text:
The Armor Headers are pairs of strings that can give the user or the receiving OpenPGP implementation some information about how to decode or use the message. The Armor Headers are a part of the armour, not a part of the message, and hence are not protected by any signatures applied to the message.
I have clear signed it using my PGP key and the result is:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
The Armor Headers are pairs of strings that can give the user or the receiving OpenPGP implementation some information about how to decode or use the message. The Armor Headers are a part of the armor, not a part of the message, and hence are not protected by any signatures applied to the message.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32) - GPGshell v3.63
iD8DBQFHUrdQCmeIPNdzb1kRAksZAJ0cOJSKNwkkGmTyQDR4sf39Kl5XgQCffsCu
HpMVh4lnKcq0xmKvc9XA7IU=
=TFRB
-----END PGP SIGNATURE-----
To verify the signature, select this clear signed text, including the armour headers, and save it as signed-text.txt
.
Then type
gpg --verify signed-text.txt
gpg: Signature made 12/02/07 15:46:56 using DSA key ID D7736F59
gpg: Good signature from "Vassilis Michalitsis (GPG public key) <zmeeagain@gmail.com>"
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 426B D59A 9798 E07A 88F8 9647 0A67 883C D773 6F59
Notice that GPG complains that the signing key may not belong to the actual owner. You have to add the newly imported public key to your trusted keys, i.e. the keys you know they come from who they were supposed to, by signing it with your own key:
gpg --edit-key D7736F59
pub 1024D/D7736F59 created: 2007-11-25 expires: never usage: SC
trust: unknown validity: unknown
sub 2048g/61B55FAD created: 2007-11-25 expires: never usage: E
[ unknown] (1). Vassilis Michalitsis (GPG public key) <zmeeagain@gmail.com>
Command> sign
pub 1024D/D7736F59 created: 2007-11-25 expires: never usage: SC
trust: unknown validity: unknown
Primary key fingerprint: 426B D59A 9798 E07A 88F8 9647 0A67 883C D773 6F59
Vassilis Michalitsis (GPG public key) <zmeeagain@gmail.com>
Are you sure that you want to sign this key with your
key "..." (...)
Really sign? (y/N) y
You need a passphrase to unlock the secret key for
user: "..."
... key, ID ..., created ...
Verifying signed-text.txt
should not display a warning anymore:
gpg --verify signed-text.txt
gpg: Signature made 12/02/07 15:46:56 using DSA key ID D7736F59
gpg: Good signature from "Vassilis Michalitsis (GPG public key) <zmeeagain@gmail.com>"
Among the various GPG GUIs GPGShell is perhaps the most comprehensive and it is the one I am using for the examples here.