I would like to upload my public key to a key server, but I already have my key infrastructure in place without GPG and I don't want to install extra software I don't need. Is there an easy way to ASCII-armor my public key without installing the whole GnuPG software suite?
How to ASCII-armor the public key without installing GPG
gnupgpublic-keypublic-key-encryption
Best Answer
OpenPGP's "Radix-64" ASCII armor, described in RFC 4880 ยง 6, is mostly just standard Base64 with PEM-like begin/end headers, and with a CRC24 checksum at the end. It can be implemented like this:
Write the Armor Header Line; optional Armor Headers; and a blank line:
Write the Base64-encoded message, wrapped to 76 characters per line.
Write the checksum line, consisting of a
=
followed by the Base64-encoded Armor Checksum:(See section 6.1 for the example CRC24 code.)
Finally, write the Armor Tail: