Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use latest BouncyCastle provider on Android?

I am writing the app for Android 1.6.
Can anyone tell me if it is possible to use latest Bouncy Castle provider (version 1.46) instead of old one contained in SDK?
If so, correct instructions will be appreciated.

like image 693
bob Avatar asked Jun 27 '11 04:06

bob


People also ask

How do you upgrade Bouncy Castle?

To get the latest Bouncy Castle release, navigate to http://www.bouncycastle.org/latest_releases.html. Select the latest release, or the release that corresponds to your version of Java. Download the signed JAR file. Stop all the IBM processes and Lawson.

What is Bouncy Castle Android?

Bouncy Castle is a collection of APIs used in cryptography. It includes APIs for both the Java and the C# programming languages. The APIs are supported by a registered Australian charitable organization: Legion of the Bouncy Castle Inc.

How do I add a Bouncy Castle provider in Java?

Installation of Bouncy Castle for use in TomEE itself is done in two steps: Add the Bouncy Castle provider jar to the $JAVA_HOME/jre/lib/ext directory. Create a Bouncy Castle provider entry in the $JAVA_HOME/jre/lib/security/java. security file.

Is Bouncy Castle open source?

The Bouncy Castle Crypto APIs are looked after by an Australian Charity, the Legion of the Bouncy Castle Inc., which looks after the care and feeding of the Bouncy Castle APIs. Help us keep this effort Free, Open Source, and Maintained!


1 Answers

Found the issue on google and SpongyCastle. After I added jar and called addProvider(), the app became bigger but could use BC 1.46 features like "Whirlpool" digest.

...the Android platform unfortunately incorporates a cut-down version of Bouncy Castle, which also makes installing an updated version of the libraries difficult due to classloader conflicts.

If you really need the full version of the Bouncy Castle libraries in your Android app, you may find it convenient to use Spongy Castle - a repackage of Bouncy Castle for Android:

like image 62
bob Avatar answered Sep 27 '22 18:09

bob