Re: Protest: Complexity running rampant

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi -

> From: "Hallam-Baker, Phillip" <pbaker@xxxxxxxxxxxx>
> To: "Harald Tveit Alvestrand" <harald@xxxxxxxxxxxxx>; "Fred Baker" <fred@xxxxxxxxx>
> Cc: <ietf@xxxxxxxx>
> 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@xxxxxxxx
https://www1.ietf.org/mailman/listinfo/ietf

[Index of Archives]     [IETF Annoucements]     [IETF]     [IP Storage]     [Yosemite News]     [Linux SCTP]     [Linux Newbies]     [Fedora Users]