CS513 Homework 1: Security In Everyday Life

General Instructions. You are expected to work alone on this assignment.

Due Sept. 7, 2004. Submit your solution on paper in class. No late assignments will be accepted.

To facilitate grading, format your solutions as follows.

Solutions that do not satisfy the formatting guidelines will be returned, ungraded.


Problem 1:

A host and guests are dining at a fancy restaurant, where they are served by a waiter. "In vino veritas" (Plato), so the host decides to purchase a bottle of wine to complement the meal. The protocol for purchasing that bottle in such circumstances typically involves the following steps:
  1. Host tells the waiter the name of a bottle of wine.
  2. Waiter brings to the table an unopened bottle of the named wine.
  3. In the presence of the host, the waiter breaks the seal on the bottle, removes the cork, and pours a small amount into the host's glass.
  4. Host samples the wine in that glass.
  5. If the host finds the wine not spoiled then the host nods approval and the waiter pours the wine into the guests' glasses, then fills the host's glass, and leaves the bottle on the table.
What properties is this protocol designed to enforce?


Problem 2:

Here is the usual protocol ("protocol A") for using a credit card to pay for dinner in a restaurant.
  1. The waiter gives the bill to the host.
  2. The host looks over the bill and, if all seems correct, hands a credit card to the waiter.
  3. The waiter returns with the credit card and two copies of a credit card charge slip for the amount on the bill.
  4. The host looks at the charge slip, adds a gratuity (if desired) onto the charge slip, and signs the charge slip. The host keeps the credit card and one copy of the charge slip.

Consider a different protocol ("protocol B"):

  1. Host gives a credit card to waiter.
  2. The waiter returns with the bill, the credit card, and two copies of a credit card charge slip for the amount on the bill.
  3. The host looks at the charge slip, adds a gratuity (if desired) onto the charge slip, and signs the charge slip. The host keeps the credit card and one copy of the charge slip.
  1. The protocols clearly exhibit performance differences but do they otherwise satisfy the same properties? What are the differences?

  2. What assumptions about expected-case behavior underlie each protocol and what are the performance implications when that expected-case behavior does not hold?


Problem 3:

A long wine list can be an intimidating prospect to the neophyte host but it virtually guarantees (assume this, anyway) that the restaurant will have a suitable wine no matter what meals a host and guests at a given table order. The host who knows little about matching wines to food and who has a budget for expendatures on wine will typically then employ the following protocol.
  1. Only the host is given a copy of the wine list. This list contains the price for each wine that the restaurant stocks.
  2. The host identifies two or three wines that span the price range defined by the host's wine budget. Let's call them W1, W2, and W3.
  3. After the guests select and order their meals, the host asks the waiter which of wines W1, W2, or W3 might be most suitable for what was ordered.
  4. The waiter generally responds "Actually W1', W2', or W3' would work best." where the waiter's suggestions are in the host's price range and each is well matched to all the food that has been ordered. (Note the wines suggested by the waiter might have no overlap with {W1, W2, W3}.)
  5. The host orders what the waiter suggested.

What properties is this protocol designed to enforce?