PGP public key

From Just Solve the File Format Problem
Jump to: navigation, search
File Format
Name PGP public key
Ontology
Extension(s) .asc
Released 1991

PGP public key can be transferred either as a text within another message or inside an .asc file. It is then used by PGP software to encrypt some data or to confirm the signature signed by the associated private key.

The file is encoded in ASCII characters, but can be saved in any plain text format (for example UTF-8).

File contents

The beginning of the file will always be:

-----BEGIN PGP PUBLIC KEY BLOCK-----

although the case of the letters maybe different.

The second line normally describes the software used to generate the key, and the third line is empty.

The key itself starts on line 4, and can go on for an arbitrary number of lines. It is encoded using all the letters of Latin alphabet (English language) in both cases [A-Za-z], characters + and /. Newlines maybe inserted at any point, normally after the 64th character on the line, but these characters are not themselves part of the key and are used for ease of viewing and transfer only.

The last line of the key will normally have fewer than 64 characters, and may end with = symbol.

After the key there is a short line, starting with = and followed by 4 characters.

The end of the file is shown by the line (with case being variant as well):

-----END PGP PUBLIC KEY BLOCK-----

The last line may or may not end with the newline character.

Newline characters used may be different, depending on the software used to produce the key, but normally are \n (Char(13)).

Example

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.4.14 (GNU/Linux)

mQENBFMXKocBCAD05ZjZxEQOFQNpMFbG+NErbJv83VZXvhzOVWDSoO5gcIQKj0+1
UMmwUfnPqBbP5X50losqH1gfJ1bspn/8n0AWK9KIgQjMPGltfdpDdb2X8Wm2X36P
Bz9HSi34mFTWLN+IjHhUpnpPQff8rbCa7TuNw3LXPjF6Kea/RcwtiSswYUI8St36
LGA9YTry4EY/XVs+vE1XCfl5RN0JsVtHkENX69pvxcxZH45GiqStB9PpYjce5EAl
/rrg/uzhWtAzwnZDaBS0okS5ZVZAIjh2rQoP117TGY9Zr4qSoM4kaLlzli5Gxc9h
3c1LEJqoWIRzYXgNjTa7c230c9jXMURw9AqVABEBAAG0MFZsYWRpbWlyIE1vemhl
bmtvdiA8VmxhZGltaXJNb3poZW5rb3ZAeWFob28uY29tPokBPgQTAQIAKAUCUxcq
hwIbIwUJA8JnAAYLCQgHAwIGFQgCCQo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mT9f9NEYfeKrnJNazWs9qYCTC+lMtRemKCzOzsdElqPI66QoHFMHM3dTDj
qY7z0VcnX0knDxI=
=EWIh
-----END PGP PUBLIC KEY BLOCK-----

And the same file in hex

2D 2D 2D 2D 2D 42 45 47 49 4E 20 50 47 50 20 50 55 42 4C 49 43 20 4B 45 59 20 42 4C 4F 43 4B 2D 2D 2D 2D 2D 
0A 56 65 72 73 69 6F 6E 3A 20 47 6E 75 50 47 20 76 31 2E 34 2E 31 34 20 28 47 4E 55 2F 4C 69 6E 75 78 29 0A 
0A 6D 51 45 4E 42 46 4D 58 4B 6F 63 42 43 41 44 30 35 5A 6A 5A 78 45 51 4F 46 51 4E 70 4D 46 62 47 2B 4E 45 
72 62 4A 76 38 33 56 5A 58 76 68 7A 4F 56 57 44 53 6F 4F 35 67 63 49 51 4B 6A 30 2B 31 0A 55 4D 6D 77 55 66 
6E 50 71 42 62 50 35 58 35 30 6C 6F 73 71 48 31 67 66 4A 31 62 73 70 6E 2F 38 6E 30 41 57 4B 39 4B 49 67 51 
6A 4D 50 47 6C 74 66 64 70 44 64 62 32 58 38 57 6D 32 58 33 36 50 0A 42 7A 39 48 53 69 33 34 6D 46 54 57 4C 
4E 2B 49 6A 48 68 55 70 6E 70 50 51 66 66 38 72 62 43 61 37 54 75 4E 77 33 4C 58 50 6A 46 36 4B 65 61 2F 52 
63 77 74 69 53 73 77 59 55 49 38 53 74 33 36 0A 4C 47 41 39 59 54 72 79 34 45 59 2F 58 56 73 2B 76 45 31 58 
43 66 6C 35 52 4E 30 4A 73 56 74 48 6B 45 4E 58 36 39 70 76 78 63 78 5A 48 34 35 47 69 71 53 74 42 39 50 70 
59 6A 63 65 35 45 41 6C 0A 2F 72 72 67 2F 75 7A 68 57 74 41 7A 77 6E 5A 44 61 42 53 30 6F 6B 53 35 5A 56 5A 
41 49 6A 68 32 72 51 6F 50 31 31 37 54 47 59 39 5A 72 34 71 53 6F 4D 34 6B 61 4C 6C 7A 6C 69 35 47 78 63 39 
68 0A 33 63 31 4C 45 4A 71 6F 57 49 52 7A 59 58 67 4E 6A 54 61 37 63 32 33 30 63 39 6A 58 4D 55 52 77 39 41 
71 56 41 42 45 42 41 41 47 30 4D 46 5A 73 59 57 52 70 62 57 6C 79 49 45 31 76 65 6D 68 6C 0A 62 6D 74 76 64 
69 41 38 56 6D 78 68 5A 47 6C 74 61 58 4A 4E 62 33 70 6F 5A 57 35 72 62 33 5A 41 65 57 46 6F 62 32 38 75 59 
32 39 74 50 6F 6B 42 50 67 51 54 41 51 49 41 4B 41 55 43 55 78 63 71 0A 68 77 49 62 49 77 55 4A 41 38 4A 6E 
41 41 59 4C 43 51 67 48 41 77 49 47 46 51 67 43 43 51 6F 4C 42 42 59 43 41 77 45 43 48 67 45 43 46 34 41 41 
43 67 6B 51 37 73 58 4C 5A 61 30 65 43 4F 56 52 0A 4B 77 67 41 38 6B 68 69 39 59 56 64 46 4E 64 53 58 6D 78 
32 6D 4B 43 69 33 4B 4D 75 52 64 50 59 4E 64 41 57 79 53 73 63 47 4C 4F 56 76 74 5A 33 6C 50 51 58 50 51 52 
6E 69 58 6D 59 56 79 35 50 0A 49 4C 57 41 34 79 47 68 36 7A 36 54 6B 72 51 52 67 42 74 35 7A 33 55 2B 44 30 
74 49 50 75 6C 36 65 46 68 4B 7A 35 51 53 43 38 4F 59 42 44 6C 30 79 76 72 48 69 4B 39 49 65 62 50 33 6A 78 
4F 2F 0A 5A 75 61 44 79 75 2B 78 71 58 53 6D 36 38 4F 4F 6B 6F 66 46 33 2F 33 52 66 41 64 4D 4F 46 61 4D 46 
69 59 73 47 38 6A 57 66 6A 32 68 35 43 37 59 78 52 57 4C 4C 69 4F 71 4A 36 2F 2F 30 45 70 6D 0A 5A 4F 43 56 
47 6D 31 49 50 73 75 51 41 38 78 76 46 44 6C 57 31 38 51 2B 42 46 7A 32 35 77 6B 61 77 44 63 6A 5A 34 73 4A 
68 4B 4D 70 5A 45 51 71 38 57 31 70 63 4D 44 65 74 42 79 36 65 77 64 48 0A 61 6B 4D 52 39 38 78 2F 6A 41 75 
30 77 70 64 74 66 5A 53 4E 63 31 51 4F 6D 37 74 5A 61 44 4A 7A 56 42 49 63 35 30 52 38 75 63 63 38 2B 36 79 
67 65 4F 65 42 53 76 44 4C 55 6D 58 2B 63 54 42 50 0A 2B 55 45 42 53 39 63 51 37 7A 46 37 63 59 33 71 46 4C 
51 6A 6B 31 36 64 48 37 6B 42 44 51 52 54 46 79 71 48 41 51 67 41 76 4F 49 44 76 72 30 37 61 71 66 4E 6E 73 
6B 44 44 6A 79 45 61 64 79 32 0A 63 58 6D 72 46 78 34 68 62 76 5A 4E 49 7A 35 62 57 4F 65 35 53 51 79 55 43 
77 70 47 6B 6E 56 67 66 44 6F 2F 4A 42 45 49 34 35 2F 6F 68 4D 38 41 33 78 55 6B 52 54 6C 61 64 64 58 42 6F 
59 35 61 0A 2F 77 65 36 63 79 41 7A 49 46 4A 64 39 53 54 30 53 33 55 32 53 64 32 54 74 39 76 4B 74 73 49 65 
64 4E 4C 51 66 50 62 4A 47 6E 6D 39 35 6B 55 53 66 4D 54 7A 5A 6E 74 61 38 41 6E 52 36 65 57 5A 0A 56 46 35 
32 73 75 4D 41 35 4D 34 50 4A 72 30 2F 66 38 6E 2F 2F 41 39 38 2B 4A 43 51 4A 51 6A 78 34 65 62 74 46 67 45 
71 32 54 44 69 62 69 42 4E 75 30 37 47 4A 76 32 79 41 75 32 6F 5A 47 67 66 0A 71 73 39 78 62 42 71 57 67 49 
45 4F 35 54 51 2F 78 30 2B 6C 4B 77 39 57 76 64 49 52 50 46 4B 6E 71 52 2B 34 7A 4E 46 62 53 61 70 65 61 4A 
32 63 41 51 73 63 33 7A 6D 45 70 50 69 75 37 37 61 34 0A 4F 42 30 78 39 68 71 6A 6C 73 66 32 33 4A 48 6A 63 
51 4D 53 39 6F 51 71 56 63 39 4D 68 53 38 64 6B 4D 78 6D 64 31 6F 42 38 2B 2B 74 36 57 43 56 36 46 39 68 53 
67 6D 46 70 48 4B 70 56 51 41 52 0A 41 51 41 42 69 51 45 6C 42 42 67 42 41 67 41 50 42 51 4A 54 46 79 71 48 
41 68 73 4D 42 51 6B 44 77 6D 63 41 41 41 6F 4A 45 4F 37 46 79 32 57 74 48 67 6A 6C 4A 64 77 49 41 49 71 49 
61 6A 36 79 0A 54 63 7A 74 38 33 74 42 43 41 4A 31 52 4E 49 69 57 4E 31 77 69 52 48 37 75 38 46 59 65 70 57 
75 6E 72 69 68 5A 49 4D 6C 34 51 78 78 72 4C 37 64 51 41 69 61 4A 30 35 30 68 39 6F 71 61 70 79 50 0A 61 62 
6B 46 79 6D 4C 55 4F 30 38 42 38 30 6E 69 34 4C 70 4F 56 59 69 75 34 57 64 71 6E 61 32 69 73 52 34 31 79 61 
48 4F 53 43 67 59 41 75 79 37 78 4F 68 6C 77 65 54 41 65 2B 51 6D 33 45 54 6B 0A 4F 52 6C 47 37 36 38 7A 71 
79 39 54 4A 37 45 4A 7A 36 37 42 78 52 74 31 6D 65 65 6B 77 44 7A 31 76 78 30 7A 7A 4E 4C 52 61 62 41 79 6C 
49 41 42 54 56 72 7A 4B 65 42 45 42 77 55 42 33 2B 63 6F 0A 50 74 77 64 73 64 58 32 44 71 70 50 59 70 66 63 
67 52 49 5A 56 55 44 2F 67 49 4E 52 56 62 34 50 6D 31 33 32 56 44 45 38 72 61 72 79 79 61 39 68 4C 34 32 4D 
2B 6C 63 53 4C 79 63 4A 5A 64 76 72 0A 53 47 45 73 47 4C 6D 54 39 66 39 4E 45 59 66 65 4B 72 6E 4A 4E 61 7A 
57 73 39 71 59 43 54 43 2B 6C 4D 74 52 65 6D 4B 43 7A 4F 7A 73 64 45 6C 71 50 49 36 36 51 6F 48 46 4D 48 4D 
33 64 54 44 6A 0A 71 59 37 7A 30 56 63 6E 58 30 6B 6E 44 78 49 3D 0A 3D 45 57 49 68 0A 2D 2D 2D 2D 2D 45 4E 
44 20 50 47 50 20 50 55 42 4C 49 43 20 4B 45 59 20 42 4C 4F 43 4B 2D 2D 2D 2D 2D 0A 

Sample files

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox