Preparing for Submission

If you have reached this stage, you have completed 95% of this assignment, congratulations! One final step is some administrative work that will help your instructors grade your assignments seamlessly.

Please read this section very very carefully and watch the given demo with your full attention.

You are expected to store TWO additional files each time a client sends a file to the server:

  1. Client to save encrypted files to source/send_files_enc before sending, with the name: enc_[filename], e.g: enc_image.ppm if it is sending image.ppm to the server.
  2. Server to save received encrypted file to client to source/recv_files_enc before decrypting, with the name enc_recv_[filename], e.g: enc_recv_image.ppm.

You should have the following files now:

The new files are mainly (names must be exactly these!):

  1. server_signed.crt, and server_private_key.pem under source/auth
  2. ClientWithSecurityAP/CP1/CP2.py and ServerWithSecurityAP/CP1/CP2.py.

All other files inside source/files directory must remain as per the original files.

You can now run the autograder yourself, assuming your current working directory is at the same level as source/. The second argument can be 1 or 2 depending on whether you want to test CP1 or CP2.

python3 autograde.py 1
python3 autograde.py 2

You should have the following message if everything goes well (8 marks for CP1, and 14 marks for CP2). The 8 marks for CP1 will be mapped to 2% of your grade, and the 14 marks for CP2 will also be mapped to 2% of your grade.

You should then make the final commit of all tracked files so far:

git commit -a -m "feat: save to recv_files_enc and send_files_enc before encrypting and before sending"

You can also put your own large files at source/files (>100MB) to test internally, but remove it before pushing to Github since it doesn’t allow you to push any single file >100MB. Please do not use git-lfs.

The autograder does not check your program’s stdout, so you’re free to print whatever you need or want during the development of the assignment.

Following Protocols Closely (1%)

As stated throughout the handout, you need to stick to the protocol strictly, that is to implement each MODE as specified (send or read exactly as specified in the MODE) so that we can run your server scripts against our answer key client scripts and vice versa. This is where the last 1% of your grade come from.

You may easily ensure this by checking your server against another pair’s client, and vice versa. You may need to handle two cases: ensure the padding schemes match, and check for MODE 1 if the encrypted bytes are concatenated together by client before sending to server, or if client is sending it 128 bytes at a time (and server decrypt each chunk and assemble).

Not to worry, our server and client scripts that will be used to test your client and server script will handle these cases.

Demo

The following video shows the expected interaction between Server and Client processes.

Submission

Go to our bot and type /start. Follow the instructions there. You’re only required to submit the github remote repo link. Ensure that you have invited natalieagus-sutd as collaborator.

We will clone your repo for grading. Make sure you check that it runs with the given autograder before submitting. The bot WILL NOT report any marks to you. We will mark your submission after all submissions are collected.

And it goes without saying that submitting any unrunnable code grants you 0. This includes using other modules that’s not already been stated in the starter code. Please do NOT import anything else. Our VM will not have any other modules installed to run your script.