Docsity

Homework 1 - Spring 2006 | Generic Programming | EECS 690, Assignments of Electrical and Electronics Engineering

Toggle sidebar
bg1
1
University of Kansas
EECS 690 Cryptography and Information Security
Spring 2006
Dr. Weichao Wang
Homework 1
Handout date: Feb 15
th, 2006
Due date: March 1st, 2006 before class
Question 1: (15 points)
Alice has an item x, and Bob has a set of five distinct items y1 to y5. Design a protocol through which Alice
(but not Bob) finds out whether her x equals any of Bob's five items; Alice should not find out anything
other than the answer ("Yes" or "No") to the above question, and Bob should not know that answer.
Do not use a hash-based solution because even though the probability of a collision is small, Alice requires
that no such collision can occur (but using encryption is fine, because in that case two distinct items that are
encrypted with the same key will result in two different cipher texts).
(Hint: Let’s assume that there exists a kind of encryption method that is commutative: if we encrypt the
packet twice with two different keys, no matter what the encryption order is, we get the same result. In
other words, we have E1( E2 (msg) ) = E2 (E1 (msg) ). )
Question 2: (10 points)
Alice has a random-bit generator that is defective in that it is biased: It generates more 1's than 0's (but the
bits it generates are independent of one another, and are identically distributed). That is, if P0 denotes the
probability that the next bit generated is 0, and P1 denotes the probability that the next bit generated is 1,
then P1 > P0 (of course P0 + P1 = 1). However, what Alice really needs is a random-bit generator that is
unbiased, i.e., one for which P0 = P1 = 0.5. Explain how Alice's biased random-bit generator can be used
to generate an unbiased random bit string; your scheme should not assume that Alice knows P0 or P1 (she
just knows that P1 > P0), and should not use hash functions or encryption.
Question 3: (10 points) Alice proves her presence to Bob's machine through the following protocol (in
which all encryptions are symmetric, and T is the trusted third party).
(1). A Æ B: A (which means: Hi, Bob, this is A, I want to log in)
(2). B Æ A: RB
where RB is a random number generated by B; from here on B "remembers" the association
between A and RB (at least for a while - there is a "timeout" mechanism so that B "forgets" the association
if the next 3 steps are not all completed within a certain amount of time).
(3). A Æ B: E_AT (RB)
where E_AT(*) denotes encryption with the key shared by A and T.
(4). B Æ T: E_BT (A, E_AT(RB))
(5). T Æ B: E_BT(RB)
and B, after retrieving RB, allows the user associated with RB (in this case A) access to his machine.
Just like Alice, Carol and others (but not the malicious node) also have accounts on Bob's
machine, and use a similar protocol to log on.
pf3

Partial preview of the text

Download Homework 1 - Spring 2006 | Generic Programming | EECS 690 and more Assignments Electrical and Electronics Engineering in PDF only on Docsity!

University of Kansas EECS 690 Cryptography and Information Security Spring 2006 Dr. Weichao Wang Homework 1 Handout date: Feb 15 th, 2006 Due date: March 1 st, 2006 before class

Question 1: (15 points)

Alice has an item x, and Bob has a set of five distinct items y1 to y5. Design a protocol through which Alice (but not Bob) finds out whether her x equals any of Bob's five items; Alice should not find out anything other than the answer ("Yes" or "No") to the above question, and Bob should not know that answer.

Do not use a hash-based solution because even though the probability of a collision is small, Alice requires that no such collision can occur (but using encryption is fine, because in that case two distinct items that are encrypted with the same key will result in two different cipher texts).

(Hint: Let’s assume that there exists a kind of encryption method that is commutative: if we encrypt the packet twice with two different keys, no matter what the encryption order is, we get the same result. In other words, we have E 1 ( E 2 (msg) ) = E 2 (E 1 (msg) ). )

Question 2: (10 points)

Alice has a random-bit generator that is defective in that it is biased: It generates more 1's than 0's (but the bits it generates are independent of one another, and are identically distributed). That is, if P0 denotes the probability that the next bit generated is 0 , and P1 denotes the probability that the next bit generated is 1, then P1 > P0 (of course P0 + P1 = 1). However, what Alice really needs is a random-bit generator that is unbiased, i.e., one for which P0 = P1 = 0.5. Explain how Alice's biased random-bit generator can be used to generate an unbiased random bit string; your scheme should not assume that Alice knows P0 or P1 (she just knows that P1 > P0), and should not use hash functions or encryption.

Question 3: (10 points) Alice proves her presence to Bob's machine through the following protocol (in which all encryptions are symmetric, and T is the trusted third party).

(1). A Æ B: A (which means: Hi, Bob, this is A, I want to log in)

(2). B Æ A: RB

where RB is a random number generated by B; from here on B "remembers" the association between A and RB (at least for a while - there is a "timeout" mechanism so that B "forgets" the association if the next 3 steps are not all completed within a certain amount of time).

(3). A Æ B: E_AT (RB)

where E_ (^) AT (*) denotes encryption with the key shared by A and T.

(4). B Æ T: E_ BT (A, E_ AT (RB))

(5). T Æ B: E_BT (RB)

and B, after retrieving RB, allows the user associated with R (^) B (in this case A) access to his machine.

Just like Alice, Carol and others (but not the malicious node) also have accounts on Bob's machine, and use a similar protocol to log on.

Show how a malicious node (Mallory) could illegally gain access to Alice's account on Bob's machine (give the full details of how this is done).

Hints: Mallory tries to log on as "Alice" at about the same time as Carol is trying to log on. The attack would not be possible if, in Step 5, E_ (^) BT (RB) were replaced by E_ (^) BT (A, RB).

Question 4: (25 points) There is a bank B that allows its customers to withdraw cash from their accounts at hundreds of specialized automated teller machines (ATMs) that are only for cash withdrawals (not for checking balances or performing other transactions). The ATMs operate in the following way. (In what follows E_ (^) B refers to encryption with the bank's secret key, in a symmetric cryptosystem.) The bank asks the customer C to select a secret number (called "personal identification number", denoted by PIN ( C )). Then the bank issues the customer C a special magnetized card that contains the following two pieces of information (on separate portions of the magnetized strip on the card):

(1) The customer's account number at the bank (call it AcNr( C )).

(2)E_ B(PIN( C )).

Each ATM of that bank can perform an E_B (*) computation, and also stores a list of all the valid account numbers. It does not store the dollar balance in each account (each ATM limits cash withdrawals to no more than $200 per day for each account, and each account contains at least $500 - the bank automatically closes an account whose balance falls below the $500 minimum).

When the customer C wants to withdraw cash from an ATM, C inserts the card and the ATM reads the information on it and then challenges C to enter PIN ( C ). The ATM then (1) verifies that the AcNr( C ) that it read from the card is on its list of valid account numbers, and then (2) encrypts (i.e., does an E_B(*)) what C just entered and verifies that the result equals the E_ (^) B(PIN( C )) that is stored in the card.

If both (1) and (2) are successfully verified, the ATM allows the customer to withdraw the cash (subject to the constraint that the total amount withdrawn by C that day from that ATM does not exceed $200). The ATM also stores a record of the transaction that consists of the account number and the amount just withdrawn. At midnight every day all the ATMs communicate with the bank's main computer, which updates all the customer accounts by subtracting from their balances the amounts of cash withdrawn that day. This off-line operation of the ATM allows the customers to quickly withdraw cash even when the network is down or very slow (at peak-hours during the day); contrast this to on-line operation, which would have required communication with the bank's main computer before a transaction can complete (and would have been problematic if the network was down or very slow at the time of the transaction).

Note that, if the card is stolen from the customer, the thief cannot obtain PIN( C ) from the card because it is encrypted (this is why it is E_B(PIN( C )) rather than PIN( C ) that is stored on the magnetic strip of the card - the latter would be insecure because the information on the magnetic strip of a card is easy to read and modify). Please answer the following 5 questions:

  1. Show how a dishonest customer C' who knows AcNr( C ) can steal from C (by with-drawing cash from the account of C ).
  2. Suppose the theft occurs as in the above question 1. When C receives the end-of-month statement from the bank, C realizes what happened and complains to the bank. Can the bank tell for sure whether the theft really occurred, i.e., that C is not lying?
  3. Without doing any modification to the card itself, explain how you would modify the ATM protocol so that the identity of C' is revealed if C' were to steal from C as in question 1. That is, when C gets the end-of-month statement and complains about illegal withdrawals from her account, the bank should at least be able to find out which C' committed the crime.