mkogg.py: Fix 'self.get_mp4_metadata(self, source)'
[blog.git] / posts / PGP.mdwn
1 [[!meta  title="Pretty good privacy"]]
2
3 [PGP][] is a protocol for signing and encrypting email.  It has been
4 widely used in the tech community since its creation by Phil
5 Zimmermann in 1991.  Sadly, it doesn't seem to have spread deeply into
6 the general community.
7
8 Anyhow, I was confused about the difference between PGP, PGP/MIME,
9 OpenPGP and [S/MIME][], so I did a little RFC reading:
10
11 * [RFC 5581][] (Camellia symmetric block cipher in OpenPGP, updates RFC 4880)
12 * [RFC 4880][] (OpenPGP, obsoletes RFCs 1991 and 2440)
13 * [RFC 3156][] (OpenPGP and RFC 1847, updates RFC 2015)
14 * [RFC 2440][] (OpenPGP (PGP 5.x, the successor to 2.6.x), builds on RFC 1991)
15 * [RFC 2015][] (Using PGP with RFC 1847, builds on RFC 1848)
16 * [RFC 1991][] (PGP version 2.6.x)
17 * [RFC 1848][] (MIME Object Security Services (MOSS))
18 * [RFC 1847][] (multipart/signed and multipart/encrypted)
19
20 Summary:
21
22 * PGP is the encryption protocol (RFCs 1991, 2440, 4880, and 5581).
23 * Over the years, packaging PGP-encrypted email has undergone several
24   changes:
25   1. Include the encrypted body as plain/text.
26   2. PGP/MIME: separate body and signature using MIME (RFC 2015).
27   3. OpenPGP: minor changes for packaging more recent PGP protocols
28      (RFC 3156).
29 * S/MIME is a parallel effort which uses an alternate key system
30   ([CMS][]) based on certificates (similar to SSL/TLS with [X.509][]
31   certificates and certificate authorities).
32
33 The main difference between using OpenPGP and S/MIME is in how you
34 decide to trust other people's keys.  With OpenPGP, there is a [web of
35 trust][wot] in which you manually decide how much trust to assign to
36 each key.  Possible trust levels include
37
38 * unknown: you haven't made a judgement about the owner.
39 * none: the owner is known to improperly sign other keys.
40 * marginal: the owner knows what she's doing.
41 * full: the owner's signature is as good as your own (analagous to a
42   Certificate Authority).
43
44 To validate a key K using the web of trust, it must satisfy two
45 conditions:
46
47 1. it is signed by enough valid keys, meaning
48   * you have signed it personally,
49   * it has been signed by one fully trusted key, or
50   * it has been signed by three (configurable) marginally trusted keys; and
51 2. the path of signed keys leading from K back to you is five
52   (configurable) steps or shorter.
53
54 See the [GPG manual][gpg-trust] for more details.
55
56 The certificate authority system in web-of-trust terms is a system in
57 which you fully trust a number of root certificates and all the
58 decisions they make about delegating signing authority.  You can also
59 explicity accept other keys (e.g. when connecting to an HTTPS server
60 with a self-signed key).
61
62
63 [PGP]: http://en.wikipedia.org/wiki/Pretty_Good_Privacy
64 [S/MIME]: http://en.wikipedia.org/wiki/S/MIME
65 [RFC 5581]: http://tools.ietf.org/html/rfc5581
66 [RFC 4880]: http://tools.ietf.org/html/rfc4880
67 [RFC 3156]: http://tools.ietf.org/html/rfc3156
68 [RFC 2440]: http://tools.ietf.org/html/rfc2440
69 [RFC 2015]: http://tools.ietf.org/html/rfc2015
70 [RFC 1991]: http://tools.ietf.org/html/rfc1991
71 [RFC 1848]: http://tools.ietf.org/html/rfc1848
72 [RFC 1847]: http://tools.ietf.org/html/rfc1847
73 [CMS]: http://en.wikipedia.org/wiki/Cryptographic_Message_Syntax
74 [X.509]: http://en.wikipedia.org/wiki/X.509
75 [wot]: http://en.wikipedia.org/wiki/Web_of_trust
76 [gpg-trust]: http://www.gnupg.org/gph/en/manual.html#AEN335
77
78 [[!tag tags/linux]]
79 [[!tag tags/tools]]