[PATCH v2 1/2] test: Replying to an HTML-only message in emacs
[notmuch-archives.git] / fd / 6f5b15505316b5b45b1c8e90289a5bf6ebe981
1 Return-Path: <dkg@fifthhorseman.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id C2296431FD0\r
6         for <notmuch@notmuchmail.org>; Wed, 22 Dec 2010 11:11:46 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0.001\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0.001 tagged_above=-999 required=5\r
12         tests=[UNPARSEABLE_RELAY=0.001] autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id f+Oftu6BPL9u for <notmuch@notmuchmail.org>;\r
16         Wed, 22 Dec 2010 11:11:45 -0800 (PST)\r
17 Received: from rodolpho.mayfirst.org (mail.freitas.net [209.234.253.107])\r
18         (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id D3EA8431FB6\r
21         for <notmuch@notmuchmail.org>; Wed, 22 Dec 2010 11:11:45 -0800 (PST)\r
22 Received: from localhost (localhost [127.0.0.1])\r
23         by rodolpho.mayfirst.org (Postfix) with ESMTP id 5C3BE3CD84;\r
24         Wed, 22 Dec 2010 14:11:43 -0500 (EST)\r
25 X-Virus-Scanned: Debian amavisd-new at rodolpho.mayfirst.org\r
26 Received: from rodolpho.mayfirst.org ([127.0.0.1])\r
27         by localhost (rodolpho.mayfirst.org [127.0.0.1]) (amavisd-new,\r
28         port 10024)\r
29         with ESMTP id KaEv+VNvA7Zj; Wed, 22 Dec 2010 14:11:43 -0500 (EST)\r
30 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender:\r
31         smtpauth@rodolpho.mayfirst.org) with ESMTPSA id 1736C3CD72\r
32 Message-ID: <4D124D68.6060300@fifthhorseman.net>\r
33 Date: Wed, 22 Dec 2010 14:11:36 -0500\r
34 From: Daniel Kahn Gillmor <dkg@fifthhorseman.net>\r
35 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US;\r
36         rv:1.9.2.12) Gecko/20101110 Icedove/3.1.6\r
37 MIME-Version: 1.0\r
38 To: Sebastian Spaeth <Sebastian@SSpaeth.de>\r
39 Subject: Re: PGP/MIME signature verification\r
40 References: <4CF15D67.1070904@fifthhorseman.net>\r
41         <87aak08fu8.fsf@servo.finestructure.net>\r
42         <87zkrz314j.fsf@SSpaeth.de> <4D10C97C.7060602@fifthhorseman.net>\r
43         <87mxnx3mb9.fsf@SSpaeth.de>\r
44 In-Reply-To: <87mxnx3mb9.fsf@SSpaeth.de>\r
45 X-Enigmail-Version: 1.1.2\r
46 OpenPGP: id=D21739E9\r
47 Content-Type: multipart/signed; micalg=pgp-sha512;\r
48         protocol="application/pgp-signature";\r
49         boundary="------------enig83760AE24DDB8E65EA18B507"\r
50 Cc: notmuch <notmuch@notmuchmail.org>\r
51 X-BeenThere: notmuch@notmuchmail.org\r
52 X-Mailman-Version: 2.1.13\r
53 Precedence: list\r
54 Reply-To: notmuch <notmuch@notmuchmail.org>\r
55 List-Id: "Use and development of the notmuch mail system."\r
56         <notmuch.notmuchmail.org>\r
57 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
58         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
59 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
60 List-Post: <mailto:notmuch@notmuchmail.org>\r
61 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
62 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
63         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
64 X-List-Received-Date: Wed, 22 Dec 2010 19:11:46 -0000\r
65 \r
66 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)\r
67 --------------enig83760AE24DDB8E65EA18B507\r
68 Content-Type: text/plain; charset=UTF-8\r
69 Content-Transfer-Encoding: quoted-printable\r
70 \r
71 On 12/22/2010 09:38 AM, Sebastian Spaeth wrote:\r
72 >>> "sigstatus": [{"status": "error","keyid": "ED34CEABE27BAABC", "errors=\r
73 ":\r
74 >>> 2}]\r
75 >>> (perhaps due to me not having your key???)\r
76 >>\r
77 >> yup, that is why you get that error.\r
78 >=20\r
79 > Is there a possibility to squeeze a nicer error message out of it? :-)\r
80 \r
81 that's a good question -- i'm not sure libgmime gives us much else to\r
82 work with (it is itself calling out to gpg, which in turn might not give\r
83 *it* much to work with), but i'll see if there's anything we can do\r
84 about that.\r
85 \r
86 One potential concern with this kind of reporting is that (due to the\r
87 dirty details of the OpenPGP data signature format), differentiating\r
88 "you don't have this key in your keyring" from "you have this key, but\r
89 the signature is bad" is not fully possible.\r
90 \r
91 For those who want the details:\r
92 \r
93  0) an OpenPGP signature contains the signature data itself, plus an\r
94 indicator of what key made the signature (the "issuer"):\r
95 \r
96   https://tools.ietf.org/html/rfc4880#section-5.2.3.5\r
97 \r
98  1) The indicator is the lower 64-bits of the OpenPGP fingerprint of the\r
99 signing key.\r
100 \r
101  2) OpenPGP fingerprints themselves are SHA-1 sums of (some fiddly\r
102 concatenation of) the creation time of the key and the public key\r
103 material itself:\r
104 \r
105   https://tools.ietf.org/html/rfc4880#section-12.2\r
106 \r
107 However, the 64 bits of the key ID (while longer than the 32-bit pattern\r
108 commonly expressed like "0xDEADBEEF") isn't really a big-enough search\r
109 space to resist collision attacks by moderately-well-resourced adversarie=\r
110 s.\r
111 \r
112 That is, it's currently possible to have a computer farm powerful enough\r
113 to crank through the search space to create a valid OpenPGP key with any\r
114 chosen 64-bit key ID.\r
115 \r
116 So if Alice has her legitimate key with key ID 0x0000DECAFBAD0000, and\r
117 Eve has a big computer, Eve can create a new OpenPGP key with the same\r
118 Key ID.  If Eve convinces Bob to load her own key into his keyring, then\r
119 what happens when Bob receives a signed message from Alice?\r
120 \r
121 Bob's verifier will look at the message, see that it's signed by a key\r
122 with key ID 0x0000DECAFBAD0000, and then check the signature against his\r
123 copy of Eve's key.  But the signature doesn't verfiy!  This is actually\r
124 because Bob doesn't have Alice's key, of course, but his client has no\r
125 way of knowing that -- it just sees that it has a matching key that\r
126 doesn't verify.\r
127 \r
128 So an attacker can convert a "you don't have this key" to a "you have\r
129 this key but the signature doesn't validate" without even tampering with\r
130 the message in transit (of course, an attacker who can tamper with the\r
131 message in transit can *also* make a signature fail to validate, just by\r
132 flipping a bit or two in either the message or the signature).\r
133 \r
134 (note: don't despair!  the full 160-bit OpenPGP fingerprint space is not\r
135 currently under threat; only the 64-bit "key ID" has the above problem,\r
136 given our current understanding of cryptanalysis and the power of our\r
137 computing hardware).\r
138 \r
139         --dkg\r
140 \r
141 \r
142 --------------enig83760AE24DDB8E65EA18B507\r
143 Content-Type: application/pgp-signature; name="signature.asc"\r
144 Content-Description: OpenPGP digital signature\r
145 Content-Disposition: attachment; filename="signature.asc"\r
146 \r
147 -----BEGIN PGP SIGNATURE-----\r
148 Version: GnuPG v1.4.11 (GNU/Linux)\r
149 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/\r
150 \r
151 iQIcBAEBCgAGBQJNEk1oAAoJEMzS7ZTSFznpwtoP/2oWg6zfUJQ5+WLTr7hIGaax\r
152 anJLrexylzLczEZ0BVlA+m+v3YGGkXDaU+VMFqsjHQMvEoCiIuGcrj53NQV4ICbj\r
153 s18FjTepjkr3/x+3Xseug1afDc6+DG80+fXyUUEkLpuvCJwA1zdcn8fu/Jl/fgsA\r
154 tgGU7q/lv4HoMH3kQB3t6i4cFaOwk4W4NySqVWjuS06+7DXqLBmZ5Pe8/2vB6dic\r
155 zmr/j/W4waDBK9wkqZ4YAfwrABaKuvCfT367/0tYKKPDpG7XPnkbuaVNleUXoT4c\r
156 4tLp0MAV0Wgn331jrqT7w1Yh37ZaR2usAJ0WICi62F3yQkeB95XcfOVxmEcrgzdj\r
157 EA6qGi/9P0x559SvLMW/+e4KaniaC18aHNwSU7rP4D942d16hDpukyvOrey9+5BB\r
158 g1J3Lu581J5/MoUka0LuxebiqqdOXWzNbV9AETYx7drqMx7RrgiIfffE9etjlYPA\r
159 pqr3JZf4PLeF+aFqWtMjmLH9P6hlEbolnzqoL/QXNAzFjuE6fqI/R8rQNo3UD6r9\r
160 R7oGbr3LDCDs0GDOv1UEq3CBJ8P5VsPdAAcqn2xM2Foyc6A0v8mfr0XfMWfKesFA\r
161 xDIApjmNA/8i5v25XwWSs/EYyEqub6ndKnfvE/pbjn6TwzvwKixktCID4MgaptzK\r
162 SDe0fT0MN+NeK+sDJ1dN\r
163 =XwoT\r
164 -----END PGP SIGNATURE-----\r
165 \r
166 --------------enig83760AE24DDB8E65EA18B507--\r