Re: [openpgp] "OpenPGP Simple"

David Shaw <dshaw@jabberwocky.com> Tue, 17 March 2015 03:05 UTC

Return-Path: <dshaw@jabberwocky.com>
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 A42AD1A914B for <openpgp@ietfa.amsl.com>; Mon, 16 Mar 2015 20:05:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.911
X-Spam-Level:
X-Spam-Status: No, score=-1.911 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
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 oBF3XON0RG48 for <openpgp@ietfa.amsl.com>; Mon, 16 Mar 2015 20:05:49 -0700 (PDT)
Received: from mail.jabberwocky.com (walrus.jabberwocky.com [173.9.29.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 681E51ACD86 for <openpgp@ietf.org>; Mon, 16 Mar 2015 20:05:49 -0700 (PDT)
Received: from grover.home.jabberwocky.com (grover.home.jabberwocky.com [172.24.84.28]) (authenticated bits=0) by mail.jabberwocky.com (8.14.4/8.14.4) with ESMTP id t2H2jVdh025105 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 16 Mar 2015 22:45:32 -0400
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
From: David Shaw <dshaw@jabberwocky.com>
In-Reply-To: <9A043F3CF02CD34C8E74AC1594475C73AAFB3823@uxcn10-5.UoA.auckland.ac.nz>
Date: Mon, 16 Mar 2015 23:05:40 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <088CD5E6-CDB9-44E3-8762-DA51E3D7A294@jabberwocky.com>
References: <9A043F3CF02CD34C8E74AC1594475C73AAFB3823@uxcn10-5.UoA.auckland.ac.nz>
To: Peter Gutmann <pgut001@cs.auckland.ac.nz>
X-Mailer: Apple Mail (2.2070.6)
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/Uiq1k5HtGx3S1_2ER9fi39Yvu1Y>
Cc: "openpgp@ietf.org" <openpgp@ietf.org>
Subject: Re: [openpgp] "OpenPGP Simple"
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, 17 Mar 2015 03:05:50 -0000

On Mar 16, 2015, at 10:10 PM, Peter Gutmann <pgut001@cs.auckland.ac.nz> wrote:
> 
> David Shaw <dshaw@jabberwocky.com> writes:
>> On Mar 16, 2015, at 5:15 PM, David Leon Gil <coruus@gmail.com> wrote:
>>> Partial lengths are really a nuisance to parse.
>> 
>> No argument there...
> 
> The whole bizarro sort-of-fixed-point encoding of lengths is a pain (this is a
> cue for Jon to do his "every bit is sacred" dance).  If the format is revised,
> there should be only two lengths, a 16-bit one for almost everything (keyring
> data, signatures, etc), and a 32-bit one for payloads and partial lengths that
> are going to exceed 16-bit lengths.  Length-decoding shouldn't be any more
> complicated than:
> 
> read tag;
> if( tag & length_32_flag )
>  length = read32();
> else
>  length = read16();

I'm fine with that, but I do want to keep the concept of partial lengths, as you did above.  People do encrypt things without knowing how large they are ahead of time.  I'm fine with a restriction (which already exists today) that only payloads can use partial lengths.

David