views:

111

answers:

3

I am looking for existing implementations of different types of DES in C/C++/C##. My running platform is Windows XP/Vista/7.

I am trying to write a C# program which will encrypt and decrypt using the DES algorithm. I need some implementations with which i can verify my code output to see if i did the things in right order. For the implementations the code along with the executable will be good however not a must.

+1  A: 

This might be what you are looking for: http://msdn.microsoft.com/en-us/library/system.security.cryptography.des.aspx

Bernard
The trouble with that is that (I think!) it's a wrapper on the native implementation and he won't be able to easily step through that and compare intermediate values if he's having trouble debugging his own code.
Rup
+1  A: 

Nearly all open source C/C++ crypto libraries implement DES. You could for instance use OpenSSL, PolarSSL, LibTomCrypt, Crypto++, or any other library of your choosing for testing/experimentation.

In C# there seem to be fewer options, simply because the default .NET crypto libraries somewhat inhibit the desire for anyone else to compete in this space, but BouncyCastle's C# code (http://www.bouncycastle.org/csharp/index.html) does contain an implementation (in src/crypto/engines/DesEngine.cs).

Jack Lloyd
Are there any weblinks where i can put in some text and see the encypted form and then decrypt the text as well.
Kavitesh Singh
A: 

Thanks for the input.. I found these links where in I could calculate the DES values for giving input.

  1. http://www.unsw.adfa.edu.au/~lpb/src/DEScalc/DEScalc.html
  2. http://www.riscure.com/tech-corner/online-crypto-tools/des.html
Kavitesh Singh