Bouncy castle is a collection of APIs used in cryptography. It includes APIs for both the Java and the C# programming languages.
BouncyCastle is Australian in origin and thus American restrictions on the export of crytographic software do not apply to it.
BouncyCastle was started as a result of 2 colleagues being rather tired of having to re-invent a set of cryptography libraries each time they changed jobs. One of the very early design considerations of BouncyCastle came from one of the developers being active in JavaME
development, and as a result there are 2 distinct library sets.
The low-level, or 'light-weight', API is a vendor-specific set of APIs that implement all the underlying cryptographic algorithms. The intent is to use the low-level API in memory constrained devices (JavaME) or when easy access to the JCE
libraries is not possible (such as distribution in a Java applet
The JCE compatible provider is built upon the low-level API's. As such, the source code for the JCE provider is a great example of how to implement many of the "common" crypto problems using the low-level API.