On Fri, Jan 24, 2003 at 01:15:33PM +0000, Gordan Bobic wrote: > On Thu, 23 Jan 2003, Matthew Toseland wrote: > > > > When you say powers of two - does that mean that a 5 KB file will be > > > rounded to 8 KB? Or be split into 4 KB and 1 KB? If it is split, at what > > > > Rounded. > > I just realized something. If files are rounded to the size which is the > next power of 2, doesn't that mean that in the worst case, where the file > has size n bytes, wasted space is anything up to (n-1) bytes? And in the > average case (n/2) bytes? Is this space actually wasted? Is the empty > space padded with zeros or random data? No, the worst case is n/2. The average case is 3n/4. Unless we are talking about the source document being below the minimum 1kB. > > I can see that this prevents any data size analysis attack on the network > (i.e. key sizes are not indicative of content by their size), but if the > data is encrypted, the padding with random data would probably be more > desireable as plain zeros would introduce some level of entropy... We do, I think. > > How far off the mark am I here? > > Regards. > > Gordan
-- Matthew Toseland [EMAIL PROTECTED][EMAIL PROTECTED] Full time freenet hacker. http://freenetproject.org/ Freenet Distribution Node (temporary) at http://amphibian.dyndns.org:8889/eI49KUM9vEY/ ICTHUS.
msg01064/pgp00000.pgp
Description: PGP signature
