Is there a way to convert a (binary) .key
file to an ASCII-armored .asc
file?
There is a previous post which seems to suggest the file extension don't matter, the file content is the same: What is the difference b/w .pkr and .key file with respect to PGP?
You can use GnuPG for this. From man gpg
:
--enarmor
--dearmor
Pack or unpack an arbitrary input into/from an OpenPGP ASCII armor.
This is a GnuPG extension to OpenPGP and in general not very useful.
--enarmor
reads from stdin and outputs the armored version to stdout, --dearmor
works the other way round. For ASCII armoring a binary keyring, use gpg --enarmor <file.key >file.asc
.
Although the two files are different, they share the same OpenPGP packets and can be converted in both directions. The ASCII-armored version was created for usage in e-mail and other plain ASCII protocols.