CS579A/CpE579A: Foundations of Cryptography

Lab 0: Accessing the Libraries


[ Assignment | GNU MP | Dmalloc | Libdcrypt ]


Assignment

In this lab, you will make sure that you can compile and link against the libraries that you will be using in the other programming assignments for the Foundations of Cryptography class. The GNU MP and the Dmalloc libraries are already installed on the Linux lab machines in Burchard 127, which are also accessible via ssh under the DNS-round-robin name linux-lab.cs.stevens.edu. (If you do not yet have an account on these machines, let me know as soon as possible). The Libdcrypt library is set up under my account at /home/nicolosi/cs579/devel/.

The rest of this page describes how to install these libraries on other machines, in case you also wanted to work on the assignments outside the Linux lab.

GNU MP

You must have the GNU Multiple Precision arithmetic library installed on you machine. The gmp library provides support for big integers and many number-theoretics functions, which are needed for the implementation of most cryptographic primitives.

Before proceeding with the instructions below to install gmp, check if it's already installed on your machine:

% ls /lib/libgmp* /usr/lib/libgmp* /usr/share/lib/libgmp* /usr/local/lib/libgmp* /usr/local/share/lib/libgmp*

If you get a match, gmp is already installed on your machine, so you can move on to install dmalloc.

Otherwise, install gmp as follows.

Dmalloc

You might also want to install the dmalloc library, which helps you keep track of the memory you allocate.

First, check if the dmalloc library is already installed on your machine:

% ls /lib/libdmalloc* /usr/lib/libdmalloc* /usr/share/lib/libdmalloc* /usr/local/lib/libdmalloc* /usr/local/share/lib/libdmalloc*

If you get a match, dmalloc is already installed on your machine, so you can move on to install dcrypt.

Otherwise, install gmp as follows.

Libdcrypt

Finally, you should install dcrypt, the simple crypto library that you will use for the lab assignments.


Credits: David Mazières, Antonio Nicolosi, and Nelly Fazio
Versions of this Lab also assigned in classes taught at NYU and CUNY/City College.