Wednesday, December 31, 2008

How a double length key used with DESede (Triple DES) algorithm.


In Triple DES encryption algorithm, the encryption process is very simple but it’s very hard to reverse the process. That is why the triple DES encryption algorithm becomes as one of the most powerful encryption algorithm in modern programming world.

When we use a triple length key with triple DES encryption algorithm, the data part which is to be encrypted is being encrypted with the first 8 bytes of the key. And then, that result will be decrypted by second 8 bytes of the key. Finally, that decrypted result is again encrypted by third 8 bytes portion of the key. That’s what happened in triple DES with triple length key.

Using a single length key that means a key which is 8 bytes long, with triple DES algorithm is no use. Because the same 8 byte portion will be used to encryption and decryption purposes of the algorithm. So encryption and decryption with the same 8 bytes will give you the original data which you were submitted to the algorithm, and after another encryption round it will give a simple result. And it will be the same result which you can get after encrypting the data by the single key. So there is no point of using the triple DES algorithm.   

But if we use a double length key, there is something to be processed, but that process will be little different from using the algorithm with triple length key. Because there are no third 8 bytes portion in the key for final encryption stage. So we have to use another method.

I concatenated the double length keys first 8 bytes portion with the double length key and make a new triple length key. So by that triple length key we can do our encryption function without any trouble. And the result of this algorithm was checked by me and it was correct.

Try this method, you'll defenetly get great results.


3 comments:

  1. Very interesting post, keep up the good works.

    ReplyDelete
  2. Hey, Congratulations Sashika! To receive your gift, please go to:
    http://insidemybubbletoday.blogspot.com/2009/01/today-inside-my-bubble_27.html

    ReplyDelete