This homework requires you to use OpenSSL to decrypt some ciphertext.

OpenSSL

OpenSSL is a popular open source library (and accompanying command line application) that implements many cryptographic operations and algorithms. It runs on Unix-like operating systems, including Linux and Mac OSX. You have several options to use it:

  1. If you have OSX or Linux on your own computer, OpenSSL should already be installed.
  2. Install Ubuntu Linux in a virtual machine (e.g. VirtualBox).
  3. OpenSSL will work on Windows if you use Cygwin or Mingw.
  4. Use a ICT Lab computer: Network lab on ground floor or MAC lab on 3rd floor.
  5. Similar to 2, I have created a virtual machine that can be used for this homework, as well as other networking and security tasks. If you want to try, see my instructions for creating a virtual network. This approach is not needed for this homework and takes some time, but you may be able to use the software in later tasks and other courses.
  6. Login to the ICT server and run OpenSSL on the server.

The version of OpenSSL that you use can be seen by running "openssl version". I am using: OpenSSL 1.0.1 14 Mar 2012.

Getting Started

I have a simple introduction to using OpenSSL. Read and try some operations. The basic way to decrypt is:

openssl enc -d -cipher-mode -in ciphertext.bin -out plaintext.txt -K keyinhex -iv ivinhex

To see the list of ciphers and modes try man encrypt. Note that options like -nopad are NOT needed.

Once you have OpenSSL installed and know the basics, your first task is to download your files at:

https://ict.siit.tu.ac.th/~uxxxxxxxxxx/private/

where xxxxxxxxxx is your student ID. You will be prompted for a username/password - it is the same as your Moodle login. The 4 files are: xxxxxxxxxx-ciphertext1.bin, xxxxxxxxxx-ciphertext2.bin, xxxxxxxxxx-ciphertext3.bin, xxxxxxxxxx-key.txt.

Now decrypt xxxxxxxxxx-ciphertext1.bin using OpenSSL and the key information in xxxxxxxxxx-key.txt. It was encrypted using DES with ECB mode of operation. Now view the plaintext.

Feedback

-