3

The gpg command "--enarmor" or "--enarmour"

gpg2 --enarmor /home/none/testing.asc

creates a file with a .gpg extension such as:

-----BEGIN PGP ARMORED FILE-----

Comment: Use "gpg --dearmor" for unpacking

LS0tLS1CRUdJTiBQR1AgU0lHTkVEIE1FU1NBR0UtLS0tLQpIYXNoOiBTSEE1MTIK
CkhTSU5EIFpVUEROIFFKRUVNIFdEVVhJIEpTV1VYIGV0Yy4KLS0tLS1CRUdJTiBQ
R1AgU0lHTkFUVVJFLS0tLS0KCmlMZ0VBUk1LQUIwV0lRUXRLVW5uSjhxQzlhRDlN
d2wrcjltT05SRDZJd1VDV3lYaWlnQUtDUkIrcjltT05SRDYKSXhZeUFna0JwWDFz
WmY0cG54WVpZa0ExSkhPekkwdzNaZmpZS09PT0h2OWRGM3FVSHcvUXhuQWlYMGJ2
T3ZoeAovZ2Fnb0lEbzdBa3RNd0lRV05HQ1ZIUDlwZUZsQ1lVQ0IyQUpCUlVtdDZQ
a284YWkwSkRoaDNuQWovTDNaU3pBCk5kU1RjQXphTzZCaytQVW90NHYvdTVsd2Vo
N3NxUHFNWTY5YWlRYUtXcHVWbHY2MkZxSU9tRmpMCj1xUjRxCi0tLS0tRU5EIFBH
UCBTSUdOQVRVUkUtLS0tLQo=
=z8/a

-----END PGP ARMORED FILE-----

from a file such as:

-----BEGIN PGP SIGNED MESSAGE-----

Hash: SHA512

HSIND LUPDN QJEEM WDUXI RBAYO etc.

-----BEGIN PGP SIGNATURE-----

iLgEARMKAB0WIQQtKUnnJ8qC9aD9Mwl+r9mONRD6IwUCWyXiigAKCRB+r9mONRD6
IxYyAgkBpX1sZf4pnxYZYkA1JHOzI0w3ZfjYKOOOHv9dF3qUHw/QxnAiX0bvOvhx
/gagoIDo7AktMwIQWNGCVHP9peFlCYUCB2AJBRUmt6Pko8ai0JDhh3nAj/L3ZSzA
NdSTcAzaO6Bk+PUot4v/u5lweh7sqPqMY69aiQaKWpuVlv62FqIOmFjL
=qR4q

-----END PGP SIGNATURE-----

Could someone clarify the purpose of this command and what it specifically does?

migrated from crypto.stackexchange.com Jun 18 '18 at 9:48

This question came from our site for software developers, mathematicians and others interested in cryptography.

1

Quoting this email:

Hi List,

What is the difference between "gpg --armor --store" and "gpg --enarmor"?

--armor --store creates an armored OpenPGP message: a "literal message", which is unencrypted and unsigned.

--enarmor armors whatever you feed it. The result is not an OpenPGP message.

So this command essentially takes the input you feed it and then encodes it using the standard OpenPGP encoding mechanism (base64 + header and footer?) and returns that while not ensuring the result is actually parseable as an OpenPGP message or something.

  • I really appreciate your response. But does it answer the question fully? The GPG manual says that --enarmor and --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." An arbitrary value? Well, that sounds like a salt. – user916311 Jun 21 '18 at 8:54
  • @Patriot a salt has a well-defined place in the OpenPGP standard (at least I hope), this is really just a command that goes like "so we have this fancy mechanism to text-encode arbitrary data, let's actually expose it to the user". – SEJPM Jun 21 '18 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy