aspose file tools*
The moose likes Security and the fly likes How to use IDEA cyptography agorithm from the JCE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "How to use IDEA cyptography agorithm from the JCE" Watch "How to use IDEA cyptography agorithm from the JCE" New topic
Author

How to use IDEA cyptography agorithm from the JCE

Gary Warren
Greenhorn

Joined: Dec 28, 2010
Posts: 2
Hi
Does anyone have a sample of how to use the IDEA encrypt and decrypt algorithms from the JCE. Specifically what cipher values to use (ECB, padding, etc...)?
Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41880
    
  63
The standard JCE provider which comes with the JRE does not contain an IDEA implementation. You'll have to use a provider that does, like the one from bouncycastle.org.


Ping & DNS - my free Android networking tools app
Gary Warren
Greenhorn

Joined: Dec 28, 2010
Posts: 2
Thanks for your reply. Now using Bouncy Castle and have a few more questions...

How do I serialize a KEY value to a file (a Bouncy Castle KEY). I am getting a non serializable error.
I can encrypt with a password using SecretKeyFactory and PBEKeySpec but do you have an example of
how to decrypt with a password?
Thanks again for your help...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41880
    
  63
What do you mean by "key value" - a PBEKeySpec? Not sure, but you can get all its constituent parameters from it, and store those.

You can find some example code for how to do encrypting/decrypting with JCE at https://www.coderanch.com/how-to/java/SecurityFaq#encryption. Those examples are for other algorithms, but the basic principles are the same.
 
 
subject: How to use IDEA cyptography agorithm from the JCE