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
md98-osa at nada.kth.se

_______________________________________________
Devl mailing list
Devl at freenetproject.org
http://lists.freenetproject.org/mailman/listinfo/devl
>From - Sun May  6 15:04:43 2001
Return-Path: <devl-admin at freenetproject.org>
Received: from hawk.freenetproject.org (postfix@[4.18.42.11])
        by funky.danky.com (8.9.3/8.8.7) with ESMTP id KAA18000
        for <danello at danky.com>; Thu, 3 May 2001 10:19:40 -0400
Received: from hawk.freenetproject.org (localhost [127.0.0.1])
        by hawk.freenetproject.org (Postfix) with ESMTP
        id 2483558086; Thu,  3 May 2001 08:00:03 -0700 (PDT)
Delivered-To: devl at freenetproject.org
Received: from post.netlink.se (port215.cvx1-sto.ppp.netlink.se [62.66.4.216])
        by hawk.freenetproject.org (Postfix) with ESMTP id 069F257FFA
        for <devl at freenetproject.org>; Thu,  3 May 2001 07:59:00 -0700 (PDT)
Received: from hobbex by post.netlink.se with local (Exim 3.16 #1)
        id 14vKUd-0000EG-00
        for devl at freenetproject.org; Thu, 03 May 2001 16:54:11 +0200

Reply via email to