6
$\begingroup$

What characters may be present in a PGP encrypted message or a PGP signature? For example, do encrypted messages only use the Roman alphabet + some numbers and symbols? Can the character set be configured by the user? Is everything Base64 encoded?

Also, are there special characters that will never be used in a message?

$\endgroup$
8
$\begingroup$

OpenPGP as defined by RFC 4880 knows two different encodings.

Binary encoding

Obviously, there is no reasonable limitation to an (ASCII) character subset in binary encoding.

Radix 64

Radix 64 is also often called ASCII armored. In the end, it is a base64 encoding with a checksum. The content may consist of [a-zA-Z0-9+/=].

ASCII-armored OpenPGP messages also include a header, which may contain arbitrary UTF-8 strings.

An example message in ASCII-armor (modified from the one in the RFC):

-----BEGIN PGP MESSAGE-----
Version: OpenPrivacy 0.99
Comment: An example for an UTF-8 string with arbitrary characters

yDgBO22WxBHv7O8X7O/jygAEzol56iUKiXmV+XmpCtmpqQUKiQrFqclFqUDBovzS
vBSFjNSiVHsuAA==
=njUN
-----END PGP MESSAGE-----
$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.