Why self describing data formats:

Nicolas Williams Nicolas.Williams at sun.com
Sat Jun 23 13:26:20 EDT 2007


On Mon, Jun 11, 2007 at 11:28:37AM -0400, Richard Salz wrote:
> >Many protocols use some form of self describing data format, for example
> > ASN.1, XML, S expressions, and bencoding.
> 
> I'm not sure what you're getting at.  All XML and S expressions really get 
> you is that you know how to skip past something you don't understand. This 
> is also true for many (XER, DER, BER) but not all (PER) encodings for 
> ASN.1.

If only it were so easy.  As we discovered in the IETF KRB WG you can't
expect that just because the protocol uses a TLV encoding (DER) you can
just add items to sequences (structures) or choices (discriminated
unions) willy nilly: code generated by a compiler might choke because
formally the protocol didn't allow extensibility and the compiler did
the Right Thing.  Extensibility of this sort requires that one be
explicit about it in the original spec.

> Are you saying why publish a schema?

I doubt it: you can have schemas without self-describing encodings
(again, PER, XDR, are examples of non-self-describing encodings for
ASN.1 and XDR, respectively).  Schemas can be good while self-describing
encodings can be bad...

Nico
-- 

---------------------------------------------------------------------
The Cryptography Mailing List
Unsubscribe by sending "unsubscribe cryptography" to majordomo at metzdowd.com



More information about the cryptography mailing list