Defeating Relay Attacks in NFC Payments Serge Vaudenay COLE - - PowerPoint PPT Presentation

defeating relay attacks in nfc payments
SMART_READER_LITE
LIVE PREVIEW

Defeating Relay Attacks in NFC Payments Serge Vaudenay COLE - - PowerPoint PPT Presentation

Defeating Relay Attacks in NFC Payments Serge Vaudenay COLE POLYTECHNIQUE FDRALE DE LAUSANNE http://lasec.epfl.ch/ SV 2014 distance-bounding SDTA 14 1 / 42 Relay Attacks 1 Distance-Bounding Protocols 2 3 Asymmetric DB Protocols


slide-1
SLIDE 1

Defeating Relay Attacks in NFC Payments

Serge Vaudenay

ÉCOLE POLYTECHNIQUE FÉDÉRALE DE LAUSANNE

http://lasec.epfl.ch/

SV 2014 distance-bounding SDTA 14 1 / 42

slide-2
SLIDE 2

1

Relay Attacks

2

Distance-Bounding Protocols

3

Asymmetric DB Protocols

SV 2014 distance-bounding SDTA 14 2 / 42

slide-3
SLIDE 3

1

Relay Attacks

2

Distance-Bounding Protocols

3

Asymmetric DB Protocols

SV 2014 distance-bounding SDTA 14 3 / 42

slide-4
SLIDE 4

Playing against two Chess Grandmasters

✛ ✲

SV 2014 distance-bounding SDTA 14 4 / 42

slide-5
SLIDE 5

Relay Attacks

honest prover honest verifier adversary ✲ a ✲ a ✲ a ✛b ✛ b ✛b ✲ c ✲ c ✲ c

SV 2014 distance-bounding SDTA 14 5 / 42

slide-6
SLIDE 6

A Nice Playground for Relay Attacks

SV 2014 distance-bounding SDTA 14 6 / 42

slide-7
SLIDE 7

NFC Payment Systems

✲ ✛ ✲ ✛

1

now widely spread

2

payment device: creditcard or smartphone

3

(creditcard) no action by the holder on the creditcard

4

for small amounts: no action by the holder on the terminal

5

larger amounts may need a PIN

SV 2014 distance-bounding SDTA 14 7 / 42

slide-8
SLIDE 8

Using Round-Trip Time

Identification Tokens, or: Solving the Chess Grandmaster Problem [Beth-Desmedt CRYPTO 1990]

basic idea: use time to detect relay attacks assume that relaying a message takes time > 0 use exact time measurement

SV 2014 distance-bounding SDTA 14 8 / 42

slide-9
SLIDE 9

The Speed of Light

10ns = round-trip of 2× 1.5m

SV 2014 distance-bounding SDTA 14 9 / 42

slide-10
SLIDE 10

1

Relay Attacks

2

Distance-Bounding Protocols

3

Asymmetric DB Protocols

SV 2014 distance-bounding SDTA 14 10 / 42

slide-11
SLIDE 11

The Brands-Chaum Protocol

Distance-Bounding Protocols [Brands-Chaum EUROCRYPT 1993]

Verifier Prover secret key: x public key: y initialization phase

Commit(m)

← − − − − − − − − − − − −

pick m distance bounding phase for i = 1 to n pick ci start timeri

ci

− − − − − − − − − − − − →

stop timeri

ri

← − − − − − − − − − − − −

ri = mi ⊕ ci check timers termination phase check responses

  • pen commitment

← − − − − − − − − − − − −

check signature

Signx (c,r)

← − − − − − − − − − − − −

OutV

− − − − − − − − − − − − →

SV 2014 distance-bounding SDTA 14 11 / 42

slide-12
SLIDE 12

The Implementation Challenge

to answer ri on challenge ci should take a few nanoseconds almost no time to do computation no time to receive several bits (period in microseconds) nearly no time to digitize an analog signal we need an ad-hoc chip for transmission and computation

SV 2014 distance-bounding SDTA 14 12 / 42

slide-13
SLIDE 13

Distance Fraud

P∗ ←

→ V

  • far away

a malicious prover P∗ tries to prove that he is close to a verifier V

SV 2014 distance-bounding SDTA 14 13 / 42

slide-14
SLIDE 14

Why Distance Fraud?

for some applications, a malicious prover could be a threat cars want to have the key holder inside the car doors do not want to open for someone who is not here payment booths want remote payment to be impossible

SV 2014 distance-bounding SDTA 14 14 / 42

slide-15
SLIDE 15

Distance Hijacking

Distance Hijacking Attacks on Distance Bounding Protocols [Cremers-Rasmussen-Schmidt- ˇ Capkun IEEE S&P 2012]

P∗ ←

→ P′ ← → V

  • far away

a malicious prover P∗ tries to prove that he is close to a verifier V by taking advantage of other provers P′

SV 2014 distance-bounding SDTA 14 15 / 42

slide-16
SLIDE 16

Mafia Fraud

Major Security Problems with the “Unforgeable” (Feige)-Fiat-Shamir Proofs of Identity and How to Overcome Them [Desmedt SECURICOM 1988]

P ←

→ A ← → V

  • far away

an adversary A tries to prove that a prover P is close to a verifier V

SV 2014 distance-bounding SDTA 14 16 / 42

slide-17
SLIDE 17

Impersonation Fraud

An Efficient Distance Bounding RFID Authentication Protocol [Avoine-Tchamkerten ISC 2009]

A ←

→ V

an adversary A tries to prove that a prover P is close to a verifier V

SV 2014 distance-bounding SDTA 14 17 / 42

slide-18
SLIDE 18

Terrorist Fraud

Major Security Problems with the “Unforgeable” (Feige)-Fiat-Shamir Proofs of Identity and How to Overcome Them [Desmedt SECURICOM 1988]

P∗ ←

→ A ← → V

  • far away

a malicious prover P∗ helps an adversary A to prove that P∗ is close to a verifier V without giving A another advantage

SV 2014 distance-bounding SDTA 14 18 / 42

slide-19
SLIDE 19

The Easy Way to Defeat Terrorist Fraud

Identification Tokens, or: Solving the Chess Grandmaster Problem [Beth-Desmedt CRYPTO 1990]

embed provers in tamper-resistant devices

= assume that provers are honest!

SV 2014 distance-bounding SDTA 14 19 / 42

slide-20
SLIDE 20

DB Protocols

without post-authentication Hancke-Kuhn DBENC TDB SKI with post-authentication Swiss-Knife Fischlin-Onete DB1-DB2-DB3 asymmetric Brands-Chaum DBPK-Log ProProx privDB

SV 2014 distance-bounding SDTA 14 20 / 42

slide-21
SLIDE 21

DB Design Issues

some have no security proofs

→ some are broken

some have “semi-formal” security proofs

→ some have instances which could be broken

some have wrong security proofs

→ some are broken

SV 2014 distance-bounding SDTA 14 21 / 42

slide-22
SLIDE 22

Known Protocols and Security Results (Without Noise)

success probability of best known attacks (θ < 1 s.t. 2−θn = negl)

Protocol Success Probability DF MF TF

Brands & Chaum

(1/2)n (1/2)n

1

Bussard & Bagga 1

(1/2)n

1

ˇ Capkun et al.

(1/2)n (1/2)n

1

Hancke & Kuhn

(3/4)n to 1 (3/4)n

1

Reid et al.

(3/4)n to 1

1

(3/4)θn †

Singel´ ee & Preneel

(1/2)n (1/2)n

1

Tu & Piramuthu

(3/4)n

1

(3/4)θn †

Munilla & Peinado

(3/4)n (3/5)n

1

  • Swiss-Knife

(3/4)n (1/2)n to 1 (3/4)θn †

Kim & Avoine

(7/8)n (1/2)n

1

  • Avoine et al.

(3/4)n to 1 (2/3)n to 1 (5/6)θn

  • SKI

(3/4)n (2/3)n (5/6)θn

  • Fischlin & Onete

(3/4)n (3/4)n γ = γ′

  • DB1

(1/3)n (1/3)n (2/3)θn

  • DB2

(1/ √

2)n

(1/2)n (1/ √

2)θn

SV 2014 distance-bounding SDTA 14 22 / 42

slide-23
SLIDE 23

Known Protocols and Security Results (Noise-Tolerant)

success probability of best known attacks

Protocol Success Probability DF MF TF

Brands & Chaum tl(n,τ,1/2) tl(n,τ,1/2) 1

Bussard & Bagga 1 tl(n,τ,1/2) 1

ˇ Capkun et al. tl(n,τ,1/2) tl(n,τ,1/2) 1

Hancke & Kuhn tl(n,τ,3/4) to 1 tl(n,τ,3/4) 1

Reid et al. tl(n,τ,3/4) to 1 1 1

Singel´ ee & Preneel tl(n,τ,1/2) tl(n,τ,1/2) 1

Tu & Piramuthu tl(n,τ,3/4) 1 1

Munilla & Peinado tl(n,τ,3/4) tl(n,τ,3/5) 1

Swiss-Knife tl(n,τ,3/4) tl(n,τ,1/2) to 1 1

Kim & Avoine tl(n,τ,7/8) tl(n,τ,1/2) 1

Avoine et al. tl(n,τ,3/4) to 1 tl(n,τ,2/3) to 1 1

  • SKI

tl(n,τ,3/4) tl(n,τ,2/3) tl(n,τ,5/6)

  • Fischlin & Onete

tl(n,τ,3/4) tl(n,τ,3/4)

γ = γ′

  • DB1

tl(n,τ,1/3) tl(n,τ,1/3) tl(n,τ,2/3)

  • DB2

tl( n

2,τ− n 2,1/2)

tl(n,τ,1/2) tl( n

2,τ− n 2,1/2) SV 2014 distance-bounding SDTA 14 23 / 42

slide-24
SLIDE 24

The SKI Protocol

Serge Katerina Ioana

SV 2014 distance-bounding SDTA 14 24 / 42

slide-25
SLIDE 25

The Survivors

SKI non-binary challenges Fischlin-Onete different TF-resistance model DB1 and DB2 (combine both)

  • ptimized

SV 2014 distance-bounding SDTA 14 25 / 42

slide-26
SLIDE 26

Bitlength-Equiv Security / #Rounds

DF

10 20 30 40 50 60 70 80 20 40 60 80 100 120 140

SKI and FO DB1 q = 3 DB1 q = 4 DB2 DB3

MF

10 20 30 40 50 60 70 80 20 40 60 80 100 120 140

SKI FO DB1 q = 3 DB1 q = 4 DB2 and DB3

TF

5 10 15 20 25 20 40 60 80 100 120 140

SKI DB1 q = 3 DB1 q = 4 DB2

SV 2014 distance-bounding SDTA 14 26 / 42

slide-27
SLIDE 27

DB2 (Noiseless Variant)

Verifier (b fixed of weight n

2 )

Prover secret: x secret: x initialization phase pick µ ∈ Zs

2,NV ∈ {0,1}ℓnonce NP

← − − − − − − − − − − − − −

pick NP ∈ {0,1}ℓnonce a = fx(NP,NV ,µ)

NV ,µ

− − − − − − − − − − − − − →

a = fx(NP,NV ,µ) x′ = µ· x x′ = µ· x distance bounding phase for i = 1 to n pick ci ∈ {0,1} start timeri

ci

− − − − − − − − − − − − − →

receive c′

i

receive ri, stop timeri

r′

i

← − − − − − − − − − − − − −

r′

i = ai ⊕ c′ i (x′ ⊕ bi)

verification phase receive c′′

c′,tag

← − − − − − − − − − − − − −

tag = fx(NP,NV ,µ,c′) check tag = fx(NP,NV ,µ,c′′), ci = c′′

i , ri, and timeri correct OutV

− − − − − − − − − − − − − →

SV 2014 distance-bounding SDTA 14 27 / 42

slide-28
SLIDE 28

Best Distance Fraud Against DB2

Verifier (b fixed of weight n

2 )

Prover secret: x secret: x initialization phase pick µ ∈ Zs

2,NV ∈ {0,1}ℓnonce NP

← − − − − − − − − − − − − −

pick NP ∈ {0,1}ℓnonce a = fx(NP,NV ,µ)

NV ,µ

− − − − − − − − − − − − − →

a = fx(NP,NV ,µ) x′ = µ· x x′ = µ· x distance bounding phase for i = 1 to n pick ci ∈ {0,1} ci ri r′

i = ai ⊕ random·(x′ ⊕ bi)

. . .

it is correct for sure for n

2 rounds (for all others, probability is 1 2)

Pr[pass] =

(

1 2

) n

2 SV 2014 distance-bounding SDTA 14 28 / 42

slide-29
SLIDE 29

Best Mafia Fraud Against DB2

Verifier Adversary Prover secret: x secret: x initialization phase

NP

← − − − − − − − − − − − −

NP

← − − − − − − − − − − − −

NV ,µ

− − − − − − − − − − − − →

NV ,µ

− − − − − − − − − − − − →

distance bounding phase for i = 1 to n pick c∗

i c∗

i

− − − − − − − − − − − − →

ci

− − − − − − − − − − − − →

r∗

i

← − − − − − − − − − − − −

ri

← − − − − − − − − − − − −

ri = r∗

i

. . .

Pr[pass] =

(

1 2

)n

SV 2014 distance-bounding SDTA 14 29 / 42

slide-30
SLIDE 30

Best Terrorist Fraud Against DB2

Verifier Adversary Malicious Prover secret: x secret: x initialization phase

NP

← − − − − − − − − − − − −

NP

← − − − − − − − − − − − −

NV ,µ

− − − − − − − − − − − − →

NV ,µ

− − − − − − − − − − − − →

table ci→r∗

i

← − − − − − − − − − − − −

distance bounding phase for i = 1 to n

ci

− − − − − − − − − − − − →

(for half of the i, (ci → r∗

i ) = (ci → ri) r∗

i

← − − − − − − − − − − − −

  • therwise, one entry is different)

. . .

Pr[pass] =

(

1 2

) n

2 SV 2014 distance-bounding SDTA 14 30 / 42

slide-31
SLIDE 31

1

Relay Attacks

2

Distance-Bounding Protocols

3

Asymmetric DB Protocols

SV 2014 distance-bounding SDTA 14 31 / 42

slide-32
SLIDE 32

The Problem

the prover does not want to share his secret with the verifier could have a public key (and a certificate from the issuing authority) nice for payment systems may also need privacy

SV 2014 distance-bounding SDTA 14 32 / 42

slide-33
SLIDE 33

State of Affair

protocol MF DF DH TF Privacy Strong p. Brands-Chaum

  • DBPK-Log

!! !!

  • HPO
  • GOR
  • !!

!! ProProx

  • VSSDB
  • privDB
  • SV 2014

distance-bounding SDTA 14 33 / 42

slide-34
SLIDE 34

ProProx (Noiseless Variant)

Verifier y = ComH(x) Prover public: y

(yj = Com(xj;H(x,j)))

secret: x initialization phase for j = 1 to s in parallel (b: a vector of weight n

2 )

pick ai,j,ρi,j, i = 1,...,n

A1,j,...,An,j

← − − − − − − − − − − − − − − − − − − −

Ai,j = Com(ai,j;ρi,j) challenge phase for i = 1 to n and j = 1 to s pick ci,j ∈ Z2 start timeri,j

ci,j

− − − − − − − − − − − − − − − − − − − →

receive c′

i,j

receive ri,j, stop timeri,j

r′

i,j

← − − − − − − − − − − − − − − − − − − −

r′

i,j = ai,j + c′ i,jbi + c′ i,jxj

verification phase check timeri,j ≤ 2B zi,j = Ai,j

( θbi yj )ci,j θ−ri,j

ZKPκ(zi,j:ζi,j;i,j)

← − − − − − − − − − − − − − − − − − − → ζi,j = ρi,jH(x,j)c′

i,j

OutV

− − − − − − − − − − − − − − − − − − − →

SV 2014 distance-bounding SDTA 14 34 / 42

slide-35
SLIDE 35

ProProx (Variant with n = 1)

Verifier y = ComH(x) Prover public: y

(yj = Com(xj;H(x,j)))

secret: x initialization phase pick aj,ρj, j = 1,...,s

A1,...,As

← − − − − − − − − − − − − − − − − − − −

Aj = Com(aj;ρj) pick b ∈ Zs

2 b

− − − − − − − − − − − − − − − − − − − →

challenge phase for j = 1 to s pick cj ∈ Z2 start timerj

cj

− − − − − − − − − − − − − − − − − − − →

receive c′

j

receive rj, stop timerj

r′

j

← − − − − − − − − − − − − − − − − − − −

r′

j = aj + c′ j bj + c′ j xj

verification phase check timerj ≤ 2B zj = Aj

( θbj yj )cj θ−rj

ZKPκ(zj:ζj;j)

← − − − − − − − − − − − − − − − − − − → ζj = ρjH(x,j)c′

j

OutV

− − − − − − − − − − − − − − − − − − − →

SV 2014 distance-bounding SDTA 14 35 / 42

slide-36
SLIDE 36

Security of ProProx

Theorem If Com is a perfectly binding, computationally hiding, and homomorphic bit commitment, ComH is one-way, ZKPκ is a complete κ-sound computationally zero-knowledge proof of membership for κ = negl(λ), then the protocol is a sound and secure PoPoK. Furthermore, the protocol resists to distance frauds.

SV 2014 distance-bounding SDTA 14 36 / 42

slide-37
SLIDE 37

Parameters

bound s pDF pSec pSound proven 80 2−22 2−12 2−11 empirical 80 2−22 2−80 2−80 proven bounds pDF

= (

3 4

)s +κ

pSec

= (

1 2

)⌊s/log2 s⌋ +κ+ negl

pSound

=

2

(

1 2

)⌊s/log2 s⌋ + 2κ

proven bounds pDF

= (

3 4

)s

pSec

= (

1 2

)s

pSound

= (

1 2

)s

SV 2014 distance-bounding SDTA 14 37 / 42

slide-38
SLIDE 38

privDB

Verifier Prover secret key: skV secret key: skP public key: pkV public key: pkP pick N

N

− − − − − − − − − − − − − →

pick s, σ = SignskP (N) s∥pk∥N∥σ = DecskV (e)

e

← − − − − − − − − − − − − −

e = EncpkV (s∥pkP∥N∥σ) check N, Verifypk(σ,N), Validate(pk)

symDB(s)

← − − − − − − − − − − − →

OutV

− − − − − − − − − − − − − →

private output: pk

requires encryption and signature (EMV cards could do that)

SV 2014 distance-bounding SDTA 14 38 / 42

slide-39
SLIDE 39

privDB with OTDB

Verifier Prover secret key: skV secret key: skP public key: pkV public key: pkP pick N

N

− − − − − − − − − − − − − →

pick s, σ = SignskP (N) s∥pk∥N∥σ = DecskV (e)

e

← − − − − − − − − − − − − −

e = EncpkV (s∥pkP∥N∥σ) check N, Verifypk(σ,N), Validate(pk) pick m ∈ {0,1}2n

m

− − − − − − − − − − − − − →

a = s ⊕ m a = s ⊕ m challenge phase for i = 1 to n pick ci ∈ {0,1} start timeri

ci

− − − − − − − − − − − − − →

stop timeri

ri

← − − − − − − − − − − − − −

ri = a2i+ci−1 verification phase check timeri ≤ 2B, ri = a2i+ci−1

OutV

− − − − − − − − − − − − − →

private output: pk

SV 2014 distance-bounding SDTA 14 39 / 42

slide-40
SLIDE 40

OTDB (One-Time Distance Bounding)

Verifier Prover secret: s secret: s pick m ∈ {0,1}2n

m

− − − − − − − − − − − − − →

a = s ⊕ m a = s ⊕ m challenge phase for i = 1 to n pick ci ∈ {0,1} start timeri

ci

− − − − − − − − − − − − − →

stop timeri

ri

← − − − − − − − − − − − − −

ri = a2i+ci−1 verification phase check timeri ≤ 2B, ri = a2i+ci−1

OutV

− − − − − − − − − − − − − →

could use n = 49 (for 2−20 security) or n = 25 (for 2−10 security)

SV 2014 distance-bounding SDTA 14 40 / 42

slide-41
SLIDE 41

Security of privDB with OTDB

Theorem If the signature is UF-CMA-secure and the cryptosystem is IND-CCA-secure, then the protocol is

1

DF-secure

2

MF-secure

3

DH-secure

4

wide-strong private in the HPVP model

SV 2014 distance-bounding SDTA 14 41 / 42

slide-42
SLIDE 42

Conclusion

good models for DB protocols many weak protocols around more confidence in recent symmetric DB, optimal new asymmetric DB protocols appearing could defeat relay attacks in payment systems

SV 2014 distance-bounding SDTA 14 42 / 42