DES examples

Share

This page contains some DES example code I wrote in reaction to a crypto tutorial I attended a while ago. I finally got around to putting the code online…

The basic point of the code is it shows you how to use the DES calls within openssl. It also shows how the electronic code book for of DES is a bad choice for vaguely predictable data such as images.

A visual demonstration of this is these two images. The one on the right is an encrypted version of the one on the left… The vertical flip of the image is because of the way libtiff reads colour images, and to be honest isn’t worth fixing for this example.

   

Share