Security Developer Center > Security Forums > CAT.NET > DES Initialization Vector in C#
Ask a questionAsk a question
 

QuestionDES Initialization Vector in C#

  • Sunday, October 25, 2009 8:01 PMmarkm208 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I am trying to decrypt (using the DES algorithm) data that comes from a third party in C# code. There are plenty of examples here and elsewhere that have helped me out. The problem is that I don't know what to use for the 'initialization vector'. The initialization vector is required. I believe the third party uses CBC mode.

    The third party supplied a tool for use on the command line (DES.EXE, which I believe is an out-of-the-box build of the libdes library v4.01) which only requires that you supply an encryption key. So, I can decrypt fine with the command line tool. However, I would rather not spawn a process to run the tool from my code.

    My question is how do I generate/find that initialization vector. I am 99.9% sure it can be done from looking at other posts but I can't figure it out. I talked to the third party and they said they do not support that approach. In other words, they would not help me. Any help I can get here would be greatly appreciated.