[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> 
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();
 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.


openpgp mailing list

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