* Crypto: Rename bouncycastle HMAC libs so they don't conflict

with older Android versions which bundle them
This commit is contained in:
zzz
2012-08-23 19:11:55 +00:00
parent e3e15850bb
commit 5ffefd2a19
11 changed files with 40 additions and 18 deletions

View File

@ -413,7 +413,7 @@
splitindex="true"
doctitle="I2P Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
<group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.crypto:org.bouncycastle.crypto.*:gnu.crypto.*:gnu.gettext:com.nettgryppa.security:net.metanotion:net.metanotion.*" />
<group title="Core SDK (i2p.jar)" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.gettext:com.nettgryppa.security:net.metanotion:net.metanotion.*" />
<group title="Streaming Library" packages="net.i2p.client.streaming" />
<group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters" />
<group title="Router Console" packages="net.i2p.router.web" />
@ -482,7 +482,7 @@
splitindex="true"
doctitle="I2P Unit Test Javadocs for Release ${release.number} Build ${i2p.build.number}${build.extra}"
windowtitle="I2P Anonymous Network - Java Documentation - Version ${release.number}">
<group title="Core SDK" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.crypto:org.bouncycastle.crypto.*:gnu.crypto.*:gnu.gettext:org:com.nettgryppa.security:net.metanotion:net.metanotion.*" />
<group title="Core SDK" packages="net.i2p:net.i2p.*:net.i2p.client:net.i2p.client.*:net.i2p.internal:net.i2p.internal.*:freenet.support.CPUInformation:org.bouncycastle.oldcrypto:org.bouncycastle.oldcrypto.*:gnu.crypto.*:gnu.gettext:org:com.nettgryppa.security:net.metanotion:net.metanotion.*" />
<group title="Router" packages="net.i2p.router:net.i2p.router.*:net.i2p.data.i2np:org.cybergarage.*:org.freenetproject:org.xlattice.crypto.filters" />
<sourcepath>
<pathelement location="core/java/test/junit" />

View File

@ -4,12 +4,12 @@ import gnu.crypto.hash.Sha256Standalone;
import net.i2p.I2PAppContext;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.macs.I2PHMac;
import org.bouncycastle.oldcrypto.Digest;
import org.bouncycastle.oldcrypto.macs.I2PHMac;
/**
* Calculate the HMAC-SHA256 of a key+message. All the good stuff occurs
* in {@link org.bouncycastle.crypto.macs.I2PHMac} and
* in {@link org.bouncycastle.oldcrypto.macs.I2PHMac} and
* {@link gnu.crypto.hash.Sha256Standalone}.
*
* This should be compatible with javax.crypto.Mac.getInstance("HmacSHA256")

View File

@ -16,13 +16,13 @@ import net.i2p.data.Hash;
import net.i2p.data.SessionKey;
import net.i2p.util.SimpleByteCache;
import org.bouncycastle.crypto.digests.MD5Digest;
import org.bouncycastle.crypto.macs.I2PHMac;
import org.bouncycastle.oldcrypto.digests.MD5Digest;
import org.bouncycastle.oldcrypto.macs.I2PHMac;
/**
* Calculate the HMAC-MD5-128 of a key+message. All the good stuff occurs
* in {@link org.bouncycastle.crypto.macs.I2PHMac} and
* {@link org.bouncycastle.crypto.digests.MD5Digest}.
* in {@link org.bouncycastle.oldcrypto.macs.I2PHMac} and
* {@link org.bouncycastle.oldcrypto.digests.MD5Digest}.
*
* Keys are always 32 bytes.
* This is used only by UDP.

View File

@ -1,4 +1,4 @@
package org.bouncycastle.crypto;
package org.bouncycastle.oldcrypto;
/*
* Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
* (http://www.bouncycastle.org)

View File

@ -1,4 +1,4 @@
package org.bouncycastle.crypto;
package org.bouncycastle.oldcrypto;
/*
* Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
* (http://www.bouncycastle.org)

View File

@ -1,4 +1,4 @@
package org.bouncycastle.crypto.digests;
package org.bouncycastle.oldcrypto.digests;
/*
* Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
* (http://www.bouncycastle.org)
@ -26,7 +26,7 @@ package org.bouncycastle.crypto.digests;
*
*/
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.oldcrypto.Digest;
/**
* base implementation of MD4 family style digest as outlined in

View File

@ -1,4 +1,4 @@
package org.bouncycastle.crypto.digests;
package org.bouncycastle.oldcrypto.digests;
/**

View File

@ -1,4 +1,4 @@
package org.bouncycastle.crypto.macs;
package org.bouncycastle.oldcrypto.macs;
/*
* Copyright (c) 2000 - 2004 The Legion Of The Bouncy Castle
* (http://www.bouncycastle.org)
@ -31,8 +31,8 @@ import java.util.Arrays;
import net.i2p.util.SimpleByteCache;
import org.bouncycastle.crypto.Digest;
import org.bouncycastle.crypto.Mac;
import org.bouncycastle.oldcrypto.Digest;
import org.bouncycastle.oldcrypto.Mac;
/**
* HMAC implementation based on RFC2104

View File

@ -0,0 +1,14 @@
<html>
<body>
<p>
This is from some very old version of bouncycastle, part of package org.bouncycastle.crypto.
Android bundled something similar in pre-Gingerbread, but upgraded to a later, incompatible version
in Gingerbread. As of Java 1.4 these are in javax.crypto - more or less.
To avoid having to make two different versions of our Android app, we rename to org.bouncycastle.oldcrypto.
</p><p>
Ref: <a href="http://docs.oracle.com/javase/1.5.0/docs/api/javax/crypto/package-summary.html">javax.crypto</a>
and
<a href="http://code.google.com/p/android/issues/detail?id=3280">this android issue</a>.
</p>
</body>
</html>

View File

@ -1,3 +1,11 @@
2012-08-23 zzz
* Crypto: Rename bouncycastle HMAC libs so they don't conflict
with older Android versions which bundle them
* NTCP: Reduce lock contention
* SSU:
- Don't relay or introduce to/from privileged ports
- Various spoof detections
2012-08-22 zzz
* NetDB: Add hash collision detection
* SimpleTimer2: Synchronization improvements (ticket #653)

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 15;
public final static long BUILD = 16;
/** for example "-test" */
public final static String EXTRA = "";