Author: nextgens
Date: 2007-09-28 21:26:17 +0000 (Fri, 28 Sep 2007)
New Revision: 15371
Modified:
branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java
Log:
Doh(2)
Modified: branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java
===================================================================
--- branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java 2007-09-28
21:20:50 UTC (rev 15370)
+++ branches/freenet-jfk/src/freenet/node/FNPPacketMangler.java 2007-09-28
21:26:17 UTC (rev 15371)
@@ -672,7 +672,7 @@
final int expectedLength = NONCE_SIZE*2 +
DiffieHellman.modulusLengthInBytes()*2 +
HASH_LENGTH + // authenticator
HASH_LENGTH + // HMAC of the cyphertext
-
c.getBlockSize() + // IV
+
(c.getBlockSize() >> 3) + // IV
HASH_LENGTH; // it's at least a signature
if(payload.length < expectedLength + 3) {
Logger.error(this, "Packet too short from "+pn+":
"+payload.length+" after decryption in JFK(3), should be "+(expectedLength +
3));
@@ -837,7 +837,7 @@
DiffieHellman.modulusLengthInBytes()*2 + // g^i, g^r
HASH_LENGTH + // authenticator
HASH_LENGTH + // HMAC(cyphertext)
- c.getBlockSize() + // IV
+ (c.getBlockSize() >> 3) + // IV
Node.SIGNATURE_PARAMETER_LENGTH * 2
// Signature (R,S)
];
int offset = 0;