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? 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. -- # 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 >From - Thu May 3 00:17:25 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 UAA12491 for <danello at danky.com>; Wed, 2 May 2001 20:36:49 -0400