Re: Encryption simplification

Martin Thomson <martin.thomson@gmail.com> Mon, 31 October 2016 10:09 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6360A129629 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 31 Oct 2016 03:09:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.498
X-Spam-Level:
X-Spam-Status: No, score=-8.498 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 9zq4loy6WTXH for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 31 Oct 2016 03:09:21 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5BD3E129566 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 31 Oct 2016 03:09:21 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c19Ri-0001iH-3T for ietf-http-wg-dist@listhub.w3.org; Mon, 31 Oct 2016 10:04:02 +0000
Resent-Date: Mon, 31 Oct 2016 10:04:02 +0000
Resent-Message-Id: <E1c19Ri-0001iH-3T@frink.w3.org>
Received: from mimas.w3.org ([128.30.52.79]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <martin.thomson@gmail.com>) id 1c19Rd-0001gb-6q for ietf-http-wg@listhub.w3.org; Mon, 31 Oct 2016 10:03:57 +0000
Received: from mail-qk0-f176.google.com ([209.85.220.176]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <martin.thomson@gmail.com>) id 1c19RX-0007LK-EL for ietf-http-wg@w3.org; Mon, 31 Oct 2016 10:03:52 +0000
Received: by mail-qk0-f176.google.com with SMTP id q130so35512484qke.1 for <ietf-http-wg@w3.org>; Mon, 31 Oct 2016 03:03:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JjSJtMZvL8AUEI4oMllITjIHUV4WykZh4Fmr8WzvxXk=; b=RZWccTig8v15LdMwN1ImLyDN1OTXbGK1MZIq+yoBwlwG47Wgm0znThVA0EJDU0w8Jo mucsNCVFzkvxIOmi5yXkT4jNQHpyLTGQ6pPYGaPTpED1ejsXlRS7P0jZ7y5XAdCdH8S6 6nZgnfvAQBOIICvW+rt2r3qFWuJebHiKQsSdxC4NmfgKDva7RtJu3oK7x4MceLyUUsFm CKp057huu3DaH7f0LY5tDRP9NjLb23/0ssgem6TEUgPnq2BaqYSMHHo9OSy6Kzhp/S+B nS3zZug8eZUT7mRHCxdY5AEpSJiUWjMuP49xeVmvi2MGJm741qZa64hJaflYCsxQznvN NetA==
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:from:date :message-id:subject:to:cc; bh=JjSJtMZvL8AUEI4oMllITjIHUV4WykZh4Fmr8WzvxXk=; b=dzYMIBHQB8lSEZWeid1qJsbyE3jyXYLsnQpQgs/QpKiG3CFlgHFv2xlv1x8NF6FEI9 KkbchAntIwQn6s4JefA7RZpcymm28DOlqsJF3X9DqL6+Nb+p5t4+PNFkwNmi37iJwyXa SIlnYTfPdDQqGIvWeLfNULwPZEoHPfiwgnFyHOUT7FbgMST2pkgBd0+yZsnqm3gj21sC zKRFu3XLcwTnOSUbl5rQ3rpFJmvB8ssxIrb1j7AfjgC/iRym270daw59ZrPS0+7X1g4S EdUWKgeieS0OMCMFMyg9Bkx2ga854UGZd4vhn+Bc8MsQzR2SMLy53arYDthPRqH/qIh7 raXQ==
X-Gm-Message-State: ABUngvcf4iBpv5eyrJyBFxjbXCEU5nw/iAgfyNY5q6CkWtGmUQXFS5Ejby6eHH9+CwcY2+zQK1wgLKzxsZYs6Q==
X-Received: by 10.55.74.1 with SMTP id x1mr17770248qka.316.1477908205152; Mon, 31 Oct 2016 03:03:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.85.7 with HTTP; Mon, 31 Oct 2016 03:03:24 -0700 (PDT)
In-Reply-To: <CAP8-FqneP57fhwQD1eFAw4D=PAe9uhtsjJ_2AqFAkZFTJcBJBQ@mail.gmail.com>
References: <922b5d40-3c8e-4642-17ec-0034ff841d9d@gmx.de> <20161030182604.36ED312C6B@welho-filter3.welho.com> <CABkgnnUJhvt3NzUOYQ7fq9Twc8K65BtXroQ_LUHbranuqRv0mw@mail.gmail.com> <CAP8-FqneP57fhwQD1eFAw4D=PAe9uhtsjJ_2AqFAkZFTJcBJBQ@mail.gmail.com>
From: Martin Thomson <martin.thomson@gmail.com>
Date: Mon, 31 Oct 2016 21:03:24 +1100
Message-ID: <CABkgnnWdMgHHmJMKnt763M0NEL6qhwSOWcqo6GHiPn=dEtb+2g@mail.gmail.com>
To: Costin Manolache <costin@gmail.com>
Cc: Kari Hurtta <hurtta-ietf@elmme-mailer.org>, Julian Reschke <julian.reschke@gmx.de>, HTTP working group mailing list <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=209.85.220.176; envelope-from=martin.thomson@gmail.com; helo=mail-qk0-f176.google.com
X-W3C-Hub-Spam-Status: No, score=-5.8
X-W3C-Hub-Spam-Report: AWL=-0.262, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1c19RX-0007LK-EL 4cd8a61299ab4fe89527ef369773c573
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Encryption simplification
Archived-At: <http://www.w3.org/mid/CABkgnnWdMgHHmJMKnt763M0NEL6qhwSOWcqo6GHiPn=dEtb+2g@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32750
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 31 October 2016 at 17:13, Costin Manolache <costin@gmail.com> wrote:
> 1. Why not add the Crypto-Key to the binary header ? If we have to deal with
> binary encoding, we can at
> least avoid parsing more text headers - and it doesn't have to be b64.

I considered doing this, but - other than webpush, more on that below
- the key usually has to travel independently of the encrypted
payload.  Otherwise we're reduced to providing an elaborate checksum.

> 2. For webpush - if the actual encryption is the same ( and I haven't
> compared with the previous version ) - I
> don't expect it to be a big problem to accept both formats for a while in
> existing servers.

I have an update for the webpush document that follows this.
Unfortunately, the format and crypto is incompatible.  That's
unavoidable.  I took the opportunity to simplify things further.

We've managed this in the past by switching on the content-encoding
header field value, and I plan to do the same.  I consider that sort
of extra complexity the cost of trying to implement a standard that
isn't completely done.

For the DH public key, I did consider packing it into the keyid field
rather than relying on Crypto-Key.  That seemed wrong, but I could be
convinced that it's worth doing.

I'll follow up on the webpush list and we can hash out that side of
things there.