Bouncy castle (cryptography)
Encyclopedia
Bouncy Castle is a collection of APIs
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 used in cryptography
Cryptography
Cryptography is the practice and study of techniques for secure communication in the presence of third parties...

. It includes APIs for both the Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...

 and the C# programming languages.

Bouncy Castle is Australian in origin and thus American restrictions on the export of cryptographic software do not apply to it.

History

Bouncy Castle started when two colleagues were tired of having to re-invent a set of cryptography libraries each time they changed jobs working in server-side JavaSE. One of the developers was active in JavaME
Java Platform, Micro Edition
Java Platform, Micro Edition, or Java ME, is a Java platform designed for embedded systems . Target devices range from industrial controls to mobile phones and set-top boxes...

 (J2ME at that time) development as a hobby and a design consideration was to include the greatest range of Java VMs for the library, including those on J2ME.

This design consideration lead to the architecture that exists in Bouncy Castle.

A brief timeline of the development is:
  • Founded in May 2000. Now has around 20,000 downloads a month, including 5000 of the full Java distribution.
  • Originally just Java, C# API added in 2006.
  • Original Java API around 27,000 lines including test code. Provided support for J2ME, a JCE/JCA provider, and basic X.509 certificate generation.
  • Latest Java release, 1.46, 267,000 lines including test code. Supports same functionality as original release (with a larger number of algorithms) plus PKCS#10, PKCS#12, CMS, S/MIME, OpenPGP, TLS, OCSP, and Attribute Certificates.
  • C# API around 145,000 lines. Supports most of what the Java API does.
  • Strong emphasis on standards compliance and adaptability.
  • Public support facilities include an issue tracker, dev mailing list, and a wiki all available at the website.
  • Commercial support provided at http://www.lockboxlabs.com

Architecture

The Bouncy Castle architecture consists of 2 main components that support the base cryptographic capabilities. These are known as the 'light-weight' API, and the JCE provider. There are further components that are built upon the JCE provider which support additional functionality such as PGP support, S-MIME and similar.

The low-level, or 'light-weight', API is a set of APIs that implement all the underlying cryptographic algorithms. The APIs were designed to be simple enough to use if needed, but provided the basic building blocks for the JCE provider. The intent is to use the low-level API in memory constrained devices (JavaME) or when easy access to the JCE
Java Cryptography Extension
The Java Cryptography Extension is an officially released Standard Extension to the Java Platform. JCE provides a framework and implementation for encryption, key generation and key agreement, and Message Authentication Code algorithms...

 libraries is not possible (such as distribution in an applet
Java applet
A Java applet is an applet delivered to users in the form of Java bytecode. Java applets can run in a Web browser using a Java Virtual Machine , or in Sun's AppletViewer, a stand-alone tool for testing applets...

). As the light-weight API is just Java code, the JVM doesn't impose any restrictions on the operation of the code, and at early times of the Bouncy Castle history it was the only way to develop strong cryptography that wasn't crippled by the Jurisdiction Policy files which prevented any JCE providers from performing "strong" encryption.

The JCE-compatible provider is built upon the low-level APIs. As such, the source code for the JCE provider is an example of how to implement many of the "common" crypto problems using the low-level API. Many projects have been built using the JCE provider, including an Open Source Certificate Authority EJBCA.

Android Development

Google has packaged an outdated version of Bouncy Castle with their Android operating system. It's not known if this has been modified in any way, but the outdated library has caused a bit of hassle for any developers wanting to ship updated crypto with their Android applications.

To assist with this, an enterprising Android developer has repackaged Bouncy Castle to be usable on the Android platform. This project is known as Spongy Castle and is available from SpongyCastle github project.

Users of Spongy Castle may wish to ensure that the version there is the current version of Bouncy Castle, but with the more infrequent releases (now about every 6-9 months) this should not be overly onerous.

External links

  • kpbe An open source Password Based Encryption tool for files that uses bouncycastle C# implementation
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK