What is triple DESm (3DESm) encryption method? Is it much different from 3DES?

StackOverflow https://stackoverflow.com/questions/10548073

  •  07-06-2021
  •  | 
  •  

سؤال

I have to decrypt an encrypted message in C program which has been encrypted using 3DESm method in CBC mode. It looks quite different from the encrypted message that we get from 3DES method. Generally the ciphertext that we get after encrypting from is a hexadecimal number which is of length 16 and has includes the characters like 0-9 and A-F only. But the ciphertext that I need to decrypt is more than 20 characters in length and includes all characters from A-Z, a-z , 0-9 and also includes few special characters like '+' and '='. Which library would be helpful to do the needful?

هل كانت مفيدة؟

المحلول

The ciphertext you get from any normal blockcipher consistst of raw bytes/ binary data, not hex. In the case of DES these are 8 bytes per block.

You can then encode them, if you prefer text over binary data. Looks like your ciphertext was Base64 and not Hex encoded. But that's a choice independent from the choice of cipher.

Base64 uses all ASCII letters and numbers as well as + and / to encode the data, and = as padding if the input isn't a multiple of 6 bits.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top