Re: Encryption simplification

Kari Hurtta <hurtta-ietf@elmme-mailer.org> Sun, 30 October 2016 18:30 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 9AF8A1294EB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 30 Oct 2016 11:30:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.398
X-Spam-Level:
X-Spam-Status: No, score=-8.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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
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 8LorYb6kMlZM for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 30 Oct 2016 11:30:57 -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 E23CD1294E3 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 30 Oct 2016 11:30:56 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c0uod-0003u2-NB for ietf-http-wg-dist@listhub.w3.org; Sun, 30 Oct 2016 18:26:43 +0000
Resent-Date: Sun, 30 Oct 2016 18:26:43 +0000
Resent-Message-Id: <E1c0uod-0003u2-NB@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 <khurtta@welho.com>) id 1c0uoY-0003ng-Ak for ietf-http-wg@listhub.w3.org; Sun, 30 Oct 2016 18:26:38 +0000
Received: from welho-filter3.welho.com ([83.102.41.25]) by mimas.w3.org with esmtp (Exim 4.84_2) (envelope-from <khurtta@welho.com>) id 1c0uoS-00037t-41 for ietf-http-wg@w3.org; Sun, 30 Oct 2016 18:26:33 +0000
Received: from localhost (localhost [127.0.0.1]) by welho-filter3.welho.com (Postfix) with ESMTP id 36ED312C6B; Sun, 30 Oct 2016 20:26:04 +0200 (EET)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter3.welho.com [::ffff:83.102.41.25]) (amavisd-new, port 10024) with ESMTP id pntxRFDCmPTv; Sun, 30 Oct 2016 20:26:03 +0200 (EET)
Received: from hurtta09lk.keh.iki.fi (89-27-35-245.bb.dnainternet.fi [89.27.35.245]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPS id 864BA2310; Sun, 30 Oct 2016 20:26:03 +0200 (EET)
In-Reply-To: <922b5d40-3c8e-4642-17ec-0034ff841d9d@gmx.de>
References: <922b5d40-3c8e-4642-17ec-0034ff841d9d@gmx.de>
To: Julian Reschke <julian.reschke@gmx.de>
Date: Sun, 30 Oct 2016 20:26:03 +0200
Sender: hurtta@hurtta09lk.keh.iki.fi
From: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
CC: Martin Thomson <martin.thomson@gmail.com>, HTTP working group mailing list <ietf-http-wg@w3.org>
X-Mailer: ELM [version ME+ 2.5 PLalpha43+]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="UTF-8"
Message-Id: <20161030182604.36ED312C6B@welho-filter3.welho.com>
Received-SPF: none client-ip=83.102.41.25; envelope-from=khurtta@welho.com; helo=welho-filter3.welho.com
X-W3C-Hub-Spam-Status: No, score=-6.7
X-W3C-Hub-Spam-Report: AWL=-0.173, BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-2.656, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1c0uoS-00037t-41 24d00d9c624c4a6a928bc0a6d3a6321e
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Encryption simplification
Archived-At: <http://www.w3.org/mid/20161030182604.36ED312C6B@welho-filter3.welho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32739
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>

> That said, doesn't have Crypto-Key a similar problem (in that you might 
> not now what applied encryption content codings it applies to)?

http://httpwg.org/http-extensions/encryption-preview.html#crypto-key

| keyid:
|     The “keyid” parameter corresponds to the “keyid” parameter in the content 
|     coding.
| aes128gcm:
|     The “aes128gcm” parameter contains the base64url-encoded octets [RFC7515] of 
|     the input keying material for the “aes128gcm” content coding.

So there is keyid and it is also on

http://httpwg.org/http-extensions/encryption-preview.html#header

| +-----------+--------+-----------+------------+
| | salt (16) | rs (4) | idlen (1) | id (idlen) |
| +-----------+--------+-----------+------------+

I guess that this "id" is keyid:

| keyid:
|     The “keyid” parameter can be used to identify the keying material that is 
|     used. When the Crypto-Key header field is used, the “keyid” identifies a 
|     matching value in that field. The “keyid” parameter MUST be used if keying 
|     material included in an Crypto-Key header field is needed to derive the 
|     content encryption key. The “keyid” parameter can also be used to identify 
|     keys in an application-specific fashion.



This

| rs:
|     The “rs” or record size parameter contains an unsigned 32-bit integer in 
|    network byte order that describes the record size in octets. Note that it is 
|    therefore impossible to exceed the 2^36-1 limit on plaintext input to 
|    AEAD_AES_128_GCM. Values smaller than 3 are invalid.



Is that 2^36-1 same than  2^36-31  here:

http://httpwg.org/http-extensions/encryption-preview.html#limits

|   There are limits to the data that AEAD_AES_128_GCM can encipher. The maximum 
|   record size is 2^36-31 [RFC5116].


/ Kari Hurtta