Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I need to know what are the padding modes applicable to Triple DES algorithm , Is AI_PKCS_PADDING a padding mode applicable to Triple DES ?

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

According to Java Cipher API:

Every implementation of the Java platform is required to support the following standard Cipher transformations with the keysizes in parentheses: 


    AES/CBC/NoPadding (128)
    AES/CBC/PKCS5Padding (128)
    AES/ECB/NoPadding (128)
    AES/ECB/PKCS5Padding (128)
    DES/CBC/NoPadding (56)
    DES/CBC/PKCS5Padding (56)
    DES/ECB/NoPadding (56)
    DES/ECB/PKCS5Padding (56)
    DESede/CBC/NoPadding (168)
    DESede/CBC/PKCS5Padding (168)
    DESede/ECB/NoPadding (168)
    DESede/ECB/PKCS5Padding (168)
    RSA/ECB/PKCS1Padding (1024, 2048)
    RSA/ECB/OAEPWithSHA-1AndMGF1Padding (1024, 2048)
    RSA/ECB/OAEPWithSHA-256AndMGF1Padding (1024, 2048)

Hence it should support PKCS5Padding

share|improve this answer
    
Tanx for response, but could you please say what is deference of AES and DES and DESede, Actually I want to send encrypted data to a device which is support standard DES algorithm and I dont know which mode I should use which matches the Standard algorithm implementation (CBC mode) –  Areff May 7 '13 at 10:33
1  
Regarding which algorithm to use, regular DES is only 56 bit key, so DESede (3DES) should be used over that. AES is a different algoritm and if your device doesnt support that you should not use it :) Regarding modes, CBC mode is the be perfeered over ECB since ECB is not safe. Good description about the different modes can be found at the Wiki page –  John Snow May 7 '13 at 10:57
add comment

Triple DES algorithm Padding modes (...) I dont know which mode I should use (...)

DES Modes of Operation (Triple DES is based on DES):

  • ECB
  • CBC
  • CFB
  • OFB

what is deference of AES and DES and DESede

share|improve this answer
add comment

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.