Re: [saag] IETF 93 Agenda Request - Key Discovery

Richard Barnes <rlb@ipv.sx> Thu, 23 July 2015 14:38 UTC

Return-Path: <rlb@ipv.sx>
X-Original-To: saag@ietfa.amsl.com
Delivered-To: saag@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D3D7D1ACE2A for <saag@ietfa.amsl.com>; Thu, 23 Jul 2015 07:38:18 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-0.7] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xo_5Zsk7h8HP for <saag@ietfa.amsl.com>; Thu, 23 Jul 2015 07:38:17 -0700 (PDT)
Received: from mail-vn0-f52.google.com (mail-vn0-f52.google.com [209.85.216.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A00981ACE1B for <saag@ietf.org>; Thu, 23 Jul 2015 07:38:15 -0700 (PDT)
Received: by vnav141 with SMTP id v141so61187199vna.0 for <saag@ietf.org>; Thu, 23 Jul 2015 07:38:14 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=ul5zj5tjH6mrNybvRrwQJaT3sX/oiIgNCNShfTSs6OU=; b=BEIQ8XnmRabed+8EufSSe4hsOcm8hv6d3Wp6SWStWP+Q8Kzl+TR7aH7B2Y1ESGj70a 9StUm5nNvnZGA5lRBcKcqoZ+1otte61Do2oxkvnDb7fvIwy6fDcGI9aqml1b/+JLs54k jwecMZlCRSc0GBE7YPFgM2PyO/W5es3Y7pCZ+WLMp4HpFlFlFkqP/c1b1yYOLgGvnFrj oDjOqGZBR3mFyP7s8AE/AqkLhTBXRGDWmOZNvs0LAwywddTdhWmTyTeQmvPMXN7nk5sl faxH3+YQnlPxXxKwRBnC7Wq8XBmb7+0OCH8cTHYTwPEUhwDPYWRk8Q/4p/5+j89eEycK bnHA==
X-Gm-Message-State: ALoCoQn/+ozHMXKkG8uRx/cwCxqyC20HSUr/UBjyu3rojjoPcMDlpBUQ4aXW17hlncAHNP5ODG7M
MIME-Version: 1.0
X-Received: by 10.52.5.133 with SMTP id s5mr9889848vds.65.1437662294856; Thu, 23 Jul 2015 07:38:14 -0700 (PDT)
Received: by 10.31.164.207 with HTTP; Thu, 23 Jul 2015 07:38:14 -0700 (PDT)
In-Reply-To: <20150723130501.GO4347@mournblade.imrryr.org>
References: <20150721222308.GU28047@mournblade.imrryr.org> <20150721231021.59110.qmail@ary.lan> <CAL02cgQ3aTwpt43YYWSL-pEGcA5v1a10BskuA7-U1YN1Jk+G2w@mail.gmail.com> <20150723130501.GO4347@mournblade.imrryr.org>
Date: Thu, 23 Jul 2015 16:38:14 +0200
Message-ID: <CAL02cgQVtTw5xHXM+XaY==FsPO4aMuwDxg-YyXGUp83HQaq8kg@mail.gmail.com>
From: Richard Barnes <rlb@ipv.sx>
To: IETF SAAG <saag@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <http://mailarchive.ietf.org/arch/msg/saag/KTO4d_FQCMg9ISarTu39jtIJwnQ>
Subject: Re: [saag] IETF 93 Agenda Request - Key Discovery
X-BeenThere: saag@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Security Area Advisory Group <saag.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/saag>, <mailto:saag-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/saag/>
List-Post: <mailto:saag@ietf.org>
List-Help: <mailto:saag-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/saag>, <mailto:saag-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 23 Jul 2015 14:38:19 -0000

On Thu, Jul 23, 2015 at 3:05 PM, Viktor Dukhovni <ietf-dane@dukhovni.org> wrote:
> On Thu, Jul 23, 2015 at 02:30:34PM +0200, Richard Barnes wrote:
>
>> > Agreed.  It distributes mail information through mail servers, rather
>> > than hoping one can keep mail servers and web servers synchronized.
>> >
>> > It's not perfect but the problems are fixable.
>>
>> I'm kind of astonished that people still think that extending email
>> protocols is a good idea for things like this.  For example:
>>
>> "BASE64 is used to avoid the need for the server to produce JSON text
>> which conforms to SMTP line-length restrictions."
>
> SMTP line length restrictions are primarily a constraint on the
> command side of the protocol.  The new command could be defined to
> return lines of arbitrary length, but in practice it is much simpler
> to in fact base64 encode the output.
>
>> Why, in 2015, would we continue to choose modalities that come with
>> these arcane restrictions?
>
> Because email servers understand the email address namespace and
> canonicalization rules.  Because email clients, already talk to
> MSAs, which are well positioned to find the remote MX hosts.  The
> MSA might even cache the responses for sufficiently "popular" email
> addresses.
>
> MX hosts already have code for connection and request rate limits,
> which can be extended to apply to these new queries.
>
> Also for first-contact keys, the MX host would typically return
> the mail server's public key, not the recipient's so it can continue
> to offer spam and malware protection to the target user.  Real
> end-to-end keys would often only be returned by the user in a reply.
>
> Returning the MTA's key allows the MTA to return a public key
> regardless of whether email address requested exists or not, just
> return the same key for all inputs (there should also be one or
> more per-user signature key digests along with that key, to verify
> any end-to-end keys later sent by the user, which can be random
> for non-existent users).

I don't know why you think MXs or MTAs have any role in this at all.
The major point of this stuff is to look up keys for e2e, so it's most
likely to be implemented in MUAs, most of which either already have an
HTTP stack (to support HTML email), or are web pages themselves.  If
you want to add this to a web mail client, here's your implementation:

function getKey(uri) {
  var xhr = new XMLHttpRequest();
  xhr.open("GET", makeWebfingerURL(uri), false);
  xhr.send();
  var jrd = JSON.parse(xhr.responseText);
  return jrd.properties.keys;
}

It's not that many more to add it to Thunderbird.  How many lines of
code do you want to add to your MUA?


>> Let's use modern technology for this.  What's needed here is
>> request/response protocol that can carry JSON, not a store-and-forward
>> protocol that carries an oddly constrained text format.  WebFinger
>> seems fine.
>
> The "store-and-forward" bit is irrelevant here, requests are not
> for multiple recipients, nor are there keys for mailing lists.
> Therefore, the envelope never splits, and there's no need to
> commit data to a queue to ensure reliable delivery to multiple
> destinations.
>
> WebFinger requires email server operators to also deploy HTTP
> WebFinger servers, or email servers to support an additional request
> protocol.  Neither seems necessary.

That is only necessary if you want to make keys discoverable for your
users.  And it's probably easier than upgrading your MTA to support
some new thing.

--Richard


>
> --
>         Viktor.
>
> _______________________________________________
> saag mailing list
> saag@ietf.org
> https://www.ietf.org/mailman/listinfo/saag