



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Computer Security 4, Exercises - Computer Science - Prof. David Wagner.pdf, University of California (CA) - UCLA, United States of America (USA), Prof. David Wagner, Computer Science, Computer Security, Crypto
Typology: Exercises
1 / 5
This page cannot be seen from the preview
Don't miss anything!




PRINT your name: , (last) (first)
SIGN your name:
PRINT your Unix account name:
PRINT your TA’s name:
You may consult any books, notes, or other paper-based inanimate objects available to you. Calculators and computers are not permitted. Please write your answers in the spaces provided in the test; in particular, we will not grade anything on the back of an exam page unless we are clearly told on the front of the page to look there.
Please be concise.
If you have questions, make a best guess and state your assumptions.
You have 50 minutes. There are 4 questions, of varying credit (100 points total). The questions are of varying difficulty, so avoid spending too long on any one question.
Do not turn this page until your proctor tells you to do so.
Give brief answers (one or two sentences) to each of the following.
(a) What is the principle of least privilege? Why is it important?
(b) Is a TCP connection secure against eavesdropping? Why or why not?
(c) You have a copy of Anthony Joseph’s certificate chain: his certificate is signed by the EECS department; the EECS department’s certificate is signed by UC Berkeley; UC Berkeley’s certificate is signed by Verisign. Whose public keys do you need to know in advance in order to obtain the correct public key for Anthony?
/* Escapes all newlines in the input string, replacing them with "\n". / / Requires: p != NULL; p is a valid ’\0’-terminated string / void escape(char p) { while (p != ’\0’) switch (p) { case ’\n’: memcpy(p+2, p+1, strlen(p)); *p++ = ’\’; *p++ = ’n’; break; default: p++; } }
You may assume that escape()’s argument is always non-null and points to a ’\0’-terminated string.
What’s wrong with this code (from a security point of view)?
Alice wants to send a cellphone text message to Bob securely, over an insecure communication network. Alice’s cellphone has a RSA public key KA and matching private key vA ; likewise, Bob’s cellphone has KB and vB. Let’s design a cryptographic protocol for doing this, assuming both know each other’s public keys.
Here is what Alice’s cellphone will do to send the text message m :
And here is what Bob’s cellphone will do, upon receiving ( c , c ′, t ):
(a) Does this protocol ensure the confidentiality of Alice’s messages? Why or why not?
(b) Does this protocol ensure authentication and data integrity for every text message Bob receives? Why or why not?
(c) Suppose that Bob is Alice’s stockbroker. Bob hooks up the output of this protocol to an automatic stock- trading service, so if Alice sends a text message “Sell 100 shares MSFT” using the above protocol, then this trade will be immediately and automatically executed from Alice’s account. Suggest one reason why this might be a bad idea from a security point of view.