James A. Donald wrote:
Many protocols use some form of self describing data format, for example
ASN.1, XML, S expressions, and bencoding.

Why?

Presumably both ends of the conversation have negotiated what protocol
version they are using (and if they have not, you have big problems) and
when they receive data, they need to get the data they expect.  If they
are looking for list of integer pairs, and they get an integer string
pair, then having the string correctly identified as a string is not going to
help much.

Charlie Kaufman wrote:
You are correct that such encodings don't help with any interoperability
issues. Sometimes, they make reading and writing the spec easier, since
silly issues like big endian vs. little endian encoding of integers gets
specified elsewhere.

They also make it easy to write specs that do not in fact work. The spec writers do not in fact agree, and then leave the problem of implementing an under defined spec to the engineer.

More rarely, it makes coding easier (if there is some
parsing and encoding engine readily available to the implementers). If
the protocol is being designed by a committee, it can reduce the number of
debates over minutia.

In the case of XML, yes there is a parsing engine, and if the structure of the DTD reflects the structure of the algorithm, then indeed it makes things much easier. But usually the committee have not thought about the algorithm, or have unresolved disagreements about what the algorithm should be, leaving the engineer with problems that are at best extremely difficult to solve, and are at worst impossible to solve. Ideally the DTD should be developed in parallel with the program that processes the XML. In that case, you get the parsing engine doing a lot of work for free, so the engineers do not have to reinvent the wheel. But if the DTD is written first by one group, and the program second, by another group, the second group is usually hosed good.

But the main motivation (imho) is that it's trendy. And once anyone
proposes a heavyweight "standard" encoding, anyone who opposes it is
labeled a Luddite.

Sounds true.

---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to [EMAIL PROTECTED]

Reply via email to