intelliCastle JCE Provider

A re-packaged version of the Bouncy Castle JCE provider.
Targeted for Android development.

Why in general?

The Android platform unfortunately ships with a cut-down version of Bouncy Castle - as well as being crippled, it also makes installing an updated version of the libraries difficult due to class loader conflicts.

intelliCastle is the same as the stock Bouncy Castle libraries with a couple of small changes to make them work on Android.

Why not Spongy Castle?

Why another fork apart from the already available Spongy Castle?

As a manufacturer of a security library for mobile devices, we wanted to have control over the cryptographic code being used internally by our library while not enforcing any restrictions upon users of our library.

Hence an application making use of our library could still use (a potentially different version of) Spongy Castle without running into class loader problems or other side effects. They could, of course, also make use of the intelliCastle classes and thus prevent a lot of code duplication ...

Changes from Bouncy Castle

Current version

The current version of intelliCastle is derived from the Bouncy Castle version 1.58.

The previous versions of intelliCastle based on Bouncy Castle version 1.47, 1.50, 1.51, 1.52, 1.54, 1.55, 1.56 and 1.57 are still available here.

Note that as from version 1.55, the intelliCastle JCE provider is signed with a proper code signing certificate for JCE provider signing (issued by the "JCE Code Signing CA, Sun Microsystems Inc"). This allows the provider to also be used in the Oracle JRE which requires JCE providers to be signed. In that way, it is easier to re-use the same code (built on the classes in the intelliCastle namespace) for both Android and "normal" Java on desktop/server systems.

License

intelliCastle is licensed under the same adaptation of the MIT X11 License as the original Bouncy Castle library.

Downloads

JAR file Contents Dependencies
ic-light.jar Lightweight Crypto API -
ic-prov.jar JCE provider ic-light.jar
ic-pkix.jar PKIX, CMS, EAC, TSP, PKCS,
OCSP, CMP and CRMF APIs
ic-light.jar
ic-prov.jar
ic-pg.jar OpenPGP API ic-light.jar
ic-prov.jar
ic-bzip2.jar
ic-mail.jar S/MIME API ic-light.jar
ic-prov.jar
ic-pkix.jar
JavaMail 1.4.5

Build your own

Security sensitive people tend to like building stuff on their own, so here's a short description of the necessary steps:

  1. Create a work directory, called IC_HOME in the following steps, and make it the current directory.
  2. Download the necessary scripts and helper files and unpack them into the current IC_HOME directory:
    
              IC_HOME$ unzip intellicastle-build-1.58.zip
            
  3. Download the full distribution from the Bouncy Castle FTP server, e.g. crypto-158.zip.
  4. Unpack the downloaded archive and rename the created folder to crypto:
    
              IC_HOME$ unzip crypto-158.zip
              IC_HOME$ mv crypto-158 crypto
            
  5. You should now have the following directory structure:
    
              IC_HOME$ ls -Al
              total 115483
              drwx------ 0 lep lep         0 2015-06-21 08:34:29 bin/
              drwx------ 0 lep lep         0 2016-12-10 20:02:26 bouncycastle/
              drwx------ 0 lep lep         0 2017-01-25 17:40:00 crypto/
              -rw------- 0 lep lep 127868099 2017-10-11 12:07:13 crypto-158.zip
              drwx------ 0 lep lep         0 2013-08-08 13:40:42 doc/
              drwx------ 0 lep lep         0 2016-12-10 20:26:29 intellicastle/
              -rw------- 0 lep lep     38517 2017-10-11 16:19:27 intellicastle-build-1.58.zip
              drwx------ 0 lep lep         0 2015-06-21 08:34:28 maven/
              IC_HOME$
            
  6. Execute the bouncycastle-to-maven-layout.sh script to convert the project structure to maven:
    
              IC_HOME$ bin/bouncycastle-to-maven-layout.sh
            
  7. Execute the bouncycastle-to-intellicastle.sh script to perform the package renaming and other replacements.
    This script requires the version which is being built as an argument, e.g. 1.58:
    
              IC_HOME$ bin/bouncycastle-to-intellicastle.sh 1.58
            
  8. Apply the necessary patch for the chosen version to disable some of the (broken?) JUnit tests:
    
              IC_HOME$ patch -p1 < bouncycastle/crypto-158.patch
            
  9. Compile the libraries with Maven (assuming a version compatible with Maven 3.0.5):
    
              IC_HOME$ mvn clean install
            
  10. If all went well, you'll find the built libraries in the maven repository as well as in the target folder in each of the maven project folders, e.g. IC_HOME/ic-light/target/ic-light-1.58.jar.
    
              IC_HOME$ find -name "*.jar"
              ./ic-light/target/ic-light-1.58.jar
              ./ic-mail/target/ic-mail-1.58.jar
              ./ic-pg/target/ic-pg-1.58.jar
              ./ic-pkix/target/ic-pkix-1.58.jar
              ./ic-prov/target/ic-prov-1.58.jar
              ./ic-test/target/ic-test-1.58.jar
              IC_HOME$
            
  11. An example output of such a build is given in this build log.

Contributors

Besides of course the original team from Bouncy Castle and Roberto Tyley who came up with the initial idea of creating the Android port called Spongy Castle, these are the people who have contributed to this release: