On Wed, May 02, 2001 at 09:06:52PM -0400, Tavin Cole wrote:
> The 21st byte in freenet keys contains a value equal to the smallest power of
> 2 which is _larger_ than the PartSize of the data.  For CHKs the PartSize is
> the larger of 16364 (sic) and (plain file length)/20.  For all other keys the
> PartSize is the length of the encrypted file plus control bytes.
> 
> When keys are verified, the PartSize is pulled from the Storables and if not
> found, it is set equal to the total length as above.  Then the PartSize is
> checked against that 21st byte to make sure the 21st byte is greater than or
> equal to the PartSize.
> 
> So if the PartSize is exactly a power of 2, that 21st byte is one larger than
> it needs to be.  Why?

It is probably just a typo (just like the 6, stop whining).
 
> Also, why don't we just drop PartSize from the Storables entirely and store
> it in the 21st byte?  It would force PartSize to always be a power of 2 but
> I don't see that being a problem.

PartSize came first, byte 21 came later. Actually, it might be byte 21
that is unnecessary - I put it there to make sure that nodes can't lie
about the partsize and thus keep another from discovering that the data is
bogus for much longer than they would actually need, but if we start by
verifying all the Storables then they can't do that anyways.

-- 
'DeCSS would be fine. Where is it?'
'Here,' Montag touched his head.
'Ah,' Granger smiled and nodded.

Oskar Sandberg
[EMAIL PROTECTED]

_______________________________________________
Devl mailing list
[EMAIL PROTECTED]
http://lists.freenetproject.org/mailman/listinfo/devl

Reply via email to