CS 643, Fall 2005 Assignment 1 Due: Thursday September 8, at the beginning of class ------------ Warning: You are to do your own work, individually on this assignment. You may not consult with or discuss with anyone else, whether in the class or not. You should not use google (or other content on the web) to try to find solutions to this, and you must not copy code from anywhere else. Violation of this will result in a failing grade and possibly university disciplinary action. ------------ 1. Read Ken Thompson's classic paper, "Reflections on Trusting Trust". You can find it at http://www.acm.org/classics/sep95/. Make sure you understand how the program works and what the security implications are. 1. Produce a program, A, that outputs a different program, B such that when B is run, it outputs program A. That is, you will produce two programs that output each other. This is a cycle of length 2. Now, here's the catch. program A and B must be in different types of programming languages. So, for example, program A can be written in C, and program B in Perl. 2. Prepare a presentation for class on 9/8. You will walk the class through your code and explain the philosophy behind your program. You should then run program A and show how it works. Then run your program B and show that it outputs program A. 3. These programs often look like "fake" programs where it is obvious that they have some property that is not likely to exist in a real program. Think about how you might produce code in a production system that would have the behavior of outputting a program that would output some meaningful code, such that a code review of the program might not turn up anything suspicious. Write up your best idea for this in a 2-3 page report. For extra credit write some code to demonstrate your idea. 4. Describe a new programming assignment that you think will be challenging but doable by students in this class. The assignment should have to do with generating programs whose output relates to themselves. Produce the standard assignment as well as an advanced extra credit version. In your time slot for presentation, you should describe your assignment and the extra credit portion. We will discuss all of the proposed assignments in class as a group, refine several top choices, and derive the assignment for the following week. What to turn in: - the code for program A and program B - the report for item #3 - a written description of your assignment in item #4