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();
While I'm venting, shall I get started on the MDC kludge?
Peter.
_______________________________________________
openpgp mailing list
openpgp(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/openpgp