encrypt with TripleDES, decrypt with DES, doesnt work ?

L

Lech Migdal

Hi

I have such a problem - I've tried to encrypt a file with TripleDES and then
decrypt it with DES, but failed.
AFAIK, TripleDES uses 3x DES (EEE), so decrypting it with DES should be
possible.

I've tested DES and it is ok (encrypts and decrypts file without problem).
The passwords provided
and IV are the same. (for the TripleDES I give 24 bytes of password, to DES
I give password bytes 1 to 8, 9 to 18 and 19 to 27)

So maybe TripleDES is doing something with the password that I am not aware
of ?

thanks in advance
LM
 
H

Hernan de Lahitte

In fact the process is not that simple as to pass three times with DES using
the key splitted in three parts. These two algorithms are block ciphers and
basically they process the data in blocks of a fixed size at a time. The
3DES algorithm process each block 3 times, each of them with a different
part of the 24 bytes key (3 x 8). When you decrypt with DES, you are
processing all the cipher data with each key part, so this way you are not
getting the same output as 3DES because you are not processing each block at
a time.

Regards,
Hernan.

--
Hernan de Lahitte
Lagash Systems S.A.
http://weblogs.asp.net/hernandl
Shadowfax Dev Team

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top