# A5 **Deadline:** Monday, November 9, 11:59 pm PT *This assignment should be done in groups of 2-4* ### Problem 1 You have been engaged as a security consultant by Yangtze,\* a new company providing cloud storage. Yangtze's new system is named Remote Repository, or R2 for short. With R2, Yangtze's engineers seek to build an ultra-high performance cloud storage system. They've solved most of the problems, but they need your help with the access control subsystem. (\*The Yangtze is the next-longest river in the world after the Amazon.) Yangtze built a prototype of R2 that uses access control lists. They've encountered a serious problem, though: every request that a client makes to read from or write to an object in storage has to be authenticated, the client has to be mapped to a subject, and the subject's entry in the ACL for the object has to be consulted. All that work is slowing down the system, keeping it from achieving Yangtze's performance goals. Luckily, you studied capabilities in CS 181S. You know that with an access control subsystem based on capabilities, the storage system would need to do very little work, because the client would simply present the capability along with its request. The storage system would need only verify that the capability permits the request. Also, Yangtze is excited about the possibility of subjects delegating access rights without ever having to contact R2 at all, because this would further enhance performance. But there is one big problem: you've read about how to implement capabilities with asymmetric cryptography, digital signatures in particular, but that kind of crypto is too slow for use in R2. You're going to have to find a way to implement capabilities with symmetric cryptography. So far, you've invented the following architecture for the system: <img src="R2_architecture.jpg" alt="R2 architecture" width="50%"/> - The **client node** is used to access R2. - The **security node** authenticates clients and issues capabilities. - The **storage node** verifies capabilities when they are used to access objects. You've already taken care of the authentication subsystem&mdash;it doesn't play much, if any, role in the work you're doing now. Furthermore, you've already arranged that the security node and storage node can share an arbitrary number of symmetric keys&mdash;you don't need to concern yourself with how to accomplish that key distribution. However, generating and distributing keys is somewhat expensive, so Yangtze insists that you keep the number of keys used to a minimum. Finally, you can assume that all communication channels between client nodes and server (i.e., security and storage) nodes are secured with SSL in unilateral authentication mode: the client authenticates the identity of the server, all communication is encrypted to protect confidentiality, and replay of messages sent over the SSL channel is detected. One more thing: Yangtze has provided you with an implementation of *globally unique identifiers* (GUIDs) for objects, so that every object in the system has its own unique 128-bit identifier. Your remaining work is to figure out how to handle the following concerns: - How R2 will **grant access** to clients by issuing capabilities when they are requested. - How R2 will **determine access** by deciding whether a subject may read or write an object. - How R2 will enable **delegation of access** between subjects. - How R2 will enable **revocation of access** to objects. Taking into account all the constraints and goals above, you now need to produce a design for R2's access control subsystem. You will want to carefully specify what capabilities are: what fields they contain, how to interpret those fields, etc. You'll also want to explain in detail how each of the above concerns will be implemented in R2. If there are any cryptographic protocols involved, you need to write those down using proper notation, and explain each step. Finally, explain why you introduce each symmetric key that is used in your design, and explain why you've used the minimum of number of keys necessary. ### Feedback In the interest of improving future iterations of this course, please answer the following questions: 1. How long did you spend on this assignment? 2. Any comments or feedback? ### What to Submit Submit your solution as a single pdf on Gradescope.