MICE: specify record size inline, not in separate header

"Manger, James" <James.H.Manger@team.telstra.com> Mon, 09 May 2016 03:56 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 7BE9C12D15B for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 8 May 2016 20:56:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.916
X-Spam-Level:
X-Spam-Status: No, score=-7.916 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.996, 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 Mw7bA4dt-nSV for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 8 May 2016 20:56:25 -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 C66A012D14E for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 8 May 2016 20:56:25 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1azcEX-00054s-Sv for ietf-http-wg-dist@listhub.w3.org; Mon, 09 May 2016 03:51:49 +0000
Resent-Date: Mon, 09 May 2016 03:51:49 +0000
Resent-Message-Id: <E1azcEX-00054s-Sv@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <James.H.Manger@team.telstra.com>) id 1azcER-000547-3q for ietf-http-wg@listhub.w3.org; Mon, 09 May 2016 03:51:43 +0000
Received: from ipxcno.tcif.telstra.com.au ([203.35.82.208]) by maggie.w3.org with esmtp (Exim 4.80) (envelope-from <James.H.Manger@team.telstra.com>) id 1azcEO-000703-No for ietf-http-wg@w3.org; Mon, 09 May 2016 03:51:42 +0000
X-IronPort-AV: E=Sophos;i="5.24,599,1454936400"; d="scan'208,217";a="76224868"
Received: from unknown (HELO ipcbni.tcif.telstra.com.au) ([10.97.216.204]) by ipocni.tcif.telstra.com.au with ESMTP; 09 May 2016 13:43:53 +1000
X-IronPort-AV: E=McAfee;i="5700,7163,8159"; a="116648183"
Received: from wsmsg3701.srv.dir.telstra.com ([172.49.40.169]) by ipcbni.tcif.telstra.com.au with ESMTP; 09 May 2016 13:43:53 +1000
Received: from WSMSG3153V.srv.dir.telstra.com ([172.49.40.159]) by wsmsg3701.srv.dir.telstra.com ([fe80::d462:bcaa:ad1:66fc%15]) with mapi; Mon, 9 May 2016 13:43:53 +1000
From: "Manger, James" <James.H.Manger@team.telstra.com>
To: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Date: Mon, 09 May 2016 13:43:51 +1000
Thread-Topic: MICE: specify record size inline, not in separate header
Thread-Index: AdGpomuAmzBVHxMLTp6ZGQBl0Uinxw==
Message-ID: <255B9BB34FB7D647A506DC292726F6E13BD127B40A@WSMSG3153V.srv.dir.telstra.com>
Accept-Language: en-US, en-AU
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US, en-AU
Content-Type: multipart/alternative; boundary="_000_255B9BB34FB7D647A506DC292726F6E13BD127B40AWSMSG3153Vsrv_"
MIME-Version: 1.0
Received-SPF: none client-ip=203.35.82.208; envelope-from=James.H.Manger@team.telstra.com; helo=ipxcno.tcif.telstra.com.au
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-3.350, BAYES_40=-0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, W3C_NW=0.5
X-W3C-Scan-Sig: maggie.w3.org 1azcEO-000703-No c590be11bc7ca237d47c104ea73f9747
X-Original-To: ietf-http-wg@w3.org
Subject: MICE: specify record size inline, not in separate header
Archived-At: <http://www.w3.org/mid/255B9BB34FB7D647A506DC292726F6E13BD127B40A@WSMSG3153V.srv.dir.telstra.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/31617
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>

Merkle Integrity Content Encoding (draft-thomson-http-mice) is a nice idea.
Specifying the record size in a separate "MI" HTTP header feels like a poor design: Content-Encoding indicates the encoding, but its critical parameter is in a separate header.
How about just putting the record size at the start of the content, eg a 4-byte prefix holding the record size in bytes as a big-endian unsigned int?

The 2nd example from the spec would become:

Content-Encoding: mi-sha256
Content-Length: 109

<00 00 00 10>When I grow up, <OElbplJlPK-Rv6JNK6p5_515IaoPoZo-2elWL7OQ60A>I want to be a w<iPMpmgExHPrbEX3_RvwP4d16fWlK4l--p75PUu_KyN0>atermelon

--
James Manger