Re: Protest: Complexity running rampant
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Protest: Complexity running rampant



Hi -

> From: "Hallam-Baker, Phillip" <pbaker at verisign.com>
> To: "Harald Tveit Alvestrand" <harald at alvestrand.no>; "Fred Baker" <fred at cisco.com>
> Cc: <ietf at ietf.org>
> Sent: Tuesday, February 27, 2007 6:45 AM
> Subject: RE: Protest: Complexity running rampant
...
> DER would not have been so bad if they had chosen to use
> indefinite length encoding for lists rather than definite length,
> thus requiring implementations to chose between unnecessary
> recursion and unnecessary memory copies.
...

There's a third approach that can be simpler to implement and
faster to execute - do the encoding *backwards*, starting at the
end of your buffer.  Then you don't need to encode the length
(and length-of-length) fields before you know their values.  That
way one can do the encoding without recursion or unnecessary
copies, and ensure that all lengths are minimal.

Randy


_______________________________________________
Ietf mailing list
Ietf at ietf.org
https://www1.ietf.org/mailman/listinfo/ietf




Note Well: Messages sent to this mailing list are the opinions of the senders and do not imply endorsement by the IETF.

Note: Messages sent to this list are the opinions of the senders and do not imply endorsement by the IETF.