Re: Encryption simplification

Martin Thomson <> Mon, 31 October 2016 10:09 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 6360A129629 for <>; Mon, 31 Oct 2016 03:09:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -8.498
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: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id 9zq4loy6WTXH for <>; Mon, 31 Oct 2016 03:09:21 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 5BD3E129566 for <>; Mon, 31 Oct 2016 03:09:21 -0700 (PDT)
Received: from lists by with local (Exim 4.80) (envelope-from <>) id 1c19Ri-0001iH-3T for; Mon, 31 Oct 2016 10:04:02 +0000
Resent-Date: Mon, 31 Oct 2016 10:04:02 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1c19Rd-0001gb-6q for; Mon, 31 Oct 2016 10:03:57 +0000
Received: from ([]) by with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <>) id 1c19RX-0007LK-EL for; Mon, 31 Oct 2016 10:03:52 +0000
Received: by with SMTP id q130so35512484qke.1 for <>; Mon, 31 Oct 2016 03:03:30 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; 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;; 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 with SMTP id x1mr17770248qka.316.1477908205152; Mon, 31 Oct 2016 03:03:25 -0700 (PDT)
MIME-Version: 1.0
Received: by with HTTP; Mon, 31 Oct 2016 03:03:24 -0700 (PDT)
In-Reply-To: <>
References: <> <> <> <>
From: Martin Thomson <>
Date: Mon, 31 Oct 2016 21:03:24 +1100
Message-ID: <>
To: Costin Manolache <>
Cc: Kari Hurtta <>, Julian Reschke <>, HTTP working group mailing list <>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=;;
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: 1c19RX-0007LK-EL 4cd8a61299ab4fe89527ef369773c573
Subject: Re: Encryption simplification
Archived-At: <>
X-Mailing-List: <> archive/latest/32750
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

On 31 October 2016 at 17:13, Costin Manolache <> 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.