Jump to content

Yao's Millionaires' problem

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 83.244.180.36 (talk) at 15:53, 27 August 2010 (→‎See also). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Yao's Millionaires' problem is a secure multiparty communication problem which was introduced by Andrew Yao, a prominent computer scientist and computational theorist. The problem discusses two millionaires, Alice and Bob, who are interested in knowing which of them is richer without revealing their actual wealth.

This problem is analogous to a more general problem where there are two numbers a and b and the goal is to solve the inequality without revealing the actual values of a and b.

The Millionaires' Problem is an important problem in cryptography and its solution is used in e-commerce and data mining. Commercial applications sometimes have to compare between numbers which are confidential and whose security is important.

Many solutions have been introduced for the problem, among which the first solution, presented by Yao himself, was exponential in time and space. This article presents and explains one possible solution.

Protocol and proof

The protocol

We will make use of oblivious transfer in our protocol. In that transfer one bit is transferred in the following way: A sender has two bits and . The receiver chooses and the sender sends with the oblivious transfer protocol such that:
(i) The receiver doesn't get any information about where .
(ii) The value of i is not exposed to the sender.

Now we will begin with the protocol description. We will indicate the number of Alice as a and the number of Bob as b and assume that the length of their binary representation is less than for some .

The steps of the protocol are as follows:

1. Alice creates a matrix K of size dX2 of k-bits numbers, where k is the length of the key in the oblivious transfer protocol. In addition, she chooses two random numbers u and v where and .

2. will be the l-th bit of the number appears in cell and for l=0 will be the least significant bit. In addition, we denote as the i-th bit of Alice's number a. For every i, Alice does the following actions:

(i) For every bit she sets and to random bits.
(ii) If let l=0 otherwise l=1 and for every set to a random bit.
(iii) For set and to .
(iv) For every will be a random k-bit number and will be another number with k bits where all bits accept the last two are random and the last two are calculated in the following way:


where is the bitwise XOR operation.
(v) For l=1,2 set . Where leftrot(x,y) is rotating to the left x by y bits.

3. For every i, Bob transfers with the oblivious transfer protocol where and is the i-th bit of b.

4. Alice sends to Bob .

5. Bob calculates the bitwise XOR of all the numbers he got in step 3 and N from step 4. Bob scans the result from left to right until he gets a large sequence of zeros. Lets c be the bit to the right of that sequence (c is non zero). if the bit to the right of c equals 1 then . otherwise .

Proof

correctness:
Bob calculates the final result from and the result depends on . K and therefor c as well, can be split into 3 parts. The left part doesn't affect the result. The right part has all the important information and in the middle there is a sequence of zeros what separate those two parts. The length of each partition of c is linked to the security scheme.
For every i, only one of has non zero right part and it is if and otherwise. In addition, if and has a non zero right part then has also a non zero right part and the two leftmost bits of this right part will be the same as the one of . As a result, the right part of c is a function of the entries Bob transferred correspond to the unique bits in a and b and the only bits in the right part in c which are not random are the two leftmost, Exactly the bits which determines the result of where i is the highest order bit in which a and b differ. In the end, if then those two leftmost bits will be 11 and Bob will answer that . If the bits are 10 then and he will answer a<b. If a=b then there will be no right part in c and in this case the two leftmost bits in c will be 11 and will indicate the result.

security

The information Bob sends to Alice is secure because it is sent through oblivious transfer which is secure.

Bob gets 3 numbers from Alice:
(1). leftrot - for every i Bob receives one such number and is random so no secure information is transformed.
(2). N - This is a XOR of random numbers and therefor reveals no information. The relevant information is revealed only after calculating c.
(3). c - The same goes for c. The left part of c is random and the right part is random as well accept from the two leftmost bits. Deducing any information from those bits requires guessing some other values and the chance of guessing them correct is very low.

Complexity

The complexity of the protocol is O(d). Alice constructs d length number for each bit of a and Bob calculates XOR d times of d length numbers. The complexity of those operations is . The communication part takes also . Therefore the complexity of the protocol is

See also