On Mon, May 07, 2001 at 09:00:09AM -0500, Scott Gregory Miller wrote:
> > * Storable.Document-header = DocHeadData zero padded to power of 2
> > * DocHeadData = <length of key: 2 bytes><key><length of data: number>
> >   <length of metadata: number>
> > * The length of the key MUST equal the keysize of the cipher (e.g. 16
> >   bytes for a 128-bit cipher)
> > * DocHeadData number = <length of number: 2 bytes><number: big endian>
> >   where length is the smallest length that the number will fit into
> >   subject to: The minumum length is 2 AND The length may not be odd.
>   Why not make DocHeadData number an MPI so that people don't have to code
> yet another number representation?  

Part of the spec was that the unencrypted Document-header be a series
of byte fields each beginning with a 2-byte byte-length marker, but the
byte fields don't necessarily store numbers.

So numeric values would still be stored with this 2-byte byte-length field.
Starting from there, it seems more natural to me just to go ahead and read
or write a big-endian number, than to mess with MPI representations that
needlessly repeat the length information.

We can't really say that all the fields will be MPIs either, since some
fields may need to store leading zeroes (like the crypto key).

-- 

# tavin cole
#
# "The process of scientific discovery is, in effect,
#  a continual flight from wonder."
#                                   - Albert Einstein


_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to