Bouncy Castle Crypto package

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:

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
jce-jdkNN-MMM.jar Java Cryptography Extension (JCE) library

This package support the generation of certificates and PKCS10 signing requests.
bctsp-jdkNN-MMM.jar Bouncy Castle TSP (Time Stamp Protocol) library
bctest-jdkNN-MMM.jar Bouncy Castle test classes library
bcprov-jdkNN-MMM.jar Bouncy Castle provider library
bcpg-jdkNN-MMM.jar Bouncy Castle OpenPGP/BCPG library

A package dealing with OpenPGP objects.
bcmail-jdkNN-MMM.jar 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
Note: NN=J2SE version, MMM=Bouncy Castle release

Installing the Bouncy Castle provider 1.2.8


Operating system used
Windows XP Home Edition Version 5.1 SP 2

Software prerequisites
Java 2 Standard Edition (J2SE) SDK, version 1.4. or higher.

  1. Download and unzip
    e.g.: C:\Tools\crypto-128

    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).

  2. 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.

  3. 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.

  4. Edit both 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)

  5. 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.

  6. You are ready to sign and encrypt files/messages.