|The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. The package is organised so that it contains a light-weight API suitable for use in any environment (including J2ME) with the additional infrastructure to conform the algorithms to the JCE framework. The package is distributed under a license based on the MIT X Consortium license, which means it is distributed at no charge for commercial or non-commercial use.
The Bouncy Castle Crypto package can be downloaded from: http://www.bouncycastle.org
The Bouncy Castle package can be downloaded in one go which includes JCE, provider, light weight API, J2ME, JDK1.2, JDK1.1, and JDK1.0 compatibility classes, signed jars, etc. or can be downloaded separately.
An overview of the Bouncy Castle libraries and their purpose can be found here below.
The jar files depends on the JVM version you have installed.
Bouncy Castle libraries
Note: NN=J2SE version, MMM=Bouncy Castle release
||Java Cryptography Extension (JCE) library
This package support the generation of certificates and PKCS10 signing requests.
||Bouncy Castle TSP (Time Stamp Protocol) library
||Bouncy Castle test classes library
||Bouncy Castle provider library
||Bouncy Castle OpenPGP/BCPG library
A package dealing with OpenPGP objects.
||Bouncy Castle SMIME/CMS library
A package for processing RFC 3852 Cryptographic Message Syntax (CMS) objects - also referred to as PKCS#7 (formerly RFC 2630, 3369), and also dealing with S/MIME objects (RFC 3851).
||Bouncy Castle J2ME library
||Bouncy Castle J2ME library
Installing the Bouncy Castle provider 1.2.8
Operating system used
Windows XP Home Edition Version 5.1 SP 2
Java 2 Standard Edition (J2SE) SDK, version 1.4. or higher.
- Download and unzip crypto-128.zip
Note: This zip file contains the lot (includes JCE, provider, light weight API, J2ME, JDK1.2, JDK1.1, and JDK1.0 compatibility classes, signed jars etc).
- In directory C:\Tools\crypto-128\jars you will find several jar files.
In directory C:\Tools\crypto-128\zips you will find two zip files.
- Copy C:\Tools\crypto-128\jars\bcprov-jdk14-128.jar to two locations:
- C:\Tools\java\j2sdk1.4.2_01\jre\lib\ext (J2SE SDK location)
- C:\Program Files\Java\j2re1.4.2_01\lib\ext (J2SE runtime location)
Note: bcprov-jdk14-128.jar has been choosen because J2SE 1.4.x is installed.
- Edit both java.security files located at:
- C:\Tools\java\j2sdk1.4.2_01\jre\lib\security (J2SE SDK location)
- C:\Program Files\Java\j2re1.4.2_01\lib\security (J2SE runtime location)
- Add the Bouncy Castle provider to the list, your list should look like this one:
Be sure that the order of security.provider.n lines is sequential from 1 to n. The security manager will not recognize any provider settings if there is a gap in the number sequence.
- You are ready to sign and encrypt files/messages.