Re: [openpgp] "OpenPGP Simple"

Phill <hallam@gmail.com> Tue, 17 March 2015 14:30 UTC

Return-Path: <hallam@gmail.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 49D621A1AA1 for <openpgp@ietfa.amsl.com>; Tue, 17 Mar 2015 07:30:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level:
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, SPF_PASS=-0.001] 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 e9-CMzRY-R9o for <openpgp@ietfa.amsl.com>; Tue, 17 Mar 2015 07:30:18 -0700 (PDT)
Received: from mail-qc0-x22a.google.com (mail-qc0-x22a.google.com [IPv6:2607:f8b0:400d:c01::22a]) (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 EE8F11A1A9B for <openpgp@ietf.org>; Tue, 17 Mar 2015 07:30:17 -0700 (PDT)
Received: by qcto4 with SMTP id o4so9724254qct.3 for <openpgp@ietf.org>; Tue, 17 Mar 2015 07:30:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=A1vQV/ILalSgwtUvQsXLdGTrX+FzqamOOgufVxzDdgQ=; b=M3+XixBkTbiBWdM9VRIbznbdJnNZ7X2yvwFWvt1Mbeyx+593mdL1XjnC2uVTyoqS7D VbpPcUxJK9oXW0NNL6BO54M2o2PS6SdFG7neknISOIOlyqkdmEIhGZ5BQJ8UlkgtqkWP rlib4Ilp2NQDB+LxHK1FJ3x6pe3qcWCCgPcheJpLyfgdru9KSuA9V9CkRJXm3lHIEjPs xN7EgmEV+znH/6QBb/xMCgb/M7Wtt3LV8ucKy6kPhq7pgC/J0vcMr/krW1/QpLiDdgkD Yf0wbMt1qVn+X0pcBPc+x8Lod6qyRhCJ16WBQ1H8Kv+VVp2aat3GslsViI4oapVv6yGv ik8A==
X-Received: by 10.140.98.227 with SMTP id o90mr80773280qge.96.1426602617063; Tue, 17 Mar 2015 07:30:17 -0700 (PDT)
Received: from [192.168.1.29] (pool-71-174-213-210.bstnma.fios.verizon.net. [71.174.213.210]) by mx.google.com with ESMTPSA id 23sm9680650qkr.41.2015.03.17.07.30.12 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Mar 2015 07:30:15 -0700 (PDT)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\))
From: Phill <hallam@gmail.com>
In-Reply-To: <088CD5E6-CDB9-44E3-8762-DA51E3D7A294@jabberwocky.com>
Date: Tue, 17 Mar 2015 10:30:00 -0400
Content-Transfer-Encoding: quoted-printable
Message-Id: <AC983DBE-79DA-4106-A901-98478EC8BC29@gmail.com>
References: <9A043F3CF02CD34C8E74AC1594475C73AAFB3823@uxcn10-5.UoA.auckland.ac.nz> <088CD5E6-CDB9-44E3-8762-DA51E3D7A294@jabberwocky.com>
To: David Shaw <dshaw@jabberwocky.com>
X-Mailer: Apple Mail (2.2070.6)
Archived-At: <http://mailarchive.ietf.org/arch/msg/openpgp/P6FL3hjonQUZsYP8N1lT4arQXjU>
Cc: "openpgp@ietf.org" <openpgp@ietf.org>, Peter Gutmann <pgut001@cs.auckland.ac.nz>
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 14:30:19 -0000

> On Mar 16, 2015, at 11:05 PM, David Shaw <dshaw@jabberwocky.com> wrote:
> 
> 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.
> 

+1 

But that 32 bit length really worries me. Just because people can’t send 4GB messages today does not mean that they can’t or won’t in the future. Do not build OpenPGP around assumptions based on SMTP continuing forever. Use today is not limited to mail in any case.

If I have a 1TB archive file I am not going to want to break it into chunks just to encrypt it.


I am not convinced a complete overhaul of the messaging format is desirable. But if people were going to completely revise the message format, the field is moving towards JSON for almost everything.

The only thing JSON does not do that is essential for crypto is length prefixed binary encoding of binary blobs. Base64 encoding is not so bad if you do it only once. But a 33% penalty for each time a file is wrapped starts to add up. When folk were suggesting yet another data encoding, several of us who only want one data model suggested just adding code points for binary blobs to JSON. It does get the job done.


Again, I am not sure that a complete overhaul is desirable. Just pruning back the unnecessary features is probably sufficient. But if a change is made, best to pick something that looks as much like the standard the rest of the protocol stack above layer 5 is converging on as possible.