[freenet-cvs] r15144 - branches/freenet-jfk/src/freenet/node

kryptos at freenetproject.org kryptos at freenetproject.org
Thu Sep 13 15:40:07 UTC 2007


Author: kryptos
Date: 2007-09-13 15:40:06 +0000 (Thu, 13 Sep 2007)
New Revision: 15144

Modified:
   branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java
Log:
Remove some unused code 

Modified: branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java
===================================================================
--- branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java	2007-09-13 15:08:14 UTC (rev 15143)
+++ branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java	2007-09-13 15:40:06 UTC (rev 15144)
@@ -73,13 +73,10 @@
 	 * Usage of a linkedList could prove to be much slower due to the allocation time
 	 * for each node in the list.
 	 */
-	final Map message3Cache;
-	final Map message4Cache;
+	
 	private final HashMap authenticatorCache;
 	final eKey encryptionKey;
-	final DSAGroup g;
-	static DSAPrivateKey PKR,PKI;
-	final RandomSource r;
+		
 	/** We renew it on each *successful* run of the protocol (the spec. says "once a while") - access is synchronized! */
 	private DiffieHellmanLightContext currentDHContext = null;
 	// TODO: is 64 bits enough ?
@@ -122,12 +119,9 @@
 		this.sock = sock;
 		fnpTimingSource = new EntropySource();
 		myPacketDataSource = new EntropySource();
-		message3Cache = new HashMap();
-		message4Cache = new HashMap();
 		authenticatorCache = new HashMap();
 		encryptionKey = new eKey();
-		g = Global.DSAgroupBigA;
-		r=node.random;
+			
 		fullHeadersLengthMinimum = HEADERS_LENGTH_MINIMUM + sock.getHeadersLength();
 		fullHeadersLengthOneMessage = HEADERS_LENGTH_ONE_MESSAGE + sock.getHeadersLength();
 		logMINOR = Logger.shouldLog(Logger.MINOR, this);
@@ -438,23 +432,6 @@
 	}
 
 	/*
-	 * Shared Secret key
-	 * Alice generates random number x and computes exponential g^x
-	 * Bob generates random number y and computes exponential g^y
-	 * Shared secret key= (g^x)^y used as key for computing hash of the encryption key
-	 */
-	private synchronized byte[] sharedSecretKey(PeerNode pn){
-		DiffieHellmanContext dh=(DiffieHellmanContext)pn.getKeyAgreementSchemeContext();
-		if(dh==null)
-		{
-			if(shouldLogErrorInHandshake())
-				Logger.error(this,"Failed getting exponentials");
-
-		}
-		return dh.getKey();
-	}
-	
-	/*
 	 * Initiator Method:Message1
 	 * Process Message1
 	 * Send the Initiator nonce and DiffieHellman Exponential




More information about the cvs mailing list