Re: [openpgp] "OpenPGP Simple"

ianG <iang@iang.org> Mon, 23 March 2015 19:52 UTC

Return-Path: <iang@iang.org>
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 EB07C1A034F for <openpgp@ietfa.amsl.com>; Mon, 23 Mar 2015 12:52:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9] 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 atptSOq2khHd for <openpgp@ietfa.amsl.com>; Mon, 23 Mar 2015 12:52:04 -0700 (PDT)
Received: from virulha.pair.com (virulha.pair.com [209.68.5.166]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 959551A037A for <openpgp@ietf.org>; Mon, 23 Mar 2015 12:52:04 -0700 (PDT)
Received: from tormenta.local (iang.org [209.197.106.187]) by virulha.pair.com (Postfix) with ESMTPSA id 08CA06D717; Mon, 23 Mar 2015 15:52:02 -0400 (EDT)
Message-ID: <55106EE1.5060404@iang.org>
Date: Mon, 23 Mar 2015 19:52:01 +0000
From: ianG <iang@iang.org>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: openpgp@ietf.org
References: <9A043F3CF02CD34C8E74AC1594475C73AAFB3823@uxcn10-5.UoA.auckland.ac.nz>
In-Reply-To: <9A043F3CF02CD34C8E74AC1594475C73AAFB3823@uxcn10-5.UoA.auckland.ac.nz>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/s4AuMRCnLohbLXWmYgaoTBv1Djw>
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: Mon, 23 Mar 2015 19:52:06 -0000

On 17/03/2015 02:10 am, Peter Gutmann 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.


Crazy * 2 :)

One int is good enough for anyone.  Just use an expanding 7 bit form, 
where the hi bit says, grab the following byte.


> Length-decoding shouldn't be any more
> complicated than:
>
> read tag;
> if( tag & length_32_flag )
>    length = read32();
> else
>    length = read16();
>
> While I'm venting, shall I get started on the MDC kludge?


Simplify!  Simplify!


iang