Information Security Stack Exchange is a question and answer site for information security professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had found bcprov-ext-jdk16-145.jar and I wish to use the IDEA encryption to encrypt XML, but i haven't found any sample of coding in JAVA. Can anyone tell me how to call the methods in org.bouncycastle.jce.provider.symmetric.* to do the IDEA encryption and decryption or where can find sample code? Thank you all.

share|improve this question
this question doesn't look like a security question in its current form, more like a programming question. You may get some answers here, however you may want to look at – Rory Alsop Jan 25 '11 at 10:07
@Rory, I'm not so sure - code for performing encryption is ontopic, I think... That said, for something this niche, he's likely to get answers quicker. However, I've noticed programmers often use cryptographic functions wrong (like, using the wrong cipher mode, getting the padding wrong, etc.) – AviD Jan 26 '11 at 7:20
@AviD @Rory I agree with AviD. I don't have enough experience to answer this question, but it'd definitely be better to ask security people this question than programmers. – user185 Jan 26 '11 at 15:22

BouncyCastle is a standard JCE provider, so most Java crypto code will work just fine. You just need to add the provider to security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider I'd recommend using something like OWASP ESAPI instead of using the crypto API directly.

share|improve this answer

I don't have special IDEA sample code, but there are some samples on the net for symmetric encryption with bouncy castle. Try this one from the book Beginning Cryptography with Java.

share|improve this answer
Oh, sorry for my bad. Christian, i will try it. thank you. – scorp Jan 27 '11 at 9:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.