CSE 551 -- Programming Assignment #3
Out: Wednesday May 16, 2007
Due: Tuesday May 29th, 2007, before class
For this assignment, you will implement a simple Web server that
provides a simple "notary" service. You are allowed to start with the
language of your choice, and take advantage of whatever support
libraries you can find for that language. (Hint: perl, python, and
ruby all have extensive HTTP and network libraries available that will
massively simplify this programming assignment.) You may not start
with a fully functioning web server such as Apache, however.
The notary service provides a simple interface:
- People visit a web page, upload a file through that web page to
your Web server. Your Web server hashes the file, signs the
concatenation of (hash + timestamp), and displays the signature
on a result page.
- The server keeps track of all signatures that it has ever been
asked to produce, and displays them on a different page for
anyone to see. (Note: this implies you have to track those
signatures across machine reboot.)
- The server displays its public key on a third page. (Note:
this implies you need to generate a pub/priv keypair for
your server, and keep track of them.)
- You are free to use whatever hash and public key signature
scheme you prefer, as long as they provide good crypotographic
strength. If you pick a reasonable implementation language,
chances are that the language has cryptography libraries
available that implement these for you. I don't recommend
implementing your own. ;)
- Your server must have a multi-process architecture: in other
words, concurrent requests must be handled by concurrently
running processes, rather than being serialized within a single
process. (I really do mean process, not threads.) You can
choose whether you fork a process for each request, or whether
you use a process pool; The former is simpler to build. Both
the signature generation and the reading/writing of network
data should be handled by a separate process -- i.e., don't
just hand off signature generation to a worker process,
hand off both signatures and network reading/writing.
- Your server must take a command line argument that specifies
what IP port it listens on.
- You must leave your server running for the remainder of the
quarter. This implies that if your server crashes, or if the
machine on which it is running crashes, you'll need to restart
it. I recommend implementing a simple fault tolerance script,
and having a program on some external machine monitor the
server to let you know if you need to kick it. If you don't
have access to your own machine, you can launch your server on
attu.cs. (As usual, please be a good citizen and don't abuse
What to turn in
Please email Steve and Elizabeth the following:
- a very short description of how you implemented your server -- its design, any pertinent implementation details, what choice of crypto you used, etc.
- the URLs I should use for the three webpages described in the "Overview" section above.
- your source code
- a "delivered bandwidth" vs. "latency" curve of the sort we discussed in class, for the file submission + hash generation web page.