Getting StartedΒΆ

For this project, you can work in teams of up to 2 people. We want you to actively get your hands dirty designing and implementing your system.

You should strive to write clean, secure code. Follow general Python best practices. One of us particularly likes the Hitchhiker’s Guide to Python, which has a good section on Python Style. Another good resource is the CS61a Style Guide.

You must use Python 3 and PyCrypto 2.6.1 for this project. These are already provided for you on all the following instructional machines (and possibly others):

  • hive{1-32} (330 Soda)
  • s271-{1-35} (271 Soda)
  • s273-{1-34} (273 Soda)
  • s275-{1-34} (275 Soda)
  • s277-{1-30} (277 Soda)

Note that python defaults to Python2 on most machines, including Hive. You can invoke Python3 using the python3 command. If you aren’t sure what version of Python you have, check the output of python --version and python3 --version.

An example workflow for developing on your personal machine is as follows:

  • Copy the framework code into a folder named project2.

  • Sync changes to your class account using scp: scp -r project2/

    This will copy the project2 folder and its contents to your home directory.

  • SSH into a Hive machine with your class account.

  • Do all Python console work using python3 or ipython3 in your SSH session.

  • Run all Python code using python3, e.g. python3

You can also do all of this while seated at a machine in the instructional labs, or inside an SSH session using vim or emacs (the course staff designing this project have differing opinions in the editor wars....).

While not officially supported by course staff, it is also possible to set up Python3 and install PyCrypto on your own machine. One easy way to do this is to use the Anaconda Python distribution for your platform (choosing the Python 3.5 version). This will include the PyCrypto package.

This should be compatible with the instructional machines’ setup, but you should double check your code by re-running the functionality tests against your code on Hive. Remember to follow all of the steps in the submission instructions for each part of this project!

The provided framework code includes:

  •, where you will write your Client implementation. Put all of your code in this file.
  •, containing the base class you will base your client on.
  •, containing a baseline implementation which is functionally correct, but does not have any security built-in. It is described in the documentation for insecure_client. It is very simple (at only 50 lines).
  •, containing the provided cryptographic API you must use. Your client will be passed a Crypto object which you will use to access this API.
  •, containing the StorageServer and PublicKeyServer implementations.
  •, containing potentially useful utility functions.
  •, a Python script to run the provided tests for Part 1.
  •, a Python script to run the provided tests for Part 2.