Update of /cvsroot/freenet/freenet/src/freenet/session
In directory sc8-pr-cvs1:/tmp/cvs-serv5586/src/freenet/session
Modified Files:
FnpLink.java
Log Message:
Work around problem with ThrottleAsyncEntropyYarrow/Yarrow initialization order.
Made randSource in Core private and started exposing it though a getter instead of
directly.
Index: FnpLink.java
===================================================================
RCS file: /cvsroot/freenet/freenet/src/freenet/session/FnpLink.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -w -r1.33 -r1.34
--- FnpLink.java 8 Oct 2003 22:54:18 -0000 1.33
+++ FnpLink.java 27 Oct 2003 14:45:19 -0000 1.34
@@ -227,7 +227,7 @@
shiftedSetTime, sstlen>500?Logger.MINOR:
Logger.DEBUG);
- BigInteger[] C = asymCipher.encrypt(bob, M, Core.randSource);
+ BigInteger[] C = asymCipher.encrypt(bob, M, Core.getRandSource());
long madeChallengeTime = System.currentTimeMillis();
long mclen = madeChallengeTime - shiftedSetTime;
@@ -279,7 +279,7 @@
rbl>500?Logger.MINOR:Logger.DEBUG);
if (cb == SILENT_BOB_BYTE) {
- ctx.writeIV(Core.randSource, rawOut);
+ ctx.writeIV(Core.getRandSource(), rawOut);
long writtenIVTime = System.currentTimeMillis();
long ivt = writtenIVTime - readByteTime;
if(logDEBUG || ivt>500)
@@ -310,7 +310,7 @@
"Bad OK byte");
}
} else {
- ctx.writeIV(Core.randSource, rawOut);
+ ctx.writeIV(Core.getRandSource(), rawOut);
long writtenIVTime = System.currentTimeMillis();
long wiv = writtenIVTime - initCipherTime;
if(logDEBUG || wiv>500)
@@ -415,7 +415,7 @@
Core.logger.log(this, "Set up cipher in "+clen, clen>500?
Logger.MINOR:Logger.DEBUG);
- ctx.writeIV(Core.randSource, rawOut);
+ ctx.writeIV(Core.getRandSource(), rawOut);
long IVTime = System.currentTimeMillis();
long ivlen = IVTime - cipherTime;
if(logDEBUG || ivlen>500)
@@ -499,7 +499,7 @@
}
PCFBMode pcfb = new PCFBMode(c);
- pcfb.writeIV(Core.randSource, rawOut);
+ pcfb.writeIV(Core.getRandSource(), rawOut);
setOutputStream(pcfb, rawOut);
//setInputStream(c, rawIn);
@@ -510,7 +510,7 @@
ctx.update(Cbbytes, 0, Cbbytes.length);
BigInteger M = Util.byteArrayToMPI(ctx.digest());
DSASignature sigCaCb = DSA.sign(pubMe.getGroup(), privMe,
- M, Core.randSource);
+ M, Core.getRandSource());
sigCaCb.write(out);
out.flush();
@@ -575,7 +575,7 @@
ByteArrayOutputStream buff = new ByteArrayOutputStream(10000);
- DLESCa = asymCipher.encrypt(bob, Ca, Core.randSource);
+ DLESCa = asymCipher.encrypt(bob, Ca, Core.getRandSource());
long encryptedTime = System.currentTimeMillis();
long elen = encryptedTime - writtenByteTime;
if(logDEBUG || elen>500)
@@ -637,7 +637,7 @@
Core.logger.log(this, "Initialized more cipher stuff in "+ilen, ilen>500?
Logger.MINOR:Logger.DEBUG);
- pcfb.writeIV(Core.randSource, rawOut);
+ pcfb.writeIV(Core.getRandSource(), rawOut);
long writtenIVTime = System.currentTimeMillis();
long wivlen = writtenIVTime - inittedBitsTime;
if(logDEBUG || wivlen>500)
@@ -664,7 +664,7 @@
M = Util.byteArrayToMPI(ctx.digest());
DSASignature sigYaCaCb = DSA.sign(pubMe.getGroup(), privMe, M,
- Core.randSource);
+ Core.getRandSource());
long signedTime = System.currentTimeMillis();
long siglen = signedTime - writtenPKTime;
if(logDEBUG || siglen>500)
_______________________________________________
cvs mailing list
[EMAIL PROTECTED]
http://dodo.freenetproject.org/cgi-bin/mailman/listinfo/cvs