Author: juiceman
Date: 2007-09-10 03:20:08 +0000 (Mon, 10 Sep 2007)
New Revision: 15104
Modified:
trunk/freenet/src/freenet/crypt/KeyAgreementSchemeContext.java
trunk/freenet/src/freenet/crypt/ciphers/Rijndael.java
trunk/freenet/src/freenet/keys/ClientCHKBlock.java
trunk/freenet/src/freenet/keys/ClientSSK.java
trunk/freenet/src/freenet/keys/ClientSSKBlock.java
trunk/freenet/src/freenet/keys/InsertableClientSSK.java
trunk/freenet/src/freenet/node/PeerNode.java
trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
Log:
Remove more pre-1010 cruft. Review encouraged
Modified: trunk/freenet/src/freenet/crypt/KeyAgreementSchemeContext.java
===================================================================
--- trunk/freenet/src/freenet/crypt/KeyAgreementSchemeContext.java
2007-09-10 03:03:06 UTC (rev 15103)
+++ trunk/freenet/src/freenet/crypt/KeyAgreementSchemeContext.java
2007-09-10 03:20:08 UTC (rev 15104)
@@ -27,7 +27,7 @@
if(cipher != null) return cipher;
getKey();
try {
- cipher = new Rijndael(256, 256, false);
+ cipher = new Rijndael(256, 256);
} catch (UnsupportedCipherException e1) {
throw new Error(e1);
}
Modified: trunk/freenet/src/freenet/crypt/ciphers/Rijndael.java
===================================================================
--- trunk/freenet/src/freenet/crypt/ciphers/Rijndael.java 2007-09-10
03:03:06 UTC (rev 15103)
+++ trunk/freenet/src/freenet/crypt/ciphers/Rijndael.java 2007-09-10
03:20:08 UTC (rev 15104)
@@ -30,7 +30,7 @@
}
public Rijndael(int keysize) throws UnsupportedCipherException {
- this(keysize, 128, false);
+ this(keysize, 128);
}
/**
@@ -42,7 +42,7 @@
* the old code.
* @throws UnsupportedCipherException
*/
- public Rijndael(int keysize, int blocksize, boolean fakeInsecure)
throws UnsupportedCipherException {
+ public Rijndael(int keysize, int blocksize) throws
UnsupportedCipherException {
if (! ((keysize == 128) ||
(keysize == 192) ||
(keysize == 256)))
Modified: trunk/freenet/src/freenet/keys/ClientCHKBlock.java
===================================================================
--- trunk/freenet/src/freenet/keys/ClientCHKBlock.java 2007-09-10 03:03:06 UTC
(rev 15103)
+++ trunk/freenet/src/freenet/keys/ClientCHKBlock.java 2007-09-10 03:20:08 UTC
(rev 15104)
@@ -80,7 +80,7 @@
throw new UnsupportedOperationException();
BlockCipher cipher;
try {
- cipher = new Rijndael(256, 256, key.cryptoAlgorithm ==
Key.ALGO_INSECURE_AES_PCFB_256_SHA256);
+ cipher = new Rijndael(256, 256);
} catch (UnsupportedCipherException e) {
// FIXME - log this properly
throw new Error(e);
@@ -180,7 +180,7 @@
// Now encrypt the header, then the data, using the same PCFB instance
BlockCipher cipher;
try {
- cipher = new Rijndael(256, 256, false);
+ cipher = new Rijndael(256, 256);
} catch (UnsupportedCipherException e) {
// FIXME - log this properly
throw new Error(e);
Modified: trunk/freenet/src/freenet/keys/ClientSSK.java
===================================================================
--- trunk/freenet/src/freenet/keys/ClientSSK.java 2007-09-10 03:03:06 UTC
(rev 15103)
+++ trunk/freenet/src/freenet/keys/ClientSSK.java 2007-09-10 03:20:08 UTC
(rev 15104)
@@ -66,7 +66,7 @@
}
byte[] buf = md.digest();
try {
- Rijndael aes = new Rijndael(256,256,cryptoAlgorithm ==
Key.ALGO_INSECURE_AES_PCFB_256_SHA256);
+ Rijndael aes = new Rijndael(256,256);
aes.initialize(cryptoKey);
aes.encipher(buf, buf);
ehDocname = buf;
Modified: trunk/freenet/src/freenet/keys/ClientSSKBlock.java
===================================================================
--- trunk/freenet/src/freenet/keys/ClientSSKBlock.java 2007-09-10 03:03:06 UTC
(rev 15103)
+++ trunk/freenet/src/freenet/keys/ClientSSKBlock.java 2007-09-10 03:20:08 UTC
(rev 15104)
@@ -53,7 +53,7 @@
Rijndael aes;
try {
Logger.minor(this,
"cryptoAlgorithm="+key.cryptoAlgorithm+" for "+getClientKey().getURI());
- aes = new
Rijndael(256,256,key.cryptoAlgorithm==Key.ALGO_INSECURE_AES_PCFB_256_SHA256);
+ aes = new Rijndael(256,256);
} catch (UnsupportedCipherException e) {
throw new Error(e);
}
Modified: trunk/freenet/src/freenet/keys/InsertableClientSSK.java
===================================================================
--- trunk/freenet/src/freenet/keys/InsertableClientSSK.java 2007-09-10
03:03:06 UTC (rev 15103)
+++ trunk/freenet/src/freenet/keys/InsertableClientSSK.java 2007-09-10
03:20:08 UTC (rev 15104)
@@ -113,7 +113,7 @@
Rijndael aes;
try {
- aes = new Rijndael(256, 256, cryptoAlgorithm ==
Key.ALGO_INSECURE_AES_PCFB_256_SHA256);
+ aes = new Rijndael(256, 256);
} catch (UnsupportedCipherException e) {
throw new Error("256/256 Rijndael not supported!");
}
Modified: trunk/freenet/src/freenet/node/PeerNode.java
===================================================================
--- trunk/freenet/src/freenet/node/PeerNode.java 2007-09-10 03:03:06 UTC
(rev 15103)
+++ trunk/freenet/src/freenet/node/PeerNode.java 2007-09-10 03:20:08 UTC
(rev 15104)
@@ -462,9 +462,9 @@
"\nFor: "+getPeer());
try {
- incomingSetupCipher = new Rijndael(256,256,false);
+ incomingSetupCipher = new Rijndael(256,256);
incomingSetupCipher.initialize(incomingSetupKey);
- outgoingSetupCipher = new Rijndael(256,256,false);
+ outgoingSetupCipher = new Rijndael(256,256);
outgoingSetupCipher.initialize(outgoingSetupKey);
} catch (UnsupportedCipherException e1) {
Logger.error(this, "Caught: "+e1);
Modified:
trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
===================================================================
--- trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
2007-09-10 03:03:06 UTC (rev 15103)
+++ trunk/freenet/src/freenet/support/io/PaddedEphemerallyEncryptedBucket.java
2007-09-10 03:20:08 UTC (rev 15104)
@@ -298,7 +298,7 @@
if(aes != null) return aes;
}
try {
- aes = new Rijndael(256, 256, false);
+ aes = new Rijndael(256, 256);
} catch (UnsupportedCipherException e) {
throw new Error(e);
}