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

JFK nit



Sorry if this has been repeated before...

> 4.1  Structure
> 
>    Each message is a string of tag-length-value elements concatenated
>    together.  Tags are one octet.  Lengths are two octets, and specify
>    the number of octets of the value.  Values are always integral
>    numbers of octets.  All octets are in big-endian order.


Ewwww.  This is not a good choice.  Modern machines work better with aligned
data!  Say you have two nonce tags in a row (Ni, followed by Nr).  Say they
start nicely on byte 0x10...


	0x10	<Ni tag>
	0x11	<Ni len msb>
	0x12	<Ni len lsb>  == 8 bytes
	0x13	Ni msb
	...
	0x1a	Ni lsb
	0x1b	<Nr tag>

I can load the whole nonce into a register, but I can't, because it starts at
the byte-only-boundary of 0x13.

JFK authors, please address this problem.  If you want to discuss matters of
bit-twiddling import, let me know!

Dan