[openpgp] On Streaming and Chunking

Tom Ritter <tom@ritter.vg> Tue, 24 March 2015 12:25 UTC

Return-Path: <tom@ritter.vg>
X-Original-To: openpgp@ietfa.amsl.com
Delivered-To: openpgp@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id BF90F1A88C4 for <openpgp@ietfa.amsl.com>; Tue, 24 Mar 2015 05:25:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.379
X-Spam-Level:
X-Spam-Status: No, score=-1.379 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FM_FORGED_GMAIL=0.622, SPF_PASS=-0.001] autolearn=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 VvYErFCFybKV for <openpgp@ietfa.amsl.com>; Tue, 24 Mar 2015 05:25:52 -0700 (PDT)
Received: from mail-ig0-x22f.google.com (mail-ig0-x22f.google.com [IPv6:2607:f8b0:4001:c05::22f]) (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 AAE9A1A8834 for <openpgp@ietf.org>; Tue, 24 Mar 2015 05:25:52 -0700 (PDT)
Received: by igbqf9 with SMTP id qf9so64733770igb.1 for <openpgp@ietf.org>; Tue, 24 Mar 2015 05:25:52 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ritter.vg; s=vg; h=mime-version:from:date:message-id:subject:to:content-type; bh=HaAtxHLKEwQ69Wz57hMWvDJHVLB8dnNQsRVfrSK8M4M=; b=Q3oGJGvPDaMFLJ2lm2sMo1oKu+j6+XfB8OJ2HYaurAcUEKD1CZPRHoe9hP2KMbnSUj MxdhXlf4qfF5n4A4cQzzAEikFFpBPFwfLJo+m7efZl2FuuDB3MCxgYoZLen5rriJlexh qXcEXbIxTwc0GSKERe28yVKt3QNYlK1zDsH0w=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=HaAtxHLKEwQ69Wz57hMWvDJHVLB8dnNQsRVfrSK8M4M=; b=dJyD/Bo8osrYIsK9DF+cIlkTxVLenoPvOWyK6CmgFdNevd1xTlsLjSMxAmSMBnfbn6 UBIjCBREEqIe03PoX23qzt1KkIg0VEPiZZpR/SJ2gkRw1biAHkjEkP96N/QgNpArmWB7 +IxPKk88x81kjjN2/udihd87XQoiiMkdICPIgM3T0dGBL1aGZPdPRTWUMPomIwvFyoSQ OFmjkQUy2aIlRrE/Zk4kgAL33VkjLJ1XbgHTIgtWV4W2c990R9I90E7w72HSPxOaz61x EkXvQxjnf3HBeDgnLAz87PVl3ZV++6N5i32iyIgtxf4C1V2HC2rPchX4DtjUuLG9bMd0 7RfA==
X-Gm-Message-State: ALoCoQlaLP5Pa8TwWxFwhrA6oxbxdkM4XcDl4ekJZdj09nmP+aVd83O/sNU1TBRZwRaha0sO5yns
X-Received: by 10.42.94.65 with SMTP id a1mr24763012icn.1.1427199952134; Tue, 24 Mar 2015 05:25:52 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.107.166.84 with HTTP; Tue, 24 Mar 2015 05:25:31 -0700 (PDT)
From: Tom Ritter <tom@ritter.vg>
Date: Tue, 24 Mar 2015 07:25:31 -0500
Message-ID: <CA+cU71kTbjZd8Kz1qxJfA9XQDu+Lju6VhWHVCqwagEC8f0UEzQ@mail.gmail.com>
To: openpgp@ietf.org
Content-Type: text/plain; charset="ISO-8859-1"
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/sbWwwrqb4okea-Ec9o-qHV15zY0>
Subject: [openpgp] On Streaming and Chunking
X-BeenThere: openpgp@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: "Ongoing discussion of OpenPGP issues." <openpgp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/openpgp>, <mailto:openpgp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/openpgp/>
List-Post: <mailto:openpgp@ietf.org>
List-Help: <mailto:openpgp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/openpgp>, <mailto:openpgp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Mar 2015 12:25:53 -0000

Adam's post on streaming API's has been posted before:
https://www.imperialviolet.org/2014/06/27/streamingencryption.html

The same problem is the root cause of the Java GCM CipherInputStream
issue: http://blog.philippheckel.com/2014/03/01/cipherinputstream-for-aead-modes-is-broken-in-jdk7-gcm/

But I haven't seen any discussion of Adam's point that one _can_
construct a format for chunking and authenticating the chunks (and
ordering thereof) to provide authenticated streaming. And that someone
has already done so:
https://github.com/kaepora/miniLock#4-file-encryption

I think support for a mode like this would be good to consider, and I
think if IPR allows it, a fully-specified design for it is a good
place to start.

-tom