views:

89

answers:

3

Hello,
I have to make an application which can encrypt and decrypt text file using IDEA(International Data Encryption Algorithm) in java or C#. I know that in java there is inbuilt JCE(Java Cryptography Extension) but how to proceed further, will anybody please give me some suggestions?

thank you.

+2  A: 

You could try to use BouncyCastle, which is available for Java and C#. However, you'll need to get the right jars (assuming Java) for IDEA support, according to this note:

From release 1.40 the implementation of the IDEA encryption algorithm was removed from the regular jar files at the request of a number of users. Jars with names of the form -ext- still include the IDEA implementation.

EDIT (added pointer to example): I haven't tried, but I think that the DESExample could be adapted to do what you want, probably by replacing the DESedeEngine with am IDEAEngine (and similar for other classes).

Bruno
Would the down-voter care to explain what was wrong with this answer? (I don't mind accepting being wrong, but I'd be interested to know why.)
Bruno
+3  A: 

Can't comment for whatever reason, so I am posting this as a reply.

IDEA is a patented algorithm and patents expire only in 2011 and 2012 (depending on the country). Also it's not best-performing at all. So unless you have a requirement to use IDEA, I'd suggest looking at AES or RC4 (ARCFOUR, as RC4 name is a registered trademark) algorithms. RC4 is faster, but heavily depends on quality of the encryption key.

Eugene Mayevski 'EldoS Corp
+3  A: 

Eugene is right regarding IDEA. If it is under your choice, it would be reasonable to avoid using IDEA and choose some other algorithm. Due to the patent issues, IDEA is used quite rarely and thus it is less investigated by the cryptanalysts. Besides, the length of IDEA key is restricted with 128 bits that is likely to become insufficient relatively soon.

Most of (not to say absolutely all) development frameworks include support for standard cryptographic algorithms. As a matter of fact, it is always good to use standardized algorithms, as they are best-studied by the cryptanalysts. AES128/256 is a preferred choice. The maximal lenth of RC4 key, as well as IDEA key, is 128 bits; besides, it is also a kind of exotic and may be unsupported by some frameworks.

Ken Johnson