Re: [Webpush] Major change to encryption

JR Conlin <jconlin@mozilla.com> Wed, 02 November 2016 04:02 UTC

Return-Path: <jconlin@mozilla.com>
X-Original-To: webpush@ietfa.amsl.com
Delivered-To: webpush@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 33400129468 for <webpush@ietfa.amsl.com>; Tue, 1 Nov 2016 21:02:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.7
X-Spam-Level:
X-Spam-Status: No, score=-2.7 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=mozilla.com
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 WYhZiydk0doh for <webpush@ietfa.amsl.com>; Tue, 1 Nov 2016 21:02:19 -0700 (PDT)
Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (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 7AFA51293EE for <webpush@ietf.org>; Tue, 1 Nov 2016 21:02:19 -0700 (PDT)
Received: by mail-wm0-x22d.google.com with SMTP id p190so242224394wmp.1 for <webpush@ietf.org>; Tue, 01 Nov 2016 21:02:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mozilla.com; s=google; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Y0UPnHdLs9DcXW8MNeVG9fRwcKNdYAakIAsVThQIidc=; b=WXjGliA6hRz6lokwavNfOKflTGu18nJF4Q76muomuX+ahku2Eiph8as2jCsNuitKaM aFfUcFG4RZe18egG6ePBaYSSvfdxHXzVHx7lYot+RsfQH5rPerAPJgxfgFDsrWaIihs3 llXN84NtOMgzkXmNXsH2JuCqM44Ju45d7p6zg=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=Y0UPnHdLs9DcXW8MNeVG9fRwcKNdYAakIAsVThQIidc=; b=big/K9Hl+CF72K4nrnoEQia6LKxhZYVN440nctBZwXpyDhFp9XHQVs5fEA/HFMffAj RtPHztfBkjyJSr4tv8O6if4PKQwA+phnRUBC5ZAzM4hB+3m2nT3xqizFol/6GHxinQNO EGutSbI5VWJ/UaKskZbhCE/RJpfZsQeq/DfEv6jGzqhnBzaa5a1KdYTM98Ni5Fnrt78W Uccbd5jcCWpWdH5t+p8IdQXOfkXEMluFhfAuq5ku4lQxkjKgR7EyWJH5Zc3bcKrqQ6TS HOUbjEbWQDSxMq29wFlyIVRsmM25ahd/DGlYiWXbzC342zxsbhYoozzhBxIJrIO/Xqs+ f9pQ==
X-Gm-Message-State: ABUngve95DQ1nJXR6qDfK8UVpYc33ulk4h+r0QPvh7z9qGrE0vNcmQujleIhpRCyxBxJ9KKpNU7DKz5G4wgYWV3j
X-Received: by 10.194.176.40 with SMTP id cf8mr1005922wjc.68.1478059338041; Tue, 01 Nov 2016 21:02:18 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.28.24.21 with HTTP; Tue, 1 Nov 2016 21:02:17 -0700 (PDT)
In-Reply-To: <CABkgnnW3LK5Gvj=05QFrUktZhHEvwS-dkLE3BE_1iaSoMizUdg@mail.gmail.com>
References: <CABkgnnUiLBOGQ6fSTiLcxn_RKbEHFYHzCAv3OMg_btETfKjRGA@mail.gmail.com> <da15e3e3-9d20-7e2c-eceb-d369a3529226@mozilla.com> <CABkgnnVeGAtADwvf_FWKvNDpAtKNVvWpiFAr-LPf47hgHSqiag@mail.gmail.com> <f6bb7ff3-1d6c-3b8c-b956-aaa0c046fd3a@mozilla.com> <CABkgnnUzR747r3VC1DLTqnZJwPvkAoH-SbB+y7-UY0i1Z+fX3A@mail.gmail.com> <CALt3x6nS2+LG6aZPEZL5wPA_c00pCjZ5WswcFqty35weut2rOw@mail.gmail.com> <CABkgnnUSou5xroNP5dppHJOCydErzKm4c6_Z2tw1w2hLhqb6Bg@mail.gmail.com> <CAP8-Fqn7siP7JuguZHipHHsc6Hj7dfai3u3hS8MpjLJOCWqerA@mail.gmail.com> <84f3da33-a9a4-1bbc-f290-e283cec07c22@mozilla.com> <CAP8-Fqk+suz9YpFKbdTa42nUfknWfPH-M017UjRjV2oLxUZKjQ@mail.gmail.com> <CABkgnnW3LK5Gvj=05QFrUktZhHEvwS-dkLE3BE_1iaSoMizUdg@mail.gmail.com>
From: JR Conlin <jconlin@mozilla.com>
Date: Tue, 01 Nov 2016 21:02:17 -0700
Message-ID: <CA+XEteO0DeT4VEVArWwzR_6n-e2EA5dcsjG_Sqmc2Hwgqp6y6A@mail.gmail.com>
To: Martin Thomson <martin.thomson@gmail.com>
Content-Type: multipart/alternative; boundary="089e013d19f6cd2b5b0540498112"
Archived-At: <https://mailarchive.ietf.org/arch/msg/webpush/Hos3iQAezUX90oA_wxS0jBZc2is>
Cc: Costin Manolache <costin@gmail.com>, "webpush@ietf.org" <webpush@ietf.org>, Peter Beverloo <beverloo@google.com>
Subject: Re: [Webpush] Major change to encryption
X-BeenThere: webpush@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
Reply-To: jrconlin@mozilla.com
List-Id: Discussion of potential IETF work on a web push protocol <webpush.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webpush>, <mailto:webpush-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webpush/>
List-Post: <mailto:webpush@ietf.org>
List-Help: <mailto:webpush-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webpush>, <mailto:webpush-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 02 Nov 2016 04:02:21 -0000

​On Tue, Nov 1, 2016 at 8:50 PM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> Moving the public key into the body will cut into message budgets.
> We'll be at 3994 octets of plaintext maximum if we do that.
>
​​

​I'm a bit confused about that. For "native" networks, push servers have
pretty wide tolerances for how much data that they can send over their
pipes. Going between services, I can definitely understand, since you're
held to the limits of the provider system. (APNs limits to about 2K, so
users are kinda screwed worse.) Of course, with "bridged" systems like
those, you still have to deal with the host system, so "headers" aren't
free. You still have to encode the data into the body of the message in
some fashion, which eats into the available amount.

Worst of all, is that those bridged systems are also unreliable for hosts
of reasons and then you're re-implementing TCP with one hand tied behind
your back.​

Granted, I've got a pretty limited viewpoint, so I'm sure I'm missing
something obvious.

On Tue, Nov 1, 2016 at 8:50 PM, Martin Thomson <martin.thomson@gmail.com>
wrote:

> On 2 November 2016 at 12:00, Costin Manolache <costin@gmail.com> wrote:
> > Yes, when sending over GCM it's better to have the 65bytes of the key in
> the
> > binary prefix of the
> > "raw_data" byte[] instead of having to add another key/value pair, with
> the
> > b64 encoding and proto
> > overhead. But it's an optimization - not the main reason :-). A nice
> extra
> > benefit is that browsers on android
> > could dispatch the message based on the raw_data only, since the EC
> public
> > key can identify the app/SW.
>
> As I said, I'm not opposed to this, it just seems wrong.
>
> Moving the public key into the body will cut into message budgets.
> We'll be at 3994 octets of plaintext maximum if we do that.  One of
> the nice things with the header field is that users don't pay for it.
> The bad thing is that the server needs to find a way to move it.
>
> If we are going to make this change, we need to be very crisp about it.
>