Author: toad
Date: 2008-11-28 17:44:21 +0000 (Fri, 28 Nov 2008)
New Revision: 23954

Modified:
   trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
Log:
Logging


Modified: trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java
===================================================================
--- trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java      
2008-11-28 17:40:40 UTC (rev 23953)
+++ trunk/freenet/src/freenet/store/saltedhash/SaltedHashFreenetStore.java      
2008-11-28 17:44:21 UTC (rev 23954)
@@ -742,6 +742,14 @@
                        final long newHdLen = (headerBlockLength + 
dataBlockLength + hdPadding) * storeFileSize;
 
                        if (preallocate) {
+                               /*
+                                * Fill the store file with random data. This 
won't be compressed, unlike filling it with zeros.
+                                * So the disk space usage of the node will not 
change (apart from temp files).
+                                * 
+                                * Note that MersenneTwister is *not* 
cryptographically secure, in fact from 2.4KB of output you
+                                * can predict the rest of the stream! This is 
okay because an attacker knows which blocks are
+                                * occupied anyway; it is essential to label 
them to get good data retention on resizing etc.
+                                */
                                byte[] b = new byte[4096];
                                ByteBuffer bf = ByteBuffer.wrap(b); 
 

_______________________________________________
cvs mailing list
[email protected]
http://emu.freenetproject.org/cgi-bin/mailman/listinfo/cvs

Reply via email to