Information Security |
Homework: 1 2 3 4 5 6 7 |
Unfortunately, Diebold's encrypted file format is misdesigned and does not provide the required guarantees. Your job is to design a file format that is secure, and write programs to write and read that format.
The poll workers and police officers who handle the memory cards are probably trustworthy, but we do not want them to be able to compromise the election's integrity or the secrecy of the votes. Just to be safe, our threat model will assume that a malicious person can get access to the memory card at any time.
createFile reads in a sequence of votes (represented as integers between 0 and 1,000,000,000 inclusive) from standard input and emits a sequence of bytes on its standard output. These bytes are the secure vote file that is written to the memory card.
tabulator receives a secure vote file on its standard input, and emits a sequence of integer votes (one per line) on its standard output. However, if an adversary has tampered with the secure vote file, tabulator should exit with an error (by failing an assertion or calling exit() with a nonzero argument).
If votes.in is a file containing a sequence of integers, one per line, then the output of the shell command cat votes.in | createFile | tabulator should be the same as votes.in. We are providing a starting point that you must use. It contains programs that work, except that they are totally insecure. It also contains code for a pseudorandom function.
In accordance with good cryptographic practice, you should assume that the adversary can read all of your code, except for a single file called secretKey.h, which may declare variables and set their values but may not contain code or macros. This file represents a secret key that is preprogrammed into the voting machine and the tabulator.
Note that the tabulator need not recover from vote tampering, vote insertion, or vote removal. It is enough to detect that something is wrong and raise an alarm.
Your solution should be a zip-file containing your source code (including any provided files that you did not modify), a Makefile, and a report that describes what you did and why. The report should be an HTML file named index.html. (It may contain links to other files, if you include those files in your submission.)
When we unzip your submission into a directory and type "Make" there, it should build two programs that we can execute by typing "createFile" and "tabulator", which operate as described above.
You must work by yourself on this assignment. You may not collaborate with anybody else.