EMV
EMV
EMV
EMV = Europay-Mastercard-Visa
standard for replacing mag-stripe with chip
interesting standard, as it is all public
www.emvco.com
100s of pages
originally for contact smartcard, but now also for RFIDs
EMV roll-out
first version of standard 1996
UK rollout Oct 2003-Feb 2006 (Chip and PIN)
www.chipandpin.co.uk
Why smartcards?
preventing skimming/cloning
also: shift in liability to customer
Does it work?
97
98
99
00
01
02
03
04
05
06
2007
card not
present
10
14
29
73
96
110
122
151
183
213
292
counterfeit
20
27
50
107
160
149
110
130
97
100
144*
lost/stolen
66
66
80
102
114
108
112
115
89
68
56
mail intercept
13
12
15
18
27
37
45
73
40
15
10
card ID theft
13
17
14
17
15
21
30
37
31
32
33
122
135
188
317
412
425
420
504
439
438
535
Total
[Source: apacs.org.uk]
6
Certificate
Core
General information
about the user and the
application
Users public key
Public Key
Hash of data
Hash Result
Public Key
Remainder
EMV formatting
Signature by a Trusted
Third Party
10
SDA
11
IC Terminal
Terminal:
IC Card
PKISS certified by
Certification Authority (CA)
CE
RT
IFIE
D
Card static
data
Signature
OK
12
Weakness of SDA
does not prevent replay attacks:
skimming still an option!
UK banks issue SDA cards, which has caused
criticisms
still, cloning SDA cards will be harder than magstripe
cards, esp. one that looks convincing
13
DDA
14
INTERNAL AUTHENTICATE
IC Terminal
IC Card
Terminal:
PKISS certified by
Certification Authority (CA)
CE
RT
IFIE
D
CE
RT
IFIE
D
Signature
OK
15
16
PIN encryption
encryption of PIN code in tamper-evident secure
keypad
card issuers don't want to trust the entire ATM,
but only the Hardware Security Module (HSM) and
this secure keypad
PIN encrypted with
card's public key PKIC
or card's PIN encipherment public key PKPE
17
Unpredictable Number
(UN)
VERIFY (includes
Encrypted PIN
Data)
Decrypt Encrypted
PIN Data, using
SKIC or SKPE and
validate UN and
PIN
19
Transaction Security
card's master key derived from issuer master key
by encrypting PAN and PAN sequence number
different issuers master keys for confidentiality
(encryption) and message/transaction integrity (MACs),
resulting in corresponding card's master keys
20
Inverted PAN +
PAN Sequence
Number
3-DES Encrypt
3-DES Encrypt
(Encrypt/Decrypt/Encrypt)
(Encrypt/Decrypt/Encrypt)
Issuer
Master Key
Issuer
Master Key
21
ATC 0F 00UN
3-DES Encrypt
3-DES Encrypt
(Encrypt/Decrypt/Encrypt)
(Encrypt/Decrypt/Encrypt)
IC Master
Key
IC Master
Key
SKAC(left half)
SKAC(right half)
22
Secure Messaging
Secure messaging is used between the Issuers
host system and the smart card,
eg to update card parameters, application unblock, or
change/unblock PIN
23
Encrypt
SK(L)
Block 2
Block 3
Encrypt
Encrypt
SK(L)
SK(L)
Decrypt
SK(R)
MAC calculated with a 3-DES session key
(derived from the ICC Master Key).
Algorithm defined in ANSI X9.19 and ISO
9797-1
SK(L) = Session Key (left half)
SK(R) = Session Key (right half)
Encrypt
SK(L)
AC
24
25
CVM codes
26
27
28
IBM 4758
29
attack:
take template = m ++ '00000000' , offset = |m|
now output is {m ++ K1}K2 = {m}K2 ++ ...
we have an encryption oracle for K2
we can now spoof messages to the EMV smartcard..
30
32