I am studying Cryptography and I need to develop Java or C code to break DES(Data Encryption Standard). I am aware of the algorithm used in DES but I don’t know how should I go about coding in Java or C. I have heard about the Java Cryptography Architecture but I am not sure how to use it ? Can someone provide me with a short tutorial for the same ?
Thanks
Depends on how you attempt to “break” DES… I assume you are trying to decrypt a given ciphertext (ciphertext-only attack).
Apart from a library that is capable to support DES en-/decryption what you should probably additionally look for is a library that supports cryptanalysis to get a feel for how to implement this. Brute-forcing would require no such library, it’s as simple as iterating over the possible values for a 56 bit key and trying to decrypt your ciphertext. You can take virtually any programming language for this, as long as it supports DES.
If you want something more sophisticated, e.g. linear or differential cryptanalysis, a good introduction is Modern Cryptanalysis. The code samples in that book use Python. You, too, could consider using a high-level language such as Python or Ruby because it speeds up your development process compared to implementing things in let’s say C, and you won’t have to deal with nasty errors due to memory management, pointers etc. Both Python and Ruby do support DES encryption and decryption. The downside is that your code will probably be more performant in a lower-level language (provided you’re doing it right) – so if speed is of the essence, C in combination with OpenSSL (or any other crypto library with DES support) would be a good choice.
Examples for cryptanalysis libraries