Socialist millionaire problem explained

In cryptography, the socialist millionaire problem[1] is one in which two millionaires want to determine if their wealth is equal without disclosing any information about their riches to each other. It is a variant of the Millionaire's Problem[2] [3] whereby two millionaires wish to compare their riches to determine who has the most wealth without disclosing any information about their riches to each other.

It is often used as a cryptographic protocol that allows two parties to verify the identity of the remote party through the use of a shared secret, avoiding a man-in-the-middle attack without the inconvenience of manually comparing public key fingerprints through an outside channel. In effect, a relatively weak password/passphrase in natural language can be used.

Motivation

Alice and Bob have secret values

x

and

y

, respectively. Alice and Bob wish to learn if

x=y

without allowing either party to learn anything else about the other's secret value.

A passive attacker simply spying on the messages Alice and Bob exchange learns nothing about

x

and

y

, not even whether

x=y

.

Even if one of the parties is dishonest and deviates from the protocol, that person cannot learn anything more than if

x=y

.

An active attacker capable of arbitrarily interfering with Alice and Bob's communication (man-in-the-middle attack) cannot learn more than a passive attacker and cannot affect the outcome of the protocol other than to make it fail.

Therefore, the protocol can be used to authenticate whether two parties have the same secret information. Popular instant message cryptography package Off-the-Record Messaging uses the Socialist Millionaire protocol for authentication, in which the secrets

x

and

y

contain information about both parties' long-term authentication public keys as well as information entered by the users themselves.

Off-the-Record Messaging protocol

See main article: Off-the-Record Messaging.

The protocol is based on group theory.

p

and a generator

h

are agreed upon a priori, and in practice are generally fixed in a given implementation. For example, in the Off-the-Record Messaging protocol,

p

is a specific fixed 1,536-bit prime.

h

is then a generator of a prime-order subgroup of

(Z/pZ)*

, and all operations are performed modulo

p

, or in other words, in a subgroup of the multiplicative group,

(Z/pZ)*

.

By

\langleh|a,b\rangle

, denote the secure multiparty computation, Diffie–Hellman–Merkle key exchange, which, for the integers,

a

,

b

, returns

hab

to each party:

ha

and sends it to Bob, who then calculates

\left(ha\right)b\equivhab

.

hb

and sends it to Alice, who then calculates

\left(hb\right)a\equivhba

.

hab\equivhba

as multiplication in

(Z/pZ)*

is associative. Note that this procedure is insecure against man-in-the-middle attacks.

The socialist millionaire protocol[4] only has a few steps that are not part of the above procedure, and the security of each relies on the difficulty of the discrete logarithm problem, just as the above does. All sent values also include zero-knowledge proofs that they were generated according to protocol.

Part of the security also relies on random secrets. However, as written below, the protocol is vulnerable to poisoning if Alice or Bob chooses any of

a

,

b

,

\alpha

, or

\beta

to be zero. To solve this problem, each party must check during the Diffie-Hellman exchanges that none of the

ha

,

hb

,

h\alpha

, or

h\beta

that they receive is equal to 1. It is also necessary to check that

PaPb

and

QaQb

.
AliceMultipartyBob
1Message

x


Random

a,\alpha,r

Public

p,h

Message

y


Random

b,\beta,s

2Secure

g=\langleh

a, b\rangle
3Secure

\gamma=\langleh

\alpha, \beta\rangle
4Test

hb1

,

h\beta1

Test

ha1

,

h\alpha1

5

\begin{align} Pa&=\gammar\\ Qa&=hrgx \end{align}

\begin{align} Pb&=\gammas\\ Qb&=hsgy \end{align}

6Insecure exchange

Pa,Qa,Pb,Qb

7Secure

c=\left\langle\left.QaQ

-1
b

\right

\alpha, \beta \right\rangle
8Test

PaPb

,

QaQb

Test

PaPb

,

QaQb

9Test

c=Pa{P

-1
b}
Test

c=Pa{P

-1
b}

Note that:

\begin{align} Pa{P

-1
b}

&=\gammar\gamma-s=\gammar\\ &=h\alpha\beta(r\end{align}

and therefore

\begin{align} c&=\left(QaQ

-1
b

\right)\alpha\beta\\ &=\left(hrgxh-sg-y\right)\alpha\beta=\left(hrgx\right)\alpha\beta\\ &=\left(hrhab(x\right)\alpha\beta=h\alpha\beta(rh\alpha\beta\\ &=\left(Pa{P

-1
b}

\right)h\alpha\beta\end{align}

.

Because of the random values stored in secret by the other party, neither party can force

c

and

Pa{P

-1
b}
to be equal unless

x

equals

y

, in which case

h\alpha\beta=h0=1

. This proves correctness.

See also

External links

Notes and References

  1. . Proving without knowing: On oblivious, agnostic and blindfolded provers. . Advances in Cryptology – CRYPTO '96, volume 1109 of Lecture Notes in Computer Science . 186–200 . 1996 . Berlin . 10.1007/3-540-68697-5_15 . free .
  2. Andrew Yao. Protocols for secure communications. Proc. 23rd IEEE Symposium on Foundations of Computer Science (FOCS '82). 160–164. 1982. 10.1109/SFCS.1982.88.
  3. Andrew Yao. How to generate and exchange secrets. Proc. 27th IEEE Symposium on Foundations of Computer Science (FOCS '86). 162–167. 1986. 10.1109/SFCS.1986.25.
  4. Fabrice Boudot, Berry Schoenmakers, Jacques Traoré . A Fair and Efficient Solution to the Socialist Millionaires' Problem . Discrete Applied Mathematics . 111 . 1 . 23–36 . 2001 . 10.1016/S0166-218X(00)00342-5 .