pem-dev
[Top] [All Lists]

Re: ASN.1 is one of the problems

1995-07-28 11:10:00
The biggest problem with ASN.1 is that people expect to be able to use it
without thinking about it, in my experience.  It's just tagged data, after
all.  A general-purpose ASN.1 compiler has to generate general-purpose code,
which is quite a bit of overkill for most applications.

It is quite true that ASN.1 is just tagged data. And it is also true that
people expect to be able to use it without giving it any initial consideration,
and you just cannot do that.

However, the biggest problem with ASN.1 in my opinion is that it promises much
more than it delivers. At first glance it looks like you can add new primitive
types via the source language (i.e. via macros). But the fact of the matter is
that you cannot do this. All you can do is change the format of the source
language around, and given the modular nature of most ASN.1 these days this
ends up making it harder rather than easier to process the stuff. I think ASN.1
macros were a really terrible idea in ASN.1 and we'd all be better off without
them. (The new macro replacement mechanisms look better, but are probably too
late.)

Another major problem is the lack of decent documentation. I've looked at
dozens of books that purport to describe ASN.1, and thus far I've only found
one reasonable one -- Douglas Steedman's. All it covers is ASN.1 and it does it
very well, although it is now somewhat dated. The ASN.1 standards documents may
well be the worst in the entire ITU collection. And what's more, they seem to
have degenerated over time -- the best of the lot was the description in
X.400-1984!

When it came time for me to implement X.400-1984 I floundered around in the
standards swamp for quite a while. Then some guy from DEC told me about
Steedman's book. He said it was a must-have and he was right. After reading it
I immediately deleted all the code I had and started over, and I was able to
implement X.400-1984 in a straightforward way without any major incidents after
that.

I don't believe in using ASN.1 compilers either. They always mean using an
intermediate representation and I cannot tolerate the inefficiency of that. I
played around with the stuff in ISODE but gave up it up as hopeless in fairly
short order.

I have a little ASN.1 routine library (2500 lines or so) that I use and I just
crank out code based on that. It is just not that hard once you really
understand what's going on -- the understanding was the hard part.

                                Ned

<Prev in Thread] Current Thread [Next in Thread>