Assignment 6, due March 22
Part of
the homework for 22C:169, Spring 2010
|
Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated (usually a Friday), and unless there is what insurance companies call "an act of God" - something outside your control; the only exceptions to this rule will be by advance arrangement.
a) Explain why this directory system is not very useful with with a Unix-style single-rooted directory tree where everyone has access to the root. (0.5 points)
b) What files should be accessible from the public root of the file system? (0.5 points)
c) The term "public root of the file system" suggests that there might be a second root, a private root (used only by the system, for example). Give an example of a system program that would need access to this, and explain why. (0.5 points)
d) Explain why including an up-link (analogous to the .. link in each Unix directory) could be a bad idea with this file system. (0.5 points)
The kernel call setuid(), if executed with root privileges, changes all three identically. Otherwise, if a process tries to set the user ID to x, only the effective user ID changes, and the only legal values are the real ID or the saved ID.
a) What does this third user ID permit that you could not do with just two user ID's, effective and real? (0.5 points)
b) If you have two mutually suspicious applications, mine and yours where your application needs to use mine, but you don't trust me and I don't trust you, why is the result very problematic. (0.5 points)
The course notes suggest that a good encryption function should also work as a pseudorandom number generator for a stream cypher. This creates a stream of keys sk[i] used to encrypt or decrypt the successive blocks of the mesage.
a) What is the encryption key for a stream cypher constructed this way? It is more complex than just the k used in the corresponding block cypher. (0.5 points)
b) Give the most straightforward stream_encrypt(p[i] ... ) and stream_decrypt(e[i] ... ) functions. You may find a need to reference sk[i-1] and you will certainly have to produce sk[i] as a side effect of each step. The ellipsis in this problem statement implies deliberate under-specification (0.5 points)
US elections are complicated -- it is common to find 20 distinct contests on a single ballot. As a result, it takes an average of about 6 minutes for each voter to cast a ballot. If the polls are open for 12 hours on election day, that means each voting machine can accomodate 120 voters. This means that there will be, on average, about 7 ballots in each bin when the polls close. Here are the number of votes per bin after an actual election:
2 11 7 6 7 4 7 7 7 8 11 12 13 6 8 4
a) Give an informal argument that there is a high likelihood that the count of ballots in the bins at the close of polls uniquely determines the pseudorandom number seed and therefore, that the attempted randomization of the ballots did not actually protect voter privacy. (0.5 points)
b) Assuming, for no good reason, that we must use that 32-bit pseudorandom number generator, would voter privacy be protected better if we used more bins or if we used fewer bins? (0.5 points)