Take the 2-minute tour ×
Information Security Stack Exchange is a question and answer site for Information security professionals. It's 100% free, no registration required.

I had found bcprov-ext-jdk16-145.jar and bcprov-jdk16-145.zip. 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
4  
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 stackoverflow.com –  Rory Alsop Jan 25 '11 at 10:07
2  
@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
1  
@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

2 Answers 2

BouncyCastle is a standard JCE provider, so most Java crypto code will work just fine. You just need to add the provider to java.security... 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

 
discard

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.