BouncyCastle : Java Glossary

go to home page B words local find full screen, hide local find menu Google search web for more information on this topic jump to foot of page translate this page with Babelfish punctuation 0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z (all) ©1996-2009 Roedy Green, Canadian Mind Products
BouncyCastle
Legion of the Bouncy Castle is a JCE (Java Cryptographic Extension)-compatible library that also handles PGP. It is well regarded. The source is not well formatted or commented. The Javadoc in version 1.22 was sparce and inaccurate. version 1.41 is reputedly better. I don’t know how they do it, but everything is free. The specificiations give a bird’s eye view of all the encryption algorithms supported.

BouncyCastle has the big advantage of being Australian, and hence immune to the silly American laws about exporting strong encryption. If Canadians use BouncyCastle they need not worry about that law, since the code is not American. If Americans use it, they can still get in trouble just for incorporating Australian encryption code even though it did not originate in America. If you are an American and have a product then implements or uses encryption, best talk to a lawyer. The laws are idiotic since encryption algorithms are public domain and widely disseminated. All the laws do is cripple American software company exports.

You will want to download the BouncyCastle jars for:

Put the jars in your ext directories:
ext directories :

Generating Keys

Generate a binary private/public key with:
The public and private keys will appear as pub.bpg, and secret.bpg. You can generate ascii *.asc ascii armoured file instead by using the -a option like this:
To generate variants look at the source code in bcpg-jdk14-122/src/org/bouncycastleopenpgp/examples/RSAKeyPairGenerator.java

Signing A Binary File

Resulting signed file will appear in anyfile.dat.bpg signed, but not encrypted.

Verifying a Signed Binary File

I’m told BouncyCastle does not support Sun’s proprietary JKS store format, but even that can be got around with Metastatic’s reverse engineered version.

With BouncyCastle you have the sources to look at. With keytool, all you have is -J-verbose:class to find out what classes it is using.


CMP homejump to top You can get the freshest copy of this page from: or possibly from your local J: drive (Java virtual drive/mindprod.com website mirror)
http://mindprod.com/jgloss/bouncycastle.html J:\mindprod\jgloss\bouncycastle.html
CMP logofeedback Please email your feedback for publication, errors, omissions, typos, formatting errors, ambiguities, unclear wording, broken/redirected link reports, suggestions to improve this page or comments to Roedy Green : feedback email
mindprod.com IP:[65.110.21.43]
view BlogYour face IP:[38.107.191.106]
You are visitor number 22,418.