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


Angelos --

You say:

> The only reason i want a binary format is because i
> don't have to do any:
> a) pre-scanning of the data
> b) canonicalization 

I don't have any idea what you mean by "pre-scanning".  Do you mean

I think that any input routine will very likely have to do some processing
of the input.  There are issues of:

	-- well-formedness.  This happens with any format.  For example,
	   does every certificate have an issuer?  Does every "not-before"
	   have a proper date field?  Is every crypto algorithm mentioned
	   actually known to the implementation?  Is the signer of a 
	   certificate the same as the key of the issuer?  Is every object
	   type recognized when it should be recognizable?

	-- machine dependencies.  Is your machine high-endian or low-endian?
	   Do numbers have to be aligned?  

The idea that you should just take a bunch of bytes as your input
object, and accept it without further checking (leaving the errors to
fall where they may later on), is not a good one.  (That is not to say
that you can always do all the necessary checking initially.)  But
"parsing" (telling where lists and byte-strings begin an end), or
"pre-scanning" as you call it, is a very minor part of this whole
business.  I'm actually suprised that we're talking about this sort of
minor thing when there are other much more major design issues (e.g.
*-rules for tags) in terms of affecting overall size of the

Here we are talking (I think) about the difference between just passing
a pointer and a length field to the hash algorithm, or writing a small
recursive routine that runs over the object, passing parens and byte
strings to the hash routine).  Probably 10-20 lines of code.   I don't
see why this is so important that we should give up on readable 

Having an ASCII readable format for our data structures is, I believe,
an important design goal.  Look at the success of Postscript.  Having to
pull out a special tool to examine data structures during implementation,
instead of just using a text editor, is a BIG negative.  

If you are into counting lines of code, you should perhaps count the lines of
code that you need to build your special tools, instead of focussing on the
few ones needed to do canonicalization, etc...

Just my two cents...

	Ron Rivest