TripleDES with CBC - WeOnlyDo Discussion board

TripleDES with CBC (wodCrypt)

by Magnus, Friday, September 16, 2005, 13:48 (6790 days ago)

Hi!

I'm evalutaing your product regarding 3DES with the CBC mode, the problem is when i try to decrypt something our other software has encrypted the first 64 bits are ok but then it doesnt get decrypted correctly!

Do you have any suggestions to what I'm doing wrong?

Thanks in advance!

Best regards

//Magnus

Re: TripleDES with CBC

by wodSupport, Friday, September 16, 2005, 13:50 (6790 days ago) @ Magnus

Magnus,

since CBC is used, it's probably that your InitVector is invalid or different than in other applications.

Can you explain what software is used to encrypt so we can duplicate the issue and show you correct code to decrypt? If it's sensitive information you can send it to techsupport@weonlydo.com

Re: TripleDES with CBC

by Magnus, Friday, September 16, 2005, 14:38 (6790 days ago) @ wodSupport

Magnus,

since CBC is used, it's probably that your InitVector is invalid or different than in other applications.

Can you explain what software is used to encrypt so we can duplicate the issue and show you correct code to decrypt? If it's sensitive information you can send it to techsupport@weonlydo.com

Hi again!

I'm able to select what KEY and IV I want to use with the other software also so I'm sure they are the same since I'm the one sending the into the software. I'm using an IV consisting of 16 ASCII characters and a KEY consisting of 24 ASCII characters, that should be enough shouldn't it?

Could there be some problem with padding?

Re: TripleDES with CBC

by wodSupport, Friday, September 16, 2005, 14:41 (6790 days ago) @ Magnus

Magnus,

I don't think padding is the issue here. I think representation of IV or Key may be different.

Can you show some sample code on how encrypted text is generated using 3rd party software? I'll try to duplicate this and make wodCrypt code that decrypts it.

Re: TripleDES with CBC

by Magnus, Friday, September 16, 2005, 14:55 (6790 days ago) @ wodSupport

Magnus,

I don't think padding is the issue here. I think representation of IV or Key may be different.

Can you show some sample code on how encrypted text is generated using 3rd party software? I'll try to duplicate this and make wodCrypt code that decrypts it.

Hi!

The funny thing is that I got it working in ECB mode so I don't see why it should'nt work in CBC mode?

The encryptionsoftware is in an terminal using C and the function is in an precompiled file that I don't have access to [:sad:]

The function call looks like this
C_DesTripleDecryptCBC(const BYTE* pKey, const BYTE* pIV,const BYTE* pData, DWORD nLen, BYTE* pResult);

Thanks for the quick answers! [:happy:]

Re: TripleDES with CBC

by wodSupport, Friday, September 16, 2005, 19:33 (6790 days ago) @ Magnus

Magnus,

not sure how to help since I can't see any data or try things out. I just don't have enough info to give you better answer than this one :)