CS 600.443 Spring, 2005 Course Project Part I is due on October 5. Part II is due on November 2. Part III is due on December 6. This assignment is to be done individually or in small groups of up to four students. All the work must be your own. The expected productivity from each group is the same, regardless of the size of the team. The only allowed platforms are Mac OS/X, Linux, and Windows. Part I: The random number generator (due on October 5) a. Design and implement a random number generator (RNG) that is self-contained. That is, the program does not take any inputs. Every time it runs, the program should write 512 random bits to a file. You may not call any built-in random function in the operating system. I.e., you may not call the rand() function. You can use system calls if you like. Your goal is to make the RNG as unpredictable as possible, based on as much entropy as you can gather. You must generate all 512 bits directly, as a seed. That is, you cannot generate a small number of bits and then use cryptographic functions to expand them. You should write the random bits directly into a 64 byte binary file. b. Using whatever technique you like, read in the 512 bits from part (a) and turn them into 100 kilobytes of randomness that you write to a new binary file. You will be graded on quality of your technique, quality of the randomness, and efficiency of computation. Efficiency should be good enough that your expansion function's running time is not likely to create an unusual amount of overhead in applications that require randomness. c. Pick 6 statistical test of randomness and run them against your 512 bit seed. If you need more input to run the tests, concatenate the output of several runs of your program together. Next, do the same for the 100 kilobytes. The TAs will also run these tests against your RNG. If you like, go to http://csrc.nist.gov/rng/ and read about the random number statistical tests. You can use the code there for this part of the project. For each of the tests, explain your choices for any parameters you choose, and also give the rationale for choosing the tests that you chose, and why they might be preferable to tests that you did not choose. Extra credit for running more than 6 different statistical tests. What to turn in for Part I (October 5): 1. A write-up explaining the philosophy behind your RNG for both the 512 bit seed and the 100k stream. Explain why the function would be difficult for an adversary to model or predict. (max 2 pages) 2. A write-up describing the statistical tests and how you did against them. (max 1 page) 2. All of the code that you wrote, including simple installation instructions so the TAs can compile and run it. Part I Grade sheet: Quality of RNG Design ______________ (10) Quality of expander function ________(5) Results from statistical tests_______(15) Extra credit (>6 stat tests)__________(up to 10 points) Part II: Cheating a. Modify the RNG you created or design a new one that contains a trapdoor. That is, to someone who does not know the trapdoor information, the RNG behaves randomly, but to someone (you) who knows the trapdoor, the function is predicatble, despite having to produce random-looking output. Here's the clincher. You must make your trapdoor resistant to audit. That is, assume that your adversary has access to all of the source code for the RNG and that the adversary can run statistical tests against it. b. We will provide you with a poker program that takes a file full of randomness as input. We will give you the filename and tell you where to put it. Use your cheating RNG to fill this file. The poke game stuff is in poker.tgz in the course directory on the web. c. Be prepared to play poker with the TA watching, and demonstrate that you can cheat and gain an advantage. You can perform your cheating by writing a companion program that you run as you are playing, and which advises you about the next cards or some other way to cheat. What to turn in for Part II (November 2): 1. Code listing for the new RNG and the companion cheating program, if you wrote one. 2. A write-up explaining the cheating philosophy, how it works, how it avoids audit, and how the companion cheating program, if you wrote one, is used. 3. 2 CDs as follows: Note: you will be graded on the readability, modularity and installability (how easy you make it to install) of your system. a. One CD with all of your source code and installation instructions containing your honest RNG. b. One CD with all of your source code and installation instructions containing your cheating RNG. c. The CDs and the files should give no indication of whether it is the "good" system or the "cheating" system. Each CD should be placed in an envelope that is labeled "good" or "cheating" on the outside. 3. Make an appointment with a TA in the class to demonstrate your cheating program. Show the TA how you can win at poker because you can predict the cards. Part II Grade sheet: Quality of the RNG in normal usage, quality of trapdoor ________ (15) Stealthiness of trapdoor _________ (15) User friendliness of software _________ (5) (includes ease of installation) Quality of TA demo _________ (5) Writeup _________ (5) Total:_______________ Part III: Audit Your group will be given 2 CDs from two different groups. You will most likely (but not necessarily) be given one "good" CD and one "cheating" CD. Your job as auditor is to inspect the software packages and try to make a determination of, for each CD, whether it is good or cheating. You should do source code analysis and also install the systems and run them. Ideally, if you encounter and identify a cheating CD, you will be able to figure out how to cheat with that system. If so, demonstrate it in your write-up. Don't be surprised if you find a way to cheat on someone's "honest" version. It may not have been that good. You will get extra credit for finding a way to cheat using some other groups non-cheating version. What to turn in for Part III (December 6): You will turn in a write-up describing: (3 pages max) 1. Your methodology 2. Your conclusions (e.g. CD 1 is good, CD 2 is cheating) 3. Justification for your conclusions. 4. Whether or not you are able to cheat in either of the systems (with supporting evidence). Part III Grade sheet: Success finding trapdoors _______ (10) Success in not having your trapdoor found ____ (10) Overall quality of the audit technique & methodology ________ (10) Quality of the write-up _____ (5)