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

Re: Canonical form for signing S-expressions

The only problem with this is that you now have an ambiguous recursion
problem.  How do you know when:

	(a b (cd e fgh)

Both of these would encode to the same notation in your example.


Alan Barrett <apb@iafrica.com> writes:

> For on-the-wire encoding, there might be some advantage to pre-declaring
> the length of each parenthesised group (in the hopes of making memory
> allocation easier), something like this: 
> 	(a b (cd e fgh)) 
> 	30:(1:a,1:b,16:(2:cd,1:e,3:fgh),),
> Although the canonical form for signature does not need to be the same
> as an on-the-wire form, it seems to me that making them the same would
> be convenient from a code-sharing point of view.
> I don't have strong opinions on decimal versus hex, but I do like the
> robustness and legibility that are added by having a comma after the end
> of the counted string in Dan Bernstein's netstrings proposal. 
> --apb (Alan Barrett)

       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/      PP-ASEL      N1NWH
       warlord@MIT.EDU                        PGP key available

Follow-Ups: References: