Professional Web Applications Themes

encrypt with TripleDES, decrypt with DES, doesnt work ? - ASP.NET Security

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 ...

  1. #1

    Default encrypt with TripleDES, decrypt with DES, doesnt work ?

    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



    Lech Migdal Guest

  2. #2

    Default Re: encrypt with TripleDES, decrypt with DES, doesnt work ?

    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.
    [url]http://weblogs.asp.net/hernandl[/url]
    Shadowfax Dev Team

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

    "Lech Migdal" <xntso2.pl> wrote in message
    news:c50npe$k5i$1news.onet.pl...
    > 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
    >
    >
    >

    Hernan de Lahitte Guest

Similar Threads

  1. How do I Use DPAPI to Encrypt and Decrypt Data (C#/VB.NET)?
    By anonieko@hotmail.com in forum ASP.NET Security
    Replies: 0
    Last Post: March 16th, 11:54 PM
  2. FormsAuthentication Encrypt/Decrypt Problem/Issue
    By Sherwood in forum ASP.NET Security
    Replies: 0
    Last Post: January 22nd, 11:09 PM
  3. Urgent Help on CAPICOM Decrypt and Encrypt
    By Mae in forum ASP.NET Security
    Replies: 2
    Last Post: January 16th, 05:05 PM
  4. 3DES encrypt in vb.net with decrypt in classic asp
    By David Lund in forum ASP.NET Security
    Replies: 0
    Last Post: December 3rd, 09:32 PM
  5. Decrypt / Encrypt Session objects
    By Stefan in forum ASP.NET Security
    Replies: 1
    Last Post: August 29th, 11:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139