[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[iaik-jce] TripleDES



Hallo,

   could someone explain how the proper application of the TripleDES
algorithm should look 
like?
I have doubts whether, after creating the secret key as follows:

      KeyGenerator keyGenerator=KeyGenerator.getInstance("3DES", "IAIK");
      SecretKey secretKey=keyGenerator.generateKey();

should I use it directly to initialize the cipher object like this:

      cipherObject.init(Cipher.ENCRYPT_MODE, secretKey);

or should I first extract from it the inherent DES keys and use them
separately to perform
the encrypting-decrypting-encrypting (EDE) operation on the given data
block.
It would be convenient if after creating a cipher object for the TripleDES
algorithm as follows:

      cipherObject=Cipher.getInstance("3DES/CBC/PKCS5Padding", "IAIK");

the (EDE) operation were carried out automatically in the background every
time 

      cipherObject.doFinal(MyDataBlock);

is called.

Regards,
Mariusz
--
Mailinglist-archive at http://jcewww.iaik.at/mailarchive/iaik-jce/jcethreads.html

To unsubscribe send an email to listserv@iaik.at with the folowing content: UNSUBSCRIBE iaik-jce