Here are some notes that will help you get started quickly with
BouncyCastle and PGP
BouncyCastle 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 is sparce and inaccurate.
You will want to download the BouncyCastle jars for:
JCE Provider
open PGP
test examples
Java Source for Open PGP
Put the jars in your ext directory.
Generating Keys
Generate a binary private/public key with:
java org.bouncycastle.openpgp.examples.RSAKeyPairGenerator charlie
"open sesame"
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:
java org.bouncycastle.openpgp.examples.RSAKeyPairGenerator -a charlie
"open sesame"
To generate variants look at the source code in bcpg-jdk14-122/src/
org/bouncycastleopenpgp/examples/RSAKeyPairGenerator.java
Signing A Binary File
java org.bouncycastle.openpgp.examples.SignedFileProcessor -s
anyfile.dat secret.bpg "open sesame"
Resulting signed file will appear in anyfile.dat.bpg signed, but not
encrypted.
Verifying a Signed Binary File
java org.bouncycastle.openpgp.examples.SignedFileProcessor -v
anyfile.dat.bpg pub.bpg
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
sp - 11 Mar 2004 03:18 GMT
Hi:
What changes required to the java.security policy file to use BouncyCastle ?
sp
> Here are some notes that will help you get started quickly with
> BouncyCastle and PGP
[quoted text clipped - 40 lines]
> java org.bouncycastle.openpgp.examples.SignedFileProcessor -v
> anyfile.dat.bpg pub.bpg
Roedy Green - 15 Mar 2004 20:33 GMT
> What changes required to the java.security policy file to use BouncyCastle ?
For simple things, nothing. I don't know about more complex things.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.