Analysis
of
a Fair Exchange Protocol
Vitaly Shmatikov John Mitchell
Stanford University
Agreement
in Hostile Environment
Contract
Signing
Immunity
deal
Fairness
If A cannot obtain a contract,
then B should not be able to
obtain a contract, either
(and vice versa)
Example (Alice buys a house from Bob)
If Alice cannot obtain a deed for the property,
Bob should not be able to collect Alice00 money
Accountability
If trusted party T misbehaves,
then honest party should be
able to prove T00 misbehavior
Example (Alice buys a house from Bob)
If escrow service gives Bob Alice00 money without
giving Alice the deed, Alice should be able to prove
to a judge that escrow service is cheating
Formal
Protocol Analysis
Intruder
Model
Analysis
Tool
Formal
Protocol
Informal
Protocol
Description
Gee whiz.
Looks OK
to me.
Murj [Dill et al.]
Success with research, industrial protocol verification
Optimistic
Contract Signing
A
B
m1 =
sigA (PKA, PKB, T, text, hash(RA))
m2 =
sigB (m1, hash(RB))
m3 =
RA
m4 =
RB
[Asokan, Shoup, Waidner]
m1, RA, m2, RB
Contract from normal executionContract issued by third party
Abort token issued by third party
Several
Forms of Contract
m1,
RA, m2, RB
sigT
(m1, m2)
sigT (abort, a1)
Role
of Trusted Third Party
Promise not to resolve the protocol in the future
T can issue a replacement contractProof that both parties are committed
T decides whether to abort or resolve on the first-come-first-serve basisT only gets involved if requested by A or B
Abort
Subprotocol
A
???
B
Network
T
a1=sigA(abort,m1)
a2
resolved?
Yes: a2 = sigT (m1, m2)
No: aborted := true
a2 = sigT
(abort, a1)
m1 = sigA
(00hash(RA))
sigT
(m1, m2)
sigT
(abort, a1)
OR
Resolve
Subprotocol
B
A
Net
T
r1
= m1, m2
aborted?
Yes: r2 = sigT (abort, a1)
No: resolved := true
r2 = sigT
(m1, m2)
r2
m1 = sigA
(00hash(RA))
m3
= RA
m2 = sigB
(00hash(RB))
sigT
(m1, m2)
sigT
(abort, a1)
OR
???
Race
Condition
B
A
m1 =
sigA (PKA, PKB, T, text, hash(RB))
m2 =
sigB (m1, hash(RB))
T
a1
= sigA (abort, m1)
r1 = m1, m2
Attack
A
r2
= sigT (m1, m2)
m1 =
sigA (... hash(RA))
m2 =
sigB (m1, hash(RB))
m3 =
RA
T
r1 = m1,
m2
secret QB,
m2
sigT
(m1, m2)
m1,
RA, m2, QB
contracts are
inconsistent!
Later ...
sigA
(PKA, PKA, T, text,
hash(RA))
B
Replay
Attack
Intruder causes B
to commit to old
contract
with A
sigB
(m1, hash(QB))
RA
QB
A
B
RA
sigA
(00hash(RA))
RB
sigB (... hash(RB))
sigA
( ,
hash(RB))
Repairing
the Protocol
A
B
m1 =
sigA (PKA, PKB, T, text, hash(RA))
m2 =
sigB (m1, hash(RB))
m3 =
RA
m4 =
RB
m1, RA, m2, RB
Another
Property: Abuse-Freeness
No party should be able to prove
that it can solely determine
the outcome of the protocol
Example (Alice buys a house from Bob)
Bob should not be able to show Alice00 offer to
Cynthia so that he can convince Cynthia to pay more
Conclusions
