ietf-openpgp
[Top] [All Lists]

Re: [openpgp] "OpenPGP Simple"

2015-03-16 22:05:55
On Mar 16, 2015, at 10:10 PM, Peter Gutmann 
<pgut001(_at_)cs(_dot_)auckland(_dot_)ac(_dot_)nz> wrote:

David Shaw <dshaw(_at_)jabberwocky(_dot_)com> writes:
On Mar 16, 2015, at 5:15 PM, David Leon Gil <coruus(_at_)gmail(_dot_)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

_______________________________________________
openpgp mailing list
openpgp(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/openpgp

<Prev in Thread] Current Thread [Next in Thread>